@font-face {
  font-family: "Prosto Parser Manrope";
  src: url("/fonts/manrope-400.ttf?v=20260618-fonts-1") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}


@font-face {
  font-family: "Prosto Parser Manrope";
  src: url("/fonts/manrope-600.ttf?v=20260618-fonts-1") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 600;
}

:root {
  color-scheme: light;

  --shell-bg: #f3f4f6;
  --shell-sidebar-bg: #f3f4f6;
  --shell-window-bg: #ffffff;
  --shell-border: #d9dde3;
  --shell-border-soft: #e6e8ec;

  --shell-text: #18181b;
  --shell-text-muted: #6b7280;
  --shell-text-faint: #9ca3af;

  --shell-accent: #ef1d25;
  --shell-accent-hover: #dc151c;
  --shell-accent-soft: #fff1f1;

  --warning: #c2410c;
  --warning-soft: #fff7ed;
  --danger-soft: #fff1e8;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --success: #118444;
  --success-soft: #f0fdf4;

  --sidebar-width: clamp(360px, 23vw, 420px);
  --sidebar-pad-x: clamp(24px, 1.5vw, 30px);
  --shell-gutter: 6px;
  --window-radius: 22px;
  --control-radius: 9px;
  --card-radius: 12px;
  --font-ui: "Prosto Parser Manrope", Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--shell-bg);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--shell-bg);
  color: var(--shell-text);
  font-family: var(--font-ui);
  font-size: 14px;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}

button,
input,
select,
textarea {
  font-synthesis: none;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  overscroll-behavior-x: none;
}

::selection {
  background: var(--shell-accent);
  color: #ffffff;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  background: var(--shell-bg);
}

.query-panel {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: var(--shell-sidebar-bg);
  color: var(--shell-text);
}

.workspace {
  position: relative;
  isolation: isolate;
  display: flex;
  min-width: 0;
  min-height: calc(100vh - (var(--shell-gutter) * 2));
  flex-direction: column;
  margin: var(--shell-gutter) var(--shell-gutter) var(--shell-gutter) 0;
  overflow: hidden;
  border: 1px solid rgba(217, 221, 227, 0.82);
  border-radius: var(--window-radius);
  background: var(--shell-window-bg);
}

.workspace::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}

.brand-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding: 24px var(--sidebar-pad-x) 18px;
}

.brand-lockup {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--shell-text);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-kicker,
.eyebrow {
  margin: 0;
  color: var(--shell-text-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--shell-text);
  text-wrap: balance;
}

h1 {
  margin-top: 2px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.14;
}

.brand-subtitle {
  margin: 4px 0 0;
  color: var(--shell-text-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.health-pill {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--shell-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--shell-text-muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.search-form {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  overflow-y: auto;
  padding: 0 var(--sidebar-pad-x);
}

.form-section {
  padding: 18px 0;
}

.form-section + .form-section,
.form-section + fieldset,
fieldset + .form-section {
  border-top: 1px solid var(--shell-border);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.form-section h2,
.form-section legend {
  color: var(--shell-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.section-note {
  color: var(--shell-text-faint);
  font-size: 12px;
  font-weight: 500;
}

fieldset {
  margin: 0;
  border: 0;
}

label,
fieldset {
  min-width: 0;
}

label > span:not(.source-copy):not(.source-check),
.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--shell-text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--shell-border);
  border-radius: var(--control-radius);
  background: #ffffff;
  color: var(--shell-text);
  padding: 0 12px;
  outline: none;
  font-size: 14px;
  font-weight: 450;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

select {
  appearance: none;
  background-image: none;
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-repeat: no-repeat;
  background-size:
    5px 5px,
    5px 5px;
  padding-right: 34px;
}

input::placeholder {
  color: var(--shell-text-faint);
}

input:hover,
select:hover {
  border-color: #c8cfd8;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  border-color: var(--shell-text);
  outline: none;
}

.field-grid,
.criteria-band,
.preset-row,
.source-list,
.toggle-grid {
  display: grid;
  gap: 10px;
}

.field-grid,
.criteria-band {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mode-control {
  display: block;
  margin-bottom: 14px;
}

.mode-control + .mode-control {
  margin-top: 2px;
}

.mode-label {
  display: block;
  margin-bottom: 8px;
  color: var(--shell-text-faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.parser-switch,
.geo-switch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 22px;
  width: 100%;
}

.parser-switch label,
.geo-switch label {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  color: var(--shell-text-muted);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.1;
}

.parser-switch input,
.geo-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.parser-switch span,
.geo-switch span {
  border-bottom: 1px solid transparent;
  padding-bottom: 5px;
  transition:
    border-color 150ms ease,
    color 150ms ease;
}

.parser-switch label:hover span,
.parser-switch input:checked + span,
.geo-switch label:hover span,
.geo-switch input:checked + span {
  border-color: var(--shell-accent);
  color: var(--shell-text);
}

.geo-readonly {
  min-height: 58px;
  border-bottom: 1px solid var(--shell-line);
  color: var(--shell-text);
  padding: 0 0 9px;
}

.geo-readonly span,
.field-label {
  display: block;
}

.geo-readonly strong {
  display: block;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.25;
}

.rating-filter {
  grid-column: 1 / -1;
}

.rating-options {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 16px;
  margin-top: 2px;
}

.rating-options label {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #6b7280;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
}

.rating-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.rating-options span {
  display: inline-flex;
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition:
    border-color 150ms ease,
    color 150ms ease;
}

.rating-options label:hover span,
.rating-options input:checked + span {
  border-color: var(--shell-accent);
  color: var(--shell-text);
}

.preset-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.preset-chip {
  min-height: 34px;
  border: 1px solid var(--shell-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--shell-text-muted);
  cursor: pointer;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 550;
  line-height: 1;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease;
}

.preset-chip:hover {
  border-color: #c8cfd8;
  background: #ffffff;
  color: var(--shell-text);
}

.preset-chip.is-active {
  border-color: var(--shell-text);
  background: #ffffff;
  color: var(--shell-text);
}

.source-list {
  grid-template-columns: 1fr;
}

.source-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 70px;
  border: 1px solid var(--shell-border);
  border-radius: var(--card-radius);
  background: rgba(255, 255, 255, 0.56);
  cursor: pointer;
  padding: 13px;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    opacity 150ms ease,
    transform 150ms ease;
}

.source-option:hover {
  border-color: #c8cfd8;
  background: #ffffff;
}

.source-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.source-check {
  display: grid;
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 1px solid #c8cfd8;
  border-radius: 6px;
  background: #ffffff;
  color: transparent;
  font-size: 11px;
  font-weight: 600;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease;
}

.source-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 4px;
}

.source-copy strong {
  color: var(--shell-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.source-copy > span {
  color: var(--shell-text-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.source-option small {
  justify-self: start;
  margin-top: 1px;
  border: 1px solid var(--shell-border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--shell-text-muted);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.source-option small.blocked {
  border-color: #fed7aa;
  background: var(--danger-soft);
  color: var(--warning);
}

.source-option:has(input:checked) {
  border-color: #c8cfd8;
  background: #ffffff;
}

.source-option:has(input:checked) .source-check {
  border-color: var(--shell-accent);
  background: var(--shell-accent);
  color: #ffffff;
}

.source-option:has(input:checked) small:not(.blocked) {
  border-color: var(--shell-border);
  color: var(--shell-text-muted);
}

.source-option.is-unavailable {
  opacity: 0.68;
}

.toggle-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.toggle-grid label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  min-height: 32px;
  color: var(--shell-text-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.12;
}

.toggle-grid label span {
  display: block;
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: 0;
  line-height: inherit;
  transform: translateY(3px);
  text-transform: none;
}

.toggle-grid input[type="checkbox"] {
  display: grid;
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 0;
  place-content: center;
  align-self: center;
  appearance: none;
  border: 1.5px solid #8b8f96;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.toggle-grid input[type="checkbox"]::after {
  content: "";
  width: 5px;
  height: 9px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  opacity: 0;
  transform: translateY(-1px) rotate(45deg);
}

.toggle-grid input[type="checkbox"]:checked {
  border-color: var(--shell-accent);
  background: var(--shell-accent);
}

.toggle-grid input[type="checkbox"]:checked::after {
  opacity: 1;
}

.form-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: auto;
  border-top: 1px solid var(--shell-border);
  background: var(--shell-sidebar-bg);
  padding: 16px 0 22px;
}

.run-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--shell-text-muted);
  font-size: 13px;
  font-weight: 500;
}

.run-summary strong {
  display: inline-flex;
  min-width: 28px;
  justify-content: center;
  border: 1px solid var(--shell-border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--shell-text);
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.primary-action,
.small-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: var(--shell-accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 600;
  transition:
    background 150ms ease,
    opacity 150ms ease,
    transform 150ms ease;
}

.primary-action {
  width: 100%;
  height: 44px;
  border-radius: var(--control-radius);
  font-size: 14px;
}

.small-primary-action {
  height: 40px;
  border-radius: var(--control-radius);
  padding: 0 14px;
  font-size: 14px;
}

.primary-action:hover,
.small-primary-action:hover {
  background: var(--shell-accent-hover);
}

.primary-action:active,
.small-primary-action:active {
  transform: translateY(1px);
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.submit-loader {
  display: none;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: currentColor;
  transform-origin: center;
}

.submit-loader svg {
  display: block;
  width: 16px;
  height: 16px;
}

button.is-loading .submit-loader {
  display: inline-flex;
  animation: submit-loader-spin 780ms linear infinite;
}

button.is-loading .action-arrow {
  display: none;
}

@keyframes submit-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

.action-arrow {
  font-size: 15px;
  line-height: 1;
}

.mobile-launch-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.workspace-head {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--shell-border-soft);
}

.workspace-title {
  min-width: 0;
}

.workspace-head h2 {
  max-width: 780px;
  margin-top: 3px;
  color: #111827;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.04;
}

.result-subtitle {
  margin: 9px 0 0;
  color: #4b5563;
  font-size: 14px;
  font-weight: 450;
  line-height: 1.5;
}

.export-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.workspace-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 16px;
}

.secondary-action,
.status-pill,
.log-row,
.contact-pill {
  border-radius: 999px;
  font-weight: 600;
  line-height: 1;
}

.secondary-action {
  display: inline-flex;
  min-width: 64px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--shell-border);
  background: #ffffff;
  color: #4b5563;
  padding: 0 16px;
  font-size: 13px;
  text-decoration: none;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease,
    opacity 150ms ease;
}

.secondary-action:hover {
  border-color: #c8cfd8;
  background: #f9fafb;
  color: var(--shell-text);
}

.secondary-action.disabled {
  pointer-events: none;
  opacity: 0.48;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--shell-border-soft);
}

.metric-card {
  min-width: 0;
  border-right: 1px solid var(--shell-border-soft);
  background: #ffffff;
  padding: 17px 20px;
}

.metric-card:last-child {
  border-right: 0;
}

.metric-label {
  display: block;
  margin-bottom: 10px;
  color: var(--shell-text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

.metric-card strong:not(.status-pill) {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#lead-count {
  color: var(--shell-accent);
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid var(--shell-border);
  background: #f9fafb;
  color: #4b5563;
  padding: 7px 10px;
  font-size: 13px;
}

.status-pill[data-status="running"] {
  border-color: #fed7aa;
  background: var(--warning-soft);
  color: var(--warning);
}

.status-pill[data-status="done"] {
  border-color: #d1d5db;
  background: #111827;
  color: #ffffff;
}

.status-pill[data-status="error"] {
  border-color: #fed7aa;
  background: var(--danger-soft);
  color: var(--warning);
}

.progress-shell {
  padding: 16px 20px 0;
}

.progress-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  border: 1px solid var(--shell-border-soft);
  border-radius: var(--card-radius);
  background: #f9fafb;
  padding: 15px;
}

.progress-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.progress-copy strong {
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.progress-copy span {
  color: #4b5563;
  font-size: 14px;
  line-height: 1.5;
}

.progress-log {
  display: flex;
  max-width: min(520px, 38vw);
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.log-row {
  display: inline-flex;
  max-width: 240px;
  overflow: hidden;
  border: 1px solid var(--shell-border-soft);
  background: #ffffff;
  color: #4b5563;
  padding: 7px 10px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-row-error {
  border-color: #fed7aa;
  background: var(--danger-soft);
  color: var(--warning);
}

.progress-track {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.progress-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--shell-accent);
  transition: width 220ms ease;
}

body[data-job-status="idle"] .progress-track {
  display: none;
}

body[data-job-status="running"] .progress-bar {
  animation: progress-pulse 1.4s ease-in-out infinite;
}

body[data-job-status="error"] .progress-card {
  border-color: #fed7aa;
  background: var(--danger-soft);
}

@keyframes progress-pulse {
  0%,
  100% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
}

.results-card {
  min-height: 0;
  flex: 1;
  margin: 16px 20px 20px;
  overflow: hidden;
  border: 1px solid var(--shell-border-soft);
  border-radius: var(--card-radius);
  background: #ffffff;
}

.table-wrap {
  width: 100%;
  height: 100%;
  overflow: auto;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}

table:has(.empty-row) {
  min-width: 100%;
  table-layout: fixed;
}

table:has(.empty-row) thead {
  display: none;
}

thead {
  background: #f9fafb;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 42px;
  border-bottom: 1px solid var(--shell-border-soft);
  background: #f9fafb;
  color: var(--shell-text-muted);
  padding: 0 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

td {
  min-height: 54px;
  border-bottom: 1px solid var(--shell-border-soft);
  background: #ffffff;
  color: var(--shell-text);
  padding: 13px 16px;
  font-size: 14px;
  vertical-align: middle;
}

tbody tr:hover td {
  background: #fafafa;
}

th:first-child,
td:first-child {
  width: 108px;
}

th:nth-child(2),
td:nth-child(2) {
  min-width: 300px;
}

th:nth-child(3),
td:nth-child(3),
th:nth-child(4),
td:nth-child(4) {
  width: 116px;
}

th:nth-child(5),
td:nth-child(5) {
  width: 230px;
}

table:has(.empty-row) th,
table:has(.empty-row) td {
  width: auto;
  min-width: 0;
}

.lead-name {
  display: block;
  margin-bottom: 5px;
  color: #111827;
  font-weight: 600;
  line-height: 1.3;
}

.lead-meta {
  color: var(--shell-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.reviews-cell {
  font-variant-numeric: tabular-nums;
}

.lead-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.contact-pill {
  display: inline-flex;
  max-width: 210px;
  overflow: hidden;
  border: 1px solid var(--shell-border-soft);
  background: #f9fafb;
  color: #4b5563;
  padding: 6px 8px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-row td {
  height: 420px;
  border-bottom: 0;
  text-align: center;
  vertical-align: middle;
}

.empty-state {
  display: grid;
  max-width: 390px;
  justify-items: center;
  gap: 0;
  margin: 0 auto;
  color: var(--shell-text-muted);
}

.empty-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 16px;
  border: 1px solid var(--shell-border-soft);
  border-radius: 15px;
  background: #f9fafb;
  color: var(--shell-accent);
  font-size: 28px;
  line-height: 1;
}

.empty-state strong {
  color: #111827;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.empty-state > span:not(.empty-icon) {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
}

.empty-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.ghost-action {
  height: 40px;
  border: 1px solid var(--shell-border);
  border-radius: var(--control-radius);
  background: #ffffff;
  color: var(--shell-text);
  cursor: pointer;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.ghost-action:hover {
  border-color: #c8cfd8;
  background: #f9fafb;
}

.loading-state {
  display: grid;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}

.skeleton-line {
  height: 12px;
  border-radius: 999px;
  background: #eef2f7;
  background-size: 180% 100%;
  animation: none;
}

.skeleton-line:nth-child(2) {
  width: 76%;
}

.skeleton-line:nth-child(3) {
  width: 54%;
}


@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1023px) {
  :root {
    --sidebar-width: 0px;
    --shell-gutter: 0px;
    --window-radius: 0px;
  }

  html,
  body {
    overflow-x: hidden;
  }

  body {
    background: #ffffff;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .query-panel {
    position: static;
    height: auto;
    max-height: none;
    border-bottom: 1px solid var(--shell-border);
  }

  .search-form {
    overflow: visible;
  }

  .workspace {
    min-height: auto;
    margin: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  .workspace::before {
    content: none;
  }
}

@media (max-width: 720px) {
  .brand-row,
  .search-form,
  .workspace-head {
    padding-right: 18px;
    padding-left: 18px;
  }

  .brand-row,
  .workspace-head {
    flex-direction: column;
  }

  .field-grid,
  .criteria-band,
  .preset-row,
  .toggle-grid {
    grid-template-columns: 1fr;
  }

  .source-option {
    min-height: 68px;
  }

  .form-actions {
    padding-bottom: 18px;
  }

  .workspace-head {
    display: grid;
    gap: 16px;
    padding-top: 22px;
  }

  .export-actions {
    width: 100%;
  }

  .secondary-action {
    flex: 1;
  }

  .workspace-head h2 {
    font-size: 29px;
  }

  .status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-card:nth-child(2n) {
    border-right: 0;
  }

  .metric-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--shell-border-soft);
  }

  .metric-card {
    padding: 15px;
  }

  .metric-card strong:not(.status-pill) {
    font-size: 25px;
  }

  .progress-shell {
    padding: 14px 14px 0;
  }

  .progress-card {
    grid-template-columns: 1fr;
  }

  .progress-log {
    max-width: none;
    justify-content: flex-start;
  }

  .results-card {
    margin: 14px;
  }

  .empty-actions {
    flex-direction: column;
  }
}

/* Anti-cell pass: keep the product functional, remove generic SaaS boxes. */
body {
  font-weight: 400;
}

.brand-row {
  gap: 10px;
  padding-top: 22px;
}

.brand-lockup {
  align-items: flex-start;
  gap: 12px;
}

.brand-mark {
  width: auto;
  height: auto;
  min-width: 0;
  place-items: start;
  border-radius: 0;
  background: transparent;
  color: var(--shell-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  padding-top: 2px;
}

.brand-kicker,
.eyebrow {
  color: #717985;
  font-size: 12px;
  font-weight: 400;
}

h1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  color: #717985;
  font-size: 12px;
  font-weight: 400;
}

.health-pill {
  display: inline-flex;
  min-height: 0;
  align-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #717985;
  padding: 0;
  font-size: 12px;
  font-weight: 400;
}

.health-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 999px;
  background: var(--shell-accent);
}

.form-section {
  padding: 17px 0;
}

.section-head {
  margin-bottom: 8px;
}

.form-section h2,
.form-section legend {
  font-size: 13px;
  font-weight: 600;
}

.section-note {
  font-weight: 400;
}

label > span:not(.source-copy):not(.source-check),
.field-label,
.metric-label,
th {
  font-weight: 500;
  letter-spacing: 0.035em;
}

input,
select {
  height: 34px;
  border: 0;
  border-bottom: 1px solid #cfd5dd;
  border-radius: 0;
  background-color: transparent;
  color: var(--shell-text);
  padding: 0 0 7px;
  font-size: 15px;
  font-weight: 400;
}

select {
  background-position:
    calc(100% - 8px) 42%,
    calc(100% - 3px) 42%;
  padding-right: 22px;
}

input:hover,
select:hover {
  border-color: #9aa3af;
}

input:focus,
select:focus {
  border-color: var(--shell-accent);
}

button:focus-visible,
a:focus-visible {
}

.field-grid,
.criteria-band {
  column-gap: 22px;
  row-gap: 12px;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 14px;
}

.preset-chip {
  min-height: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #6b7280;
  padding: 0 0 3px;
  font-size: 13px;
  font-weight: 400;
}

.preset-chip:hover,
.preset-chip.is-active {
  border-color: var(--shell-accent);
  background: transparent;
  color: var(--shell-text);
}

.source-list {
  gap: 0;
}

.source-option {
  min-height: 0;
  border: 0;
  border-bottom: 1px solid var(--shell-border);
  border-radius: 0;
  background: transparent;
  padding: 11px 0;
}

.source-option:hover,
.source-option:has(input:checked) {
  border-color: var(--shell-border);
  background: transparent;
}

.source-check {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border-radius: 4px;
  font-size: 10px;
}

.source-copy {
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 10px;
  row-gap: 3px;
}

.source-copy strong {
  font-size: 14px;
  font-weight: 500;
}

.source-copy > span {
  color: #717985;
  font-size: 12px;
  font-weight: 400;
}

.source-option small {
  align-self: start;
  justify-self: end;
  margin-top: 1px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #8b95a1;
  padding: 0;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
}

.source-option small.blocked {
  border: 0;
  background: transparent;
  color: var(--warning);
}

.source-option small.ready {
  display: none;
}

.source-copy > span {
  grid-column: 1;
}

.source-option small {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.toggle-grid label {
  font-weight: 400;
}

.form-actions {
  border-top: 1px solid var(--shell-border);
  background: var(--shell-sidebar-bg);
}

.run-summary strong {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  font-weight: 500;
}

.primary-action,
.small-primary-action {
  font-weight: 600;
}

.workspace-head {
  padding: 28px 28px 22px;
}

.workspace-head h2 {
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.018em;
}

.result-subtitle {
  font-weight: 400;
}

.secondary-action {
  min-width: 0;
  height: auto;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #9aa3af;
  padding: 0 0 4px;
  font-size: 13px;
  font-weight: 500;
  flex: 0 0 auto;
}

.secondary-action:hover {
  border-color: var(--shell-accent);
  background: transparent;
  color: var(--shell-text);
}

.secondary-action.disabled {
  opacity: 0.46;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 30px 56px;
  border-bottom: 1px solid var(--shell-border-soft);
  padding: 18px 28px 20px;
}

.metric-card {
  min-width: 120px;
  border-right: 0;
  background: transparent;
  padding: 0;
}

.metric-label {
  margin-bottom: 8px;
}

.metric-card strong:not(.status-pill) {
  color: #111827;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.metric-hint {
  display: block;
  margin-top: 7px;
  color: #8b95a1;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}

.status-pill {
  display: inline;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #4b5563;
  padding: 0;
  font-size: 15px;
  font-weight: 400;
}

.status-pill[data-status="running"],
.status-pill[data-status="error"] {
  border: 0;
  background: transparent;
  color: var(--warning);
}

.status-pill[data-status="done"] {
  border: 0;
  background: transparent;
  color: var(--shell-text);
}

.progress-shell {
  padding: 18px 28px 0;
}

.progress-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--shell-border-soft);
}

.progress-copy strong {
  font-size: 15px;
  font-weight: 500;
}

.progress-copy span {
  font-weight: 400;
}

.progress-log {
  gap: 8px 14px;
}

.log-row {
  max-width: 260px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #717985;
  padding: 0;
  font-size: 12px;
  font-weight: 400;
}

.log-row-error {
  color: var(--warning);
}

.results-card {
  margin: 0 28px 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

th {
  height: 38px;
  background: transparent;
  padding: 0 14px;
}

td {
  padding: 13px 14px;
}

.contact-pill {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  font-size: 13px;
  font-weight: 400;
}

.lead-name,
.empty-state strong {
  font-weight: 500;
}

.empty-icon {
  width: auto;
  height: auto;
  margin-bottom: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 26px;
}

.ghost-action {
  height: auto;
  border: 0;
  border-bottom: 1px solid var(--shell-border);
  border-radius: 0;
  background: transparent;
  padding: 0 0 4px;
  font-weight: 500;
}

.ghost-action:hover {
  border-color: var(--shell-accent);
  background: transparent;
}

@media (max-width: 720px) {
  .preset-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 16px 18px;
  }

  .metric-card,
  .metric-card:nth-child(2n),
  .metric-card:nth-child(-n + 2) {
    border: 0;
    padding: 0 0 18px;
  }

  .progress-shell {
    padding: 10px 18px 0;
  }

  .results-card {
    margin: 0 18px 18px;
  }

  .empty-actions {
    align-items: center;
  }
}

.progress-card {
  grid-template-columns: minmax(280px, 1fr) minmax(300px, 0.88fr);
  column-gap: 34px;
}

.progress-log {
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 7px;
  max-width: none;
  min-height: 44px;
  text-align: right;
}

.log-row {
  display: block;
  max-width: 620px;
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
  line-height: 1.45;
}

.log-row.is-muted {
  color: #9aa3af;
  font-size: 12px;
}

.log-row.is-current {
  color: #5d6673;
  font-size: 13px;
}

.log-row-error,
.log-row-error.is-current,
.log-row-error.is-muted {
  color: var(--warning);
}

.text-effect-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(9px);
  animation: text-effect-in 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i, 0) * 38ms);
  will-change: opacity, transform;
}

.status-pill .text-effect-word,
.progress-copy strong .text-effect-word {
  animation-duration: 440ms;
  animation-delay: calc(var(--i, 0) * 32ms);
}

@keyframes text-effect-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .progress-card {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }

  .progress-log {
    justify-items: start;
    min-height: 0;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .text-effect-word {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* Density pass: keep the GRecord-like quiet shell, but make the work area feel useful faster. */
.workspace-head {
  align-items: center;
  padding: 18px 28px 14px;
}

.workspace-head h2 {
  max-width: 920px;
  margin-top: 0;
  font-size: 30px;
  line-height: 1.02;
}

.export-actions {
  padding-top: 0;
}

.status-strip {
  gap: 18px 48px;
  padding: 10px 28px 12px;
}

.metric-card {
  min-width: 104px;
}

.metric-label {
  margin-bottom: 5px;
  font-size: 10px;
}

.metric-card strong:not(.status-pill) {
  font-size: 23px;
  line-height: 1;
}

.status-pill {
  font-size: 14px;
  line-height: 1.15;
}

.metric-hint {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.15;
}

.progress-shell {
  padding: 10px 28px 0;
}

.progress-card {
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 0.68fr);
  column-gap: 28px;
  padding-bottom: 10px;
}

.progress-copy {
  gap: 2px;
}

.progress-copy strong {
  font-size: 14px;
  line-height: 1.2;
}

.progress-copy span {
  font-size: 13px;
  line-height: 1.35;
}

.progress-log {
  min-height: 28px;
  gap: 4px;
}

.log-row {
  max-width: 540px;
  line-height: 1.35;
}

.log-row.is-current {
  font-size: 12px;
}

.log-row.is-muted {
  font-size: 11px;
}

.progress-track {
  height: 4px;
  margin-top: 2px;
}

.results-card {
  margin: 0 28px 16px;
}

th {
  height: 32px;
  padding: 0 12px;
  font-size: 10px;
}

td {
  padding: 9px 12px;
  font-size: 13px;
  vertical-align: top;
}

.lead-name {
  margin-bottom: 2px;
  font-size: 13px;
  line-height: 1.2;
}

.lead-meta {
  font-size: 12px;
  line-height: 1.35;
}

.reviews-cell {
  line-height: 1.25;
}

.lead-contact {
  gap: 2px 8px;
}

.contact-pill {
  max-width: 172px;
  font-size: 12px;
  line-height: 1.3;
}

.empty-state {
  min-height: 340px;
}

.empty-icon {
  margin-bottom: 14px;
}

@media (max-width: 720px) {
  .workspace-head {
    padding: 16px 18px 12px;
  }

  .workspace-head h2 {
    font-size: 27px;
  }

  .status-strip {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
    overflow-x: auto;
    padding: 12px 18px;
  }

  .metric-card {
    min-width: auto;
    flex: 0 0 auto;
  }

  .progress-shell {
    padding: 10px 18px 0;
  }

  .progress-card {
    grid-template-columns: 1fr;
    row-gap: 8px;
    padding-bottom: 10px;
  }

  .progress-log {
    min-height: 0;
  }

  .results-card {
    margin: 0 18px 14px;
  }

  th,
  td {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Fact-only results table. */
table:not(:has(.empty-row)) {
  min-width: 1180px;
}

th:first-child,
td:first-child {
  width: 300px;
}

th:nth-child(2),
td:nth-child(2) {
  width: 230px;
  min-width: 230px;
}

th:nth-child(3),
td:nth-child(3) {
  width: 170px;
}

th:nth-child(4),
td:nth-child(4) {
  width: 190px;
}

th:nth-child(5),
td:nth-child(5) {
  width: 220px;
}

th:nth-child(6),
td:nth-child(6) {
  width: 220px;
}

.review-source {
  display: grid;
  grid-template-columns: 54px 34px 1fr;
  align-items: baseline;
  gap: 8px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.35;
}

.review-source + .review-source {
  margin-top: 3px;
}

.review-source strong {
  color: #111827;
  font-size: 12px;
  font-weight: 500;
}

.review-source small {
  color: #8b95a1;
  font-size: 11px;
}

.source-badge {
  display: inline-flex;
  width: fit-content;
  border-bottom: 1px solid var(--shell-border);
  color: #6b7280;
  font-size: 12px;
  line-height: 1.35;
}

.data-link {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #111827;
  font-size: 12.5px;
  line-height: 1.35;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-link + .data-link,
.data-link + .muted-value,
.muted-value + .data-link {
  margin-top: 3px;
}

.data-link:hover {
  color: var(--shell-accent);
}

.lead-links {
  vertical-align: top;
}

.muted-value {
  display: block;
  color: #9aa3af;
  font-size: 12px;
  line-height: 1.35;
}

/* Apify-like workbench layout: navigation in sidebar, parser input in the main surface. */
:root {
  --sidebar-width: 300px;
  --shell-gutter: 0px;
  --window-radius: 0px;
  --apify-blue: #2563eb;
  --apify-green: #008f2d;
}

body {
  background: #ffffff;
}

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

.app-shell {
  grid-template-columns: 300px minmax(0, 1fr);
}

.query-panel {
  border-right: 1px solid var(--shell-border);
  background: #f8fafc;
  overflow: hidden;
}

.sidebar-user {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
}

.sidebar-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 999px;
  background: #0984d9;
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
}

.sidebar-user-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.sidebar-user-copy strong {
  overflow: hidden;
  color: #24272d;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-copy span {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.15;
}

.sidebar-user-menu {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  font-size: 18px;
}

.sidebar-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0 10px 14px;
  border: 1px solid var(--shell-border);
  border-radius: 8px;
  background: #ffffff;
  padding: 0 8px 0 10px;
}

.sidebar-search input {
  height: 38px;
  border: 0;
  background: transparent;
  padding: 0;
  color: #24272d;
  font-size: 14px;
}

.sidebar-search input:focus {
}

.sidebar-search kbd {
  border: 1px solid #d7dce3;
  border-radius: 6px;
  background: #f8fafc;
  color: #7b8490;
  padding: 2px 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
}

.sidebar-nav,
.sidebar-group {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
}

.sidebar-nav {
  border-top: 1px solid var(--shell-border);
}

.sidebar-group {
  margin-top: 8px;
}

.sidebar-group-title {
  padding: 10px 6px 7px;
  color: #7b8490;
  font-size: 12px;
  font-weight: 500;
}

.sidebar-link {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border-radius: 8px;
  color: #24272d;
  padding: 0 8px;
  text-decoration: none;
}

.sidebar-link:hover,
.sidebar-link.is-active {
  background: #eef2f7;
}

.sidebar-link span {
  color: #374151;
  font-size: 15px;
  text-align: center;
}

.sidebar-link strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-bottom {
  display: grid;
  gap: 12px;
  margin-top: auto;
  border-top: 1px solid var(--shell-border);
  padding: 14px 10px 12px;
}

.usage-card {
  display: grid;
  gap: 8px;
}

.usage-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #4b5563;
  font-size: 12px;
}

.usage-row strong {
  color: #24272d;
  font-size: 12px;
  font-weight: 600;
}

.usage-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.usage-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #24272d;
}

.upgrade-action {
  height: 36px;
  border: 1px solid var(--shell-border);
  border-radius: 8px;
  background: #ffffff;
  color: #24272d;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.upgrade-action:hover {
  background: #f3f4f6;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #24272d;
  font-size: 13px;
  font-weight: 600;
}

.sidebar-brand .brand-mark {
  font-size: 12px;
}

.workspace {
  min-height: 100vh;
  margin: 0;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.workspace::before {
  content: none;
}

.actor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 22px 10px;
}

.actor-title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.back-action {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #24272d;
  cursor: pointer;
  font-size: 22px;
}

.actor-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #d7dce3;
  border-radius: 999px;
  background: #ffffff;
  color: var(--shell-accent);
  font-size: 11px;
  font-weight: 600;
}

.actor-copy {
  min-width: 0;
}

.actor-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.actor-title-line h1 {
  color: #24272d;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.price-chip,
.permission-chip {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 7px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}

.price-chip {
  border: 1px solid #d7dce3;
  background: #ffffff;
  color: #24272d;
}

.permission-chip {
  border: 1px solid #d7f0d7;
  background: #eaf9ea;
  color: #146c1f;
}

.actor-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 7px;
  color: #5f6875;
  font-size: 13px;
}

.actor-meta code {
  border-radius: 5px;
  background: #e5e7eb;
  color: #374151;
  padding: 1px 5px;
  font-family: inherit;
  font-size: 12px;
}

.actor-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.start-action,
.header-action {
  display: inline-flex;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  cursor: pointer;
  padding: 0 15px;
  font-size: 14px;
  font-weight: 600;
}

.start-action {
  border: 1px solid var(--apify-green);
  background: var(--apify-green);
  color: #ffffff;
}

.start-action:hover {
  background: #007d28;
}

.start-action:disabled {
  cursor: wait;
  opacity: 0.68;
}

.header-action {
  border: 1px solid #d7dce3;
  background: #ffffff;
  color: #24272d;
}

.header-action:hover {
  background: #f8fafc;
}

.actor-description {
  max-width: 1180px;
  margin: 0;
  padding: 0 24px 18px;
  color: #24272d;
  font-size: 16px;
  line-height: 1.55;
}

.workspace-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-top: 1px solid var(--shell-border);
  border-bottom: 1px solid var(--shell-border);
  background: #fbfbfc;
  padding: 12px 24px;
}

.workspace-tab {
  display: inline-flex;
  height: 36px;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #4b5563;
  cursor: pointer;
  padding: 0 11px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.workspace-tab:hover,
.workspace-tab.is-active {
  border-color: #d7dce3;
  background: #ffffff;
  color: #24272d;
}

.workspace-tab span {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: #e5e7eb;
  color: #4b5563;
  font-size: 12px;
}

.workspace-body {
  display: grid;
  gap: 24px;
  padding: 24px;
}

.input-stage,
.run-stage {
  max-width: 1160px;
}

.input-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.input-stage-head h1,
.input-stage-head h2 {
  color: #24272d;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.input-stage-head p {
  max-width: 720px;
  margin: 7px 0 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.55;
}

.history-menu {
  position: relative;
  z-index: 30;
  flex: 0 0 auto;
}

.search-form {
  display: block;
  overflow: visible;
  border: 1px solid #d7dce3;
  border-radius: 9px;
  background: #ffffff;
  padding: 0;
}

.form-section {
  padding: 20px 18px;
}

.form-section + .form-section,
.form-section + fieldset,
fieldset + .form-section {
  border-top: 1px solid var(--shell-border);
}

.section-head {
  margin-bottom: 14px;
}

.form-section h3,
.form-section legend {
  color: #24272d;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.section-note {
  color: #7b8490;
  font-size: 13px;
}

.input-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(260px, 0.7fr);
  gap: 18px;
  margin-bottom: 18px;
}

.field-grid,
.criteria-band {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 18px;
}

label > span:not(.source-copy):not(.source-check),
.field-label,
.mode-label {
  color: #4b5563;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

input,
select {
  height: 44px;
  border: 1px solid #cdd3dc;
  border-radius: 7px;
  background: #ffffff;
  padding: 0 12px;
  color: #24272d;
  font-size: 14px;
}

input:focus,
select:focus {
  border-color: var(--apify-blue);
}

.geo-readonly {
  min-height: 44px;
  border: 1px solid #cdd3dc;
  border-radius: 7px;
  padding: 8px 12px;
}

.geo-readonly span {
  color: #4b5563;
  font-size: 12px;
  font-weight: 600;
}

.geo-readonly strong {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 500;
}

.mode-control-inline {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.parser-switch,
.geo-switch {
  gap: 8px;
}

.parser-switch label,
.geo-switch label,
.rating-options label {
  min-height: 34px;
  border: 1px solid #d7dce3;
  border-radius: 8px;
  background: #ffffff;
  padding: 0 10px;
  color: #4b5563;
  font-size: 14px;
}

.parser-switch span,
.geo-switch span,
.rating-options span {
  border: 0;
  padding: 0;
}

.parser-switch label:hover,
.parser-switch label:has(input:checked),
.geo-switch label:hover,
.geo-switch label:has(input:checked),
.rating-options label:hover,
.rating-options label:has(input:checked) {
  border-color: var(--apify-blue);
  background: #eff6ff;
  color: #1d4ed8;
}

.parser-switch label:hover span,
.parser-switch input:checked + span,
.geo-switch label:hover span,
.geo-switch input:checked + span,
.rating-options label:hover span,
.rating-options input:checked + span {
  border-color: transparent;
  color: inherit;
}

.preset-row {
  display: flex;
  gap: 8px;
}

.preset-chip {
  min-height: 34px;
  border: 1px solid #d7dce3;
  border-radius: 8px;
  background: #ffffff;
  padding: 0 10px;
  color: #4b5563;
  font-weight: 500;
}

.preset-chip:hover,
.preset-chip.is-active {
  border-color: #aeb7c4;
  background: #f8fafc;
  color: #24272d;
}

.source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 10px;
}

.source-option {
  min-height: 74px;
  border: 1px solid #d7dce3;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.source-option:hover,
.source-option:has(input:checked) {
  border-color: #aeb7c4;
  background: #fbfcfe;
}

.source-check {
  width: 18px;
  height: 18px;
}

.source-copy strong {
  font-size: 14px;
  font-weight: 600;
}

.source-copy > span,
.source-option small {
  font-size: 12px;
}

.source-option small.ready {
  display: inline;
}

.rating-filter {
  grid-column: 1 / -1;
}

.rating-options {
  gap: 8px;
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px 18px;
  margin-top: 18px;
}

.toggle-grid label {
  min-height: 34px;
  font-size: 14px;
}

.toggle-grid label span {
  transform: none;
}

.form-actions {
  display: flex;
  position: sticky;
  bottom: 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--shell-border);
  background: rgba(255, 255, 255, 0.96);
  padding: 14px 18px;
}

.run-summary {
  margin: 0;
  min-width: 190px;
}

.primary-action {
  width: auto;
  min-width: 180px;
  height: 42px;
  border-radius: 8px;
}

.run-stage {
  border-top: 1px solid var(--shell-border);
  padding-top: 18px;
}

.workspace-head {
  align-items: center;
  padding: 0 0 12px;
  border-bottom: 0;
}

.workspace-head h2 {
  font-size: 26px;
  font-weight: 600;
}

.result-subtitle {
  margin-top: 6px;
}

.status-strip {
  border-top: 1px solid var(--shell-border);
  border-bottom: 1px solid var(--shell-border);
  padding: 12px 0;
}

.progress-shell {
  padding: 12px 0 0;
}

.results-card {
  margin: 0;
  border: 1px solid var(--shell-border);
  border-radius: 8px;
}

.secondary-action {
  height: 34px;
  border: 1px solid #d7dce3;
  border-radius: 7px;
  background: #ffffff;
  padding: 0 10px;
}

.secondary-action:hover {
  border-color: #aeb7c4;
  background: #f8fafc;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .query-panel {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--shell-border);
  }

  .sidebar-nav,
  .sidebar-group,
  .sidebar-bottom,
  .sidebar-search {
    display: none;
  }

  .actor-head,
  .input-stage-head,
  .workspace-head,
  .form-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .actor-actions,
  .export-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .actor-head,
  .actor-description,
  .workspace-tabs,
  .workspace-body {
    padding-right: 16px;
    padding-left: 16px;
  }

  .actor-title-line h1 {
    font-size: 22px;
  }

  .input-grid,
  .field-grid,
  .criteria-band,
  .source-list,
  .toggle-grid {
    grid-template-columns: 1fr;
  }

  .mode-control-inline {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .form-actions {
    position: static;
  }

  .primary-action,
  .start-action,
  .header-action {
    width: 100%;
  }
}

.status-strip {
  gap: 18px 42px;
}

.history-menu {
  position: relative;
  z-index: 40;
  flex: 0 0 auto;
}

.history-toggle {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  border: 1px solid #d9dde3;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: #4b5563;
  cursor: pointer;
  padding: 0 10px 0 11px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease;
}

.history-toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  transition: transform 150ms ease;
}

.history-toggle:hover,
.history-toggle[aria-expanded="true"] {
  border-color: #c8cfd8;
  background: #ffffff;
  color: var(--shell-text);
}

.history-toggle[aria-expanded="true"] {
}

.history-toggle[aria-expanded="true"]::after {
  transform: translateY(2px) rotate(225deg);
}

.history-count {
  color: inherit;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.history-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(360px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 92px));
  overflow: hidden;
  border: 1px solid rgba(217, 221, 227, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
}

.history-popover[hidden] {
  display: none;
}

.history-popover-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--shell-border-soft);
  padding: 13px 14px 11px;
}

.history-popover-head strong {
  color: #111827;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
}

.history-popover-head span {
  color: #9aa3af;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
}

.history-list {
  display: grid;
  gap: 0;
  max-height: none;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 14px 8px;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}

.history-empty {
  display: block;
  color: #9aa3af;
  font-size: 13px;
  line-height: 1.5;
  padding: 12px 0;
}

.history-item {
  display: grid;
  width: 100%;
  gap: 4px;
  border: 0;
  border-bottom: 1px solid var(--shell-border-soft);
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 10px 0;
  text-align: left;
}

.history-item:hover .history-title,
.history-item.is-active .history-title {
  color: var(--shell-accent);
}

.history-title {
  overflow: hidden;
  color: #111827;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-meta {
  overflow: hidden;
  color: #8b95a1;
  font-size: 11.5px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .workspace-actions {
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
  }

  .workspace-actions .export-actions {
    width: auto;
    justify-content: flex-end;
  }

  .workspace-actions .secondary-action {
    flex: 0 0 auto;
  }

  .history-popover {
    right: auto;
    left: 0;
    width: min(360px, calc(100vw - 36px));
    max-height: min(460px, calc(100vh - 126px));
  }
}

/* Unified button and outline-toggle system. Inspired by 21st/coss controls,
   but kept native so the current form handlers and payload stay unchanged. */
:root {
  --button-height: 36px;
  --button-height-lg: 40px;
  --button-radius: 9px;
  --button-border: #d9dde3;
  --button-border-hover: #c8cfd8;
  --button-bg: #ffffff;
  --button-bg-hover: #f7f8fa;
  --button-text: #18181b;
  --button-muted: #6b7280;
  --button-primary: var(--shell-accent);
  --button-primary-hover: var(--shell-accent-hover);
  --button-primary-soft: #fff4f4;
  --button-primary-border: rgba(239, 29, 37, 0.32);
}

button,
.secondary-action,
.ghost-action {
  appearance: none;
  user-select: none;
}

.start-action,
.primary-action,
.small-primary-action,
.header-action,
.secondary-action,
.ghost-action,
.history-toggle,
.workspace-tab,
.preset-chip,
.upgrade-action,
.back-action,
.sidebar-user-menu {
  display: inline-flex;
  min-height: var(--button-height);
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--button-border);
  border-radius: var(--button-radius);
  background: var(--button-bg);
  color: var(--button-text);
  cursor: pointer;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 520;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
  transition:
    border-color 140ms ease,
    background 140ms ease;
}

.start-action:hover,
.primary-action:hover,
.small-primary-action:hover,
.header-action:hover,
.secondary-action:hover,
.ghost-action:hover,
.history-toggle:hover,
.history-toggle[aria-expanded="true"],
.workspace-tab:hover,
.workspace-tab.is-active,
.preset-chip:hover,
.preset-chip.is-active,
.upgrade-action:hover,
.back-action:hover,
.sidebar-user-menu:hover {
  border-color: var(--button-border-hover);
  background: var(--button-bg-hover);
  color: var(--button-text);
}

.start-action:active,
.primary-action:active,
.small-primary-action:active,
.header-action:active,
.secondary-action:active,
.ghost-action:active,
.history-toggle:active,
.workspace-tab:active,
.preset-chip:active,
.upgrade-action:active,
.back-action:active,
.sidebar-user-menu:active {
  transform: translateY(1px);
}

.start-action,
.primary-action,
.small-primary-action {
  min-height: var(--button-height-lg);
  border-color: var(--button-primary);
  background: var(--button-primary);
  color: #ffffff;
  font-weight: 560;
}

.start-action:hover,
.primary-action:hover,
.small-primary-action:hover {
  border-color: var(--button-primary-hover);
  background: var(--button-primary-hover);
  color: #ffffff;
}

.start-action {
  height: var(--button-height-lg);
  padding: 0 15px 0 13px;
}

.start-action-icon {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
}

.primary-action {
  width: auto;
  min-width: 176px;
  height: var(--button-height-lg);
  border-radius: var(--button-radius);
  font-size: 13px;
}

.small-primary-action {
  height: var(--button-height-lg);
  padding: 0 14px;
}

.secondary-action,
.header-action,
.history-toggle,
.ghost-action {
  color: var(--button-muted);
}

.secondary-action.disabled,
.start-action:disabled,
.primary-action:disabled,
.small-primary-action:disabled,
.header-action:disabled,
.ghost-action:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  pointer-events: none;
  transform: none;
}

.back-action,
.sidebar-user-menu {
  width: var(--button-height);
  padding: 0;
}

.workspace-tabs {
  gap: 8px;
}

.workspace-tab {
  height: var(--button-height);
  border-radius: var(--button-radius);
  color: var(--button-muted);
  padding: 0 12px;
}

.workspace-tab.is-active {
  border-color: var(--button-border-hover);
  background: #ffffff;
  color: var(--button-text);
}

.workspace-tab span,
.history-count {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--button-border);
  border-radius: 999px;
  background: #f8fafc;
  color: inherit;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1;
}

.history-toggle {
  min-height: var(--button-height);
}

.history-toggle[aria-expanded="true"] {
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-chip {
  min-height: 34px;
  border-radius: var(--button-radius);
  color: var(--button-muted);
  padding: 0 12px;
}

.preset-chip.is-active {
  border-color: var(--button-primary-border);
  background: var(--button-primary-soft);
  color: var(--button-primary);
}

.upgrade-action {
  width: 100%;
  height: var(--button-height);
  margin-top: 8px;
  border-radius: var(--button-radius);
}

.empty-actions {
  gap: 10px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.96);
}

.run-summary {
  margin: 0;
}

.export-actions {
  gap: 8px;
}

.secondary-action {
  min-width: auto;
  height: var(--button-height);
  padding: 0 12px;
}

.parser-switch,
.geo-switch,
.rating-options {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  border: 1px solid var(--button-border);
  border-radius: calc(var(--button-radius) + 3px);
  background: #ffffff;
  padding: 3px;
}

.parser-switch label,
.geo-switch label,
.rating-options label {
  position: relative;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--button-radius);
  color: var(--button-muted);
  cursor: pointer;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  transition:
    border-color 140ms ease,
    background 140ms ease;
}

.parser-switch input,
.geo-switch input,
.rating-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.parser-switch span,
.geo-switch span,
.rating-options span {
  display: inline-flex;
  margin: 0;
  border: 0;
  color: inherit;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
}

.parser-switch label:hover,
.geo-switch label:hover,
.rating-options label:hover {
  background: #f7f8fa;
  color: var(--button-text);
}

.parser-switch label:has(input:checked),
.geo-switch label:has(input:checked),
.rating-options label:has(input:checked) {
  border-color: var(--button-border-hover);
  background: #f8fafc;
  color: var(--button-text);
}

.parser-switch input:checked + span,
.geo-switch input:checked + span,
.rating-options input:checked + span,
.parser-switch label:hover span,
.geo-switch label:hover span,
.rating-options label:hover span {
  border: 0;
  color: inherit;
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 8px;
}

.toggle-grid label {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--button-border);
  border-radius: var(--button-radius);
  background: #ffffff;
  color: var(--button-muted);
  cursor: pointer;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.1;
  transition:
    border-color 140ms ease,
    background 140ms ease;
}

.toggle-grid label:hover {
  border-color: var(--button-border-hover);
  background: var(--button-bg-hover);
  color: var(--button-text);
}

.toggle-grid label:has(input[type="checkbox"]:checked) {
  border-color: var(--button-primary-border);
  background: var(--button-primary-soft);
  color: var(--button-primary);
}

.toggle-grid label span {
  display: inline-flex;
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: 0;
  line-height: 1.08;
  transform: none;
  text-transform: none;
}

.toggle-grid input[type="checkbox"] {
  display: grid;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin: 0;
  place-content: center;
  align-self: center;
  appearance: none;
  border: 1.5px solid #9aa3af;
  border-radius: 5px;
  background: #ffffff;
  cursor: pointer;
  padding: 0;
  transition:
    border-color 140ms ease,
    background 140ms ease;
}

.toggle-grid input[type="checkbox"]:checked {
  border-color: var(--button-primary);
  background: var(--button-primary);
}

.toggle-grid input[type="checkbox"]::after {
  content: "";
  width: 4px;
  height: 8px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  opacity: 0;
  transform: translateY(-1px) rotate(45deg);
}

.toggle-grid input[type="checkbox"]:checked::after {
  opacity: 1;
}

.source-option {
  border-radius: var(--button-radius);
}

.source-option:has(input:checked) {
  border-color: var(--button-primary-border);
  background: var(--button-primary-soft);
}

.source-option:has(input:checked) .source-check {
  border-color: var(--button-primary);
  background: var(--button-primary);
}

@media (max-width: 760px) {
  .form-actions {
    align-items: stretch;
  }

  .primary-action,
  .start-action,
  .header-action,
  .secondary-action,
  .ghost-action,
  .small-primary-action {
    width: 100%;
  }

  .parser-switch,
  .geo-switch,
  .rating-options {
    width: 100%;
  }

  .parser-switch label,
  .geo-switch label,
  .rating-options label {
    flex: 1 1 auto;
  }

  .toggle-grid {
    grid-template-columns: 1fr;
  }
}

/* De-cell pass: keep one work surface, remove nested card/button noise. */
:root {
  --focus-neutral: #8f98a3;
  --line-quiet: #e5e7eb;
}

.workspace {
}

.workspace::before {
}

.search-form {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.form-section {
  padding: 24px 0;
}

.form-section + .form-section,
.form-section + fieldset,
fieldset + .form-section {
  border-top: 1px solid var(--line-quiet);
}

.section-head {
  margin-bottom: 18px;
}

.form-section h3,
.form-section legend {
  font-size: 15px;
  font-weight: 560;
}

.section-note {
  font-size: 13px;
  font-weight: 400;
}

.input-grid {
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.7fr);
  gap: 28px;
  margin-bottom: 18px;
}

.criteria-band {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 28px;
}

label > span:not(.source-copy):not(.source-check),
.field-label,
.mode-label {
  margin-bottom: 8px;
  color: #697386;
  font-size: 12px;
  font-weight: 520;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
}

input,
select,
.geo-readonly {
  height: 38px;
  border: 0;
  border-bottom: 1px solid #cfd6df;
  border-radius: 0;
  background: transparent;
  color: #18181b;
  padding: 0;
  font-size: 15px;
  font-weight: 400;
}

select {
  background-color: transparent;
}

input:hover,
select:hover,
.geo-readonly:hover {
  border-color: #aeb7c4;
}

input:focus,
input:focus-visible,
select:focus,
select:focus-visible,
button:focus,
button:focus-visible,
a:focus,
a:focus-visible,
.source-option:focus-within,
.toggle-grid label:focus-within,
.parser-switch label:focus-within,
.geo-switch label:focus-within,
.rating-options label:focus-within {
  border-color: var(--focus-neutral);
  outline: none;
}

.geo-readonly {
  display: flex;
  height: 38px;
  min-height: 38px;
  flex-direction: column;
  justify-content: center;
  padding: 0;
}

.geo-readonly span {
  display: none;
}

.geo-readonly strong {
  margin: 0;
  color: #18181b;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.25;
}

.mode-control-inline {
  display: flex;
  align-items: center;
  gap: 22px;
}

.parser-switch,
.geo-switch,
.rating-options {
  display: inline-flex;
  width: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 18px;
  padding: 0;
}

.parser-switch label,
.geo-switch label,
.rating-options label {
  min-height: 28px;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #697386;
  padding: 0;
  font-size: 14px;
  font-weight: 430;
  line-height: 1;
}

.parser-switch label:hover,
.geo-switch label:hover,
.rating-options label:hover {
  background: transparent;
  color: #18181b;
}

.parser-switch label:has(input:checked),
.geo-switch label:has(input:checked),
.rating-options label:has(input:checked) {
  border-color: #18181b;
  background: transparent;
  color: #18181b;
  font-weight: 520;
}

.parser-switch span,
.geo-switch span,
.rating-options span,
.parser-switch input:checked + span,
.geo-switch input:checked + span,
.rating-options input:checked + span,
.parser-switch label:hover span,
.geo-switch label:hover span,
.rating-options label:hover span {
  border: 0;
  color: inherit;
  line-height: 1;
  padding: 0;
}

.preset-row {
  gap: 18px;
  margin-top: 18px;
}

.preset-chip {
  min-height: 26px;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #697386;
  padding: 0;
  font-size: 14px;
  font-weight: 430;
}

.preset-chip:hover,
.preset-chip.is-active {
  border-color: #18181b;
  background: transparent;
  color: #18181b;
}

.source-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.source-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 58px;
  border: 0;
  border-bottom: 1px solid var(--line-quiet);
  border-radius: 0;
  background: transparent;
  gap: 12px;
  padding: 10px 0;
}

.source-option:hover,
.source-option:has(input:checked) {
  border-color: var(--line-quiet);
  background: transparent;
}

.source-option:has(input:checked) {
  color: #18181b;
}

.source-check {
  width: 17px;
  height: 17px;
  border-color: #aeb7c4;
  border-radius: 5px;
  background: transparent;
  font-size: 10px;
  line-height: 1;
}

.source-option:has(input:checked) .source-check {
  border-color: var(--shell-accent);
  background: var(--shell-accent);
  color: #ffffff;
}

.source-copy {
  gap: 2px;
}

.source-copy strong {
  font-size: 14px;
  font-weight: 520;
  line-height: 1.2;
}

.source-copy > span {
  color: #697386;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
}

.source-option small {
  align-self: center;
  justify-self: end;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #8b95a1;
  padding: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
}

.source-option small.blocked,
.source-option small.ready,
.source-option:has(input:checked) small:not(.blocked) {
  border: 0;
  background: transparent;
  color: #8b95a1;
}

.toggle-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin-top: 22px;
}

.toggle-grid label {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #697386;
  padding: 0;
  font-size: 14px;
  font-weight: 430;
  line-height: 1;
}

.toggle-grid label:hover,
.toggle-grid label:has(input[type="checkbox"]:checked) {
  border: 0;
  background: transparent;
  color: #18181b;
}

.toggle-grid label span {
  display: inline-flex;
  align-items: center;
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: 0;
  line-height: 1;
  transform: none;
  text-transform: none;
}

.toggle-grid input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-width: 17px;
  border-color: #8f98a3;
  border-radius: 5px;
  background: transparent;
}

.toggle-grid input[type="checkbox"]:focus,
.toggle-grid input[type="checkbox"]:focus-visible {
  border-color: #8f98a3;
  outline: none;
}

.toggle-grid input[type="checkbox"]:checked {
  border-color: var(--shell-accent);
  background: var(--shell-accent);
}

.form-actions {
  border-top: 1px solid var(--line-quiet);
  background: rgba(255, 255, 255, 0.96);
  padding: 18px 0 0;
}

.start-action,
.primary-action,
.small-primary-action,
.header-action,
.secondary-action,
.ghost-action,
.history-toggle,
.workspace-tab,
.upgrade-action,
.back-action,
.sidebar-user-menu {
}

.start-action:hover,
.primary-action:hover,
.small-primary-action:hover,
.header-action:hover,
.secondary-action:hover,
.ghost-action:hover,
.history-toggle:hover,
.history-toggle[aria-expanded="true"],
.workspace-tab:hover,
.workspace-tab.is-active,
.upgrade-action:hover,
.back-action:hover,
.sidebar-user-menu:hover {
}

.workspace-tab,
.header-action,
.secondary-action,
.history-toggle,
.ghost-action,
.upgrade-action,
.back-action,
.sidebar-user-menu {
  border-color: #d9dde3;
  background: #ffffff;
}

.workspace-tab.is-active,
.header-action:hover,
.secondary-action:hover,
.history-toggle:hover,
.history-toggle[aria-expanded="true"],
.ghost-action:hover,
.upgrade-action:hover,
.back-action:hover,
.sidebar-user-menu:hover {
  border-color: #c8cfd8;
  background: #f8fafc;
  color: #18181b;
}

.history-popover {
}

@media (max-width: 760px) {
  .input-grid,
  .criteria-band {
    grid-template-columns: 1fr;
  }

  .mode-control-inline {
    align-items: flex-start;
    flex-direction: column;
  }

  .source-option {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .source-option small {
    grid-column: 2;
    justify-self: start;
  }
}

[hidden] {
  display: none !important;
}

.actor-head {
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
}

.actor-head .history-menu {
  margin-left: auto;
}

.back-action,
.back-action:hover,
.back-action:focus,
.back-action:focus-visible {
  width: auto;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: #18181b;
  padding: 0 10px 0 0;
}

.workspace-body {
  padding-top: 28px;
}

.run-stage {
  overflow: hidden;
  border: 1px solid #d9dde3;
  border-radius: 18px;
  background: #ffffff;
  padding: 0;
}

.run-stage .workspace-head {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line-quiet);
}

.run-stage .workspace-head h2 {
  font-size: 26px;
  font-weight: 560;
}

.run-stage .status-strip {
  border: 0;
  border-bottom: 1px solid var(--line-quiet);
  padding: 0;
}

.run-stage .metric-card {
  border-right: 0;
  padding: 18px 24px;
}

.run-stage .progress-shell {
  padding: 18px 24px 0;
}

.run-stage .progress-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 0 16px;
}

.run-stage .results-card {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line-quiet);
  border-radius: 0;
}

.run-stage .empty-state {
  min-height: 420px;
}

@media (max-width: 760px) {
  .run-stage {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .run-stage .workspace-head,
  .run-stage .metric-card,
  .run-stage .progress-shell {
    padding-right: 16px;
    padding-left: 16px;
  }
}

.actor-title-line h1 {
  font-size: 24px;
  font-weight: 560;
}

.actor-copy {
  gap: 0;
}

.actor-description {
  padding-top: 0;
}

.command-flow {
  display: grid;
  gap: 22px;
}

.query-main-field {
  max-width: 760px;
}

.query-main-field input {
  font-size: 17px;
}

.mode-control-inline {
  display: block;
}

.mode-control-inline .mode-label {
  margin-bottom: 10px;
}

.geo-panel {
  display: grid;
  max-width: 760px;
  gap: 14px;
}

.geo-fields {
  max-width: 520px;
}

.geo-fields label,
.geo-fields .geo-readonly {
  width: 100%;
}

.parser-switch,
.geo-switch {
  gap: 22px;
}

.parser-switch label,
.geo-switch label,
.rating-options label,
.preset-chip {
  min-height: 26px;
}

.source-copy strong {
  font-weight: 500;
}

.source-copy > span {
  margin-top: 1px;
}

.source-option small {
  text-transform: none;
}

@media (max-width: 760px) {
  .query-main-field,
  .geo-panel,
  .geo-fields {
    max-width: none;
  }
}

body[data-page="settings"] .workspace-body {
  max-width: 1208px;
}

body[data-page="results"] .workspace-body {
  max-width: none;
  padding-top: 18px;
}

.input-stage[hidden],
.run-stage[hidden],
.back-action[hidden] {
  display: none !important;
}

body[data-page="results"] .run-stage {
  overflow: visible;
  max-width: none;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body[data-page="results"] .run-stage .workspace-head {
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line-quiet);
}

body[data-page="results"] .run-stage .status-strip {
  border-bottom: 1px solid var(--line-quiet);
}

body[data-page="results"] .run-stage .progress-shell {
  padding: 18px 0 0;
}

body[data-page="results"] .run-stage .results-card {
  border: 1px solid var(--line-quiet);
  border-radius: 14px;
  background: #ffffff;
}

body[data-page="results"] .run-stage .empty-state {
  min-height: 520px;
}

body[data-page="settings"] .actor-head {
  position: absolute;
  top: 24px;
  right: 32px;
  z-index: 40;
  justify-content: flex-end;
  padding: 0;
}

body[data-page="settings"] .actor-title-row,
body[data-page="settings"] .actor-description,
body[data-page="results"] .actor-copy,
body[data-page="results"] .actor-description {
  display: none;
}

body[data-page="settings"] .actor-head .history-menu {
  margin-left: 0;
}

body[data-page="settings"] .workspace-body {
  padding-top: 24px;
}

/* Launch setup screen: productized flow with a sticky summary. */
:root {
  --shell-bg: #f6f8fa;
  --shell-sidebar-bg: #f3f6f9;
  --shell-window-bg: #ffffff;
  --shell-border: #e2e8f0;
  --shell-border-soft: #eef2f7;
  --shell-text: #111827;
  --shell-text-muted: #64748b;
  --shell-text-faint: #94a3b8;
  --shell-text-soft: #94a3b8;
  --shell-accent: #16a34a;
  --shell-accent-hover: #118444;
  --shell-accent-soft: #eaf8f0;
  --primary-border: #d8dee6;
  --warning: #dc2626;
  --danger-soft: #fef2f2;
  --sidebar-width: 280px;
  --sidebar-pad-x: 18px;
}

::selection {
  background: var(--shell-accent);
}

.query-panel {
  border-right: 1px solid var(--shell-border);
}

.sidebar-user {
  padding: 18px 14px 14px;
}

.sidebar-avatar {
  width: 40px;
  height: 40px;
  font-size: 18px;
}

.sidebar-search {
  height: 40px;
  margin: 6px 10px 18px;
}

.sidebar-link {
  min-height: 40px;
  border-radius: 12px;
  color: #334155;
  font-size: 15px;
  font-weight: 500;
}

.sidebar-link.is-active {
  background: #eaf0f6;
  color: #111827;
}

.sidebar-bottom {
  padding: 12px 10px 14px;
}

.usage-card {
  gap: 8px;
  padding: 10px;
}

.workspace {
  background: #ffffff;
}

.actor-head {
  padding: 20px 32px 12px;
}

.actor-title-line h1 {
  font-size: 28px;
  line-height: 34px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.actor-description {
  max-width: 1180px;
  padding: 0 32px 26px;
  color: var(--shell-text-muted);
  font-size: 16px;
  line-height: 24px;
}

.history-toggle {
  min-height: 40px;
  border-radius: 12px;
  border-color: var(--shell-border);
  padding: 0 14px;
  color: var(--shell-text-muted);
  font-size: 14px;
  font-weight: 600;
}

body[data-page="settings"] .workspace-body {
  max-width: 1180px;
  padding: 28px 32px 52px;
}

.input-stage {
  max-width: none;
}

.input-stage-head {
  max-width: 720px;
  margin-bottom: 26px;
}

.input-stage-head h1,
.input-stage-head h2 {
  font-size: 30px;
  line-height: 36px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.input-stage-head p {
  max-width: 680px;
  color: var(--shell-text-muted);
  font-size: 15px;
  line-height: 24px;
}

.launch-grid {
  display: grid;
  grid-template-columns: minmax(0, 720px) 320px;
  gap: 40px;
  align-items: start;
}

.search-form {
  overflow: hidden;
  border: 1px solid var(--shell-border);
  border-radius: 24px;
  background: #ffffff;
}

.form-section {
  padding: 24px;
}

.form-section + .form-section,
.form-section + fieldset,
fieldset + .form-section {
  border-top: 1px solid var(--shell-border-soft);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.form-section h3,
.form-section legend {
  color: var(--shell-text);
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.section-note {
  color: var(--shell-text-soft);
  font-size: 13px;
  font-weight: 500;
}

label > span:not(.source-copy):not(.source-check),
.field-label,
.mode-label {
  margin-bottom: 8px;
  color: var(--shell-text-muted);
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
}

input,
select,
.geo-readonly {
  height: 48px;
  border: 1px solid var(--shell-border);
  border-radius: 14px;
  background: #ffffff;
  padding: 0 14px;
  color: var(--shell-text);
  font-size: 16px;
  font-weight: 400;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--shell-accent);
}

.query-main-field {
  max-width: none;
}

.query-main-field input {
  height: 52px;
  font-size: 17px;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -6px;
}

.preset-chip {
  min-height: 34px;
  border: 1px solid var(--shell-border);
  border-radius: 999px;
  background: #ffffff;
  padding: 0 12px;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
}

.preset-chip:hover,
.preset-chip.is-active {
  border-color: transparent;
  background: var(--button-bg-active, #e8ecea);
  color: var(--text-main, #111827);
}

.mode-control-inline {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
}

.mode-control-inline .mode-label {
  margin-bottom: 0;
}

.parser-switch,
.geo-switch,
.rating-options {
  display: inline-flex;
  width: fit-content;
  flex-wrap: wrap;
  gap: 0;
  border-radius: 14px;
  background: #f1f5f9;
  padding: 4px;
}

.parser-switch label,
.geo-switch label,
.rating-options label {
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 0 14px;
  color: var(--shell-text-muted);
  font-size: 14px;
  font-weight: 600;
}

.parser-switch label:hover,
.parser-switch label:has(input:checked),
.geo-switch label:hover,
.geo-switch label:has(input:checked),
.rating-options label:hover,
.rating-options label:has(input:checked) {
  border-color: transparent;
  background: #ffffff;
  color: var(--shell-text);
}

.geo-panel {
  max-width: none;
}

.geo-fields {
  max-width: none;
}

.geo-readonly {
  display: flex;
  height: auto;
  min-height: 48px;
  flex-direction: column;
  justify-content: center;
}

.source-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.source-option {
  display: grid;
  min-height: 64px;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 0;
  border-top: 1px solid var(--shell-border-soft);
  border-radius: 0;
  background: #ffffff;
  padding: 12px 14px;
}

.source-option:first-child {
  border-top: 0;
}

.source-option:hover {
  background: #f8fafc;
}

.source-option:has(input:checked) {
  border-color: var(--shell-border-soft);
  background: #f0fdf4;
  border-radius: 16px;
}

.source-check {
  width: 20px;
  height: 20px;
  border-color: #cbd5e1;
  border-radius: 7px;
}

.source-option:has(input:checked) .source-check {
  border-color: var(--shell-accent);
  background: var(--shell-accent);
}

.source-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: center;
}

.source-copy strong {
  grid-column: 1;
  color: var(--shell-text);
  font-size: 15px;
  font-weight: 600;
}

.source-copy > span {
  grid-column: 1;
  margin-top: 2px;
  color: var(--shell-text-muted);
  font-size: 13px;
  font-weight: 400;
}

.source-option small {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  border-color: transparent;
  background: transparent;
  color: var(--shell-text-muted);
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
}

.source-option small.blocked {
  border: 1px solid #fecaca;
  background: var(--danger-soft);
  color: var(--warning);
  padding: 4px 8px;
}

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

.rating-filter {
  grid-column: 1 / -1;
}

.toggle-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin-top: 20px;
}

.toggle-grid label {
  display: grid;
  min-height: 36px;
  grid-template-columns: 20px minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
  color: var(--shell-text-muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
}

.toggle-grid label span {
  transform: none;
  line-height: 18px;
}

.toggle-grid input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-color: #94a3b8;
  border-radius: 7px;
}

.toggle-grid input[type="checkbox"]:checked {
  border-color: var(--shell-accent);
  background: var(--shell-accent);
}

.launch-summary {
  position: sticky;
  top: 24px;
  border: 1px solid var(--shell-border);
  border-radius: 24px;
  background: #ffffff;
  padding: 20px;
}

.launch-summary-head h3 {
  margin: 0;
  color: var(--shell-text);
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
}

.launch-summary-head p {
  margin: 6px 0 0;
  color: var(--shell-text-muted);
  font-size: 13px;
  line-height: 18px;
}

.summary-list {
  margin: 18px 0 0;
}

.summary-item {
  border-top: 1px solid var(--shell-border-soft);
  padding: 12px 0;
}

.summary-item dt {
  margin-bottom: 4px;
  color: var(--shell-text-muted);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
}

.summary-item dd {
  margin: 0;
  color: var(--shell-text);
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
}

.summary-item small {
  display: block;
  margin-top: 5px;
  color: var(--shell-text-muted);
  font-size: 12px;
  line-height: 17px;
}

.launch-summary-action {
  width: 100%;
  height: 48px;
  margin-top: 12px;
  border-radius: 14px;
  background: var(--shell-accent);
  font-size: 15px;
  font-weight: 600;
}

.launch-summary-action:hover {
  background: var(--shell-accent-hover);
}

.launch-summary-action:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.launch-summary-helper {
  margin: 10px 0 0;
  color: var(--shell-text-muted);
  font-size: 12px;
  line-height: 17px;
  text-align: center;
}

body[data-page="results"] .launch-summary {
  display: none;
}

@media (max-width: 1180px) {
  .launch-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .launch-summary {
    position: static;
    max-width: 720px;
  }
}

@media (max-width: 760px) {
  .actor-head,
  .actor-description,
  body[data-page="settings"] .workspace-body {
    padding-right: 16px;
    padding-left: 16px;
  }

  .mode-control-inline,
  .criteria-band,
  .toggle-grid {
    grid-template-columns: 1fr;
  }

  .source-copy {
    grid-template-columns: 1fr;
  }

  .source-option small {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin-top: 6px;
  }
}

body[data-page="settings"] .actor-head {
  position: absolute;
  top: 24px;
  right: 32px;
  z-index: 40;
  justify-content: flex-end;
  padding: 0;
}

body[data-page="settings"] .actor-title-row,
body[data-page="settings"] .actor-description,
body[data-page="results"] .actor-copy,
body[data-page="results"] .actor-description {
  display: none;
}

body[data-page="settings"] .actor-head .history-menu {
  margin-left: 0;
}

body[data-page="settings"] .workspace-body {
  padding-top: 24px;
}

.parser-switch label,
.geo-switch label,
.rating-options label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  text-align: center;
  line-height: 1;
  padding-top: 0;
  padding-bottom: 0;
}

.parser-switch span,
.geo-switch span,
.rating-options span {
  display: block;
  height: auto;
  margin: 0 !important;
  padding: 0;
  line-height: 20px;
  transform: translateY(1.5px);
}

.parser-switch,
.geo-switch,
.rating-options {
  padding: 3px;
}

.parser-switch label,
.geo-switch label,
.rating-options label {
  height: 32px;
  min-height: 32px;
  padding-right: 12px;
  padding-left: 12px;
  font-size: 15px;
}

.parser-switch span,
.geo-switch span,
.rating-options span {
  line-height: 20px;
  transform: translateY(1px);
}

.preset-chip {
  min-height: 32px;
  padding-right: 11px;
  padding-left: 11px;
  font-size: 14px;
}

@media (max-width: 760px) {
  body[data-page="settings"] .actor-head {
    top: 16px;
    right: 16px;
  }

  body[data-page="settings"] .workspace-body {
    padding-top: 68px;
  }
}

/* Topbar app shell: launch settings stay focused, account/history move out of the form. */
:root {
  --topbar-height: 64px;
  --content-width: 1240px;
}

html,
body {
  background: #ffffff;
}

.app-shell {
  display: block;
  min-height: 100vh;
  background: #ffffff;
}

.app-header {
  position: relative;
  z-index: 100;
  height: var(--topbar-height);
  border-bottom: 1px solid #e5eaf1;
  background: rgba(255, 255, 255, 0.96);
}

.app-header-inner {
  display: flex;
  align-items: center;
  gap: 30px;
  width: 100%;
  max-width: var(--content-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 40px;
}

.top-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.top-brand-logo {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: #111827;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 4px;
}

.main-nav-link {
  display: inline-flex;
  flex: 0 0 auto;
  height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 550;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav-link:hover,
.main-nav-link.is-active,
.history-toggle[aria-expanded="true"].main-nav-link {
  background: #f1f5f9;
  color: #111827;
}

.top-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.usage-menu,
.profile-menu,
.nav-history {
  position: relative;
}

.usage-menu summary,
.profile-menu summary {
  list-style: none;
}

.usage-menu summary::-webkit-details-marker,
.profile-menu summary::-webkit-details-marker {
  display: none;
}

.usage-button,
.profile-button {
  display: inline-flex;
  height: 36px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #d7dee7;
  border-radius: 11px;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.usage-button strong {
  color: #111827;
  font-weight: 600;
}

.profile-avatar {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
}

.usage-popover,
.profile-popover,
.history-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 120;
  border: 1px solid #dfe5ec;
  border-radius: 14px;
  background: #ffffff;
}

.usage-popover {
  display: grid;
  width: 280px;
  gap: 9px;
  padding: 14px;
}

.usage-popover-head,
.history-popover-head {
  display: grid;
  gap: 3px;
  margin-bottom: 3px;
}

.usage-popover-head strong,
.history-popover-head strong {
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
}

.usage-popover-head span,
.history-popover-head span {
  color: #64748b;
  font-size: 12px;
  line-height: 16px;
}

.usage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #64748b;
  font-size: 13px;
  line-height: 18px;
}

.usage-row strong {
  color: #111827;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.usage-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f6;
}

.usage-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #111827;
}

.usage-popover .upgrade-action {
  width: 100%;
  height: 36px;
  margin-top: 4px;
  border: 1px solid #d7dee7;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
}

.profile-popover {
  display: grid;
  width: 190px;
  padding: 6px;
}

.profile-popover a,
.profile-popover button {
  display: flex;
  min-height: 36px;
  align-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #334155;
  cursor: pointer;
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
}

.profile-popover a:hover,
.profile-popover button:hover {
  background: #f1f5f9;
  color: #111827;
}

.nav-history .history-toggle {
  border: 0;
}

.nav-history .history-toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 1px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.nav-history .history-count {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7dee7;
  border-radius: 999px;
  background: #ffffff;
  color: #64748b;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.nav-history .history-popover {
  right: auto;
  left: 0;
  width: 360px;
  max-width: calc(100vw - 32px);
  padding: 12px;
}

.workspace {
  min-height: calc(100vh - var(--topbar-height));
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.workspace::before {
  display: none;
}

body[data-page="settings"] .actor-head,
body[data-page="settings"] .actor-description {
  display: none;
}

body[data-page="settings"] .workspace-body {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 32px 40px 64px;
}

body[data-page="results"] .actor-head {
  position: relative;
  top: auto;
  right: auto;
  display: flex;
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 18px 40px 0;
}

body[data-page="results"] .actor-title-row {
  display: flex;
}

body[data-page="results"] .back-action {
  display: inline-flex;
}

body[data-page="results"] .workspace-body {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 20px 40px 64px;
}

body[data-page="results"] .workspace-head {
  padding-right: 0;
  padding-left: 0;
}

body[data-page="results"] .status-strip {
  grid-template-columns: repeat(2, minmax(0, 220px));
}

.input-stage,
.run-stage {
  max-width: none;
}

.launch-grid {
  display: grid;
  grid-template-columns: minmax(0, 760px) 340px;
  gap: 44px;
  align-items: start;
}

.launch-summary {
  position: sticky;
  top: 88px;
  width: 100%;
  max-width: none;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  border-color: #111827;
  outline: none;
}

@media (max-width: 900px) {
  .app-header-inner {
    padding: 0 20px;
  }

  .main-nav {
    display: none;
  }

  .top-actions {
    margin-left: auto;
  }

  .usage-button span {
    display: none;
  }

  body[data-page="settings"] .workspace-body,
  body[data-page="results"] .workspace-body,
  body[data-page="results"] .actor-head {
    padding-right: 20px;
    padding-left: 20px;
  }

  .launch-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .launch-summary {
    position: static;
  }
}

@media (max-width: 620px) {
  .top-brand span:last-child,
  .usage-menu {
    display: none;
  }

  .profile-button {
    padding-right: 10px;
    padding-left: 10px;
  }

  .profile-button > span:last-child {
    display: none;
  }
}

/* Result database surface: stats, filters, selectable rows and contact quality. */
.result-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 0;
  border-bottom: 1px solid var(--shell-border-soft);
}

.result-stat {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  padding: 13px 14px;
}

.result-stat-label {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 550;
  line-height: 16px;
}

.result-stat strong {
  display: block;
  margin-top: 5px;
  color: #111827;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 30px;
}

.result-stat.is-primary strong {
  color: var(--shell-accent);
}

body[data-page="results"] .progress-shell {
  padding: 18px 0 14px;
}

.result-ready-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid #dfe7e2;
  border-radius: 16px;
  background: #fbfdfc;
  padding: 14px 16px;
}

body[data-job-status="done"] .result-ready-bar {
  border-color: #d8dee6;
  background: #f0fdf4;
}

.result-ready-bar .progress-copy strong {
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.result-ready-bar .progress-copy span {
  color: #64748b;
  font-size: 13px;
  line-height: 18px;
}

.result-ready-bar .status-pill {
  justify-self: end;
}

.idle-status-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.result-run-action {
  min-width: 132px;
  background: var(--shell-accent);
}

body[data-job-status="running"] .result-run-action,
body[data-job-status="done"] .result-run-action {
  display: none;
}

.result-ready-bar .progress-log {
  display: none;
}

body[data-job-status="running"] .result-ready-bar .progress-log,
body[data-job-status="error"] .result-ready-bar .progress-log {
  display: flex;
  grid-column: 1 / -1;
  max-width: none;
  justify-content: flex-start;
}

.result-ready-bar .progress-track {
  grid-column: 1 / -1;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.result-actions .secondary-action {
  min-width: 76px;
  height: 38px;
  border-color: #d7e6dc;
  border-radius: 11px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
}

.results-card {
  margin: 0;
  border-radius: 16px;
}

.result-stats[hidden],
.table-toolbar[hidden] {
  display: none !important;
}

body[data-has-results="false"] .results-card {
  margin-top: 16px;
  border-radius: 24px;
}

body[data-has-results="false"] .table-wrap {
  min-height: 440px;
}

body[data-has-results="false"] .results-table {
  min-width: 100%;
}

body[data-has-results="false"] .empty-row td {
  height: 440px;
}

body[data-has-results="false"] .empty-state {
  max-width: 440px;
}

body[data-has-results="false"] .empty-icon {
  border-color: #d7f0df;
  background: #eaf8f0;
  color: #118444;
}

body[data-has-results="false"] .empty-state strong {
  font-size: 22px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #eef2f7;
  background: #ffffff;
}

.result-toolbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.top-up-action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--shell-text);
  color: #ffffff;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition:
    background 150ms ease,
    opacity 150ms ease;
}

.top-up-action:hover {
  background: #2b313d;
}

.top-up-action:disabled {
  cursor: default;
  opacity: 0.58;
}

.top-up-action[hidden] {
  display: none !important;
}

.result-tabs {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.result-tabs button {
  display: inline-flex;
  height: 32px;
  align-items: center;
  gap: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 550;
  line-height: 1;
  white-space: nowrap;
}

.result-tabs button:hover,
.result-tabs button.is-active {
  border-color: #d8dee6;
  background: #eaf8f0;
  color: #118444;
}

.result-tabs span {
  font-variant-numeric: tabular-nums;
}

.result-search {
  flex: 0 0 260px;
}

.result-search input {
  height: 36px;
  border-radius: 10px;
  font-size: 13px;
}

.selection-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #dbeafe;
  background: #eff6ff;
  color: #475569;
  font-size: 13px;
  line-height: 18px;
}

.selection-toolbar[hidden] {
  display: none;
}

.selection-toolbar strong {
  color: #111827;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.selection-toolbar button {
  height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
}

.results-table {
  min-width: 1260px;
}

.results-table th {
  height: 42px;
  padding: 0 14px;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.results-table td {
  min-height: 58px;
  padding: 12px 14px;
  vertical-align: top;
}

.results-table tbody tr:hover {
  background: #f8fafc;
}

.results-table .select-column,
.results-table .select-cell {
  width: 42px;
  min-width: 42px;
  padding-right: 8px;
  text-align: center;
}

.results-table .select-cell {
  vertical-align: middle;
}

.select-cell input,
.select-column input {
  display: inline-grid;
  width: 17px;
  height: 17px;
  margin: 0;
  place-content: center;
  appearance: none;
  border: 1.5px solid #cbd5e1;
  border-radius: 5px;
  background: #ffffff;
  cursor: pointer;
  padding: 0;
}

.select-cell input::after,
.select-column input::after {
  content: "";
  width: 5px;
  height: 9px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  opacity: 0;
  transform: translateY(-1px) rotate(45deg);
}

.select-cell input:checked,
.select-column input:checked,
.select-column input:indeterminate {
  border-color: var(--shell-accent);
  background: var(--shell-accent);
}

.select-cell input:checked::after,
.select-column input:checked::after {
  opacity: 1;
}

.select-column input:indeterminate::after {
  width: 8px;
  height: 2px;
  border: 0;
  background: #ffffff;
  opacity: 1;
  transform: none;
}

.results-table th:nth-child(2),
.results-table td:nth-child(2) {
  width: 300px;
  min-width: 300px;
}

.results-table th:nth-child(3),
.results-table td:nth-child(3) {
  width: 230px;
  min-width: 230px;
}

.results-table .address-column,
.results-table .address-cell {
  width: 250px;
  min-width: 250px;
}

.results-table .legal-name-column,
.results-table .legal-name-cell {
  width: 220px;
  min-width: 220px;
}

.results-table .inn-column,
.results-table .inn-cell,
.results-table .ogrn-column,
.results-table .ogrn-cell {
  width: 136px;
  min-width: 136px;
}

.results-table th:nth-child(4),
.results-table td:nth-child(4) {
  width: 190px;
  min-width: 190px;
}

.results-table th:nth-child(5),
.results-table td:nth-child(5) {
  width: 190px;
}

.results-table th:nth-child(6),
.results-table td:nth-child(6) {
  width: 220px;
}

.results-table th:nth-child(7),
.results-table td:nth-child(7) {
  width: 190px;
}

.results-table th:nth-child(8),
.results-table td:nth-child(8) {
  width: 170px;
}

.lead-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 19px;
}

.lead-meta {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  line-height: 18px;
}

.lead-address {
  display: block;
  overflow: hidden;
  color: #475467;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legal-entity {
  display: block;
  overflow: hidden;
  color: #475467;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registry-value {
  color: #344054;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.review-source {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.review-source + .review-source {
  margin-top: 5px;
}

.source-name {
  color: #64748b;
  font-size: 13px;
  line-height: 18px;
}

.rating-line {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.review-source strong {
  color: #111827;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 18px;
}

.review-source small {
  color: #94a3b8;
  font-size: 12px;
  line-height: 18px;
}

.data-link {
  color: #111827;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}

.data-link:hover {
  border-color: var(--shell-accent);
  color: var(--shell-accent-hover);
}

.lead-links {
  display: grid;
  gap: 3px;
}

.missing-value {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  line-height: 18px;
}

.quality-cell {
  display: grid;
  gap: 8px;
}

.quality-badge {
  display: inline-flex;
  width: fit-content;
  height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.quality-badge.full {
  background: #eaf8f0;
  color: #118444;
}

.quality-badge.good {
  background: #eff6ff;
  color: #2563eb;
}

.quality-badge.basic {
  background: #f8fafc;
  color: #64748b;
}

.quality-badge.weak {
  background: #fef2f2;
  color: #dc2626;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  opacity: 0;
  transition: opacity 150ms ease;
}

.results-table tbody tr:hover .row-actions,
.results-table tbody tr:focus-within .row-actions {
  opacity: 1;
}

.row-actions button {
  height: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
}

.row-actions button:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #111827;
}

.row-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 900px) {
  .result-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-ready-bar,
  .table-toolbar {
    align-items: stretch;
  }

  .result-ready-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .result-actions,
  .idle-status-actions {
    justify-self: start;
  }

  .table-toolbar {
    flex-direction: column;
  }

  .result-toolbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .result-search {
    flex: 1 1 auto;
    width: 100%;
  }
}

/* Compact finished-result composition. Keep idle clean, make done state dense. */
body[data-page="results"] .workspace-body {
  padding: 18px 40px 56px;
}

body[data-page="results"] .run-stage .workspace-head {
  align-items: flex-end;
  padding-bottom: 16px;
}

body[data-page="results"] .run-stage .workspace-head h2 {
  margin-top: 20px;
  font-size: 30px;
  font-weight: 620;
  letter-spacing: -0.045em;
  line-height: 36px;
}

body[data-page="results"] .result-subtitle {
  margin-top: 4px;
  font-size: 15px;
  line-height: 22px;
}

body[data-page="results"] .export-actions {
  align-items: center;
  gap: 8px;
}

body[data-page="results"] .export-actions .secondary-action {
  height: 38px;
  min-width: 72px;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 620;
}

body[data-page="results"] .result-stats {
  gap: 10px;
  padding: 16px 0 14px;
  border-bottom: 0;
}

body[data-page="results"] .result-stat {
  display: flex;
  height: 60px;
  justify-content: center;
  border-radius: 14px;
  padding: 9px 14px;
}

body[data-page="results"] .result-stat-label {
  font-size: 12px;
  font-weight: 560;
  line-height: 16px;
}

body[data-page="results"] .result-stat strong {
  margin-top: 3px;
  font-size: 23px;
  font-weight: 620;
  line-height: 26px;
}

body[data-page="results"] .progress-shell {
  padding: 0 0 14px;
}

body[data-job-status="done"] .result-ready-bar {
  min-height: 58px;
  border-color: #d8dee6;
  border-radius: 16px;
  background: #f0fdf4;
  padding: 10px 16px;
}

body[data-job-status="done"] .result-ready-bar .progress-copy strong {
  font-size: 15px;
  font-weight: 620;
  line-height: 20px;
}

body[data-job-status="done"] .result-ready-bar .progress-copy span {
  margin-top: 2px;
  font-size: 13px;
  line-height: 18px;
}

body[data-job-status="done"] .result-ready-bar .status-pill {
  height: 30px;
  border: 1px solid #d8dee6;
  background: #ffffff;
  color: #118444;
  font-size: 13px;
  font-weight: 620;
}

body[data-job-status="done"] .result-ready-bar .progress-track {
  display: none;
}

body[data-page="results"] .run-stage .results-card {
  overflow: hidden;
  border-radius: 16px;
}

body[data-page="results"] .table-toolbar {
  min-height: 56px;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 14px;
}

body[data-page="results"] .result-tabs button {
  height: 32px;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 620;
}

body[data-page="results"] .result-search input {
  height: 36px;
  border-radius: 11px;
  font-size: 14px;
}

body[data-page="results"] .results-table {
  display: block;
  min-width: 1160px;
}

body[data-page="results"] .results-table thead,
body[data-page="results"] .results-table tbody,
body[data-page="results"] .results-table tr {
  display: block;
}

body[data-page="results"] .results-table tr {
  display: grid;
  grid-template-columns: 34px minmax(220px, 1.45fr) 165px 150px 165px 200px 150px 112px;
  column-gap: 0;
  align-items: start;
  border-bottom: 1px solid #eef2f7;
}

body[data-page="results"] .results-table tbody tr:last-child {
  border-bottom: 0;
}

body[data-page="results"] .results-table th {
  display: flex;
  height: 40px;
  align-items: center;
  padding: 0 12px;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 600;
}

body[data-page="results"] .results-table td {
  display: block;
  min-height: 0;
  padding: 10px 12px;
}

body[data-page="results"] .results-table tbody tr {
  min-height: 70px;
}

body[data-page="results"] .results-table .empty-row {
  grid-template-columns: 1fr;
}

body[data-page="results"] .results-table .empty-row td,
body[data-page="results"] .results-table .locked-results-row td {
  grid-column: 1 / -1;
}

body[data-page="results"] .results-table .locked-results-row {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
}

body[data-page="results"][data-has-results="false"] .empty-state {
  min-height: 360px;
}

body[data-page="results"] .results-table .select-column,
body[data-page="results"] .results-table .select-cell {
  width: auto;
  min-width: 0;
  padding-right: 6px;
}

body[data-page="results"] .lead-name {
  font-size: 14px;
  font-weight: 560;
  line-height: 19px;
}

body[data-page="results"] .lead-meta {
  margin-top: 3px;
  font-size: 13px;
  line-height: 17px;
}

body[data-page="results"] .review-source {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body[data-page="results"] .review-source + .review-source {
  margin-top: 7px;
}

body[data-page="results"] .source-name,
body[data-page="results"] .review-source small,
body[data-page="results"] .data-link,
body[data-page="results"] .missing-value {
  font-size: 13px;
  line-height: 18px;
}

body[data-page="results"] .rating-line {
  gap: 7px;
}

body[data-page="results"] .review-source strong {
  font-size: 13px;
  font-weight: 620;
  line-height: 18px;
}

body[data-page="results"] .lead-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body[data-page="results"] .social-chip {
  display: inline-flex;
  height: 24px;
  align-items: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 560;
  line-height: 1;
  text-decoration: none;
}

body[data-page="results"] .social-chip:hover {
  background: #eaf8f0;
  color: #118444;
}

body[data-page="results"] .quality-cell {
  align-content: start;
  gap: 7px;
}

body[data-page="results"] .quality-badge {
  height: 26px;
  padding: 0 9px;
  font-weight: 620;
}

body[data-page="results"] .row-actions {
  gap: 5px;
}

body[data-page="results"] .row-actions button {
  height: 26px;
  border-radius: 7px;
  padding: 0 7px;
  font-size: 11px;
}

@media (max-width: 900px) {
  body[data-page="results"] .workspace-body {
    padding-right: 20px;
    padding-left: 20px;
  }

  body[data-page="results"] .result-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="results"] .table-toolbar {
    height: auto;
  }
}

/* Result composition v2: one compact database-ready surface. */
body[data-page="results"] .result-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 0 12px;
}

body[data-page="results"] .result-stat {
  display: inline-flex;
  width: auto;
  min-width: 0;
  height: 36px;
  align-items: center;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 5px;
  border-radius: 999px;
  padding: 0 12px;
}

body[data-page="results"] .result-stat-label {
  color: #64748b;
  font-size: 14px;
  font-weight: 560;
  line-height: 18px;
}

body[data-page="results"] .result-stat strong {
  margin: 0;
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 18px;
}

body[data-page="results"] .result-stat.is-primary {
  border-color: #d8dee6;
  background: #eaf8f0;
}

body[data-page="results"] .result-stat.is-primary .result-stat-label,
body[data-page="results"] .result-stat.is-primary strong {
  color: #118444;
}

body[data-job-status="done"][data-has-results="true"] .workspace-head .export-actions {
  display: none;
}

.done-actions {
  display: none;
}

body[data-job-status="done"][data-has-results="true"] .result-ready-bar {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-color: #d8dee6;
  border-radius: 18px;
  background: #f0fdf4;
  padding: 12px 14px;
}

body[data-job-status="done"][data-has-results="true"] .result-ready-bar .progress-copy {
  position: relative;
  min-width: 0;
  padding-left: 40px;
}

body[data-job-status="done"][data-has-results="true"] .result-ready-bar .progress-copy::before {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 0;
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #16a34a;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  transform: translateY(-50%);
}

body[data-job-status="done"][data-has-results="true"] .result-ready-bar .progress-copy strong {
  font-size: 15px;
  font-weight: 620;
  line-height: 20px;
}

body[data-job-status="done"][data-has-results="true"] .result-ready-bar .progress-copy span {
  margin-top: 1px;
  font-size: 13px;
  line-height: 18px;
}

body[data-job-status="done"][data-has-results="true"] .idle-status-actions {
  display: none;
}

body[data-job-status="done"][data-has-results="true"] .done-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.done-export-action {
  display: inline-flex;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8dee6;
  border-radius: 11px;
  background: #ffffff;
  color: #111827;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 620;
  text-decoration: none;
}

.done-export-action:hover {
  border-color: #91d6b0;
  color: #118444;
}

.done-export-action.disabled {
  cursor: not-allowed;
  opacity: 0.48;
  pointer-events: none;
}

.result-access-brief {
  display: block;
  margin: 0 0 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.result-access-brief[hidden] {
  display: none;
}

.result-access-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.result-access-copy {
  min-width: 0;
}

.result-access-copy h3 {
  margin: 0;
  color: #111827;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 27px;
}

.result-access-copy p {
  max-width: 680px;
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 21px;
}

.result-access-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.result-access-primary,
.result-access-secondary {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 0 17px;
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}

.result-access-primary {
  border: 1px solid #111827;
  background: #111827;
  color: #ffffff;
}

.result-access-secondary {
  border: 1px solid #d8dee6;
  background: #ffffff;
  color: #111827;
}

.result-access-primary:hover,
.result-access-primary:focus-visible {
  background: #233044;
}

.result-access-secondary:hover,
.result-access-secondary:focus-visible {
  border-color: #91d6b0;
  color: #118444;
}

@media (max-width: 1180px) {
  .result-access-main {
    align-items: flex-start;
  }

  .result-access-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  .result-access-brief {
    margin-bottom: 16px;
  }

  .result-access-main {
    flex-direction: column;
    gap: 14px;
  }

  .result-access-actions {
    width: 100%;
    justify-content: stretch;
  }

  .result-access-primary,
  .result-access-secondary {
    width: 100%;
    white-space: normal;
  }
}

body[data-page="results"] .table-toolbar {
  min-height: 54px;
  border-bottom: 1px solid #e2e8f0;
  padding: 9px 14px;
}

body[data-page="results"] .result-tabs {
  gap: 7px;
}

body[data-page="results"] .result-tabs button {
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 620;
}

body[data-page="results"] .result-search {
  flex: 0 0 260px;
}

body[data-page="results"] .result-search input {
  width: 100%;
  height: 36px;
  border-radius: 12px;
}

body[data-page="results"] .results-table {
  min-width: 1220px;
}

body[data-page="results"] .results-table tr {
  grid-template-columns:
    34px
    minmax(230px, 1.6fr)
    140px
    145px
    145px
    190px
    130px
    100px
    86px;
  align-items: center;
}

body[data-page="results"] .results-table th {
  height: 42px;
  font-weight: 600;
}

body[data-page="results"] .results-table td {
  padding: 10px 12px;
}

body[data-page="results"] .results-table tbody tr {
  min-height: 68px;
}

body[data-page="results"] .reviews-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body[data-page="results"] .review-source {
  gap: 2px;
}

body[data-page="results"] .review-source + .review-source {
  margin-top: 6px;
}

body[data-page="results"] .source-name {
  color: #64748b;
  font-size: 13px;
  line-height: 17px;
}

body[data-page="results"] .review-source strong {
  color: #111827;
  font-size: 13px;
  font-weight: 620;
  line-height: 17px;
}

body[data-page="results"] .review-source small {
  color: #94a3b8;
  font-size: 12px;
  line-height: 16px;
}

body[data-page="results"] .lead-links {
  gap: 5px;
}

body[data-page="results"] .social-chip {
  height: 22px;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 560;
}

body[data-page="results"] .quality-cell {
  display: flex;
  align-items: center;
}

body[data-page="results"] .quality-badge {
  height: 26px;
  justify-content: center;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 620;
}

body[data-page="results"] .quality-badge.good {
  background: #eef6ff;
  color: #2f5f93;
}

body[data-page="results"] .actions-cell {
  display: flex;
  align-items: center;
}

body[data-page="results"] .row-actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 140ms ease;
}

body[data-page="results"] .results-table tbody tr:hover .row-actions,
body[data-page="results"] .results-table tbody tr:focus-within .row-actions {
  opacity: 1;
}

body[data-page="results"] .row-actions button {
  height: 28px;
  border-radius: 9px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 620;
}

@media (max-width: 900px) {
  body[data-page="results"] .result-stats {
    display: flex;
  }

  body[data-job-status="done"][data-has-results="true"] .result-ready-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  body[data-job-status="done"][data-has-results="true"] .done-actions {
    flex-wrap: wrap;
  }
}

/* Result mobile containment. The data table may be wide, but the page itself must not be. */
body[data-page="results"] .workspace-body,
body[data-page="results"] .run-stage,
body[data-page="results"] .results-card,
body[data-page="results"] .table-wrap {
  min-width: 0;
}

body[data-page="results"] .table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
}

body[data-page="results"][data-has-results="false"] .table-wrap {
  overflow: hidden;
}

body[data-page="results"][data-has-results="false"] .results-table {
  width: 100%;
  min-width: 0;
}

body[data-page="results"][data-has-results="false"] .results-table thead {
  display: none;
}

body[data-page="results"][data-has-results="false"] .results-table tr {
  display: block;
  min-height: 0;
  border-bottom: 0;
}

body[data-page="results"][data-has-results="false"] .results-table td {
  display: block;
  height: auto;
  padding: 0;
}

body[data-page="results"][data-has-results="false"] .empty-state {
  width: min(100%, 440px);
}

@media (max-width: 900px) {
  body[data-page="results"] {
    overflow-x: hidden;
  }

  body[data-page="results"] .workspace-body {
    max-width: 100vw;
  }

  body[data-page="results"][data-has-results="true"] .table-wrap {
    border-top: 1px solid #eef2f7;
  }
}

@media (max-width: 620px) {
  body[data-page="results"] .workspace-body,
  body[data-page="results"] .actor-head {
    padding-right: 20px;
    padding-left: 20px;
  }

  body[data-page="results"] .run-stage .workspace-head {
    align-items: flex-start;
  }

  body[data-page="results"] .workspace-actions,
  body[data-page="results"] .workspace-actions .export-actions {
    width: 100%;
  }

  body[data-page="results"] .workspace-actions .export-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  body[data-page="results"] .export-actions .secondary-action {
    width: 100%;
  }

  body[data-page="results"] .idle-status-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  body[data-page="results"] .result-run-action {
    width: 100%;
  }
}

/* Result review cleanup: title with back action, no KPI chips, seven-column table. */
body[data-page="results"] .run-stage .workspace-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 0 0 22px;
  border-bottom: 1px solid #e2e8f0;
}

body[data-page="results"] .run-stage .back-action {
  display: inline-flex;
  width: 36px;
  height: 36px;
  margin-top: 18px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #111827;
  font-size: 18px;
  line-height: 1;
}

body[data-page="results"] .run-stage .back-action:hover,
body[data-page="results"] .run-stage .back-action:focus-visible {
  background: #f1f5f9;
}

body[data-page="results"] .run-stage .workspace-title {
  min-width: 0;
}

body[data-page="results"] .run-stage .workspace-head h2 {
  margin-top: 17px;
}

body[data-page="results"] .run-stage .workspace-actions {
  align-self: start;
  margin-top: 18px;
}

body[data-page="results"] .result-stats {
  display: none !important;
}

body[data-page="results"] .results-table {
  min-width: 1040px;
}

body[data-page="results"] .results-table th,
body[data-page="results"] .results-table td {
  width: auto;
  min-width: 0;
}

body[data-page="results"] .results-table tr {
  grid-template-columns:
    34px
    minmax(260px, 1.7fr)
    150px
    170px
    170px
    220px
    minmax(160px, 0.9fr);
}

body[data-page="results"] .results-table tbody tr {
  border-bottom: 1px solid #eef2f7;
}

body[data-page="results"] .results-table tbody tr:last-child {
  border-bottom: 0;
}

body[data-page="results"] .results-table td {
  border-bottom: 0;
}

body[data-page="results"] .results-table .empty-row {
  grid-template-columns: 1fr;
}

body[data-page="results"] .results-table .empty-row td {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  body[data-page="results"] .run-stage .workspace-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  body[data-page="results"] .run-stage .workspace-actions {
    grid-column: 2;
    margin-top: 4px;
  }
}

@media (max-width: 620px) {
  body[data-page="results"] .run-stage .workspace-head {
    gap: 10px;
  }

  body[data-page="results"] .run-stage .back-action {
    margin-top: 13px;
  }

  body[data-page="results"] .run-stage .workspace-head h2 {
    margin-top: 12px;
    font-size: 27px;
    line-height: 32px;
  }

  body[data-page="results"] .run-stage .workspace-actions {
    grid-column: 1 / -1;
  }
}

/* Flat B2B SaaS visual system. */
:root {
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #111827;
  --text-muted: #64748b;
  --text-soft: #94a3b8;
  --primary: #16a34a;
  --primary-hover: #118444;
  --primary-soft: #eaf8f0;
  --primary-border: #d8dee6;
  --blue-soft: #eff6ff;
  --blue-border: #bfdbfe;
  --blue-text: #2563eb;
  --danger-soft: #fef2f2;
  --danger-border: #fecaca;
  --danger-text: #dc2626;
  --shell-bg: var(--surface);
  --shell-sidebar-bg: var(--surface-muted);
  --shell-window-bg: var(--surface);
  --shell-border: var(--border);
  --shell-border-soft: #eef2f7;
  --shell-text: var(--text);
  --shell-text-muted: var(--text-muted);
  --shell-text-faint: var(--text-soft);
  --shell-text-soft: var(--text-soft);
  --shell-accent: var(--primary);
  --shell-accent-hover: var(--primary-hover);
  --shell-accent-soft: var(--primary-soft);
}

body,
.app-shell,
.workspace,
.input-stage,
.run-stage,
.search-form,
.launch-summary,
.results-card,
.table-toolbar,
.results-table,
.usage-popover,
.profile-popover,
.history-popover {
  background: var(--surface);
}

.app-header,
.results-table th,
.source-option:hover,
.results-table tbody tr:hover,
body[data-page="results"] .results-table tbody tr:hover {
  background: var(--surface-muted);
}

.usage-button,
.profile-button,
.history-toggle,
.main-nav-link,
.secondary-action,
.done-export-action,
.ghost-action,
.row-actions button,
.result-tabs button,
.preset-chip,
.social-chip,
.source-option,
.summary-item,
.selection-toolbar button,
.upgrade-action {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text-muted);
}

.usage-button:hover,
.profile-button:hover,
.history-toggle:hover,
.main-nav-link:hover,
.secondary-action:hover,
.done-export-action:hover,
.ghost-action:hover,
.row-actions button:hover,
.result-tabs button:hover,
.preset-chip:hover,
.social-chip:hover,
.selection-toolbar button:hover,
.upgrade-action:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
  color: var(--text);
}

.main-nav-link.is-active,
.history-toggle[aria-expanded="true"].main-nav-link,
.result-tabs button.is-active,
.preset-chip.is-active,
.source-option:has(input:checked),
.parser-switch label:has(input:checked),
.geo-switch label:has(input:checked),
.rating-options label:has(input:checked) {
  border-color: transparent;
  background: var(--button-bg-active, #e8ecea);
  color: var(--text-main, #111827);
}

.primary-action,
.small-primary-action,
.start-action,
.launch-summary-action,
.result-run-action {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.primary-action:hover,
.small-primary-action:hover,
.start-action:hover,
.launch-summary-action:hover,
.result-run-action:hover {
  border-color: transparent;
  background: var(--primary-hover);
  color: #ffffff;
}

.progress-card,
.result-ready-bar,
body[data-job-status="done"] .result-ready-bar,
body[data-job-status="done"][data-has-results="true"] .result-ready-bar {
  border-color: transparent;
  background: #f0fdf4;
}

body[data-job-status="done"][data-has-results="true"] .result-ready-bar .progress-copy::before {
  background: var(--primary);
  color: #ffffff;
}

.done-export-action,
body[data-job-status="done"][data-has-results="true"] .done-export-action {
  border-color: transparent;
  background: var(--surface);
  color: var(--text);
}

.done-export-action:hover,
body[data-job-status="done"][data-has-results="true"] .done-export-action:hover {
  border-color: transparent;
  background: var(--button-bg, #f4f4f2);
  color: var(--text-main, #111827);
}

.result-search input,
input,
select,
.geo-readonly {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.result-search input:hover,
input:hover,
select:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
}

.results-table tbody tr,
body[data-page="results"] .results-table tbody tr {
  background: var(--surface);
}

.results-table td,
body[data-page="results"] .results-table td,
body[data-page="results"] .results-table tbody tr > * {
  background: transparent;
}

.results-table tbody tr:hover td,
body[data-page="results"] .results-table tbody tr:hover td,
body[data-page="results"] .results-table tbody tr:hover > * {
  background: transparent;
  box-shadow: none;
}

.social-chip {
  background: #f1f5f9;
  color: #475569;
}

.quality-badge.full,
.quality-badge.good,
.quality-badge.basic,
.quality-badge.weak {
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-muted);
}

.quality-badge.good {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  color: var(--blue-text);
}

.quality-badge.weak {
  border-color: var(--danger-border);
  background: var(--danger-soft);
  color: var(--danger-text);
}

/* HireHi-like soft controls: neutral pills instead of green outline buttons. */
:root {
  --page-bg: #f4f4f2;
  --surface: #ffffff;
  --button-bg: #f4f4f2;
  --button-bg-hover: #ececea;
  --button-bg-active: #e8ecea;
  --button-text: #1f2933;
  --button-text-muted: #667085;
  --border-soft: #e6e8ec;
  --border-muted: #d8dee6;
  --green: #18a957;
  --green-soft: #eaf8f0;
  --green-text: #118444;
  --text-main: #111827;
  --text-muted: #667085;
  --text-soft: #98a2b3;
  --shell-bg: var(--page-bg);
  --shell-sidebar-bg: var(--page-bg);
  --shell-window-bg: var(--page-bg);
  --shell-text: var(--text-main);
  --shell-text-muted: var(--text-muted);
  --shell-text-faint: var(--text-soft);
  --shell-accent: var(--green);
  --shell-accent-hover: var(--green-text);
  --shell-accent-soft: var(--green-soft);
}

html,
body,
.app-shell,
.workspace,
.run-stage,
body[data-page="results"] .workspace-body {
  background: var(--page-bg);
}

.app-header,
.table-toolbar,
.results-table th {
  background: var(--surface);
}

.ui-pill,
.result-tabs button,
.preset-chip,
.history-toggle,
.ghost-action,
.selection-toolbar button,
.upgrade-action,
.row-actions button {
  display: inline-flex;
  height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-text);
  cursor: pointer;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.ui-pill:hover,
.result-tabs button:hover,
.preset-chip:hover,
.history-toggle:hover,
.ghost-action:hover,
.selection-toolbar button:hover,
.upgrade-action:hover,
.row-actions button:hover {
  border: 0;
  background: var(--button-bg-hover);
  color: var(--text-main);
}

.ui-pill:active,
.result-tabs button:active,
.preset-chip:active,
.history-toggle:active,
.ghost-action:active,
.selection-toolbar button:active,
.upgrade-action:active,
.row-actions button:active {
  background: #e1e5e3;
}

.ui-pill:disabled,
.result-tabs button:disabled,
.preset-chip:disabled,
.history-toggle:disabled,
.ghost-action:disabled,
.selection-toolbar button:disabled,
.upgrade-action:disabled,
.row-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

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

.result-tabs button,
body[data-page="results"] .result-tabs button {
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--button-bg);
  color: #3f4a5a;
  padding: 0 13px;
  font-size: 14px;
  font-weight: 600;
}

.result-tabs button:hover,
body[data-page="results"] .result-tabs button:hover {
  border: 0;
  background: var(--button-bg-hover);
  color: var(--text-main);
}

.result-tabs button.is-active,
body[data-page="results"] .result-tabs button.is-active {
  border: 0;
  background: #e1e7e4;
  color: var(--text-main);
}

.result-tabs button span,
body[data-page="results"] .result-tabs button span {
  color: #7a8594;
  font-weight: 600;
}

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

.export-actions .secondary-action,
.done-actions .done-export-action,
.done-export-action,
body[data-job-status="done"][data-has-results="true"] .done-export-action {
  height: 42px;
  min-width: 0;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  color: var(--text-main);
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
}

.export-actions .secondary-action:hover,
.done-actions .done-export-action:hover,
.done-export-action:hover,
body[data-job-status="done"][data-has-results="true"] .done-export-action:hover {
  border: 0;
  background: var(--button-bg);
  color: var(--text-main);
}

.done-export-action.disabled,
.secondary-action.disabled {
  opacity: 0.45;
}

.progress-card,
.result-ready-bar,
body[data-job-status="done"] .result-ready-bar,
body[data-job-status="done"][data-has-results="true"] .result-ready-bar {
  border: 0;
  border-radius: 22px;
  background: var(--green-soft);
}

body[data-job-status="done"][data-has-results="true"] .result-ready-bar .progress-copy::before {
  background: var(--green);
  color: #ffffff;
}

.main-nav-link {
  height: 38px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--button-text-muted);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
}

.main-nav-link:hover,
.main-nav-link.is-active,
.history-toggle[aria-expanded="true"].main-nav-link {
  border: 0;
  background: var(--button-bg);
  color: var(--text-main);
}

.usage-button,
.profile-button {
  border: 0;
  border-radius: 16px;
  background: var(--button-bg);
  color: var(--button-text);
}

.usage-button:hover,
.profile-button:hover {
  border: 0;
  background: var(--button-bg-hover);
  color: var(--text-main);
}

.result-search {
  flex: 0 0 280px;
}

.result-search input,
body[data-page="results"] .result-search input {
  height: 42px;
  border: 0;
  border-radius: 16px;
  background: var(--button-bg);
  color: var(--text-main);
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
}

.result-search input::placeholder {
  color: var(--text-soft);
}

.result-search input:hover {
  border: 0;
  background: var(--button-bg-hover);
}

.result-search input:focus {
  border: 0;
  background: var(--surface);
  outline: 1px solid var(--border-muted);
}

.social-chip,
body[data-page="results"] .social-chip {
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: var(--button-bg);
  color: #475467;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
}

.social-chip:hover,
body[data-page="results"] .social-chip:hover {
  border: 0;
  background: var(--button-bg-hover);
  color: var(--text-main);
}

.quality-badge,
.quality-badge.full,
.quality-badge.good,
.quality-badge.basic,
.quality-badge.weak {
  display: inline-flex;
  height: 26px;
  align-items: center;
  border: 0;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 600;
}

.quality-badge.full {
  background: var(--green-soft);
  color: var(--green-text);
}

.quality-badge.good {
  background: #eef4ff;
  color: #3457d5;
}

.quality-badge.basic {
  background: var(--button-bg);
  color: var(--button-text-muted);
}

.quality-badge.weak {
  background: #fef2f2;
  color: #dc2626;
}

.source-option:has(input:checked),
.parser-switch label:has(input:checked),
.geo-switch label:has(input:checked),
.rating-options label:has(input:checked),
.preset-chip.is-active {
  border: 0;
  background: var(--button-bg-active);
  color: var(--text-main);
}

.primary-action,
.small-primary-action,
.start-action,
.launch-summary-action,
.result-run-action {
  border: 0;
  background: var(--green);
  color: #ffffff;
}

.primary-action:hover,
.small-primary-action:hover,
.start-action:hover,
.launch-summary-action:hover,
.result-run-action:hover {
  border: 0;
  background: var(--green-text);
  color: #ffffff;
}

/* Settings window shell: keep the flat surface, but restore soft outer corners. */
body[data-page="settings"] .input-stage {
  overflow: clip;
  border-radius: 24px;
  background: var(--surface);
  padding: 32px 40px 40px;
}

body[data-page="settings"] .workspace-body {
  padding-top: 32px;
}

@media (max-width: 900px) {
  body[data-page="settings"] .input-stage {
    border-radius: 20px;
    padding: 24px;
  }
}

@media (max-width: 620px) {
  body[data-page="settings"] .input-stage {
    border-radius: 18px;
    padding: 20px;
  }
}

/* Search setup clarity: explain channel, geography, and source scope before launch. */
.search-channel-block {
  margin-top: 28px;
}

.search-channel-block .field-label,
.geo-panel .mode-label {
  display: block;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.segmented-control,
.parser-switch.segmented-control,
.geo-switch.segmented-control {
  display: inline-flex;
  width: fit-content;
  gap: 2px;
  border-radius: 16px;
  background: var(--button-bg);
  padding: 4px;
}

.segmented-control label,
.parser-switch.segmented-control label,
.geo-switch.segmented-control label {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
}

.segmented-control label:hover,
.parser-switch.segmented-control label:hover,
.geo-switch.segmented-control label:hover {
  background: var(--button-bg-hover);
  color: var(--text-main);
}

.segmented-control label:has(input:checked),
.parser-switch.segmented-control label:has(input:checked),
.geo-switch.segmented-control label:has(input:checked) {
  background: var(--surface);
  color: var(--text-main);
}

.channel-hint {
  max-width: 560px;
  margin-top: 12px;
  border-radius: 16px;
  background: #f8fafc;
  padding: 14px 16px;
}

.channel-hint strong,
.geo-warning strong,
.geo-info-title {
  display: block;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.channel-hint span,
.geo-info-text,
.geo-warning span {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 20px;
}

.channel-hint strong {
  margin-bottom: 3px;
}

.geo-panel {
  margin-top: 34px;
}

.geo-fields {
  margin-top: 14px;
}

.geo-input-block {
  display: block;
  margin-top: 0;
}

.geo-input-block > span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.geo-input-block input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--border-muted);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text-main);
  padding: 0 14px;
  font-size: 15px;
  font-weight: 500;
  outline: none;
}

.geo-input-block input:focus {
  border-color: #98a2b3;
}

.geo-suggestion-panel {
  position: fixed;
  z-index: 80;
  max-height: 264px;
  overflow-y: auto;
  border: 1px solid var(--border-muted);
  border-radius: 16px;
  background: var(--surface);
  padding: 6px;
}

.geo-suggestion-panel[hidden] {
  display: none;
}

.geo-suggestion-option {
  display: grid;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  padding: 7px 10px;
  text-align: left;
}

.geo-suggestion-option:hover,
.geo-suggestion-option.is-active {
  background: var(--button-bg);
}

.geo-suggestion-option span {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-suggestion-option small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: #667085;
  font-size: 13px;
  line-height: 18px;
}

.limit-field label {
  display: block;
}

.limit-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.limit-presets button {
  display: inline-flex;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: #f4f4f2;
  color: #475467;
  cursor: pointer;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 600;
}

.limit-presets button:hover {
  background: #ececea;
}

.limit-presets button.is-active {
  background: #e1e7e4;
  color: #111827;
}

.geo-info-card {
  display: flex;
  min-height: 64px;
  align-items: flex-start;
  gap: 12px;
  border-radius: 18px;
  background: #f8fafc;
  padding: 14px 16px;
}

.geo-info-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.geo-info-text,
.geo-warning span {
  margin-top: 2px;
}

.geo-warning,
.summary-warning,
.filter-warning {
  border-radius: 16px;
  background: #fffbeb;
}

.geo-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 14px 16px;
}

.geo-warning button {
  display: inline-flex;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-main);
  cursor: pointer;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
}

.geo-warning button:hover {
  background: var(--button-bg);
}

.summary-warning {
  margin: 8px 0 0;
  color: var(--text-muted);
  padding: 10px;
  font-size: 12px;
  line-height: 17px;
}

.filter-warning {
  margin: 12px 0 0;
  color: #7c5c00;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}

.done-note {
  display: block;
  margin-top: 2px;
  color: #667085;
  font-size: 12px;
  line-height: 16px;
}

.source-section .section-head {
  align-items: baseline;
  margin-bottom: 14px;
}

.source-section legend {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 24px;
}

.source-section .section-note {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.source-list {
  gap: 2px;
}

.source-option {
  display: grid;
  min-height: 58px;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  cursor: pointer;
  padding: 10px 12px;
}

.source-option:hover {
  background: #f8fafc;
}

.source-option:has(input:checked):not(.is-disabled) {
  background: #eef3f0;
}

.source-option.is-disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.source-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.source-option .source-check {
  display: flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-muted);
  border-radius: 7px;
  background: var(--surface);
  color: transparent;
  font-size: 12px;
  font-weight: 600;
}

.source-option:has(input:checked):not(.is-disabled) .source-check {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.source-copy {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: center;
}

.source-copy strong {
  min-width: 0;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
}

.source-copy > span {
  min-width: 0;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 18px;
}

.source-copy small {
  display: inline-flex;
  height: 28px;
  align-items: center;
  justify-content: center;
  grid-column: 2;
  grid-row: 1 / span 2;
  border: 0;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--text-muted);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.source-copy small.blocked {
  background: #fef2f2;
  color: #dc2626;
}

.source-copy small.soon {
  background: var(--button-bg);
  color: var(--text-soft);
}

@media (max-width: 620px) {
  .segmented-control,
  .parser-switch.segmented-control,
  .geo-switch.segmented-control {
    width: 100%;
  }

  .segmented-control label,
  .parser-switch.segmented-control label,
  .geo-switch.segmented-control label {
    flex: 1 1 auto;
    padding: 0 10px;
  }

  .geo-warning {
    align-items: flex-start;
    flex-direction: column;
  }

  .geo-warning button {
    width: 100%;
  }

  .source-copy {
    grid-template-columns: 1fr;
  }

  .source-copy small {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin-top: 8px;
  }
}

/* Segmented controls: compact fixed sizes keep the active state inside the shell. */
.segmented-control,
.parser-switch.segmented-control,
.geo-switch.segmented-control {
  display: inline-flex;
  width: fit-content;
  height: 44px;
  flex-shrink: 0;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  box-sizing: border-box;
  border: none;
  border-radius: 22px;
  background: #f4f4f2;
  padding: 4px;
}

.segmented-control label,
.parser-switch.segmented-control label,
.geo-switch.segmented-control label {
  position: relative;
  display: inline-flex;
  height: 36px;
  min-height: 0;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0;
  border: none;
  border-radius: 18px;
  background: transparent !important;
  padding: 0;
  transform: none;
  box-shadow: none;
}

.segmented-control .segment-button,
.parser-switch.segmented-control .segment-button,
.geo-switch.segmented-control .segment-button {
  display: inline-flex;
  height: 36px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0;
  border: none;
  border-radius: 18px;
  background: transparent;
  color: #667085;
  cursor: pointer;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 36px;
  white-space: nowrap;
  transform: none;
  box-shadow: none;
}

.geo-switch.segmented-control .segment-button {
  padding: 0 15px;
}

.segmented-control label:hover .segment-button,
.parser-switch.segmented-control label:hover .segment-button,
.geo-switch.segmented-control label:hover .segment-button {
  background: #ececea;
  color: #111827;
}

.segmented-control input:checked + .segment-button,
.segmented-control label.is-selected .segment-button,
.segmented-control .segment-button.active,
.segmented-control [data-state="active"],
.parser-switch.segmented-control input:checked + .segment-button,
.parser-switch.segmented-control label.is-selected .segment-button,
.geo-switch.segmented-control input:checked + .segment-button,
.geo-switch.segmented-control label.is-selected .segment-button {
  margin: 0;
  border: none;
  background: #ffffff;
  color: #111827;
  transform: none;
  box-shadow: none;
}

.segmented-control--sm {
  height: 44px;
  border-radius: 22px;
  padding: 4px;
}

.segmented-control--sm .segment-button {
  height: 36px;
  border-radius: 18px;
  padding: 0 16px;
  font-size: 14px;
  line-height: 36px;
}

@media (max-width: 620px) {
  .segmented-control,
  .parser-switch.segmented-control,
  .geo-switch.segmented-control {
    width: 100%;
  }

  .segmented-control label,
  .parser-switch.segmented-control label,
  .geo-switch.segmented-control label {
    flex: 1 1 auto;
    min-width: 0;
  }

  .segmented-control .segment-button,
  .parser-switch.segmented-control .segment-button,
  .geo-switch.segmented-control .segment-button {
    width: 100%;
    min-width: 0;
    padding: 0 10px;
  }
}

/* Leads and integrations sections */
.main-nav-link {
  height: 38px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: #667085;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
}

.main-nav-link:hover,
.main-nav-link.is-active,
.history-toggle[aria-expanded="true"].main-nav-link {
  background: #f4f4f2;
  color: #111827;
}

.app-page[hidden],
.lead-drawer-shell[hidden],
.integration-modal-shell[hidden] {
  display: none !important;
}

body[data-page="leads"] .workspace-body,
body[data-page="integrations"] .workspace-body {
  display: block;
  width: 100%;
  max-width: none;
  padding: 0;
}

.leads-page,
.integrations-page {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 40px 64px;
}

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

.page-header h1,
.page-header h2 {
  margin: 0;
  color: #111827;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 40px;
}

.page-header p {
  margin: 6px 0 0;
  color: #667085;
  font-size: 15px;
  line-height: 22px;
}

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

.page-actions button,
.bulk-bar button,
.integration-quick-tabs button,
.integration-card-actions button,
.drawer-actions button {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.page-actions button {
  height: 40px;
  border-radius: 16px;
  background: #f4f4f2;
  color: #111827;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
}

.page-actions button:hover {
  background: #ececea;
}

.leads-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.summary-chip {
  display: inline-flex;
  height: 36px;
  align-items: center;
  gap: 5px;
  border: none;
  border-radius: 999px;
  background: #f4f4f2;
  color: #667085;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
}

.summary-chip strong {
  color: #111827;
  font-size: 15px;
  font-weight: 600;
}

.summary-chip.primary {
  background: #e1e7e4;
  color: #111827;
}

.bulk-bar {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  border-radius: 18px;
  background: #f8fafc;
  padding: 8px 12px;
}

.bulk-bar span {
  margin-right: auto;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

.bulk-bar button {
  height: 34px;
  border-radius: 999px;
  background: #f4f4f2;
  color: #111827;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
}

.bulk-bar button:hover {
  background: #ececea;
}

.leads-toolbar {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #e5eaf1;
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  background: #ffffff;
  padding: 10px 14px;
}

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

.integration-quick-tabs button {
  height: 34px;
  border-radius: 999px;
  background: #f4f4f2;
  color: #667085;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
}

.integration-quick-tabs {
  margin-bottom: 20px;
}

.integration-quick-tabs button {
  height: 36px;
  font-size: 14px;
}

.integration-quick-tabs button:hover {
  background: #ececea;
}

.integration-quick-tabs button.active {
  background: #e1e7e4;
  color: #111827;
}

.leads-search input {
  width: 280px;
  height: 40px;
  border: none;
  border-radius: 16px;
  outline: none;
  background: #f4f4f2;
  color: #111827;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
}

.leads-search input::placeholder {
  color: #98a2b3;
}

.leads-search input:focus {
  outline: 1px solid #d8dee6;
  background: #ffffff;
}

.leads-table {
  overflow-x: auto;
  border: 1px solid #e5eaf1;
  border-radius: 0 0 22px 22px;
  background: #ffffff;
}

.leads-row {
  display: grid;
  min-width: 1080px;
  grid-template-columns:
    30px
    minmax(180px, 1.5fr)
    92px
    108px
    108px
    136px
    104px
    88px
    78px
    58px;
  align-items: center;
  column-gap: 10px;
  border-bottom: 1px solid #eef2f7;
  padding: 12px 14px;
}

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

.leads-head {
  min-height: 42px;
  background: #f8fafc;
  color: #667085;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.leads-row:not(.leads-head) {
  min-height: 68px;
  cursor: pointer;
}

.leads-row:not(.leads-head):hover {
  background: #f8fafc;
}

.leads-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #4dac63;
}

.company-name {
  overflow: hidden;
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-address {
  overflow: hidden;
  margin-top: 4px;
  color: #667085;
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reputation-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reputation-cell .source {
  color: #667085;
  font-size: 13px;
}

.reputation-cell .rating {
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

.reputation-cell .reviews {
  color: #98a2b3;
  font-size: 12px;
}

.leads-row .data-link {
  overflow: hidden;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.social-list > .social-chip {
  display: inline-flex;
  height: 24px;
  align-items: center;
  border: none;
  border-radius: 999px;
  background: #f4f4f2;
  color: #475467;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.run-source {
  color: #667085;
  font-size: 13px;
  font-weight: 600;
}

.status-badge {
  display: inline-flex;
  height: 26px;
  align-items: center;
  border: none;
  border-radius: 999px;
  background: #f4f4f2;
  color: #667085;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.new {
  background: #eaf8f0;
  color: #118444;
}

.status-badge.exported {
  background: #eef4ff;
  color: #3457d5;
}

.status-badge.working {
  background: #fff7e8;
  color: #a15c00;
}

.status-badge.excluded {
  background: #f4f4f2;
  color: #98a2b3;
}

.lead-row-actions button {
  height: 30px;
  border: none;
  border-radius: 999px;
  background: #f4f4f2;
  color: #111827;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.lead-row-actions button:hover {
  background: #ececea;
}

.leads-empty-row {
  grid-template-columns: 34px minmax(240px, 1fr);
}

.leads-skeleton-row .skeleton-line {
  width: 100%;
}

.leads-empty-state {
  min-height: 420px;
  border: 1px solid #e5eaf1;
  border-radius: 24px;
  background: #ffffff;
  text-align: center;
}

.leads-empty-state h2 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  font-weight: 600;
  line-height: 28px;
}

.leads-empty-state p {
  max-width: 420px;
  margin: 8px auto 18px;
  color: #667085;
  font-size: 15px;
  line-height: 22px;
}

.lead-drawer-shell,
.integration-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  justify-content: flex-end;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(17, 24, 39, 0.18);
  cursor: pointer;
}

.lead-drawer,
.integration-modal {
  position: relative;
  display: flex;
  width: min(430px, calc(100vw - 28px));
  height: calc(100vh - 24px);
  flex-direction: column;
  margin: 12px;
  border: 1px solid #e5eaf1;
  border-radius: 24px;
  background: #ffffff;
  padding: 22px;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #eef2f7;
  padding-bottom: 18px;
}

.drawer-kicker {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.drawer-head h2 {
  margin: 5px 0 0;
  color: #111827;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 30px;
}

.drawer-head p {
  margin: 6px 0 0;
  color: #667085;
  font-size: 14px;
  line-height: 20px;
}

.drawer-close {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: none;
  border-radius: 12px;
  background: #f4f4f2;
  color: #111827;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.drawer-close:hover {
  background: #ececea;
}

.drawer-content {
  display: grid;
  gap: 0;
  padding: 8px 0;
}

.drawer-field {
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid #eef2f7;
  padding: 13px 0;
}

.drawer-field > span {
  color: #667085;
  font-size: 13px;
  line-height: 20px;
}

.drawer-field strong,
.drawer-field-value {
  display: block;
  min-width: 0;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  word-break: break-word;
}

.drawer-field a {
  color: #111827;
  text-decoration: none;
}

.lead-contact-stack {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.lead-contact-item {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}

.lead-contact-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.lead-contact-value .data-link,
.lead-contact-value .masked-contact {
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.lead-contact-roles {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  gap: 4px;
}

.lead-contact-roles > span {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  border-radius: 999px;
  background: #eef3f0;
  color: #335b45;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}

.lead-contact-stack[data-contact-type="phone"] .lead-contact-roles > span {
  background: #f1f5f9;
  color: #475467;
}

.results-table .lead-contact-stack {
  max-width: 210px;
}

.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
}

.drawer-actions button {
  height: 38px;
  border-radius: 999px;
  background: #f4f4f2;
  color: #111827;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
}

.drawer-actions button:hover {
  background: #ececea;
}

.drawer-actions button.primary {
  background: #111827;
  color: #ffffff;
}

.drawer-actions button.primary:hover {
  background: #1f2937;
}

.drawer-actions button.danger {
  background: #fff1f2;
  color: #be123c;
}

.integration-section {
  margin-top: 28px;
}

.integration-section:first-of-type {
  margin-top: 0;
}

.integration-section-header {
  margin-bottom: 12px;
}

.integration-section-header h2 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 28px;
}

.integration-section-header p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 14px;
  line-height: 20px;
}

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

.integration-card {
  display: flex;
  min-height: 180px;
  flex-direction: column;
  border: 1px solid #e5eaf1;
  border-radius: 24px;
  background: #ffffff;
  padding: 18px;
}

.integration-card:hover {
  background: #f8fafc;
}

.integration-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.integration-icon {
  display: flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #f4f4f2;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
}

.integration-status {
  display: inline-flex;
  height: 28px;
  align-items: center;
  border-radius: 999px;
  background: #f4f4f2;
  color: #667085;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 600;
}

.integration-status.connected,
.integration-status.available {
  background: #eaf8f0;
  color: #118444;
}

.integration-status.soon {
  background: #f4f4f2;
  color: #98a2b3;
}

.integration-status.not-connected {
  background: #fff7e8;
  color: #a15c00;
}

.integration-card h3 {
  margin: 16px 0 0;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
}

.integration-card p {
  margin: 6px 0 0;
  color: #667085;
  font-size: 14px;
  line-height: 20px;
}

.integration-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}

.integration-card-actions button {
  height: 36px;
  border-radius: 999px;
  background: #f4f4f2;
  color: #111827;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 600;
}

.integration-card-actions button:hover {
  background: #ececea;
}

.integration-card-actions button.primary {
  background: #111827;
  color: #ffffff;
}

.integration-card-actions button.primary:hover {
  background: #1f2937;
}

.integration-card-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.webhook-form {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  padding-top: 18px;
}

.webhook-form label {
  display: grid;
  gap: 7px;
}

.webhook-form label span {
  color: #667085;
  font-size: 13px;
  font-weight: 600;
}

.webhook-form input {
  height: 44px;
  border: 1px solid #e5eaf1;
  border-radius: 16px;
  outline: none;
  background: #ffffff;
  color: #111827;
  padding: 0 14px;
  font: inherit;
}

.webhook-form input:focus {
  outline: 1px solid #d8dee6;
}

.webhook-form input[readonly] {
  background: #f8fafc;
  color: #667085;
}

.webhook-feedback {
  min-height: 20px;
  color: #667085;
  font-size: 13px;
  line-height: 20px;
}

body.has-open-drawer {
  overflow: hidden;
}

@media (max-width: 1000px) {
  .integration-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .leads-row {
    min-width: 1100px;
  }

  .leads-table {
    overflow-x: auto;
  }
}

@media (max-width: 720px) {
  .leads-page,
  .integrations-page {
    padding: 24px 18px 48px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-actions {
    width: 100%;
  }

  .page-actions button {
    flex: 1;
  }

  .leads-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .leads-search input {
    width: 100%;
  }

  .integration-grid {
    grid-template-columns: 1fr;
  }

  .drawer-field {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

.results-table th,
.leads-head,
.drawer-kicker {
  letter-spacing: 0;
  text-transform: none;
}

.lead-drawer-shell,
.integration-modal-shell,
.filters-drawer-shell,
.merge-modal-shell,
.lead-list-modal-shell {
  z-index: 1000;
}

/* Leads workspace tools */
.filters-drawer-shell[hidden],
.merge-modal-shell[hidden],
.lead-list-modal-shell[hidden] {
  display: none !important;
}

.soft-button,
.dark-button {
  display: inline-flex;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  padding: 0 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.soft-button {
  background: #f4f4f2;
  color: #111827;
}

.soft-button:hover {
  background: #ececea;
}

.dark-button {
  background: #111827;
  color: #ffffff;
}

.dark-button:hover {
  background: #1f2937;
}

.soft-button span {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 12px;
}

.summary-chip:is(button) {
  cursor: pointer;
  font-family: inherit;
}

.summary-chip.warning {
  background: #fffbeb;
  color: #92400e;
}

.lead-views {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.lead-views button {
  height: 36px;
  border: none;
  border-radius: 999px;
  background: #f1f2ef;
  color: #667085;
  cursor: pointer;
  padding: 0 13px;
  font-size: 14px;
  font-weight: 600;
}

.lead-views button:hover {
  background: #ececea;
}

.lead-views button.active {
  background: #e1e7e4;
  color: #111827;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.leads-tool-button {
  position: relative;
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #111827;
  cursor: pointer;
  padding: 0;
}

.leads-tool-button:hover,
.leads-tool-button:focus-visible {
  outline: none;
  background: #f4f4f2;
  color: #111827;
}

.leads-tool-button:focus-visible {
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.12);
}

.leads-tool-icon {
  display: block;
  width: 36px;
  height: 36px;
  background: currentColor;
  -webkit-mask: var(--leads-tool-icon) center / contain no-repeat;
  mask: var(--leads-tool-icon) center / contain no-repeat;
}

.leads-tool-icon-filter {
  --leads-tool-icon: url("/icons/leads-filter.svg?v=20260621-leads-tools-1");
  width: 44px;
  height: 44px;
}

.leads-tool-icon-group {
  --leads-tool-icon: url("/icons/leads-group.svg?v=20260622-leads-sort-1");
}

.leads-tool-count {
  position: absolute;
  top: 2px;
  right: 2px;
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.group-menu-wrap {
  position: relative;
}

.group-menu {
  position: fixed;
  top: var(--group-menu-top, 0);
  left: var(--group-menu-left, 0);
  z-index: 1200;
  display: grid;
  width: min(260px, calc(100vw - 24px));
  min-width: min(220px, calc(100vw - 24px));
  gap: 4px;
  border: 1px solid #e5eaf1;
  border-radius: 18px;
  background: #ffffff;
  padding: 8px;
}

.group-menu button {
  height: 34px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #667085;
  cursor: pointer;
  padding: 0 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}

.group-menu button:hover,
.group-menu button.active {
  background: #f4f4f2;
  color: #111827;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}

.active-filters-label {
  color: #667085;
  font-size: 13px;
  font-weight: 600;
}

.active-filters-query {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  background: #f8fafc;
  color: #667085;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
}

.active-filters button {
  height: 32px;
  border: none;
  border-radius: 999px;
  background: #f4f4f2;
  color: #475467;
  cursor: pointer;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 600;
}

.active-filters button.clear {
  background: transparent;
  color: #98a2b3;
}

.leads-row {
  min-width: 1240px;
  grid-template-columns:
    30px
    minmax(198px, 1.45fr)
    92px
    160px
    108px
    132px
    104px
    112px
    88px
    88px;
}

.company-name-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.company-name-line .company-name {
  min-width: 0;
}

.duplicate-badge {
  display: inline-flex;
  height: 24px;
  flex: 0 0 auto;
  align-items: center;
  border: none;
  border-radius: 999px;
  background: #fffbeb;
  color: #92400e;
  cursor: pointer;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
}

.quality-badge {
  display: inline-flex;
  height: 26px;
  align-items: center;
  border-radius: 999px;
  background: #f4f4f2;
  color: #667085;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 600;
}

.quality-badge.full {
  background: #eaf8f0;
  color: #118444;
}

.quality-badge.good {
  background: #eef4ff;
  color: #3457d5;
}

.quality-badge.basic {
  background: #fff7e8;
  color: #a15c00;
}

.quality-badge.weak {
  background: #f4f4f2;
  color: #98a2b3;
}

.lead-enrichment-badges {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.lead-enrichment-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  background: #f4f4f2;
  color: #667085;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.lead-enrichment-badge.good {
  background: #eaf8f0;
  color: #118444;
}

.lead-enrichment-badge.warn {
  background: #fff7e8;
  color: #a15c00;
}

.lead-enrichment-badge.muted {
  background: #f4f4f2;
  color: #98a2b3;
}

.legal-entity-summary {
  min-width: 0;
  display: grid;
  gap: 4px;
  margin-top: 5px;
}

.legal-entity-name {
  min-width: 0;
  overflow: hidden;
  color: #667085;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  line-height: 17px;
  text-transform: none;
}

.legal-entity-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.legal-primary-id,
.legal-details-trigger,
.fns-status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 0;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}

.legal-primary-id {
  gap: 5px;
  background: #f4f4f2;
  color: #475467;
  cursor: copy;
  font-variant-numeric: tabular-nums;
}

.legal-primary-id strong {
  color: #344054;
  font-weight: 600;
}

.legal-primary-id:hover,
.legal-primary-id:focus-visible {
  outline: none;
  background: #ececea;
  color: #111827;
}

.legal-details-trigger {
  background: transparent;
  color: #667085;
  cursor: pointer;
}

.legal-details-trigger:hover,
.legal-details-trigger:focus-visible {
  outline: none;
  background: #f4f4f2;
  color: #111827;
}

.fns-status {
  gap: 4px;
  font-weight: 600;
}

.fns-status.verified {
  background: #eaf8f0;
  color: #118444;
}

.legal-details-shell {
  position: fixed;
  inset: 0;
  z-index: 430;
  pointer-events: none;
}

.legal-details-shell[hidden] {
  display: none;
}

.legal-details-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  background: transparent;
  cursor: default;
  pointer-events: auto;
}

.legal-details-popover {
  position: fixed;
  z-index: 431;
  width: 360px;
  max-width: calc(100vw - 24px);
  border: 1px solid #e5eaf1;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  padding: 18px;
  pointer-events: auto;
}

.legal-details-content {
  display: grid;
  gap: 0;
}

.legal-details-content header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.legal-details-content h3 {
  margin: 0;
  color: #111827;
  font-size: 17px;
  font-weight: 600;
  line-height: 22px;
}

.legal-details-content header p {
  margin: 3px 0 0;
  color: #667085;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.legal-details-content header button {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: #f4f4f2;
  color: #667085;
  cursor: pointer;
  font-size: 18px;
}

.legal-details-content dl {
  margin: 16px 0 0;
}

.legal-details-row {
  display: grid;
  min-height: 42px;
  grid-template-columns: 64px minmax(0, 1fr) 38px;
  gap: 10px;
  align-items: start;
  border-top: 1px solid #eef2f7;
  padding: 9px 0;
}

.legal-details-row dt {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}

.legal-details-row dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 18px;
}

.legal-details-row button {
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #f4f4f2;
  color: #667085;
  cursor: pointer;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
}

.legal-details-row button:hover,
.legal-details-row button:focus-visible {
  outline: none;
  background: #ececea;
  color: #111827;
}

.legal-details-fns {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  margin-top: 12px;
  border-radius: 999px;
  background: #f4f4f2;
  color: #667085;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.legal-details-fns.verified {
  background: #eaf8f0;
  color: #118444;
}

.legal-details-fns.unavailable {
  background: #fff7e8;
  color: #a15c00;
}

.copy-all-requisites {
  width: 100%;
  height: 40px;
  margin-top: 14px;
  border: 0;
  border-radius: 20px;
  background: #111827;
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.copy-all-requisites:hover,
.copy-all-requisites:focus-visible {
  outline: none;
  background: #020617;
}

.run-source {
  display: grid;
  gap: 2px;
}

.run-source span {
  overflow: hidden;
  color: #475467;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-source small {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 600;
}

.lead-group-header {
  display: flex;
  height: 42px;
  min-width: 1180px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  background: #f8fafc;
  color: #667085;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
}

.empty-inline-action {
  display: inline-flex;
  height: 32px;
  align-items: center;
  border: none;
  border-radius: 999px;
  background: #f4f4f2;
  color: #111827;
  cursor: pointer;
  margin-top: 10px;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 600;
}

.leads-load-more {
  display: flex;
  min-width: 1080px;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-top: 1px solid #eef2f7;
  background: #ffffff;
  color: #667085;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
}

.leads-load-more button {
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #f4f4f2;
  color: #111827;
  cursor: pointer;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 600;
}

.leads-load-more button:hover,
.leads-load-more button:focus-visible {
  outline: none;
  background: #ececea;
}

.filters-drawer-shell,
.merge-modal-shell,
.lead-list-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 320;
}

.filters-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 321;
  display: flex;
  width: 420px;
  max-width: 100vw;
  height: 100vh;
  flex-direction: column;
  border-left: 1px solid #e5eaf1;
  background: #ffffff;
}

.filters-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #eef2f7;
  padding: 24px;
}

.filters-header h2 {
  margin: 0;
  color: #111827;
  font-size: 24px;
  font-weight: 600;
  line-height: 30px;
}

.filters-header p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 14px;
  line-height: 20px;
}

.filters-header button {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: none;
  border-radius: 12px;
  background: #f4f4f2;
  color: #111827;
  cursor: pointer;
  font-size: 22px;
}

.filters-scroll {
  overflow: auto;
}

.filter-group {
  border-bottom: 1px solid #eef2f7;
  padding: 18px 24px;
}

.filter-group-title {
  margin-bottom: 10px;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

.filter-options,
.filter-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-options button,
.filter-checks label {
  display: inline-flex;
  height: 34px;
  align-items: center;
  border: none;
  border-radius: 999px;
  background: #f4f4f2;
  color: #667085;
  cursor: pointer;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
}

.filter-checks input {
  width: 14px;
  height: 14px;
  margin-right: 7px;
  accent-color: #4dac63;
}

.filter-options button.active,
.filter-checks label:has(input:checked) {
  background: #e1e7e4;
  color: #111827;
}

.filters-footer {
  display: flex;
  gap: 8px;
  margin-top: auto;
  border-top: 1px solid #eef2f7;
  padding: 16px 24px;
}

.merge-modal,
.lead-list-modal {
  position: relative;
  z-index: 321;
  display: flex;
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100vh - 24px);
  flex-direction: column;
  margin: 12px auto;
  border: 1px solid #e5eaf1;
  border-radius: 24px;
  background: #ffffff;
  padding: 22px;
}

.lead-list-modal {
  width: min(680px, calc(100vw - 28px));
}

.merge-content,
.lead-list-content {
  overflow: auto;
  padding: 16px 0 4px;
}

.merge-master-list,
.merge-preview {
  display: grid;
  gap: 8px;
}

.merge-preview {
  margin-top: 18px;
}

.merge-section-title {
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

.merge-master-list label {
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 14px;
  background: #f8fafc;
  cursor: pointer;
  padding: 10px 12px;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

.merge-master-list input {
  width: 16px;
  height: 16px;
  accent-color: #4dac63;
}

.drawer-duplicates {
  display: grid;
  gap: 6px;
  border-bottom: 1px solid #eef2f7;
  padding: 13px 0;
}

.drawer-duplicates strong {
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

.drawer-duplicates span {
  color: #667085;
  font-size: 13px;
}

.drawer-duplicates button {
  justify-self: start;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: #fffbeb;
  color: #92400e;
  cursor: pointer;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 600;
}

.list-chip {
  display: inline-flex;
  height: 24px;
  align-items: center;
  border-radius: 999px;
  background: #f4f4f2;
  color: #475467;
  margin: 0 5px 5px 0;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
}

.list-name-field {
  display: grid;
  gap: 7px;
}

.lead-list-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 16px;
  background: #f8fafc;
  padding: 12px 14px;
}

.lead-list-context strong {
  color: #111827;
  font-size: 15px;
  font-weight: 600;
}

.lead-list-context span {
  color: #667085;
  font-size: 13px;
  font-weight: 600;
}

.lead-list-scope {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 14px;
}

.lead-list-scope[hidden] {
  display: none;
}

.lead-list-scope button {
  display: grid;
  gap: 3px;
  min-height: 58px;
  border: 1px solid #e5eaf1;
  border-radius: 16px;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  padding: 11px 12px;
  text-align: left;
  font-family: inherit;
}

.lead-list-scope button:hover,
.lead-list-scope button:focus-visible {
  outline: none;
  background: #f8fafc;
}

.lead-list-scope button.active {
  border-color: #c8d8ce;
  background: #e1e7e4;
}

.lead-list-scope button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.lead-list-scope strong {
  font-size: 14px;
  font-weight: 600;
}

.lead-list-scope span {
  color: #667085;
  font-size: 12px;
  font-weight: 600;
}

.list-name-field span {
  color: #667085;
  font-size: 13px;
  font-weight: 600;
}

.list-name-field input {
  height: 44px;
  border: 1px solid #e5eaf1;
  border-radius: 16px;
  outline: none;
  background: #ffffff;
  color: #111827;
  padding: 0 14px;
  font: inherit;
}

.lead-list-preview {
  margin-top: 14px;
  border: 1px solid #eef2f7;
  border-radius: 16px;
  background: #ffffff;
}

.lead-list-preview-head,
.lead-list-preview-empty {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
}

.lead-list-preview-head strong,
.lead-list-preview-empty strong {
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

.lead-list-preview-head span,
.lead-list-preview-empty span {
  color: #667085;
  font-size: 13px;
  font-weight: 600;
}

.lead-list-preview-items {
  display: grid;
  gap: 1px;
  border-top: 1px solid #eef2f7;
}

.lead-list-preview-items span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
}

.lead-list-preview-items span + span {
  border-top: 1px solid #f4f6f8;
}

.lead-list-preview-items small,
.lead-list-preview-items em {
  color: #98a2b3;
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
}

.lead-list-preview-items em {
  padding: 10px 14px;
}

.lead-list-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.lead-list-options[hidden] {
  display: none;
}

.lead-list-options-title {
  width: 100%;
  color: #667085;
  font-size: 13px;
  font-weight: 600;
}

.lead-list-options button {
  display: grid;
  min-width: 160px;
  min-height: 54px;
  align-items: start;
  gap: 7px;
  border: 0;
  border-radius: 16px;
  background: #f4f4f2;
  color: #111827;
  cursor: pointer;
  padding: 9px 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}

.lead-list-options button:hover,
.lead-list-options button:focus-visible {
  outline: none;
  background: #ececea;
}

.lead-list-options button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.lead-list-options button strong {
  color: #111827;
}

.lead-list-options button span,
.lead-list-options button small {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 600;
}

.lead-list-feedback {
  min-height: 18px;
  margin: 10px 0 0;
  color: #667085;
  font-size: 13px;
  font-weight: 600;
}

.lead-list-feedback[hidden] {
  display: none;
}

.lead-list-feedback[data-state="error"] {
  color: #b42318;
}

@media (max-width: 900px) {
  .toolbar-left {
    width: 100%;
    flex-wrap: wrap;
  }

  .leads-search {
    flex: 1 1 240px;
  }

  .lead-list-scope {
    grid-template-columns: 1fr;
  }

  .lead-list-context,
  .lead-list-preview-items span {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .toolbar-left {
    align-items: stretch;
    flex-direction: column;
  }

  .filters-drawer,
  .merge-modal,
  .lead-list-modal {
    width: calc(100vw - 16px);
    margin: 8px;
  }
}

.lead-drawer-shell,
.integration-modal-shell,
.filters-drawer-shell,
.merge-modal-shell,
.lead-list-modal-shell {
  inset: var(--topbar-height) 0 0 0;
  z-index: 1000;
}

.filters-drawer,
.merge-modal,
.lead-list-modal {
  z-index: 1001;
}

.filters-drawer {
  top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
}

.merge-modal,
.lead-list-modal {
  max-height: calc(100vh - var(--topbar-height) - 24px);
}

/* Modal overlays must cover the top navigation too.
   Keep panels inside the overlay, but never leave the header as a bright active strip. */
.auth-overlay,
.paywall-overlay,
.trial-offer-overlay,
.account-modal-overlay,
.lead-drawer-shell,
.integration-modal-shell,
.filters-drawer-shell,
.merge-modal-shell,
.lead-list-modal-shell {
  inset: 0;
  z-index: 1200;
}

.filters-drawer {
  top: 0;
  height: 100vh;
}

.merge-modal,
.lead-list-modal {
  max-height: calc(100vh - 24px);
}

/* AI workflow layer */
.launch-mode-switch {
  display: inline-flex;
  align-self: flex-start;
  gap: 2px;
  margin: 0 0 24px;
  border-radius: 18px;
  background: #f4f4f2;
  padding: 4px;
}

.launch-mode-switch button {
  height: 40px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: #667085;
  cursor: pointer;
  padding: 0 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
}

.launch-mode-switch button:hover {
  background: #ececea;
  color: #111827;
}

.launch-mode-switch button.active {
  background: #ffffff;
  color: #111827;
}

.ai-query-parser,
.ai-analysis-card {
  border: 1px solid #e5eaf1;
  border-radius: 24px;
  background: #ffffff;
}

.ai-client-finder {
  display: grid;
  gap: 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.ai-flow-stage[hidden] {
  display: none !important;
}

.ai-flow-stage {
  display: block;
}

.ai-flow-stage:not([hidden]) {
  margin-bottom: 0;
}

.ai-query-parser {
  padding: 18px;
}

.ai-block-header h2,
.ai-result-header h2,
.ai-analysis-header h2 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 28px;
  text-wrap: balance;
}

.ai-analysis-header h2 {
  font-size: 20px;
  line-height: 26px;
}

.ai-block-header p,
.ai-result-header p,
.ai-analysis-header p {
  margin: 6px 0 0;
  color: #667085;
  font-size: 15px;
  line-height: 22px;
}

.ai-analysis-header p {
  font-size: 14px;
  line-height: 20px;
}

.ai-client-finder textarea,
.ai-form-row input,
.ai-query-input-row input,
.ai-search-input-row input {
  border: none;
  border-radius: 18px;
  outline: none;
  background: #f4f4f2;
  color: #111827;
  font-family: inherit;
  font-size: 14px;
}

.ai-client-finder textarea {
  width: 100%;
  min-height: 168px;
  margin-top: 18px;
  padding: 16px;
  font-size: 15px;
  line-height: 22px;
  resize: vertical;
}

.ai-intro {
  border: 1px solid #e5eaf1;
  border-radius: 20px;
  background: #ffffff;
  padding: 20px;
}

.ai-empty-note {
  margin: 14px 0 0;
  color: #667085;
  font-size: 14px;
  line-height: 20px;
}

.ai-primary-button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: #18a957;
  color: #ffffff;
  cursor: pointer;
  padding: 0 13px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.ai-primary-button:hover {
  background: #13964c;
}

.ai-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.ai-form-row input {
  height: 44px;
  padding: 0 14px;
}

.ai-client-finder textarea::placeholder,
.ai-form-row input::placeholder,
.ai-query-input-row input::placeholder,
.ai-search-input-row input::placeholder {
  color: #7c8798;
}

.ai-client-finder textarea:focus,
.ai-form-row input:focus,
.ai-query-input-row input:focus,
.ai-search-input-row input:focus {
  background: #ffffff;
  box-shadow: 0 0 0 1px #d8dee6;
}

.ai-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.ai-query-parser > label {
  display: block;
  margin-bottom: 8px;
  color: #667085;
  font-size: 14px;
  font-weight: 600;
}

.ai-query-input-row,
.ai-search-input-row {
  display: flex;
  gap: 8px;
}

.ai-query-input-row input,
.ai-search-input-row input {
  height: 44px;
  flex: 1;
  padding: 0 16px;
}

.ai-query-input-row button,
.ai-search-input-row button {
  height: 44px;
  border: none;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  cursor: pointer;
  padding: 0 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
}

.ai-query-input-row button:hover,
.ai-search-input-row button:hover {
  background: #1f2937;
}

.ai-state-message {
  margin: 10px 0 0;
  color: #667085;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.ai-intro > .ai-state-message {
  margin-top: 12px;
}

.ai-intro > .ai-state-message:not([hidden]) + .ai-empty-note {
  display: none;
}

.ai-state-message[data-state="success"] {
  color: #118444;
}

.ai-state-message[data-state="error"] {
  color: #b42318;
}

.ai-state-message[data-state="low-confidence"] {
  color: #92400e;
}

.ai-parsed-card {
  margin-top: 14px;
  border-radius: 20px;
  background: #f8fafc;
  padding: 16px;
}

.ai-parsed-card h3,
.ai-clarification-card h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
}

.parsed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.parsed-item {
  min-height: 68px;
  border-radius: 16px;
  background: #ffffff;
  padding: 12px;
}

.parsed-item span {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 600;
}

.parsed-item strong {
  display: block;
  margin-top: 4px;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  line-height: 19px;
}

.ai-warning-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.ai-warning-list span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  background: #eef7f2;
  color: #13784f;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
}

.ai-clarification-card,
.ai-understanding-card {
  border: 1px solid #e5eaf1;
  border-radius: 20px;
  background: #ffffff;
  padding: 18px;
}

.ai-clarification-card {
  padding-bottom: 24px;
}

.ai-segments-result,
.ai-scenarios-stage {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.ai-clarification-card p {
  margin: 6px 0 0;
  color: #667085;
  font-size: 14px;
  line-height: 20px;
}

.ai-clarification-fields {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.clarification-question {
  display: grid;
  gap: 12px;
}

.clarification-question strong {
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  line-height: 21px;
}

.clarification-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.clarification-options button {
  min-height: 34px;
  border: none;
  border-radius: 999px;
  background: #f4f4f2;
  color: #111827;
  cursor: pointer;
  padding: 0 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
}

.clarification-options button:hover,
.clarification-options button.active {
  background: #e1e7e4;
}

.ai-clarification-fields textarea {
  min-height: 86px;
  border: none;
  border-radius: 18px;
  outline: none;
  background: #f4f4f2;
  color: #111827;
  padding: 14px;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  resize: vertical;
}

.ai-clarification-card > .ai-primary-button {
  margin-top: 18px;
}

.ai-clarification-card > .ai-state-message {
  margin: 12px 0 0;
}

.ai-understanding-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.ai-understanding-card .ai-card-actions {
  grid-column: 1 / -1;
  margin-top: 0;
}

.ai-understanding-card h3,
.ai-clarification-card h3 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 26px;
}

.ai-summary {
  margin: 8px 0 0;
  color: #475467;
  font-size: 15px;
  line-height: 22px;
}

.ai-confidence {
  display: grid;
  min-width: 136px;
  gap: 4px;
  border-radius: 18px;
  background: #f4f4f2;
  padding: 12px 14px;
}

.ai-confidence span {
  color: #667085;
  font-size: 12px;
  font-weight: 600;
}

.ai-confidence strong {
  color: #111827;
  font-size: 20px;
  font-weight: 600;
  line-height: 24px;
}

.ai-result-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.segment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.segment-card {
  border: 1px solid #e5eaf1;
  border-radius: 20px;
  background: #ffffff;
  padding: 16px;
}

.segment-card:hover {
  background: #f8fafc;
}

.segment-card.is-rejected {
  opacity: 0.58;
}

.segment-card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.segment-card h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
}

.segment-origin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  color: #667085;
  font-size: 12px;
  font-weight: 600;
}

.origin-badge {
  display: inline-flex;
  height: 24px;
  align-items: center;
  border-radius: 999px;
  background: #f4f4f2;
  color: #667085;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
}

.segment-card input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: #111827;
}

.priority-badge {
  display: inline-flex;
  min-width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  border-radius: 999px;
  background: #f4f4f2;
  color: #667085;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 600;
}

.priority-badge.a {
  background: #eaf8f0;
  color: #118444;
}

.priority-badge.b {
  background: #eef4ff;
  color: #3457d5;
}

.segment-card p,
.segment-why {
  margin: 12px 0 0;
  color: #667085;
  font-size: 14px;
  line-height: 20px;
}

.segment-why {
  border-radius: 16px;
  background: #f8fafc;
  padding: 10px 12px;
  color: #475467;
}

.segment-why strong {
  color: #111827;
  font-weight: 600;
}

.segment-meta,
.segment-queries {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.segment-meta span,
.segment-queries span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  background: #f4f4f2;
  color: #475467;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 600;
}

.segment-queries span.is-empty {
  color: #98a2b3;
}

.segment-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: #111827;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.segment-select input {
  width: 18px;
  height: 18px;
  accent-color: #18a957;
}

.segment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.segment-actions button {
  height: 34px;
  border: none;
  border-radius: 999px;
  background: #f4f4f2;
  color: #111827;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.segment-actions button:hover {
  background: #ececea;
}

.segment-actions button:disabled {
  opacity: 0.58;
  cursor: wait;
}

.similar-loading {
  display: flex;
  height: 54px;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  border-radius: 18px;
  background: #f8fafc;
  color: #667085;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
}

.loading-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #18a957;
}

.similar-panel {
  margin-top: 14px;
  border-radius: 20px;
  background: #f8fafc;
  padding: 14px;
}

.similar-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.similar-panel-header h4 {
  margin: 0;
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
}

.similar-panel-header p {
  margin: 3px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 18px;
}

.similar-panel-header button,
.similar-empty button {
  height: 30px;
  border: none;
  border-radius: 999px;
  background: #f4f4f2;
  color: #667085;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.similar-panel-header button:hover,
.similar-empty button:hover {
  background: #ececea;
  color: #111827;
}

.similar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.similar-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: flex-start;
  gap: 10px;
  border-radius: 16px;
  background: #ffffff;
  padding: 12px;
  cursor: pointer;
}

.similar-row:hover {
  background: #fcfcfb;
}

.similar-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #111827;
}

.similar-row-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.similar-row-title span:first-child {
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.similar-row .priority-badge {
  width: 26px;
  min-width: 26px;
  height: 26px;
  margin-top: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
}

.similar-row-content p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 18px;
}

.similar-query-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.similar-query-chips span {
  display: inline-flex;
  height: 24px;
  align-items: center;
  border-radius: 999px;
  background: #f4f4f2;
  color: #475467;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
}

.similar-panel-actions,
.similar-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.similar-panel-actions {
  margin-top: 12px;
}

.soft-button,
.ghost-button,
.similar-confirm-actions button {
  height: 34px;
  border: none;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.soft-button,
.similar-confirm-actions button:first-child {
  background: #111827;
  color: #ffffff;
}

.soft-button:hover,
.similar-confirm-actions button:first-child:hover {
  background: #1f2937;
}

.ghost-button,
.similar-confirm-actions button:last-child {
  background: #f4f4f2;
  color: #111827;
}

.ghost-button:hover,
.similar-confirm-actions button:last-child:hover {
  background: #ececea;
}

.soft-button:disabled,
.ghost-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.similar-message {
  margin-top: 10px;
  color: #118444;
  font-size: 13px;
  font-weight: 600;
}

.similar-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  border-radius: 16px;
  background: #ffffff;
  padding: 12px;
}

.similar-confirm strong {
  display: block;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
}

.similar-confirm span {
  display: block;
  margin-top: 2px;
  color: #667085;
  font-size: 13px;
  line-height: 18px;
}

.similar-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  border-radius: 18px;
  background: #fef2f2;
  padding: 12px 14px;
}

.similar-error strong,
.similar-empty strong {
  display: block;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
}

.similar-error span,
.similar-empty span {
  display: block;
  margin-top: 2px;
  color: #667085;
  font-size: 13px;
  line-height: 18px;
}

.similar-error button {
  height: 32px;
  border: none;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.similar-empty {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  border-radius: 18px;
  background: #f8fafc;
  padding: 14px;
}

.similar-empty button {
  width: fit-content;
  margin-top: 4px;
}

.scenario-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.scenario-card {
  border: 1px solid #e5eaf1;
  border-radius: 20px;
  background: #ffffff;
  padding: 16px;
}

.ai-cta {
  margin-top: 16px;
}

.scenario-card h3 {
  margin: 0;
  color: #111827;
  font-size: 17px;
  font-weight: 600;
  line-height: 23px;
}

.scenario-params {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin-top: 12px;
  color: #667085;
  font-size: 13px;
  line-height: 18px;
}

.scenario-params strong {
  color: #111827;
  font-weight: 600;
}

.scenario-queries {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.scenario-queries span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  background: #f4f4f2;
  color: #475467;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 600;
}

.ai-analysis-card {
  margin-bottom: 16px;
  padding: 20px;
}

.ai-analysis-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.ai-analysis-summary {
  margin-top: 14px;
  border-radius: 18px;
  background: #f8fafc;
  color: #475467;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 20px;
}

.ai-analysis-summary p {
  margin: 0;
}

.ai-insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.ai-insight-card {
  min-height: 92px;
  border: none;
  border-radius: 18px;
  background: #f4f4f2;
  color: inherit;
  cursor: pointer;
  padding: 14px;
  text-align: left;
}

.ai-insight-card:hover {
  background: #ececea;
}

.ai-insight-card strong {
  display: block;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

.ai-insight-card span {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 13px;
  line-height: 18px;
}

.ai-insight-card.skeleton-card {
  cursor: default;
}

.ai-insight-card.skeleton-card .skeleton-line {
  display: block;
  width: 72%;
  margin-bottom: 10px;
}

.ai-recommendations {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ai-recommendations span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  background: #f8fafc;
  color: #475467;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
}

.ai-lead-search {
  margin-bottom: 14px;
}

.drawer-ai-hint {
  display: grid;
  gap: 4px;
  border-radius: 18px;
  background: #f8fafc;
  padding: 12px;
}

.drawer-ai-hint span {
  color: #667085;
  font-size: 12px;
  font-weight: 600;
}

.drawer-ai-hint strong {
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.input-stage-head h1,
.input-stage-head h2,
.workspace-title h2,
.page-header h1,
.page-header h2,
.form-section h3,
.form-section legend,
.launch-summary h3,
.ai-block-header h2,
.ai-result-header h2,
.ai-analysis-header h2,
.ai-parsed-card h3,
.ai-understanding-card h3,
.ai-clarification-card h3,
.segment-card h3,
.scenario-card h3,
.integration-section-header h2,
.integration-card h3,
.lead-drawer h2,
.filters-header h2,
.modal-card h2,
.merge-modal h2,
.lead-list-modal h2 {
  text-transform: none;
}

@media (max-width: 1000px) {
  .parsed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .segment-grid,
  .ai-form-row {
    grid-template-columns: 1fr;
  }

  .ai-understanding-card {
    grid-template-columns: 1fr;
  }

  .ai-confidence {
    width: 100%;
  }

  .scenario-params {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .launch-mode-switch {
    width: 100%;
  }

  .launch-mode-switch button {
    flex: 1;
    padding: 0 10px;
  }

  .ai-query-input-row,
  .ai-search-input-row,
  .ai-analysis-header {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-query-input-row button,
  .ai-search-input-row button,
  .ai-analysis-header .soft-button {
    width: 100%;
  }

  .parsed-grid,
  .ai-insight-grid {
    grid-template-columns: 1fr;
  }
}

/* Running-state controls and centered loading state. */
.status-stop-button {
  appearance: none;
  font-family: inherit;
  text-align: center;
}

.status-stop-button:not(:disabled) {
  cursor: pointer;
}

.status-stop-button:not(:disabled):hover {
  background: #fff7ed;
}

.status-stop-button:disabled {
  cursor: default;
}

.status-stop-button:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 3px;
}

.status-pill[data-status="cancelled"] {
  color: #667085;
}

body[data-page="results"][data-job-status="running"][data-has-results="false"] .table-wrap,
body[data-page="results"][data-job-status="queued"][data-has-results="false"] .table-wrap {
  min-height: clamp(440px, 52vh, 620px);
}

body[data-page="results"] .results-table .running-row {
  min-height: clamp(440px, 52vh, 620px);
  align-items: center;
}

body[data-page="results"] .results-table .running-row td {
  display: flex;
  min-height: clamp(440px, 52vh, 620px);
  align-items: center;
  justify-content: center;
  padding: 0 24px;
}

body[data-page="results"] .running-row .loading-state {
  width: min(420px, 72vw);
}

@media (max-width: 720px) {
  body[data-page="results"][data-job-status="running"][data-has-results="false"] .table-wrap,
  body[data-page="results"][data-job-status="queued"][data-has-results="false"] .table-wrap,
  body[data-page="results"] .results-table .running-row,
  body[data-page="results"] .results-table .running-row td {
    min-height: 360px;
  }
}

/* Runs dropdown: compact popover for recent launch history. */
.nav-history {
  position: relative;
}

.nav-history .history-toggle[aria-expanded="true"].main-nav-link {
  background: #f4f4f2;
  color: #111827;
}

.nav-history .history-toggle[aria-expanded="true"]::after {
  transform: translateY(2px) rotate(225deg);
}

.history-popover.runs-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: auto;
  z-index: 100;
  display: flex;
  width: 440px;
  max-width: calc(100vw - 32px);
  max-height: 620px;
  overflow: hidden;
  border: 1px solid #e5eaf1;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  padding: 0;
  flex-direction: column;
}

.history-popover.runs-dropdown[hidden] {
  display: none !important;
}

.runs-dropdown-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #eef2f7;
  padding: 18px 18px 14px;
}

.runs-dropdown-header h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -0.03em;
}

.runs-dropdown-header p {
  margin: 3px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 18px;
}

.runs-count {
  display: inline-flex;
  height: 28px;
  align-items: center;
  flex-shrink: 0;
  border-radius: 999px;
  background: #f4f4f2;
  color: #667085;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.runs-dropdown-search {
  border-bottom: 1px solid #eef2f7;
  padding: 12px 14px;
}

.runs-dropdown-search input {
  width: 100%;
  height: 40px;
  border: none;
  border-radius: 14px;
  outline: none;
  background: #f4f4f2;
  color: #111827;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 500;
}

.runs-dropdown-search input::placeholder {
  color: #98a2b3;
}

.runs-dropdown-search input:focus {
  background: #ffffff;
  box-shadow: 0 0 0 1px #d8dee6;
}

.history-popover .runs-list {
  display: block;
  min-height: 0;
  max-height: 420px;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: #d8dee6 transparent;
}

.run-group-label {
  padding: 10px 10px 6px;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.run-item {
  display: block;
  width: 100%;
  border: none;
  border-radius: 16px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 12px;
  text-align: left;
}

.run-item:hover,
.run-item:focus-visible,
.run-item.is-active {
  outline: none;
  background: #f8fafc;
}

.run-item-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.run-title {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
  line-height: 18px;
}

.run-meta span {
  display: inline-flex;
  align-items: center;
}

.run-meta-separator {
  color: #cbd5e1;
}

.run-status {
  display: inline-flex;
  height: 24px;
  align-items: center;
  flex-shrink: 0;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.run-status.done {
  background: #eaf8f0;
  color: #118444;
}

.run-status.running {
  background: #eef4ff;
  color: #3457d5;
}

.run-status.error {
  background: #fef2f2;
  color: #dc2626;
}

.run-status.waiting {
  background: #f4f4f2;
  color: #667085;
}

.run-status.empty {
  background: #fffbeb;
  color: #92400e;
}

.run-actions {
  display: none;
  gap: 6px;
  margin-top: 8px;
}

.run-item:hover .run-actions,
.run-item:focus-within .run-actions {
  display: flex;
}

.run-actions button {
  display: inline-flex;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: #f4f4f2;
  color: #111827;
  cursor: pointer;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 600;
}

.run-actions button:hover,
.run-actions button:focus-visible {
  outline: none;
  background: #ececea;
}

.runs-dropdown-footer {
  display: flex;
  gap: 8px;
  border-top: 1px solid #eef2f7;
  padding: 12px 14px;
}

.runs-dropdown-footer a {
  display: inline-flex;
  height: 38px;
  align-items: center;
  justify-content: center;
  flex: 1;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.runs-dropdown-footer .soft-button {
  background: #f4f4f2;
  color: #111827;
}

.runs-dropdown-footer .soft-button:hover,
.runs-dropdown-footer .soft-button:focus-visible {
  outline: none;
  background: #ececea;
}

.runs-dropdown-footer .dark-button {
  background: #111827;
  color: #ffffff;
}

.runs-dropdown-footer .dark-button:hover,
.runs-dropdown-footer .dark-button:focus-visible {
  outline: none;
  background: #1f2937;
}

.runs-empty {
  padding: 36px 24px;
  text-align: center;
}

.runs-empty h4 {
  margin: 0;
  color: #111827;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.runs-empty p {
  margin: 6px auto 0;
  max-width: 300px;
  color: #667085;
  font-size: 13px;
  line-height: 20px;
}

.runs-empty a {
  display: inline-flex;
  height: 38px;
  align-items: center;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  margin-top: 14px;
  padding: 0 14px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.runs-loading {
  padding: 18px;
}

.skeleton-line {
  height: 12px;
  border-radius: 999px;
  background: #eef2f7;
  margin-bottom: 10px;
}

.w-70 {
  width: 70%;
}

.w-50 {
  width: 50%;
}

.w-60 {
  width: 60%;
}

@media (max-width: 640px) {
  .history-popover.runs-dropdown {
    position: fixed;
    top: 72px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 90px);
  }

  .history-popover .runs-list {
    max-height: calc(100vh - 280px);
  }
}

/* Product-led access layer: auth, paywall and trial states. */
.auth-overlay,
.paywall-overlay,
.trial-offer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 39, 0.32);
  padding: 24px;
}

.auth-overlay[hidden],
.paywall-overlay[hidden],
.trial-offer-overlay[hidden] {
  display: none;
}

.trial-offer-overlay {
  background: rgba(17, 24, 39, 0.42);
  backdrop-filter: blur(8px);
}

.auth-modal,
.paywall-modal,
.checkout-modal,
.trial-offer-modal {
  position: relative;
  width: 100%;
  border: 1px solid #e5eaf1;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}

.auth-modal {
  max-width: 440px;
  border-radius: 28px;
  padding: 28px;
}

.paywall-modal,
.checkout-modal {
  max-width: 520px;
  border-radius: 32px;
  padding: 30px;
}

.trial-offer-modal {
  --trial-bg: #ffffff;
  --trial-soft: #f6f7f3;
  --trial-soft-2: #f3f4f0;
  --trial-text: #111827;
  --trial-muted: #667085;
  --trial-border: rgba(17, 24, 39, 0.08);
  --trial-accent: #20d486;
  --trial-accent-soft: #e9fbf3;
  --trial-accent-dark: #0f9f63;
  --trial-button: #111827;
  --trial-button-hover: #1f2937;
  width: min(560px, calc(100vw - 32px));
  max-width: min(560px, calc(100vw - 32px));
  border-color: var(--trial-border);
  border-radius: 28px;
  background: var(--trial-bg);
  color: var(--trial-text);
  padding: 28px;
  box-shadow: 0 32px 90px rgba(17, 24, 39, 0.22), 0 4px 16px rgba(17, 24, 39, 0.08);
}

.trial-offer-modal:focus {
  outline: none;
}

.auth-close,
.paywall-close,
.trial-offer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: #f4f4f2;
  color: #111827;
  cursor: pointer;
  font-size: 18px;
}

.auth-close:hover,
.auth-close:focus-visible,
.paywall-close:hover,
.paywall-close:focus-visible,
.trial-offer-close:hover,
.trial-offer-close:focus-visible {
  outline: none;
  background: #ececea;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: #111827;
  font-size: 16px;
  font-weight: 600;
}

.brand-logo {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #111827;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
}

.auth-modal h2,
.paywall-modal h2,
.checkout-modal h2,
.trial-offer-modal h2 {
  margin: 0;
  color: #111827;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 34px;
  text-transform: none;
}

.paywall-modal h2,
.checkout-modal h2,
.trial-offer-modal h2 {
  font-size: 30px;
  line-height: 36px;
}

.auth-modal p,
.paywall-modal p,
.checkout-modal p,
.trial-offer-modal p {
  margin: 8px 0 0;
  color: #667085;
  font-size: 15px;
  line-height: 22px;
}

.paywall-modal p,
.checkout-modal p,
.trial-offer-modal p {
  margin-top: 10px;
  line-height: 23px;
}

.trial-offer-close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: var(--trial-surface-soft);
  color: var(--trial-text);
  font-size: 20px;
  line-height: 1;
}

.trial-offer-eyebrow {
  margin: 0 0 12px !important;
  color: var(--trial-accent-dark) !important;
  font-size: 13px !important;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 18px !important;
}

.trial-offer-modal h2 {
  max-width: 16ch;
  color: var(--trial-text);
  font-size: 38px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 42px;
}

.trial-offer-modal p {
  color: var(--trial-muted);
}

.trial-offer-modal #trial-modal-description {
  max-width: 45ch;
  margin-top: 14px;
  font-size: 16px;
  line-height: 24px;
}

.trial-offer-error {
  border: 1px solid rgba(180, 35, 24, 0.16);
  border-radius: 16px;
  background: #fff4f2;
  color: #b42318 !important;
  margin-top: 20px !important;
  padding: 12px 14px;
  font-size: 14px !important;
  font-weight: 500;
  line-height: 20px !important;
}

.trial-offer-error[hidden] {
  display: none;
}

.trial-offer-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 28px;
}

.trial-offer-primary,
.trial-offer-secondary,
.trial-offer-login {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  padding: 0 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.trial-offer-primary {
  gap: 8px;
  background: var(--trial-button);
  color: #ffffff;
}

.trial-offer-primary:hover,
.trial-offer-primary:focus-visible {
  outline: none;
  background: var(--trial-button-hover);
}

.trial-offer-primary:disabled,
.trial-offer-secondary:disabled,
.trial-offer-login:disabled {
  cursor: wait;
  opacity: 0.72;
}

.trial-offer-button-spinner {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  animation: spin 0.9s linear infinite;
}

.trial-offer-button-spinner[hidden] {
  display: none;
}

.trial-offer-secondary {
  background: var(--trial-surface-soft);
  color: #475467;
}

.trial-offer-secondary:hover,
.trial-offer-secondary:focus-visible {
  outline: none;
  background: #ebeee8;
  color: var(--trial-text);
}

.trial-offer-login {
  min-height: auto;
  margin: 18px auto 0;
  background: transparent;
  color: var(--trial-muted);
  padding: 0;
  font-size: 13px;
  line-height: 18px;
}

.trial-offer-login:hover,
.trial-offer-login:focus-visible {
  outline: none;
  color: var(--trial-text);
}

@media (max-width: 640px) {
  .trial-offer-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .trial-offer-modal {
    width: 100%;
    max-width: none;
    max-height: 92dvh;
    border-radius: 30px 30px 0 0;
    padding: 28px 20px calc(22px + env(safe-area-inset-bottom));
    overflow-y: auto;
  }

  .trial-offer-eyebrow,
  .trial-offer-modal h2 {
    order: 0;
  }

  .trial-offer-modal h2 {
    max-width: 13ch;
    font-size: 30px;
    line-height: 34px;
  }

  .trial-offer-modal #trial-modal-description {
    order: 1;
    max-width: none;
    font-size: 15px;
    line-height: 22px;
  }

  .trial-offer-error {
    order: 5;
    margin-top: 0 !important;
  }

  .trial-offer-actions {
    order: 6;
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .trial-offer-secondary,
  .trial-offer-login {
    min-height: 44px;
  }

  .trial-offer-login {
    order: 7;
    margin-top: 0;
  }

}

.trial-offer-close {
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  background: var(--trial-soft-2);
  color: var(--trial-text);
  font-size: 24px;
  line-height: 1;
  transition: background 150ms ease, transform 150ms ease;
}

.trial-offer-close:hover,
.trial-offer-close:focus-visible {
  background: #e9ece7;
  transform: translateY(-1px);
}

.trial-offer-eyebrow {
  margin: 0 !important;
  color: var(--trial-accent-dark) !important;
  font-size: 14px !important;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 18px !important;
}

.trial-offer-modal h2 {
  max-width: 440px;
  margin-top: 18px;
  color: var(--trial-text);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 37px;
}

.trial-offer-modal #trial-modal-description {
  max-width: 470px;
  margin-top: 12px;
  color: var(--trial-muted);
  font-size: 17px;
  line-height: 25px;
}

.trial-summary-card {
  margin-top: 22px;
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-radius: 20px;
  background: var(--trial-soft);
  padding: 16px;
}

.trial-summary-title {
  color: var(--trial-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  margin-bottom: 12px;
}

.trial-summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trial-summary-tags span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-radius: 999px;
  background: #ffffff;
  color: #344054;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.trial-benefits {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.trial-benefit {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--trial-text);
  font-size: 15px;
  font-weight: 500;
  line-height: 21px;
}

.trial-benefit-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--trial-accent);
  margin-top: 7px;
}

.trial-offer-note {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  background: var(--trial-accent-soft);
  color: var(--trial-accent-dark);
  margin-top: 18px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.trial-offer-note[hidden] {
  display: none;
}

.trial-offer-error {
  margin-top: 18px !important;
  border: 0;
  border-radius: 16px;
  background: #fff4f2;
  color: #b42318 !important;
  padding: 12px 14px;
  font-size: 14px !important;
  font-weight: 500;
  line-height: 20px !important;
}

.trial-offer-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 24px;
}

.trial-offer-primary,
.trial-offer-secondary {
  min-height: 52px;
  border-radius: 999px;
  padding: 0 24px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  transition: background 150ms ease, color 150ms ease, opacity 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.trial-offer-primary {
  gap: 8px;
  background: var(--trial-button);
  color: #ffffff;
}

.trial-offer-primary:hover,
.trial-offer-primary:focus-visible {
  background: var(--trial-button-hover);
  transform: translateY(-1px);
}

.trial-offer-secondary {
  background: var(--trial-soft-2);
  color: #344054;
  padding: 0 22px;
}

.trial-offer-secondary:hover,
.trial-offer-secondary:focus-visible {
  background: #e9ece7;
  color: var(--trial-text);
  transform: translateY(-1px);
}

.trial-offer-primary:focus-visible,
.trial-offer-secondary:focus-visible,
.trial-offer-close:focus-visible,
.trial-offer-login:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(32, 212, 134, 0.22);
}

.trial-offer-primary:disabled,
.trial-offer-secondary:disabled,
.trial-offer-login:disabled {
  cursor: default;
  opacity: 0.72;
  transform: none;
}

.trial-offer-button-spinner {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  animation: spin 0.9s linear infinite;
}

.trial-offer-login-row {
  margin: 16px 0 0 !important;
  color: var(--trial-muted) !important;
  font-size: 14px !important;
  line-height: 20px !important;
}

.trial-offer-login {
  display: inline;
  min-height: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #344054;
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-size: inherit;
  font-weight: 600;
  line-height: inherit;
  text-decoration: none;
}

.trial-offer-login:hover,
.trial-offer-login:focus-visible {
  color: var(--trial-text);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .trial-offer-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .trial-offer-modal {
    width: 100%;
    max-width: none;
    max-height: 92dvh;
    border-radius: 28px 28px 0 0;
    padding: 24px 20px 20px;
    overflow-y: auto;
  }

  .trial-offer-modal h2 {
    max-width: 12ch;
    font-size: 28px;
    line-height: 31px;
  }

  .trial-offer-modal #trial-modal-description {
    font-size: 16px;
    line-height: 23px;
  }

  .trial-offer-actions {
    grid-template-columns: 1fr;
  }

  .trial-offer-primary,
  .trial-offer-secondary {
    width: 100%;
  }
}

.auth-modal #auth-subtitle.auth-message {
  display: block;
  border: 1px solid #d8dee6;
  border-radius: 14px;
  background: #f8fafc;
  color: #111827;
  margin-top: 14px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}

.auth-modal #auth-subtitle.auth-message-error {
  border-color: #fecaca;
  background: #fff1f1;
  color: #991b1b;
}

.auth-modal #auth-subtitle.auth-message-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.auth-tabs {
  display: inline-flex;
  border-radius: 999px;
  background: #f4f4f2;
  margin: 22px 0 20px;
  padding: 4px;
}

.auth-tabs[hidden] {
  display: none !important;
}

.auth-tabs button {
  height: 36px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #667085;
  cursor: pointer;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
}

.auth-tabs button.active {
  background: #ffffff;
  color: #111827;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-form label {
  margin-top: 10px;
  color: #667085;
  font-size: 13px;
  font-weight: 600;
}

.auth-form input {
  height: 46px;
  border: none;
  border-radius: 16px;
  outline: none;
  background: #f4f4f2;
  color: #111827;
  padding: 0 14px;
  font-size: 15px;
}

.auth-form [hidden] {
  display: none !important;
}

.auth-form input[readonly] {
  color: #667085;
}

.auth-form input:focus {
  background: #ffffff;
  box-shadow: 0 0 0 1px #d8dee6;
}

.auth-primary-button,
.paywall-primary-button,
.paywall-secondary-filled {
  display: inline-flex;
  width: 100%;
  height: 46px;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  cursor: pointer;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}

.auth-primary-button {
  margin-top: 16px;
}

.auth-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.auth-actions button {
  border: none;
  background: transparent;
  color: #667085;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  padding: 0;
}

.auth-actions button:hover,
.auth-actions button:focus-visible {
  outline: none;
  color: #111827;
}

.auth-actions button[hidden] {
  display: none !important;
}

.paywall-primary-button {
  height: 48px;
  margin-top: 18px;
}

.auth-primary-button:hover,
.auth-primary-button:focus-visible,
.paywall-primary-button:hover,
.paywall-primary-button:focus-visible {
  outline: none;
  background: #1f2937;
}

.auth-terms {
  margin-top: 16px !important;
  color: #98a2b3 !important;
  text-align: center;
  font-size: 12px !important;
  line-height: 18px !important;
}

.modal-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.modal-legal-links a {
  color: #667085;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  text-decoration: none;
}

.modal-legal-links a:hover,
.modal-legal-links a:focus-visible {
  outline: none;
  color: #111827;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.paywall-icon {
  display: flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eaf8f0;
  color: #118444;
  margin-bottom: 18px;
  font-size: 20px;
  font-weight: 600;
}

.paywall-benefits {
  display: grid;
  gap: 10px;
  border-radius: 22px;
  background: #f8fafc;
  margin-top: 20px;
  padding: 16px;
}

.paywall-benefits div {
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.paywall-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 22px;
  background: #f4f4f2;
  margin-top: 18px;
  padding: 16px;
}

.paywall-price span {
  color: #667085;
  font-size: 14px;
  font-weight: 600;
}

.paywall-price strong {
  color: #111827;
  font-size: 20px;
  font-weight: 600;
  line-height: 26px;
}

.paywall-secondary-button,
.paywall-secondary-filled {
  width: 100%;
  height: 44px;
  margin-top: 8px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #667085;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.paywall-secondary-filled {
  background: #f4f4f2;
  color: #111827;
}

.paywall-secondary-button:hover,
.paywall-secondary-button:focus-visible {
  outline: none;
  color: #111827;
}

.paywall-secondary-filled:hover,
.paywall-secondary-filled:focus-visible {
  outline: none;
  background: #ececea;
}

.checkout-actions {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.checkout-feedback {
  min-height: 20px;
  margin-top: 12px !important;
  color: #667085 !important;
  font-size: 13px !important;
  font-weight: 600;
  line-height: 20px !important;
}

.checkout-feedback:empty {
  display: none;
}

.checkout-purchase-modal {
  --checkout-text: #111827;
  --checkout-muted: #667085;
  --checkout-soft: #f6f7f3;
  --checkout-soft-2: #f3f4f0;
  --checkout-accent: #0f9f63;
  --checkout-accent-soft: #e9fbf3;
  width: min(560px, calc(100vw - 32px));
  max-width: min(560px, calc(100vw - 32px));
  border: 0;
  border-radius: 34px;
  background: #ffffff;
  color: var(--checkout-text);
  padding: 36px;
  box-shadow:
    0 34px 90px rgba(17, 24, 39, 0.24),
    0 8px 28px rgba(17, 24, 39, 0.12);
}

.checkout-purchase-modal .checkout-modal__close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: var(--checkout-soft-2);
  color: var(--checkout-text);
  font-size: 22px;
  line-height: 1;
  transition-property: background-color, color, scale;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.checkout-purchase-modal .checkout-modal__close:hover,
.checkout-purchase-modal .checkout-modal__close:focus-visible {
  background: #e9ece7;
  color: var(--checkout-text);
}

.checkout-purchase-modal .checkout-modal__close:active {
  scale: 0.96;
}

.checkout-modal__kicker {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border-radius: 999px;
  background: var(--checkout-accent-soft);
  color: var(--checkout-accent);
  padding: 0 12px;
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
}

.checkout-purchase-modal .checkout-modal__title {
  max-width: 430px;
  margin: 26px 0 0;
  color: var(--checkout-text);
  font-size: 42px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 46px;
  text-wrap: balance;
}

.checkout-purchase-modal .checkout-modal__description {
  max-width: 460px;
  margin: 14px 0 0;
  color: var(--checkout-muted);
  font-size: 18px;
  font-weight: 400;
  line-height: 25px;
  text-wrap: pretty;
}

.checkout-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin-top: 26px;
  border-radius: 24px;
  background: var(--checkout-soft);
  padding: 18px;
  box-shadow:
    inset 0 0 0 1px rgba(17, 24, 39, 0.06),
    0 1px 2px rgba(17, 24, 39, 0.04);
}

.checkout-summary strong {
  display: block;
  color: var(--checkout-text);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  line-height: 26px;
}

.checkout-summary span {
  display: block;
  margin-top: 6px;
  color: var(--checkout-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 19px;
  text-wrap: pretty;
}

.checkout-summary__price {
  text-align: right;
}

.checkout-summary__price strong {
  font-size: 30px;
  line-height: 34px;
}

.checkout-facts {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.checkout-facts div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #344054;
  font-size: 15px;
  font-weight: 600;
  line-height: 21px;
}

.checkout-facts span {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: var(--checkout-accent-soft);
  color: var(--checkout-accent);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.checkout-purchase-actions {
  gap: 12px;
  margin-top: 28px;
}

.checkout-purchase-modal .checkout-modal__primary {
  height: 58px;
  margin-top: 0;
  border-radius: 20px;
  background: var(--checkout-text);
  color: #ffffff;
  font-size: 18px;
  font-weight: 650;
  line-height: 1;
  transition-property: background-color, transform, scale, opacity;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.checkout-purchase-modal .checkout-modal__primary:hover,
.checkout-purchase-modal .checkout-modal__primary:focus-visible {
  background: #1f2937;
  transform: translateY(-1px);
}

.checkout-purchase-modal .checkout-modal__primary:active {
  scale: 0.96;
}

.checkout-purchase-modal .checkout-modal__primary:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
  scale: 1;
}

.checkout-purchase-modal .checkout-modal__secondary {
  display: inline-flex;
  width: auto;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  justify-self: center;
  margin-top: 0;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--checkout-muted);
  font-size: 15px;
  font-weight: 650;
  line-height: 1;
  transition-property: color, background-color, scale;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.checkout-purchase-modal .checkout-modal__secondary:hover,
.checkout-purchase-modal .checkout-modal__secondary:focus-visible {
  background: var(--checkout-soft-2);
  color: var(--checkout-text);
}

.checkout-purchase-modal .checkout-modal__secondary:active {
  scale: 0.96;
}

.checkout-purchase-modal .checkout-error {
  min-height: 0;
  margin-top: 16px !important;
  border-radius: 16px;
  padding: 12px 14px;
  background: #f4f6f8;
  color: #667085 !important;
  font-size: 14px !important;
  font-weight: 650;
  line-height: 20px !important;
  text-wrap: pretty;
}

.checkout-purchase-modal .checkout-error[data-state="loading"] {
  background: #f4f6f8;
  color: #667085 !important;
}

.checkout-purchase-modal .checkout-error[data-state="success"] {
  background: #e9fbf3;
  color: #0f7a4b !important;
}

.checkout-purchase-modal .checkout-error[data-state="error"] {
  background: #fff4f2;
  color: #b42318 !important;
}

.checkout-purchase-modal .checkout-modal__legal {
  max-width: 430px;
  margin: 26px auto 0 !important;
  color: #98a2b3 !important;
  text-align: center;
  font-size: 12px !important;
  font-weight: 400;
  line-height: 18px !important;
}

.checkout-purchase-modal .checkout-modal__legal a {
  color: #667085;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition-property: color;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.checkout-purchase-modal .checkout-modal__legal a:hover,
.checkout-purchase-modal .checkout-modal__legal a:focus-visible {
  outline: none;
  color: var(--checkout-text);
}

.paywall-primary-button:disabled {
  cursor: wait;
  background: #475467;
}

.pp-payment-overlay {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 24px 72px 24px 24px;
  background: rgba(8, 10, 14, 0.74);
  backdrop-filter: blur(10px);
}

.pp-payment-overlay[hidden] {
  display: none;
}

.pp-payment-modal {
  position: relative;
  width: min(620px, calc(100vw - 32px));
  max-width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: hidden auto;
  border: 0;
  border-radius: 32px;
  background:
    radial-gradient(circle at 20% 10%, rgba(105, 229, 177, 0.34), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(31, 138, 93, 0.34), transparent 32%),
    radial-gradient(circle at 22% 78%, rgba(190, 116, 56, 0.24), transparent 34%),
    linear-gradient(145deg, #13201b 0%, #0e1714 54%, #101010 100%);
  color: #ffffff;
  padding: 28px;
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.48),
    0 12px 36px rgba(0, 0, 0, 0.32);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.pp-payment-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.15;
  background-image: radial-gradient(rgba(255, 255, 255, 0.24) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
}

.pp-payment-modal > * {
  position: relative;
  z-index: 1;
}

.pp-payment-modal:focus {
  outline: none;
}

.pp-payment-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  transition-property: background-color, color, scale;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.pp-payment-close:hover,
.pp-payment-close:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  outline: none;
}

.pp-payment-close:active {
  scale: 0.96;
}

.pp-payment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-right: 48px;
}

.pp-payment-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  text-decoration: none;
}

.pp-payment-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
}

.pp-payment-brand-mark svg {
  display: block;
  width: 38px;
  height: 38px;
}

.pp-payment-brand-mark path {
  fill: #f8fff9;
}

.pp-payment-brand-mark circle {
  fill: #23d08b;
}

.pp-payment-brand span:not(.pp-payment-brand-mark) {
  font-size: 24px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 0.86;
}

.pp-payment-badge {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.pp-payment-hero {
  margin-top: 34px;
  text-align: center;
}

.pp-payment-hero h2 {
  max-width: 440px;
  margin: 0 auto;
  color: #ffffff;
  font-size: 42px;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 43px;
  text-wrap: balance;
}

.pp-payment-hero p {
  max-width: 430px;
  margin: 12px auto 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 22px;
  text-wrap: pretty;
}

.pp-payment-compare {
  margin-top: 28px;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
}

.pp-payment-compare__head,
.pp-payment-compare__row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(58px, 0.7fr));
  align-items: center;
  gap: 10px;
}

.pp-payment-compare__head {
  min-height: 48px;
  padding: 0 16px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 760;
  line-height: 1;
}

.pp-payment-compare__head span:not(:first-child) {
  text-align: center;
}

.pp-payment-compare__row {
  min-height: 54px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 16px;
  font-size: 14px;
  line-height: 17px;
}

.pp-payment-compare__row span {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 650;
  text-wrap: pretty;
}

.pp-payment-compare__row strong {
  color: #ffffff;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 780;
  line-height: 1;
  text-align: center;
}

.pp-payment-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.pp-payment-plan {
  display: flex;
  min-height: 74px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  cursor: pointer;
  padding: 13px 14px;
  text-align: left;
  backdrop-filter: blur(14px);
  transition-property: background-color, border-color, color, transform, scale;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.pp-payment-plan:hover,
.pp-payment-plan:focus-visible {
  background: rgba(255, 255, 255, 0.17);
  border-color: rgba(255, 255, 255, 0.2);
  outline: none;
}

.pp-payment-plan:active {
  scale: 0.96;
}

.pp-payment-plan.is-selected {
  border-color: #ffffff;
  background: #ffffff;
  color: #111827;
  transform: translateY(-1px);
}

.pp-payment-plan__radio {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
}

.pp-payment-plan.is-selected .pp-payment-plan__radio {
  display: grid;
  place-items: center;
  border-color: #46c48c;
  background: #46c48c;
}

.pp-payment-plan.is-selected .pp-payment-plan__radio::after {
  content: "✓";
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.pp-payment-plan__main strong,
.pp-payment-plan__main em {
  display: block;
}

.pp-payment-plan__main strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 17px;
}

.pp-payment-plan__main em {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
  line-height: 1;
}

.pp-payment-plan.is-selected .pp-payment-plan__main em {
  color: rgba(17, 24, 39, 0.62);
}

.pp-payment-primary {
  width: 100%;
  height: 58px;
  margin-top: 18px;
  border: 0;
  border-radius: 18px;
  background: #57c892;
  color: #ffffff;
  cursor: pointer;
  font-size: 17px;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1;
  transition-property: background-color, transform, scale, opacity;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.pp-payment-primary:hover,
.pp-payment-primary:focus-visible {
  background: #65d5a0;
  outline: none;
  transform: translateY(-1px);
}

.pp-payment-primary:active {
  scale: 0.96;
}

.pp-payment-primary:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
  scale: 1;
}

.pp-payment-error {
  min-height: 0;
  margin-top: 14px !important;
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.74) !important;
  font-size: 14px !important;
  font-weight: 650;
  line-height: 19px !important;
  text-wrap: pretty;
}

.pp-payment-error[data-state="loading"] {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78) !important;
}

.pp-payment-error[data-state="success"] {
  background: rgba(87, 200, 146, 0.16);
  color: #bdf8dc !important;
}

.pp-payment-error[data-state="error"] {
  background: rgba(255, 89, 89, 0.12);
  color: #ffd2d2 !important;
}

.pp-payment-note {
  max-width: 470px;
  margin: 14px auto 0 !important;
  color: rgba(255, 255, 255, 0.68) !important;
  font-size: 13px !important;
  font-weight: 650;
  line-height: 18px !important;
  text-align: center;
  text-wrap: pretty;
}

.pp-payment-legal {
  max-width: 480px;
  margin: 10px auto 0 !important;
  color: rgba(255, 255, 255, 0.42) !important;
  font-size: 12px !important;
  font-weight: 500;
  line-height: 16px !important;
  text-align: center;
  text-wrap: pretty;
}

.pp-payment-legal a {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition-property: color;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.pp-payment-legal a:hover,
.pp-payment-legal a:focus-visible {
  color: #ffffff;
  outline: none;
}


@media (max-width: 980px) {
  .pp-payment-overlay {
    justify-content: center;
    padding-right: 24px;
  }
}

.pp-footer {
  position: relative;
  width: 100%;
  margin-top: 72px;
  background: #f3f4f1;
  color: #697386;
}

.pp-footer__inner {
  width: min(1400px, calc(100% - 56px));
  margin: 0 auto;
  border-top: 1px solid rgba(17, 24, 39, 0.1);
  padding: 42px 0 58px;
}

.pp-footer__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 44px 72px;
}

.pp-footer__col {
  min-width: 0;
}

.pp-footer__brand {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 12px;
  color: #111827;
  text-decoration: none;
}

.pp-footer__logo {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  object-fit: contain;
}

.pp-footer__brand span {
  color: #111827;
  font-size: 24px;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 0.86;
}

.pp-footer__description {
  max-width: 318px;
  margin: 22px 0 0;
  color: #667085;
  font-size: 15px;
  font-weight: 400;
  line-height: 22px;
}

.pp-footer__group {
  margin-top: 34px;
}

.pp-footer__group:first-child {
  margin-top: 0;
}

.pp-footer__group h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 22px;
}

.pp-footer__group a,
.pp-footer__item {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 11px;
  color: #667085;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 22px;
  text-decoration: none;
}

.pp-footer__group a:first-of-type,
.pp-footer__item:first-of-type {
  margin-top: 0;
}

.pp-footer__item {
  cursor: default;
}

.pp-footer__group a:hover,
.pp-footer__group a:focus-visible {
  outline: none;
  color: #111827;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pp-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin-top: 56px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  padding-top: 22px;
  color: #8a94a6;
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
}

.pp-footer__bottom a {
  color: #667085;
  text-decoration: none;
}

.pp-footer__bottom a:hover,
.pp-footer__bottom a:focus-visible {
  outline: none;
  color: #111827;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pp-footer__to-top {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 30;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  font-size: 26px;
  font-weight: 760;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.16), inset 0 0 0 1px rgba(17, 24, 39, 0.08);
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease, color 160ms ease;
}

.pp-footer__to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.pp-footer__to-top:hover,
.pp-footer__to-top:focus-visible {
  outline: none;
  background: #111827;
  color: #ffffff;
}

@media (max-width: 1180px) {
  .pp-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 56px;
  }

  .pp-footer__description {
    max-width: 420px;
  }
}

@media (max-width: 760px) {
  .pp-footer {
    margin-top: 48px;
  }

  .pp-footer__inner {
    width: calc(100% - 36px);
    padding: 32px 0 52px;
  }

  .pp-footer__grid {
    grid-template-columns: 1fr;
    row-gap: 34px;
  }

  .pp-footer__description {
    max-width: none;
    font-size: 14px;
  }

  .pp-footer__group {
    margin-top: 28px;
  }

  .pp-footer__group h2 {
    margin-bottom: 12px;
    font-size: 15px;
  }

  .pp-footer__group a,
  .pp-footer__item {
    font-size: 14px;
    line-height: 1.3;
  }

  .pp-footer__bottom {
    flex-direction: column;
    gap: 10px;
    margin-top: 42px;
  }

  .pp-footer__to-top {
    right: 18px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
    font-size: 24px;
  }
}

.site-footer {
  display: grid;
  width: min(var(--app-content-wide, 1240px), calc(100% - 80px));
  grid-template-columns: minmax(260px, 1.4fr) repeat(4, minmax(142px, 1fr));
  gap: 32px;
  margin: 0 auto;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  padding: 32px 0 52px;
  color: #667085;
}

.site-footer__brand strong {
  display: block;
  color: #111827;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 24px;
}

.site-footer__brand p {
  max-width: 300px;
  margin: 10px 0 14px;
  color: #667085;
  font-size: 14px;
  line-height: 21px;
}

.site-footer__brand a,
.site-footer__col a {
  color: #667085;
  text-decoration: none;
}

.site-footer__col h2 {
  margin: 0 0 13px;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 16px;
}

.site-footer__col a {
  display: block;
  width: fit-content;
  margin-top: 9px;
  font-size: 14px;
  font-weight: 600;
  line-height: 19px;
}

.site-footer__brand a {
  display: inline-flex;
  width: fit-content;
  font-size: 14px;
  font-weight: 600;
  line-height: 19px;
}

.site-footer__brand a:hover,
.site-footer__brand a:focus-visible,
.site-footer__col a:hover,
.site-footer__col a:focus-visible {
  outline: none;
  color: #111827;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-page {
  min-height: 100vh;
  background: #f4f4f2;
  color: #111827;
}

.legal-header {
  display: flex;
  max-width: 1120px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  padding: 24px 32px;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.legal-nav a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border-radius: 999px;
  background: #ffffff;
  color: #667085;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.legal-nav a:hover,
.legal-nav a:focus-visible {
  outline: none;
  color: #111827;
}

.legal-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 32px 42px;
}

.legal-hero {
  margin-bottom: 22px;
}

.legal-hero > span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  background: #eaf8f0;
  color: #118444;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 600;
}

.legal-hero h1 {
  margin: 16px 0 0;
  color: #111827;
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 46px;
}

.legal-hero p {
  max-width: 760px;
  margin: 12px 0 0;
  color: #667085;
  font-size: 18px;
  line-height: 28px;
}

.legal-card,
.pricing-card {
  border: 1px solid #e5eaf1;
  border-radius: 18px;
  background: #ffffff;
  padding: 24px;
}

.legal-card + .legal-card,
.legal-card + .pricing-grid,
.pricing-grid + .legal-card {
  margin-top: 18px;
}

.pricing-grid,
.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.support-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.pricing-card.is-featured {
  border-color: rgba(24, 169, 87, 0.34);
}

.pricing-card > span {
  color: #667085;
  font-size: 13px;
  font-weight: 600;
}

.pricing-card h2,
.legal-card h2 {
  margin: 10px 0 0;
  color: #111827;
  font-size: 24px;
  font-weight: 600;
  line-height: 30px;
}

.pricing-card p,
.legal-card p,
.legal-card li {
  color: #667085;
  font-size: 15px;
  line-height: 23px;
}

.pricing-card ul,
.support-card ul {
  display: grid;
  gap: 9px;
  margin: 16px 0 0;
  padding-left: 18px;
}

.pricing-card a,
.support-email {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f4f4f2;
  color: #111827;
  margin-top: auto;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.pricing-card a.primary {
  background: #111827;
  color: #ffffff;
}

.pricing-card a:hover,
.pricing-card a:focus-visible,
.support-email:hover,
.support-email:focus-visible {
  outline: none;
  background: #ececea;
}

.pricing-card a.primary:hover,
.pricing-card a.primary:focus-visible {
  background: #1f2937;
}

.legal-text {
  display: grid;
  gap: 14px;
}

.legal-text h2 {
  margin-top: 8px;
}

.legal-text p {
  margin: 0;
}

.legal-text a,
.support-card a {
  color: #111827;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.support-card h2 {
  margin-top: 0;
}

.support-contact-card {
  border: 1px solid #e5eaf1;
  border-radius: 18px;
  background: #f8fafc;
  margin-bottom: 14px;
  padding: 16px;
}

.support-contact-card span {
  display: block;
  color: #667085;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.support-contact-card a {
  display: inline-flex;
  margin-top: 6px;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  text-decoration: none;
}

.support-contact-card p {
  margin: 8px 0 0;
  color: #667085;
  font-size: 14px;
  line-height: 20px;
}

.legal-footer-static {
  padding-bottom: 44px;
}

.masked-contact {
  display: inline-flex;
  max-width: 100%;
  border: none;
  background: transparent;
  color: #667085;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: inherit;
  font-weight: 600;
}

.masked-contact:hover,
.masked-contact:focus-visible {
  outline: none;
  color: #111827;
}

.locked-results-card {
  border: 1px solid #e5eaf1;
  border-radius: 18px;
  background: #f8fafc;
  margin: 12px;
  padding: 18px 20px;
  text-align: left;
}

.locked-results-card h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
}

.locked-results-card p {
  max-width: 620px;
  margin: 6px 0 0;
  color: #667085;
  font-size: 14px;
  line-height: 20px;
}

.locked-results-card button {
  height: 42px;
  border: none;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  cursor: pointer;
  margin-top: 16px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
}

.locked-results-card button:hover,
.locked-results-card button:focus-visible {
  outline: none;
  background: #1f2937;
}

.filter-rescue-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 104px;
  margin: 10px 0 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  background: #ffffff;
  padding: 12px 16px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.filter-rescue-panel[hidden] {
  display: none !important;
}

.filter-rescue-main {
  align-self: center;
  min-width: 0;
  max-width: 760px;
}

.filter-rescue-main h3 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(24px, 1.65vw, 30px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.filter-rescue-main p {
  max-width: 680px;
  margin: 8px 0 0;
  color: #667085;
  font-size: 15px;
  line-height: 1.35;
}

.filter-rescue-counter {
  display: flex;
  min-width: 116px;
  height: 76px;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 18px;
  background: #f7f8f6;
  padding: 12px 14px;
}

.filter-rescue-counter strong {
  display: block;
  overflow: hidden;
  color: #0f172a;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-rescue-counter span {
  display: block;
  margin-top: 6px;
  color: #667085;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.filter-rescue-actions {
  display: flex;
  width: 164px;
  flex-direction: column;
  gap: 8px;
}

.filter-rescue-actions button {
  width: 100%;
  min-height: 42px;
  border-radius: 14px;
  cursor: pointer;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.filter-rescue-primary {
  border: 0;
  background: #0f172a;
  color: #ffffff;
}

.filter-rescue-primary:hover,
.filter-rescue-primary:focus-visible {
  outline: none;
  background: #1e293b;
  transform: translateY(-1px);
}

.filter-rescue-secondary {
  min-height: 40px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  color: #0f172a;
  font-weight: 650;
}

.filter-rescue-secondary:hover,
.filter-rescue-secondary:focus-visible {
  outline: none;
  border-color: rgba(15, 23, 42, 0.16);
  background: #f7f8f4;
  color: #0f172a;
}

.filter-rescue-actions button:focus-visible {
  outline: 3px solid rgba(34, 197, 94, 0.22);
  outline-offset: 2px;
}

.filter-rescue-panel.is-applied {
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-height: 92px;
  border-color: rgba(34, 197, 94, 0.18);
  background: #ffffff;
}

.filter-rescue-panel,
.filter-rescue-panel.is-severe {
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 76px;
  gap: 14px;
  border-color: #f0dfa9;
  border-radius: 14px;
  background: #fffdf7;
  padding: 12px 14px;
  box-shadow: none;
}

.filter-rescue-counter,
.filter-rescue-panel.is-severe .filter-rescue-counter {
  min-width: 88px;
  height: auto;
  align-self: stretch;
  border: 0;
  border-right: 1px solid #eee4c8;
  border-radius: 0;
  background: transparent;
  padding: 4px 14px 4px 0;
}

.filter-rescue-counter strong {
  color: var(--text-main);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}

.filter-rescue-counter span {
  margin-top: 3px;
  color: #92763b;
  font-size: 12px;
  font-weight: 600;
}

.filter-rescue-main h3 {
  color: var(--text-main);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.3;
}

.filter-rescue-main p {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.filter-rescue-actions,
.filter-rescue-panel.is-severe .filter-rescue-actions {
  display: flex;
  width: auto;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.filter-rescue-actions button,
.filter-rescue-panel.is-severe .filter-rescue-actions button {
  min-height: 36px;
  width: auto;
  border-radius: 10px;
  padding: 0 13px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.filter-rescue-primary {
  background: var(--green);
  color: #ffffff;
}

.filter-rescue-primary:hover,
.filter-rescue-primary:focus-visible {
  background: var(--green-hover, var(--green-text));
  color: #ffffff;
  transform: none;
}

.filter-rescue-secondary {
  border-color: var(--border-muted);
  background: #ffffff;
  color: var(--text-main);
}

.filter-rescue-secondary:hover,
.filter-rescue-secondary:focus-visible {
  border-color: #c5ccd6;
  background: var(--button-bg);
  color: var(--text-main);
}

@media (max-width: 980px) {
  .filter-rescue-panel,
  .filter-rescue-panel.is-severe {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px 14px;
  }

  .filter-rescue-actions,
  .filter-rescue-panel.is-severe .filter-rescue-actions {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .filter-rescue-panel,
  .filter-rescue-panel.is-severe {
    gap: 12px;
    border-radius: 12px;
    padding: 12px;
  }

  .filter-rescue-counter,
  .filter-rescue-panel.is-severe .filter-rescue-counter {
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    gap: 7px;
    border-right: 0;
    border-bottom: 1px solid #eee4c8;
    padding: 0 0 10px;
  }

  .filter-rescue-main h3 {
    font-size: 16px;
  }

  .filter-rescue-actions,
  .filter-rescue-panel.is-severe .filter-rescue-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .filter-rescue-actions button,
  .filter-rescue-panel.is-severe .filter-rescue-actions button {
    width: 100%;
  }
}

.secondary-action.is-locked,
.done-export-action.is-locked {
  color: #111827;
  opacity: 1;
}

.ai-insight-card.is-locked {
  cursor: pointer;
}

@media (max-width: 640px) {
  .auth-overlay,
  .paywall-overlay {
    align-items: flex-end;
    padding: 12px;
  }

  .auth-modal,
  .paywall-modal,
  .checkout-modal {
    max-width: none;
    border-radius: 24px;
    padding: 24px;
  }

  .paywall-price {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    width: calc(100% - 40px);
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 0 40px;
  }

  body[data-page="settings"] .site-footer {
    padding-bottom: 112px;
  }

  .legal-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px;
  }

  .legal-nav {
    justify-content: flex-start;
  }

  .legal-shell {
    padding: 8px 20px 32px;
  }

  .legal-hero h1 {
    font-size: 34px;
    line-height: 38px;
  }

  .legal-hero p {
    font-size: 16px;
    line-height: 25px;
  }

  .pricing-grid,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .legal-card,
  .pricing-card {
    border-radius: 16px;
    padding: 20px;
  }
}

/* HireHi-inspired new run surface: search-first, flat, and task-oriented. */
:root {
  --page-bg: #f4f4f2;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --control-bg: #f4f4f2;
  --control-hover: #ececea;
  --control-active: #e1e7e4;
  --text-main: #111827;
  --text-muted: #667085;
  --text-soft: #98a2b3;
  --border: #e5eaf1;
  --border-soft: #eef2f7;
  --green: #18a957;
  --green-hover: #13964c;
  --green-soft: #eaf8f0;
  --green-text: #118444;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-pill: 999px;
}

body {
  background: var(--page-bg);
}

.app-header {
  height: 68px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.app-header-inner {
  max-width: 1240px;
  padding: 0 40px;
  gap: 32px;
}

.main-nav {
  gap: 6px;
}

.main-nav-link,
.history-toggle.main-nav-link {
  height: 40px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
}

.main-nav-link:hover,
.history-toggle.main-nav-link:hover,
.main-nav-link.is-active,
.history-toggle.main-nav-link.is-active,
.history-toggle[aria-expanded="true"] {
  background: var(--control-bg);
  color: var(--text-main);
}

body[data-page="settings"] .workspace {
  background: var(--page-bg);
}

body[data-page="settings"] .workspace-body {
  max-width: none;
  padding: 0;
  background: transparent;
}

body[data-page="settings"] .input-stage.new-run-page {
  max-width: 1240px;
  margin: 0 auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 44px 40px 72px;
  box-shadow: none;
}

.input-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  max-width: 760px;
  margin-bottom: 24px;
}

.input-stage-head > div {
  min-width: 0;
}

.new-run-back {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-main);
  cursor: pointer;
  font-family: inherit;
  font-size: 25px;
  font-weight: 600;
  line-height: 1;
  margin-top: 0;
  transition: background 160ms ease, transform 160ms ease;
}

.new-run-back[hidden] {
  display: none;
}

.new-run-back:hover,
.new-run-back:focus-visible {
  background: var(--control-bg);
}

.new-run-back:active {
  transform: translateX(-1px);
}

.input-stage-head h1,
.input-stage-head h2 {
  margin: 0;
  color: var(--text-main);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 40px;
  text-transform: none;
}

.input-stage-head p {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 22px;
}

.main-search-card,
.ai-query-parser.main-search-card {
  margin: 0 0 12px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: var(--surface);
  padding: 18px;
}

.main-search-label,
.ai-query-parser > .main-search-label {
  display: block;
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-transform: none;
}

.main-search-row,
.ai-query-input-row.main-search-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.main-search-row input,
.ai-query-input-row.main-search-row input {
  height: 54px;
  flex: 1;
  border: 0;
  border-radius: 20px;
  background: var(--control-bg);
  color: var(--text-main);
  padding: 0 18px;
  font-size: 16px;
  font-weight: 500;
  outline: none;
}

.main-search-row input::placeholder {
  color: var(--text-soft);
}

.main-search-row input:focus {
  background: var(--surface);
  box-shadow: 0 0 0 1px #d8dee6;
}

.typed-query-placeholder {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 160ms ease;
}

.typed-query-placeholder::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 56px;
  height: 100%;
  pointer-events: none;
}

.main-typed-placeholder {
  left: 18px;
  right: 150px;
  top: 50%;
  transform: translateY(-50%);
}

.main-typed-placeholder::after {
  background: linear-gradient(90deg, rgb(237 237 235 / 0), var(--control-bg) 78%);
}

.ai-query-input-row.main-search-row.is-query-focused .main-typed-placeholder {
  opacity: 0.55;
}

.ai-query-input-row.main-search-row.is-query-focused .main-typed-placeholder::after {
  background: linear-gradient(90deg, rgb(255 255 255 / 0), var(--surface) 78%);
}

.ai-query-input-row.main-search-row.has-query-value .main-typed-placeholder {
  opacity: 0;
  visibility: hidden;
}

.typed-placeholder-prefix,
[data-typed-placeholder-text] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.typed-placeholder-prefix {
  flex: 0 0 auto;
}

[data-typed-placeholder-text] {
  flex: 0 1 auto;
}

.typed-placeholder-caret {
  flex: 0 0 auto;
  width: 2px;
  height: 1.18em;
  margin-left: 3px;
  border-radius: 999px;
  background: #8f98a8;
  animation: typed-placeholder-caret 900ms steps(2, start) infinite;
}

@keyframes typed-placeholder-caret {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .typed-query-placeholder {
    transition: none;
  }

  .typed-placeholder-caret {
    display: none;
    animation: none;
  }
}

.main-search-row .dark-button,
.ai-query-input-row.main-search-row button {
  height: 54px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--text-main);
  color: #ffffff;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 600;
}

.main-search-row .dark-button:hover,
.ai-query-input-row.main-search-row button:hover {
  background: #1f2937;
}

.launch-mode-switch {
  display: inline-flex;
  gap: 2px;
  margin: 0 0 18px;
  border-radius: var(--radius-pill);
  background: var(--control-bg);
  padding: 4px;
}

.launch-mode-switch button {
  height: 40px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
}

.launch-mode-switch button:hover {
  background: var(--control-hover);
  color: var(--text-main);
}

.launch-mode-switch button.active {
  background: var(--surface);
  color: var(--text-main);
}

.quick-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.quick-categories .preset-chip {
  min-height: 38px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-main);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
}

.quick-categories .preset-chip:hover {
  background: var(--surface-soft);
}

.quick-categories .preset-chip.is-active {
  background: var(--control-active);
  color: var(--text-main);
}

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

.action-card {
  min-height: 72px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text-main);
  cursor: pointer;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  transition: background 160ms ease, transform 160ms ease;
}

.action-card:hover {
  background: var(--surface-soft);
}

.action-card:active {
  transform: translateY(1px);
}

.action-card.is-active {
  background: #eef3f0;
}

.action-icon {
  width: 66px;
  height: 66px;
  flex: 0 0 auto;
  border-radius: 0;
  background: transparent;
  color: var(--green-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-icon img {
  display: block;
  width: 63px;
  height: 63px;
  object-fit: contain;
}

.action-card span:last-child {
  color: var(--text-main);
  font-size: 15px;
  font-weight: 600;
  line-height: 18px;
}

.run-layout,
.launch-grid.run-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.run-main-column,
.search-form.run-main-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.form-section,
.search-form.run-main-column .form-section {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  padding: 22px;
}

.form-section + .form-section,
.form-section + fieldset,
fieldset + .form-section {
  border-top: 1px solid var(--border);
}

.section-head {
  margin-bottom: 18px;
}

.section-head h3,
.section-head legend,
.form-section h3,
.form-section legend {
  margin: 0;
  color: var(--text-main);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 28px;
  text-transform: none;
}

.section-head p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 20px;
}

.query-main-field span,
.geo-input-block > span,
.search-channel-block .field-label,
.geo-panel .mode-label,
.limit-field label > span,
.criteria-band label > span,
.rating-filter .field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  text-transform: none;
}

.query-main-field input,
.form-section input[type="text"],
.form-section input[type="number"],
.geo-input-block input {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--control-bg);
  color: var(--text-main);
  padding: 0 16px;
  font-size: 16px;
  outline: none;
}

.query-main-field input:focus,
.form-section input[type="text"]:focus,
.form-section input[type="number"]:focus,
.geo-input-block input:focus {
  background: var(--surface);
  box-shadow: 0 0 0 1px #d8dee6;
}

.search-channel-block,
.geo-panel {
  margin-top: 0;
}

.search-channel-block + .geo-panel {
  margin-top: 24px;
}

.channel-hint,
.geo-info-card {
  max-width: none;
  border: 0;
  border-radius: 20px;
  background: var(--surface-soft);
  padding: 14px 16px;
}

.channel-hint strong,
.geo-info-title {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
}

.channel-hint span,
.geo-info-text {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 20px;
}

.segmented-control,
.parser-switch.segmented-control,
.geo-switch.segmented-control {
  height: 48px;
  border-radius: var(--radius-pill);
  background: var(--control-bg);
  padding: 4px;
}

.segmented-control .segment-button,
.parser-switch.segmented-control .segment-button,
.geo-switch.segmented-control .segment-button {
  height: 40px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 40px;
}

.segmented-control label:hover .segment-button,
.parser-switch.segmented-control label:hover .segment-button,
.geo-switch.segmented-control label:hover .segment-button {
  background: var(--control-hover);
  color: var(--text-main);
}

.segmented-control input:checked + .segment-button,
.parser-switch.segmented-control input:checked + .segment-button,
.geo-switch.segmented-control input:checked + .segment-button,
.segmented-control label.is-selected .segment-button,
.parser-switch.segmented-control label.is-selected .segment-button,
.geo-switch.segmented-control label.is-selected .segment-button {
  background: var(--surface);
  color: var(--text-main);
}

.source-section .section-head {
  margin-bottom: 12px;
}

.source-list {
  gap: 4px;
}

.source-option {
  min-height: 58px;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  padding: 10px 12px;
}

.source-option:hover {
  background: var(--surface-soft);
}

.source-option:has(input:checked):not(.is-disabled) {
  background: #eef3f0;
}

.source-copy strong {
  color: var(--text-main);
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
}

.source-copy > span {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 18px;
}

.source-copy small {
  background: var(--control-bg);
  color: var(--text-muted);
}

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

.rating-filter {
  grid-column: 1 / -1;
}

.rating-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.rating-options label {
  min-height: 34px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--control-bg);
  color: var(--text-muted);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
}

.rating-options label:hover,
.rating-options label:has(input:checked) {
  background: var(--control-active);
  color: var(--text-main);
}

.toggle-grid {
  gap: 10px;
  margin-top: 20px;
}

.toggle-grid label {
  min-height: 38px;
  border-radius: var(--radius-pill);
  background: var(--control-bg);
  padding: 0 12px;
}

.launch-summary {
  position: sticky;
  top: 92px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  padding: 22px;
}

.launch-summary-head h3 {
  margin: 0;
  color: var(--text-main);
  font-size: 22px;
  font-weight: 600;
  line-height: 28px;
  text-transform: none;
}

.launch-summary-head p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 20px;
}

body[data-page="settings"] .run-main-column .section-head {
  margin-bottom: 20px;
}

body[data-page="settings"] .run-main-column .section-head h3,
body[data-page="settings"] .run-main-column .section-head legend,
body[data-page="settings"] .launch-summary-head h3 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 36px;
}

body[data-page="settings"] .run-main-column .section-head p,
body[data-page="settings"] .launch-summary-head p {
  margin-top: 6px;
  font-size: 15px;
  line-height: 22px;
}

.summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.summary-chips span {
  min-height: 32px;
  border-radius: var(--radius-pill);
  background: var(--control-bg);
  color: #475467;
  padding: 7px 11px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.summary-result {
  margin-top: 18px;
  border-radius: 20px;
  background: var(--surface-soft);
  padding: 14px;
}

.summary-result span {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 16px;
  text-transform: none;
}

.summary-result strong,
.summary-result small {
  display: block;
  margin-top: 5px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.summary-result small {
  color: var(--text-muted);
  font-weight: 600;
}

.summary-formats {
  margin-top: 10px;
}

.launch-summary-action {
  width: 100%;
  height: 46px;
  margin-top: 18px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--green);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
}

.launch-summary-action:hover {
  background: var(--green-hover);
}

.launch-summary-helper {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 19px;
  text-align: center;
}

.ai-client-finder {
  margin-top: 0;
  display: grid;
  gap: 16px;
}

.ai-flow-stage {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  padding: 22px;
}

.ai-segments-result,
.ai-scenarios-stage {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.ai-segments-result .segment-grid,
.segment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.segment-next-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 14px 0 0;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  padding: 14px;
}

.segment-next-step[hidden] {
  display: none;
}

.segment-next-step-main {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.segment-next-step-main span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.segment-next-step-main strong {
  color: var(--text-main);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 24px;
}

.segment-next-step-main p {
  max-width: 720px;
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 18px;
}

.segment-next-step .ai-primary-button {
  min-width: 184px;
  flex: 0 0 auto;
}

.ai-primary-button:disabled,
.ai-primary-button:disabled:hover {
  background: #d8dee6;
  color: #7c8798;
  cursor: not-allowed;
}

.segment-card,
.scenario-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 18px;
}

.output-preview-section {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 0.92fr) minmax(500px, 1.08fr);
  gap: 44px;
  margin-top: 42px;
  border-radius: 30px;
  background: #f1f3ee;
  padding: 34px;
}

.output-preview-copy {
  min-width: 0;
}

.output-preview-kicker {
  display: block;
  color: #7a8595;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.output-preview-copy h2 {
  max-width: 600px;
  margin: 16px 0 0;
  color: #111827;
  font-size: 42px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 46px;
  text-wrap: balance;
}

.output-preview-copy p {
  max-width: 570px;
  margin: 16px 0 0;
  color: #667085;
  font-size: 17px;
  line-height: 26px;
}

.output-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.output-preview-tags span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  background: #ffffff;
  color: #344054;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.output-preview-card {
  min-width: 0;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 26px;
  background: #ffffff;
  padding: 16px;
}

.output-preview-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 6px 15px;
  font-size: 13px;
  line-height: 1;
}

.output-preview-card-header span {
  color: #8a94a4;
  font-weight: 600;
}

.output-preview-card-header strong {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  background: #e9fbf3;
  color: #0f9f63;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.output-mini-table {
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 20px;
  background: #ffffff;
}

.output-mini-table-head,
.output-mini-table-row {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(120px, 1.18fr) minmax(74px, 0.72fr) minmax(64px, 0.62fr) minmax(64px, 0.62fr) minmax(76px, 0.72fr);
  gap: 10px;
}

.output-mini-table-head {
  min-height: 44px;
  background: #f6f7f3;
  color: #667085;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.output-mini-table-row {
  min-height: 56px;
  border-top: 1px solid rgba(17, 24, 39, 0.07);
  padding: 0 14px;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  line-height: 17px;
}

.skeleton {
  display: block;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e4e7e2, #eff1ec 48%, #e4e7e2);
}

.skeleton-lg {
  width: 82%;
}

.skeleton-md {
  width: 66%;
}

.skeleton-sm {
  width: 50%;
}

.status-found {
  color: #111827;
}

.status-muted {
  color: #98a2b3;
}

.source-dot {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  color: #475467;
  white-space: nowrap;
}

.source-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #b6bdc8;
}

.source-dot--yandex::before {
  background: #ff4d4d;
}

.source-dot--gis::before {
  background: #23d08b;
}

.source-dot--google::before {
  background: #4f7cff;
}

.output-preview-sources {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 0 6px;
  color: #667085;
  font-size: 13px;
  line-height: 18px;
}

.output-preview-sources span {
  color: #8a94a4;
  font-weight: 600;
}

.output-preview-sources strong {
  color: #344054;
  font-weight: 600;
  text-align: right;
}

@media (max-width: 1180px) {
  .run-layout,
  .launch-grid.run-layout {
    grid-template-columns: 1fr;
  }

  .launch-summary {
    position: static;
  }

  .output-preview-section {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 760px) {
  body[data-page="settings"] .input-stage.new-run-page {
    padding: 32px 20px 56px;
  }

  .input-stage-head h1,
  .input-stage-head h2 {
    font-size: 34px;
    line-height: 40px;
  }

  .input-stage-head p {
    font-size: 15px;
    line-height: 22px;
  }

  .main-search-row,
  .ai-query-input-row.main-search-row {
    align-items: stretch;
    flex-direction: column;
  }

  .main-search-row .dark-button,
  .ai-query-input-row.main-search-row button {
    width: 100%;
  }

  .launch-mode-switch {
    width: 100%;
  }

  .launch-mode-switch button {
    flex: 1;
    min-width: 0;
    padding: 0 10px;
  }

  .action-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .output-preview-section {
    margin-top: 30px;
    border-radius: 26px;
    padding: 22px;
  }

  .output-preview-copy h2 {
    font-size: 30px;
    letter-spacing: 0;
    line-height: 35px;
  }

  .output-preview-copy p {
    font-size: 15px;
    line-height: 23px;
  }

  .output-preview-tags {
    gap: 7px;
  }

  .output-preview-tags span {
    min-height: 32px;
    padding: 0 11px;
    font-size: 12px;
  }

  .output-preview-card {
    border-radius: 22px;
    padding: 12px;
  }

  .output-mini-table-head,
  .output-mini-table-row {
    grid-template-columns: minmax(92px, 1fr) minmax(66px, 0.72fr) minmax(54px, 0.62fr);
    gap: 8px;
  }

  .output-mini-table-head span:nth-child(4),
  .output-mini-table-head span:nth-child(5),
  .output-mini-table-row span:nth-child(4),
  .output-mini-table-row span:nth-child(5) {
    display: none;
  }

  .output-preview-sources {
    flex-direction: column;
    gap: 4px;
  }

  .output-preview-sources strong {
    text-align: left;
  }

  .criteria-band,
  .ai-segments-result .segment-grid,
  .segment-grid {
    grid-template-columns: 1fr;
  }

  .segment-next-step {
    align-items: stretch;
    flex-direction: column;
  }

  .segment-next-step .ai-primary-button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .app-header-inner {
    padding: 0 16px;
  }

  .action-cards {
    grid-template-columns: 1fr;
  }

  .form-section,
  .search-form.run-main-column .form-section,
  .launch-summary,
  .main-search-card,
  .ai-query-parser.main-search-card {
    border-radius: 24px;
    padding: 18px;
  }
}

/* HireHi-like product header override. */
:root {
  --topbar-height: 76px;
}

.app-header {
  position: relative;
  height: 76px;
  border-bottom: 0;
  background: var(--page-bg, #f4f4f2);
  z-index: 100;
}

.app-header-inner {
  max-width: 1240px;
  height: 100%;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 34px;
}

.top-brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 8px;
  color: #111827;
  text-decoration: none;
}

.top-brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #111827;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.top-brand span:last-child {
  color: #111827;
  font-size: 17px;
  line-height: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.main-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
}

.history-menu.nav-history {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.main-nav-link,
.history-toggle.main-nav-link {
  position: relative;
  height: 40px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #111827;
  opacity: 0.72;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
}

.main-nav-link:hover,
.history-toggle.main-nav-link:hover,
.history-toggle[aria-expanded="true"].main-nav-link {
  background: transparent;
  color: #111827;
  opacity: 1;
}

.main-nav-link.is-active {
  height: 42px;
  padding: 0 16px;
  border-radius: 18px;
  background: #ffffff;
  color: #111827;
  opacity: 1;
  font-weight: 600;
}

.main-nav-link.nav-pricing-link {
  color: #23d08b;
  opacity: 1;
  font-weight: 600;
}

.main-nav-link.nav-pricing-link:hover,
.main-nav-link.nav-pricing-link:focus-visible {
  color: #18a957;
  opacity: 1;
}

.history-toggle.main-nav-link::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 3px;
  border-right: 2px solid #667085;
  border-bottom: 2px solid #667085;
  transform: rotate(45deg) translateY(-2px);
  transform-origin: 50% 50%;
}

.history-toggle.main-nav-link:hover::after,
.history-toggle[aria-expanded="true"].main-nav-link::after {
  border-color: #111827;
}

.top-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.usage-menu,
.profile-menu {
  position: relative;
}

.usage-button,
.profile-button {
  height: 46px;
  border: 0;
  border-radius: 18px;
  background: #ffffff;
  color: #111827;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
}

.usage-button:hover,
.profile-button:hover {
  border: 0;
  background: #f8fafc;
  color: #111827;
}

.usage-button span,
.usage-button strong {
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
}

.profile-button {
  padding: 0 16px 0 10px;
  gap: 9px;
  font-weight: 600;
}

.profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
}

.profile-button.is-login-button {
  height: 46px;
  padding: 0 22px;
  border-radius: 18px;
  background: #4cb989;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
}

.profile-button.is-login-button:hover {
  background: #40aa7c;
  color: #ffffff;
}

.history-popover.runs-dropdown,
.nav-history .history-popover,
.history-popover {
  top: calc(100% + 12px);
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.history-menu.nav-history .history-popover.runs-dropdown {
  position: fixed;
  top: var(--runs-popover-top, 76px);
  left: var(--runs-popover-left, 24px);
  right: auto;
  bottom: auto;
  width: var(--runs-popover-width, min(520px, calc(100vw - 48px)));
  max-height: min(680px, calc(100dvh - var(--runs-popover-top, 76px) - 24px));
  border-radius: 26px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.14);
  transform: none;
}

.history-menu.nav-history .history-popover.runs-dropdown .runs-list {
  max-height: min(500px, calc(100vh - 280px));
  padding: 10px;
}

.history-menu.nav-history .history-popover.runs-dropdown .run-item {
  border-radius: 18px;
  padding: 14px;
}

.history-menu.nav-history .history-popover.runs-dropdown .run-title {
  font-size: 15px;
  line-height: 22px;
}

.history-menu.nav-history .history-popover.runs-dropdown .run-meta {
  font-size: 13px;
  line-height: 20px;
}

.history-menu.nav-history .history-popover.runs-dropdown .runs-dropdown-footer {
  position: sticky;
  bottom: 0;
  background: #ffffff;
}

@media (max-width: 640px) {
  .history-menu.nav-history .history-popover.runs-dropdown {
    position: fixed;
    top: var(--runs-popover-top, 72px);
    right: 12px;
    left: 12px;
    bottom: auto;
    width: auto;
    max-width: none;
    max-height: calc(100dvh - var(--runs-popover-top, 72px) - 18px);
    transform: none;
  }

  .history-menu.nav-history .history-popover.runs-dropdown .runs-list {
    max-height: calc(100dvh - 280px);
  }
}

.usage-popover,
.profile-popover {
  top: calc(100% + 12px);
}

@media (max-width: 1180px) {
  .app-header-inner {
    max-width: none;
    padding: 0 28px;
    gap: 24px;
  }

  .main-nav {
    gap: 20px;
  }

  .main-nav-link,
  .history-toggle.main-nav-link {
    font-size: 15px;
  }
}

@media (max-width: 900px) {
  .app-header-inner {
    padding: 0 20px;
  }

  .main-nav {
    display: none;
  }

  .usage-menu {
    display: none;
  }

  .profile-button {
    height: 44px;
    border-radius: 17px;
  }
}

@media (max-width: 520px) {
  :root {
    --topbar-height: 68px;
  }

  .app-header {
    height: 68px;
  }

  .app-header-inner {
    padding: 0 16px;
    gap: 14px;
  }

  .top-brand span:last-child {
    display: inline;
    font-size: 16px;
  }

  .top-brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .profile-button > span:last-child {
    display: inline;
  }
}

/* AI scenario review editor. */
.scenario-review-header {
  margin: 28px 0 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.scenario-review-header h2 {
  margin: 0;
  color: #111827;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 34px;
}

.scenario-review-header p {
  max-width: 720px;
  margin: 8px 0 0;
  color: #667085;
  font-size: 15px;
  line-height: 22px;
}

.scenario-count {
  display: inline-flex;
  height: 34px;
  align-items: center;
  white-space: nowrap;
  border-radius: 999px;
  background: #f4f4f2;
  color: #667085;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
}

.bulk-scenario-settings {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 14px;
  border: 1px solid #e5eaf1;
  border-radius: 24px;
  background: #ffffff;
  padding: 16px;
}

.bulk-title {
  min-width: 220px;
}

.bulk-title strong {
  display: block;
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
}

.bulk-title span {
  display: block;
  margin-top: 2px;
  color: #667085;
  font-size: 13px;
  line-height: 18px;
}

.bulk-controls,
.bulk-option-row,
.scenario-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bulk-controls button,
.bulk-option-row button,
.scenario-chip-row button,
.scenario-card-actions button,
.scenario-add-query {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: #f4f4f2;
  color: #111827;
  cursor: pointer;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
}

.bulk-controls button:hover,
.bulk-option-row button:hover,
.scenario-chip-row button:hover,
.scenario-card-actions button:hover,
.scenario-add-query:hover {
  background: #ececea;
}

.bulk-controls button.active,
.bulk-option-row button.active,
.scenario-chip-row button.active {
  background: #e1e7e4;
  color: #111827;
}

.bulk-scenario-settings > div:last-child {
  flex: 1;
  min-width: 0;
}

.bulk-scenario-editor {
  margin-top: 12px;
  border-radius: 18px;
  background: #f8fafc;
  padding: 12px;
}

.bulk-editor-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 0.8fr) auto;
  gap: 12px;
  align-items: end;
}

.bulk-editor-stack {
  display: grid;
  gap: 10px;
}

.bulk-editor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.bulk-editor-main {
  min-width: 0;
}

.bulk-editor-grid strong,
.bulk-editor-stack strong,
.bulk-editor-row strong {
  display: block;
  margin-bottom: 8px;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
}

.bulk-input-label {
  display: grid;
  gap: 6px;
  color: #667085;
  font-size: 12px;
  font-weight: 600;
}

.bulk-input-label input,
.scenario-field input,
.scenario-query-row input {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 16px;
  background: #ffffff;
  color: #111827;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
}

.bulk-input-label input:focus,
.scenario-field input:focus,
.scenario-query-row input:focus {
  box-shadow: 0 0 0 1px #d8dee6;
}

.bulk-apply {
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  cursor: pointer;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.bulk-apply:hover {
  background: #1f2937;
}

.ai-scenarios-stage .scenario-list {
  display: grid;
  gap: 12px;
  margin-top: 0;
}

.ai-scenarios-stage .scenario-card {
  border: 1px solid #e5eaf1;
  border-radius: 22px;
  background: #ffffff;
  padding: 18px;
}

.ai-scenarios-stage .scenario-card.is-disabled {
  opacity: 0.58;
}

.scenario-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.scenario-card-head h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
}

.scenario-card-head p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 18px;
}

.scenario-toggle {
  display: inline-flex;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: #f4f4f2;
  color: #667085;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 600;
}

.scenario-toggle input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #118444;
}

.scenario-meta-line {
  margin-top: 14px;
  color: #667085;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
}

.ai-scenarios-stage .scenario-queries {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.ai-scenarios-stage .scenario-queries span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  background: #f4f4f2;
  color: #475467;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 600;
}

.ai-scenarios-stage .scenario-queries span.is-empty {
  color: #b42318;
  background: #fff1e8;
}

.scenario-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  border-radius: 16px;
  background: #fff1e8;
  color: #9a3412;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.scenario-error-actions {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 6px;
}

.scenario-error-actions button {
  height: 30px;
  border: none;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
}

.scenario-error-actions button:hover {
  background: #f4f4f2;
}

.scenario-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.scenario-launch-bar {
  position: sticky;
  bottom: 16px;
  z-index: 24;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  border: 1px solid #e5eaf1;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  padding: 12px;
}

.scenario-launch-summary {
  display: grid;
  gap: 2px;
}

.scenario-launch-summary strong {
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
}

.scenario-launch-summary span {
  color: #667085;
  font-size: 13px;
  line-height: 18px;
}

.scenario-launch-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.scenario-launch-actions .soft-button,
.scenario-drawer footer .soft-button {
  background: #f4f4f2;
  color: #111827;
}

.scenario-launch-actions .soft-button:hover,
.scenario-drawer footer .soft-button:hover {
  background: #ececea;
}

.scenario-drawer-shell[hidden] {
  display: none;
}

.scenario-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(17, 24, 39, 0.24);
}

.scenario-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 71;
  display: flex;
  width: min(520px, 100vw);
  height: 100vh;
  flex-direction: column;
  border-left: 1px solid #e5eaf1;
  background: #ffffff;
}

.scenario-drawer header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #eef2f7;
  padding: 22px;
}

.scenario-drawer header span {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 600;
}

.scenario-drawer header h2 {
  margin: 4px 0 0;
  color: #111827;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 28px;
}

.scenario-drawer header button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #f4f4f2;
  color: #111827;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.scenario-drawer-body {
  display: grid;
  gap: 18px;
  overflow: auto;
  padding: 20px 22px;
}

.scenario-field {
  display: grid;
  gap: 8px;
}

.scenario-field > span {
  color: #667085;
  font-size: 13px;
  font-weight: 600;
}

.scenario-segmented {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  border-radius: 18px;
  background: #f4f4f2;
  padding: 4px;
}

.scenario-segmented.wrap {
  flex-wrap: wrap;
  width: 100%;
}

.scenario-segmented button {
  height: 34px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #667085;
  cursor: pointer;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
}

.scenario-segmented button.active {
  background: #ffffff;
  color: #111827;
}

.scenario-query-editor {
  display: grid;
  gap: 8px;
}

.scenario-query-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
}

.scenario-query-row button {
  width: 38px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #f4f4f2;
  color: #111827;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
}

.scenario-add-query {
  width: fit-content;
}

.scenario-drawer footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #eef2f7;
  padding: 16px 22px;
}

@media (max-width: 1040px) {
  .bulk-scenario-settings {
    display: grid;
  }

  .bulk-title {
    min-width: 0;
  }

  .bulk-editor-grid,
  .bulk-editor-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .scenario-review-header,
  .scenario-card-head,
  .scenario-launch-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .bulk-editor-grid,
  .bulk-editor-row {
    grid-template-columns: 1fr;
  }

  .scenario-error {
    align-items: flex-start;
    flex-direction: column;
  }

  .scenario-launch-actions,
  .scenario-launch-actions button,
  .scenario-drawer footer,
  .scenario-drawer footer button {
    width: 100%;
  }
}

/* Brand assets: green mark from the supplied Просто Парсер logo. */
.top-brand {
  gap: 8px;
}

.top-brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 0;
  letter-spacing: 0;
}

.top-brand-logo img,
.top-brand-logo svg,
.brand-logo img,
.brand-logo svg {
  display: block;
  width: 100%;
  height: 100%;
}

.top-brand-text,
.brand-text {
  display: grid;
  gap: 0;
  color: #111827;
}

.top-brand .top-brand-text span,
.auth-brand .brand-text span {
  display: block;
  color: inherit;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.top-brand .top-brand-text span {
  font-size: 22px;
  line-height: 20px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 0;
}

.auth-brand .brand-text span {
  font-size: 18px;
  line-height: 17px;
}

@media (max-width: 520px) {
  .top-brand {
    gap: 7px;
  }

  .top-brand-logo {
    width: 42px;
    height: 42px;
  }

  .top-brand .top-brand-text span {
    font-size: 20px;
    line-height: 18px;
  }
}

/* Account dropdowns and account modals. */
.header-popover-root {
  position: relative;
}

.usage-popover[hidden],
.profile-popover[hidden],
.account-modal-overlay[hidden] {
  display: none !important;
}

.usage-button[aria-expanded="true"],
.profile-button[aria-expanded="true"] {
  background: #f8fafc;
}

.usage-popover,
.profile-popover.account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 140;
  width: 320px;
  box-sizing: border-box;
  border: 1px solid #e5eaf1;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.usage-popover {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.popover-header,
.account-dropdown-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.popover-header div,
.account-dropdown-header div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.popover-header span,
.usage-current span,
.account-dropdown-header span,
.readonly-account-field span,
.settings-group > span,
.soft-field span,
.billing-summary span {
  color: #667085;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.popover-header strong,
.usage-current strong,
.account-dropdown-header strong,
.billing-summary strong {
  color: #111827;
  font-size: 17px;
  font-weight: 600;
  line-height: 22px;
}

.popover-header em {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eaf8f2;
  color: #167a55;
  padding: 5px 9px;
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.usage-current,
.billing-summary {
  display: grid;
  gap: 4px;
  border-radius: 18px;
  background: #f8fafc;
  padding: 12px;
}

.usage-list {
  display: grid;
  gap: 12px;
}

.usage-meter {
  display: grid;
  gap: 7px;
}

.usage-row,
.usage-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #667085;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.usage-row strong,
.usage-status-row strong {
  color: #111827;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.usage-status-row .is-positive {
  color: #167a55;
}

.usage-status-row .is-muted {
  color: #98a2b3;
}

.usage-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f6;
}

.usage-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #111827;
}

.usage-popover .upgrade-action,
.account-primary-button,
.account-secondary-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  padding: 0 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.usage-popover .upgrade-action,
.account-primary-button {
  background: #111827;
  color: #ffffff;
}

.usage-popover .upgrade-action:hover,
.account-primary-button:hover {
  background: #0b1220;
}

.account-secondary-button {
  background: #f4f6f8;
  color: #111827;
}

.profile-popover.account-dropdown {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.account-dropdown-header {
  justify-content: flex-start;
  border-bottom: 1px solid #eef2f6;
  padding: 6px 6px 14px;
}

.account-avatar {
  width: 38px;
  height: 38px;
  font-size: 14px;
}

.account-dropdown-header span:not(.profile-avatar) {
  display: block;
  max-width: 218px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-dropdown-plan {
  border-radius: 16px;
  background: #f8fafc;
  color: #111827;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.account-menu {
  display: grid;
  gap: 4px;
}

.profile-popover.account-dropdown .account-menu button {
  display: flex;
  min-height: 40px;
  align-items: center;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #111827;
  cursor: pointer;
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

.profile-popover.account-dropdown .account-menu button:hover {
  background: #f4f6f8;
}

.profile-popover.account-dropdown .account-menu-danger {
  color: #b42318;
}

.account-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: start center;
  background: rgba(15, 23, 42, 0.26);
  overflow-y: auto;
  padding: calc(var(--topbar-height, 76px) + 24px) 24px 24px;
}

body.has-account-modal-open .workspace {
  z-index: 260;
}

.account-modal {
  position: relative;
  display: grid;
  width: min(520px, 100%);
  max-height: calc(100dvh - var(--topbar-height, 76px) - 48px);
  overflow: auto;
  border: 1px solid #e5eaf1;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.account-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #f4f6f8;
  color: #111827;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.account-modal-head {
  display: grid;
  gap: 7px;
  padding: 28px 64px 18px 28px;
}

.account-modal-head h2 {
  margin: 0;
  color: #111827;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 34px;
}

.account-modal-head p {
  margin: 0;
  color: #667085;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

.account-modal-body {
  display: grid;
  gap: 16px;
  padding: 0 28px 28px;
}

.account-field-list,
.settings-group,
.billing-feature-grid {
  display: grid;
  gap: 12px;
}

.readonly-account-field {
  display: grid;
  gap: 7px;
}

.readonly-account-field input {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-radius: 16px;
  background: #f4f6f8;
  color: #111827;
  padding: 13px 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
}

.billing-feature-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.billing-feature-grid > div {
  display: grid;
  gap: 8px;
  border-radius: 18px;
  background: #f8fafc;
  padding: 14px;
}

.billing-feature-grid strong {
  color: #111827;
  font-size: 15px;
  font-weight: 600;
}

.billing-feature-grid span {
  color: #667085;
  font-size: 14px;
  font-weight: 600;
  line-height: 19px;
}

.billing-usage-list {
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #eef2f6;
  padding: 14px;
}

.segmented-control {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  border-radius: 18px;
  background: #f4f6f8;
  padding: 4px;
}

.segmented-control button {
  min-width: 72px;
  height: 36px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #667085;
  cursor: pointer;
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}

.segmented-control button.active {
  background: #ffffff;
  color: #111827;
}

.checkbox-row,
.soft-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 18px;
  background: #f8fafc;
  padding: 13px 14px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.checkbox-row span {
  flex: 1 1 auto;
  color: #111827;
  font-size: 15px;
  font-weight: 600;
}

.checkbox-row em {
  border-radius: 999px;
  background: #eaf8f2;
  color: #167a55;
  padding: 4px 8px;
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
}

.soft-field strong {
  color: #111827;
  font-size: 15px;
  font-weight: 600;
}

.support-actions {
  display: grid;
  gap: 8px;
}

.support-actions button,
.support-actions a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border: 0;
  border-radius: 16px;
  background: #f4f6f8;
  color: #111827;
  cursor: pointer;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
}

.support-actions button:hover,
.support-actions a:hover,
.support-actions a:focus-visible,
.account-secondary-button:hover {
  outline: none;
  background: #e9edf2;
}

.account-modal-feedback {
  min-height: 22px;
  margin: 0;
  color: #667085;
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
}

.account-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

/* Compact chip density: keep product controls scannable without oversized padding. */
.main-nav {
  gap: 22px;
}

.main-nav-link.is-active {
  height: 38px;
  border-radius: 16px;
  padding: 0 12px;
}

.usage-button,
.profile-button {
  height: 42px;
  border-radius: 16px;
  padding: 0 14px;
}

.profile-button {
  gap: 7px;
  padding: 0 13px 0 8px;
}

.profile-button.is-login-button {
  height: 42px;
  border-radius: 16px;
  padding: 0 18px;
}

.workspace-tab,
.ui-pill,
.result-tabs button,
.preset-chip,
.history-toggle,
.ghost-action,
.selection-toolbar button,
.upgrade-action,
.row-actions button,
.bulk-controls button,
.bulk-option-row button,
.scenario-chip-row button,
.scenario-card-actions button,
.scenario-add-query {
  min-height: 0;
  height: 32px;
  border-radius: 999px;
  padding: 0 10px;
}

.quick-categories .preset-chip {
  min-height: 0;
  height: 30px;
  padding: 0 10px;
}

.workspace-tab {
  height: 34px;
}

.result-tabs button {
  height: 30px;
  gap: 5px;
  padding: 0 9px;
}

.summary-chip,
.active-filters button,
.filter-options button,
.filter-checks label {
  height: 30px;
  padding: 0 10px;
}

.summary-chip {
  gap: 4px;
  font-size: 13px;
}

.summary-chip strong {
  font-size: 14px;
}

.active-filters-query,
.rating-options label,
.summary-chips span {
  min-height: 28px;
  padding: 0 9px;
}

.toggle-grid label {
  min-height: 34px;
  padding: 0 10px;
}

.segmented-control,
.parser-switch.segmented-control,
.geo-switch.segmented-control {
  height: 42px;
  padding: 3px;
}

.segmented-control label,
.parser-switch.segmented-control label,
.geo-switch.segmented-control label,
.segmented-control .segment-button,
.parser-switch.segmented-control .segment-button,
.geo-switch.segmented-control .segment-button {
  height: 36px;
  border-radius: 18px;
  padding: 0 12px;
  line-height: 36px;
}

.geo-switch.segmented-control .segment-button {
  padding: 0 11px;
}

.mode-tabs-list {
  position: relative;
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  isolation: isolate;
  box-sizing: border-box;
  border-radius: 999px;
  background: var(--button-bg, #f4f4f2);
  padding: 3px;
}

.mode-tabs-indicator {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: var(--mode-tabs-indicator-width, 0px);
  height: var(--mode-tabs-indicator-height, calc(100% - 8px));
  border-radius: 999px;
  background: var(--surface, #ffffff);
  pointer-events: none;
  transform: translate3d(
    var(--mode-tabs-indicator-x, 4px),
    var(--mode-tabs-indicator-y, 4px),
    0
  );
  transition:
    width 260ms cubic-bezier(0.22, 1, 0.36, 1),
    height 260ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.mode-tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-width: 0;
  height: 30px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted, #667085);
  cursor: pointer;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition:
    color 160ms ease;
}

.mode-tab input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.mode-tab-text {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transform: translateY(4px);
}

.mode-tab:hover {
  color: var(--text-main, #111827);
}

.mode-tab[data-state="active"],
.mode-tab.is-selected {
  color: var(--text-main, #111827);
}

.mode-tab:has(input:focus-visible) {
  outline: 2px solid rgba(17, 24, 39, 0.14);
  outline-offset: 2px;
}

.geo-tabs-list .mode-tab {
  padding: 0 10px;
}

@media (max-width: 620px) {
  .mode-tabs-list {
    width: 100%;
  }

  .mode-tab {
    flex: 1 1 0;
    padding: 0 7px;
    font-size: 13px;
  }

  .geo-tabs-list {
    flex-wrap: wrap;
    border-radius: 20px;
  }

  .geo-tabs-list:has(.mode-tab[hidden]) {
    flex-wrap: nowrap;
    border-radius: 999px;
  }

  .geo-tabs-list .mode-tab {
    flex-basis: calc(50% - 1px);
  }

  .geo-tabs-list:has(.mode-tab[hidden]) .mode-tab {
    flex-basis: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mode-tabs-indicator {
    transition: none;
  }
}

.social-chip,
body[data-page="results"] .social-chip,
.quality-badge,
.quality-badge.full,
.quality-badge.good,
.quality-badge.basic,
.quality-badge.weak,
.duplicate-badge,
.origin-badge,
.similar-query-chips span,
.list-chip,
.price-chip,
.permission-chip {
  height: 22px;
  min-height: 0;
  padding: 0 7px;
}

.priority-badge {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
}

@media (max-width: 900px) {
  .usage-menu {
    display: block;
  }

  .usage-popover,
  .profile-popover.account-dropdown {
    position: fixed;
    top: 72px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

@media (max-width: 620px) {
  .usage-button,
  .profile-button,
  .profile-button.is-login-button {
    height: 42px;
    border-radius: 16px;
    padding: 0 12px;
    font-size: 13px;
  }

  .profile-button:not(.is-login-button) {
    max-width: 142px;
    gap: 7px;
    padding: 0 10px;
  }

  .profile-button:not(.is-login-button) .profile-avatar {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .profile-button > span:last-child {
    max-width: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .account-modal-overlay {
    align-items: end;
    padding: var(--topbar-height, 68px) 0 0;
  }

  .account-modal {
    width: 100%;
    max-height: calc(100dvh - var(--topbar-height, 68px));
    border-radius: 24px 24px 0 0;
  }

  .account-modal-head {
    padding: 26px 60px 16px 20px;
  }

  .account-modal-head h2 {
    font-size: 24px;
    line-height: 30px;
  }

  .account-modal-body {
    padding: 0 20px 22px;
  }

  .billing-feature-grid {
    grid-template-columns: 1fr;
  }

  .account-modal-footer {
    flex-direction: column;
  }

  .account-modal-footer button {
    width: 100%;
  }
}

/* Run progress page: operational process view for active lead collection. */
.run-process-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.run-process-panel[hidden] {
  display: none !important;
}

body[data-page="results"][data-job-status="running"] .progress-shell,
body[data-page="results"][data-job-status="error"] .progress-shell,
body[data-page="results"][data-job-status="cancelled"] .progress-shell,
body[data-page="results"][data-job-status="running"] .results-card,
body[data-page="results"][data-job-status="error"] .results-card,
body[data-page="results"][data-job-status="cancelled"] .results-card {
  display: none !important;
}

body[data-page="results"][data-job-status="idle"] .run-header-status {
  display: none;
}

body[data-page="results"] .run-stage .workspace-head {
  align-items: start;
}

.run-header-status {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: #f4f4f2;
  color: #667085;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.run-header-status.running,
.run-header-status.starting,
.run-header-status.collecting,
.run-header-status.enriching,
.run-header-status.finishing {
  background: #eef4ff;
  color: #3457d5;
}

.run-header-status.done {
  background: #eaf8f0;
  color: #118444;
}

.run-header-status.error {
  background: #fef2f2;
  color: #dc2626;
}

.run-header-status.cancelled {
  background: #f4f4f2;
  color: #667085;
}

.run-status-card {
  min-height: 82px;
  border: 1px solid #e5eaf1;
  border-radius: 26px;
  background: #ffffff;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.run-status-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.run-status-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eaf8f0;
  color: #118444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
}

body[data-job-status="error"] .run-status-icon {
  background: #fef2f2;
  color: #dc2626;
}

body[data-job-status="cancelled"] .run-status-icon {
  background: #f4f4f2;
  color: #667085;
}

.run-status-card h2 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
}

.run-status-card p {
  margin: 3px 0 0;
  color: #667085;
  font-size: 14px;
  line-height: 20px;
}

.run-status-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.run-status-card .status-stop-button {
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #fef2f2;
  color: #dc2626;
  cursor: pointer;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
}

.run-status-card .status-stop-button:hover:not(:disabled) {
  background: #fee2e2;
}

.run-status-card .status-stop-button:disabled {
  cursor: default;
  background: #f4f4f2;
  color: #98a2b3;
}

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

.run-metric {
  height: 74px;
  border: 1px solid #e5eaf1;
  border-radius: 22px;
  background: #ffffff;
  padding: 14px 16px;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.run-metric span {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 16px;
  text-transform: uppercase;
}

.run-metric strong {
  margin-top: 5px;
  overflow: hidden;
  color: #111827;
  font-size: 20px;
  font-weight: 600;
  line-height: 26px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-progress-card {
  border: 1px solid #e5eaf1;
  border-radius: 24px;
  background: #ffffff;
  padding: 18px;
}

.run-progress-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.run-progress-header h3 {
  margin: 0;
  color: #111827;
  font-size: 17px;
  font-weight: 600;
  line-height: 23px;
}

.run-progress-header p {
  margin: 3px 0 0;
  color: #667085;
  font-size: 14px;
  line-height: 20px;
}

.run-progress-header > span {
  color: #111827;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 24px;
}

.run-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #f4f4f2;
}

.run-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: #18a957;
  transition: width 240ms ease;
}

body[data-job-status="error"] .run-progress-fill {
  background: #dc2626;
}

body[data-job-status="cancelled"] .run-progress-fill {
  background: #98a2b3;
}

.run-progress-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  color: #667085;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.run-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.run-step {
  border: 1px solid #e5eaf1;
  border-radius: 20px;
  background: #ffffff;
  padding: 14px;
}

.step-dot {
  width: 26px;
  height: 26px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: #f4f4f2;
  color: #98a2b3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.run-step.done .step-dot {
  background: #eaf8f0;
  color: #118444;
}

.run-step.active .step-dot {
  background: #111827;
  color: #ffffff;
}

.run-step.error .step-dot {
  background: #fef2f2;
  color: #dc2626;
}

.run-step h4 {
  margin: 0;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.run-step p {
  margin: 3px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 17px;
}

.run-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
}

.live-leads-card,
.run-log-card {
  min-height: 420px;
  overflow: hidden;
  border: 1px solid #e5eaf1;
  border-radius: 26px;
  background: #ffffff;
}

.workspace-card-header {
  min-height: 58px;
  border-bottom: 1px solid #eef2f7;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.workspace-card-header h3 {
  margin: 0;
  color: #111827;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.workspace-card-header span {
  color: #98a2b3;
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
}

.lead-skeleton-list,
.live-lead-list,
.run-timeline {
  padding: 8px;
}

.lead-skeleton-row {
  min-height: 68px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 90px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
}

.lead-skeleton-row + .lead-skeleton-row,
.live-lead-row + .live-lead-row {
  border-top: 1px solid #eef2f7;
}

.skeleton-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #eef2f7;
}

.skeleton-line {
  height: 12px;
  border-radius: 999px;
  background: #eef2f7;
}

.skeleton-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.w-50 {
  width: 50%;
}

.w-80 {
  width: 80%;
}

.w-30 {
  width: 30%;
}

.live-lead-row {
  min-height: 68px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
}

.lead-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #f4f4f2;
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

.live-lead-row .lead-name {
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.live-lead-row .lead-meta {
  margin-top: 2px;
  color: #667085;
  font-size: 13px;
  line-height: 18px;
}

.lead-quality {
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: #eaf8f0;
  color: #118444;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.lead-quality.basic {
  background: #eef4ff;
  color: #3457d5;
}

.lead-quality.new {
  background: #f4f4f2;
  color: #667085;
}

.timeline-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
}

.timeline-item.active {
  background: #f8fafc;
}

.timeline-dot {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #f4f4f2;
}

.timeline-item.done .timeline-dot {
  background: #eaf8f0;
}

.timeline-item.active .timeline-dot {
  background: #111827;
}

.timeline-item.error .timeline-dot {
  background: #fef2f2;
}

.timeline-title-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.timeline-title {
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.timeline-time {
  flex: 0 0 auto;
  color: #98a2b3;
  font-size: 12px;
  line-height: 18px;
}

.timeline-description {
  margin-top: 2px;
  color: #667085;
  font-size: 12px;
  line-height: 17px;
}

@media (max-width: 1000px) {
  .run-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .run-steps,
  .run-workspace {
    grid-template-columns: 1fr;
  }

  .run-status-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .run-status-actions {
    width: 100%;
  }

  .run-status-actions button {
    flex: 1;
  }
}

@media (max-width: 620px) {
  .run-metrics {
    grid-template-columns: 1fr;
  }

  .run-progress-header,
  .run-progress-footer,
  .workspace-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .live-lead-row,
  .lead-skeleton-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .live-lead-row .lead-quality,
  .lead-skeleton-row > .skeleton-line {
    grid-column: 2;
    width: fit-content;
  }
}

/* Run progress page: distilled waiting state, not a dashboard. */
body[data-page="results"][data-job-status="running"] .run-stage,
body[data-page="results"][data-job-status="error"] .run-stage,
body[data-page="results"][data-job-status="cancelled"] .run-stage {
  width: min(100%, 1040px);
}

body[data-page="results"][data-job-status="running"] .run-stage .workspace-head,
body[data-page="results"][data-job-status="error"] .run-stage .workspace-head,
body[data-page="results"][data-job-status="cancelled"] .run-stage .workspace-head {
  margin-bottom: 28px;
}

body[data-page="results"][data-job-status="running"] .run-stage .workspace-head h2,
body[data-page="results"][data-job-status="error"] .run-stage .workspace-head h2,
body[data-page="results"][data-job-status="cancelled"] .run-stage .workspace-head h2 {
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 46px;
}

.run-process-panel {
  display: block;
  margin-bottom: 18px;
}

.run-process-panel[hidden] {
  display: none !important;
}

.run-progress-strip {
  margin-bottom: 16px;
  border: 1px solid #e5eaf1;
  border-radius: 24px;
  background: #ffffff;
  padding: 22px;
}

.run-progress-copy {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.run-progress-copy h2 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 28px;
  text-wrap: balance;
}

.run-progress-copy p {
  max-width: 68ch;
  margin: 5px 0 0;
  color: #667085;
  font-size: 15px;
  line-height: 22px;
}

.run-progress-side {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.run-progress-percent {
  color: #111827;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 32px;
}

.run-stop-button {
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: #f4f4f2;
  color: #667085;
  padding: 0 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.run-stop-button[hidden] {
  display: none !important;
}

.run-stop-button:not(:disabled):hover {
  background: #ececea;
  color: #111827;
}

.current-run-compact .run-stop-button {
  min-height: 38px;
  background: #fff1f2;
  color: #dc2626;
  cursor: pointer;
  padding: 0 15px;
}

.current-run-compact .run-stop-button:not(:disabled):hover,
.current-run-compact .run-stop-button:not(:disabled):focus-visible {
  outline: none;
  background: #ffe4e6;
  color: #b91c1c;
}

.current-run-compact .run-stop-button:disabled {
  cursor: default;
  opacity: 0.56;
}

.run-progress-track {
  height: 8px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #f4f4f2;
}

.run-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: #18a957;
  transition: width 240ms ease;
}

body[data-job-status="error"] .run-progress-fill {
  background: #dc2626;
}

body[data-job-status="cancelled"] .run-progress-fill {
  background: #98a2b3;
}

.run-progress-meta,
.mini-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.run-progress-meta {
  margin-top: 12px;
}

.mini-steps {
  margin-top: 14px;
}

.run-progress-meta span,
.mini-steps span {
  height: 28px;
  border-radius: 999px;
  background: #f4f4f2;
  color: #667085;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.mini-steps span {
  color: #98a2b3;
}

.mini-steps span.done {
  background: #eaf8f0;
  color: #118444;
}

.mini-steps span.active {
  background: #111827;
  color: #ffffff;
}

.mini-steps span.error {
  background: #fef2f2;
  color: #dc2626;
}

.run-preview-card {
  overflow: hidden;
  border: 1px solid #e5eaf1;
  border-radius: 24px;
  background: #ffffff;
}

.run-preview-header {
  min-height: 62px;
  border-bottom: 1px solid #eef2f7;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.run-preview-header h2 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
}

.run-preview-header span {
  color: #98a2b3;
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
}

.run-preview-table-head,
.run-preview-row,
.run-preview-skeleton-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(120px, 1fr) minmax(110px, 1fr) minmax(110px, 1fr) 100px;
  gap: 16px;
  align-items: center;
}

.run-preview-table-head {
  min-height: 44px;
  border-bottom: 1px solid #eef2f7;
  background: #f8fafc;
  padding: 0 20px;
}

.run-preview-table-head span {
  color: #667085;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 16px;
  text-transform: uppercase;
}

.run-preview-row,
.run-preview-skeleton-row {
  min-height: 70px;
  border-bottom: 1px solid #eef2f7;
  padding: 14px 20px;
}

.run-preview-row:last-child,
.run-preview-skeleton-row:last-child {
  border-bottom: 0;
}

.run-preview-row .lead-name {
  overflow: hidden;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-preview-row .lead-meta,
.run-preview-cell {
  overflow: hidden;
  color: #667085;
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-preview-row .lead-meta {
  margin-top: 2px;
}

.run-skeleton-cell {
  min-width: 0;
}

.run-skeleton-line {
  height: 12px;
  border-radius: 999px;
  background: #eef2f7;
}

.run-skeleton-line + .run-skeleton-line {
  margin-top: 8px;
}

.run-skeleton-pill {
  width: 68px;
  height: 26px;
  border-radius: 999px;
  background: #eef2f7;
}

.w-40 {
  width: 40%;
}

.w-60 {
  width: 60%;
}

.technical-log {
  margin-top: 14px;
  border: 1px solid #e5eaf1;
  border-radius: 18px;
  background: #ffffff;
  padding: 14px 18px;
}

.technical-log summary {
  cursor: pointer;
  color: #667085;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.technical-log-note {
  display: none;
}

.technical-log .run-timeline {
  padding: 10px 0 0;
}

.technical-log .timeline-item {
  border-radius: 12px;
  padding: 10px 0;
}

.technical-log .timeline-item.active {
  background: transparent;
}

@media (max-width: 900px) {
  .run-preview-card {
    overflow-x: auto;
  }

  .run-preview-table-head,
  .run-preview-row,
  .run-preview-skeleton-row {
    min-width: 760px;
  }
}

@media (max-width: 620px) {
  body[data-page="results"][data-job-status="running"] .run-stage .workspace-head h2,
  body[data-page="results"][data-job-status="error"] .run-stage .workspace-head h2,
  body[data-page="results"][data-job-status="cancelled"] .run-stage .workspace-head h2 {
    font-size: 32px;
    letter-spacing: -0.035em;
    line-height: 36px;
  }

  .run-progress-strip {
    border-radius: 22px;
    padding: 18px;
  }

  .run-progress-copy,
  .run-preview-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .run-progress-side {
    width: 100%;
    justify-content: space-between;
  }

  .run-preview-header span {
    white-space: normal;
  }
}

/* Run process v2: search results filling in, not parser monitoring. */
body[data-page="results"][data-job-status="running"] .run-stage,
body[data-page="results"][data-job-status="error"] .run-stage,
body[data-page="results"][data-job-status="cancelled"] .run-stage,
body[data-page="results"][data-job-status="done"] .run-stage {
  width: min(100%, 1040px);
}

body[data-page="results"][data-job-status="running"] .run-stage .workspace-head,
body[data-page="results"][data-job-status="error"] .run-stage .workspace-head,
body[data-page="results"][data-job-status="cancelled"] .run-stage .workspace-head,
body[data-page="results"][data-job-status="done"] .run-stage .workspace-head {
  grid-template-columns: auto minmax(0, 1fr);
  margin-bottom: 24px;
  padding-bottom: 0;
  border-bottom: 0;
}

body[data-page="results"] .run-header-status,
body[data-page="results"][data-job-status="running"] .workspace-actions,
body[data-page="results"][data-job-status="error"] .workspace-actions,
body[data-page="results"][data-job-status="cancelled"] .workspace-actions,
body[data-page="results"][data-job-status="done"] .workspace-actions {
  display: none !important;
}

body[data-page="results"][data-job-status="running"] .run-stage .workspace-head h2,
body[data-page="results"][data-job-status="error"] .run-stage .workspace-head h2,
body[data-page="results"][data-job-status="cancelled"] .run-stage .workspace-head h2,
body[data-page="results"][data-job-status="done"] .run-stage .workspace-head h2 {
  margin-top: 17px;
  color: #111827;
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 48px;
}

body[data-page="results"][data-job-status="done"] .progress-shell {
  display: none !important;
}

body[data-page="results"][data-job-status="done"] .run-process-panel .live-results,
body[data-page="results"][data-job-status="done"] .technical-log {
  display: none;
}

body[data-page="results"][data-job-status="queued"] .progress-shell,
body[data-page="results"][data-job-status="queued"] .results-card {
  display: none !important;
}

.compact-run-status {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 18px;
  row-gap: 14px;
  align-items: center;
  margin-bottom: 12px;
  border: 1px solid #e5eaf1;
  border-radius: 24px;
  background: #ffffff;
  padding: 16px 18px 18px;
}

.status-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #18a957;
}

body[data-job-status="error"] .status-dot {
  background: #dc2626;
}

body[data-job-status="cancelled"] .status-dot {
  background: #98a2b3;
}

.status-left strong {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-left span:last-child {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #667085;
  font-size: 14px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.status-percent {
  color: #111827;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 24px;
}

.status-progress {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #f4f4f2;
}

.status-progress div {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: #18a957;
  transition: width 240ms ease;
}

body[data-job-status="error"] .status-progress div {
  background: #dc2626;
}

body[data-job-status="cancelled"] .status-progress div {
  background: #98a2b3;
}

.live-results {
  overflow: hidden;
  border: 1px solid #e5eaf1;
  border-radius: 24px;
  background: #ffffff;
}

.live-results-header {
  min-height: 60px;
  border-bottom: 1px solid #eef2f7;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.live-results-header h2 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
}

.live-results-header span {
  color: #98a2b3;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
}

.live-results-table {
  width: 100%;
}

.live-results-head,
.live-results .live-lead-row,
.live-results .skeleton-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.7fr) minmax(130px, 1fr) minmax(110px, 1fr) minmax(110px, 1fr) 100px;
  gap: 16px;
  align-items: center;
}

.live-results-head {
  min-height: 44px;
  border-bottom: 1px solid #eef2f7;
  background: #f8fafc;
  padding: 0 20px;
}

.live-results-head span {
  color: #667085;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 16px;
  text-transform: uppercase;
}

.live-results .live-lead-row,
.live-results .skeleton-row {
  min-height: 70px;
  border-bottom: 1px solid #eef2f7;
  padding: 14px 20px;
}

.live-results .live-lead-row:last-child,
.live-results .skeleton-row:last-child {
  border-bottom: 0;
}

.company-cell {
  min-width: 0;
}

.company-cell strong {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-cell span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #667085;
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-results .live-lead-row > span:not(.quality-pill) {
  overflow: hidden;
  color: #111827;
  font-size: 14px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-pill {
  width: fit-content;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.quality-pill.contact {
  background: #eef4ff;
  color: #3457d5;
}

.quality-pill.good {
  background: #eaf8f0;
  color: #118444;
}

.quality-pill.new {
  background: #f4f4f2;
  color: #667085;
}

.live-results .skeleton-row > div {
  min-width: 0;
}

.live-results .skeleton-line {
  height: 12px;
  border-radius: 999px;
  background: #eef2f7;
}

.live-results .skeleton-line + .skeleton-line {
  margin-top: 8px;
}

.live-results .skeleton-pill {
  width: 72px;
  height: 26px;
  border-radius: 999px;
  background: #eef2f7;
}

.technical-log {
  margin-top: 12px;
  border-radius: 18px;
}

.technical-log summary {
  font-weight: 600;
}

@media (max-width: 900px) {
  .live-results {
    overflow-x: auto;
  }

  .live-results-head,
  .live-results .live-lead-row,
  .live-results .skeleton-row {
    min-width: 780px;
  }
}

@media (max-width: 620px) {
  body[data-page="results"][data-job-status="running"] .run-stage .workspace-head,
  body[data-page="results"][data-job-status="error"] .run-stage .workspace-head,
  body[data-page="results"][data-job-status="cancelled"] .run-stage .workspace-head,
  body[data-page="results"][data-job-status="done"] .run-stage .workspace-head {
    gap: 10px;
  }

  body[data-page="results"][data-job-status="running"] .run-stage .workspace-head h2,
  body[data-page="results"][data-job-status="error"] .run-stage .workspace-head h2,
  body[data-page="results"][data-job-status="cancelled"] .run-stage .workspace-head h2,
  body[data-page="results"][data-job-status="done"] .run-stage .workspace-head h2 {
    margin-top: 12px;
    font-size: 32px;
    letter-spacing: -0.035em;
    line-height: 36px;
  }

  .compact-run-status {
    grid-template-columns: 1fr;
    border-radius: 22px;
    padding: 15px 16px 17px;
  }

  .status-right {
    justify-content: space-between;
  }

  .status-left span:last-child,
  .live-results-header span {
    white-space: normal;
  }

  .live-results-header {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

/* Current run: inline expandable block inside the new collection screen. */
.current-run-expandable {
  width: 100%;
  margin: 18px 0 22px;
  overflow: hidden;
  border: 1px solid #e3e8ef;
  border-radius: 18px;
  background: #ffffff;
}

.current-run-expandable[hidden],
.current-run-expanded[hidden],
.run-open-result-button[hidden],
#job-status[hidden] {
  display: none !important;
}

.current-run-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: center;
  min-height: 78px;
  cursor: pointer;
  padding: 16px 18px 14px;
  outline: none;
}

.current-run-compact:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(24, 169, 87, 0.42);
}

.run-compact-left,
.run-compact-right {
  display: flex;
  align-items: center;
}

.run-compact-left {
  min-width: 0;
  gap: 12px;
  overflow: hidden;
}

.run-compact-left > div {
  min-width: 0;
  flex: 1 1 auto;
}

.run-status-dot {
  position: relative;
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #18a957;
}

.run-status-dot.queued,
.run-status-dot.starting,
.run-status-dot.collecting,
.run-status-dot.enriching,
.run-status-dot.finishing {
  box-shadow: 0 0 0 4px rgba(24, 169, 87, 0.12);
}

.run-status-dot.error {
  background: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.11);
}

.run-status-dot.cancelled {
  background: #98a2b3;
  box-shadow: 0 0 0 4px rgba(152, 162, 179, 0.12);
}

.run-status-dot.is-loading,
.mobile-run-dot.is-loading {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #18a957;
}

.run-loader-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  animation: submit-loader-spin 780ms linear infinite;
}

.run-loader-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

.run-compact-left strong {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 17px;
  font-weight: 600;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-compact-left span:last-child {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #667085;
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-compact-right {
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 8px;
  min-width: max-content;
}

.run-compact-percent {
  color: #111827;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 22px;
}

.run-expand-button,
.run-open-result-button,
.technical-log-stop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  background: #f4f4f2;
  color: #4b5563;
  cursor: pointer;
  padding: 0 11px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.run-open-result-button {
  background: #111827;
  color: #ffffff;
}

.run-expand-button:hover,
.technical-log-stop:hover {
  background: #ececea;
  color: #111827;
}

.run-open-result-button:hover {
  background: #1f2937;
  color: #ffffff;
}

.run-compact-progress {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f5f9;
}

.run-compact-progress div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #18a957;
  transition: width 220ms ease-out;
}

.current-run-expandable[data-status="error"] .run-compact-progress div {
  background: #dc2626;
}

.current-run-expandable[data-status="cancelled"] .run-compact-progress div {
  background: #98a2b3;
}

.current-run-expanded {
  border-top: 1px solid #eef2f7;
  padding: 0;
  animation: current-run-expand 180ms ease-out;
}

.run-preview {
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.run-preview-header {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #eef2f7;
  padding: 0 20px;
}

.run-preview-header h4 {
  margin: 0;
  color: #111827;
  font-size: 17px;
  font-weight: 600;
  line-height: 23px;
}

.run-preview-header span {
  color: #98a2b3;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
}

.run-preview-table {
  width: 100%;
}

.run-preview-head,
.run-preview-row,
.run-skeleton-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.7fr) minmax(130px, 1fr) minmax(110px, 1fr) minmax(120px, 1fr) 100px;
  gap: 14px;
  align-items: center;
}

.run-preview-head {
  min-height: 40px;
  border-bottom: 1px solid #eef2f7;
  background: #f8fafc;
  padding: 0 20px;
}

.run-preview-head span {
  color: #667085;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 16px;
  text-transform: uppercase;
}

.run-preview-row,
.run-skeleton-row {
  min-height: 66px;
  border-bottom: 1px solid #eef2f7;
  padding: 12px 20px;
}

.run-preview-row:last-child,
.run-skeleton-row:last-child {
  border-bottom: 0;
}

.run-preview-cell {
  overflow: hidden;
  color: #111827;
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-skeleton-cell {
  min-width: 0;
}

.run-skeleton-line {
  height: 12px;
  border-radius: 999px;
  background: #eef2f7;
}

.run-skeleton-line + .run-skeleton-line {
  margin-top: 8px;
}

.run-skeleton-pill {
  width: 72px;
  height: 26px;
  border-radius: 999px;
  background: #eef2f7;
}

.current-run-expandable .company-cell strong,
.current-run-expandable .company-cell span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-run-expandable .company-cell strong {
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.current-run-expandable .company-cell span {
  margin-top: 2px;
  color: #667085;
  font-size: 12px;
  line-height: 17px;
}

.current-run-expandable .technical-log {
  margin: 12px 16px 16px;
  border: 1px solid #e5eaf1;
  border-radius: 18px;
  background: #ffffff;
  padding: 12px 14px;
}

.current-run-expandable .technical-log summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: #667085;
  font-size: 14px;
  font-weight: 600;
  line-height: 19px;
}

.current-run-expandable .technical-log-note {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 600;
}

.current-run-expandable .technical-log .run-timeline {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px 0 0;
}

.technical-log-stop {
  min-height: 28px;
  margin-top: 8px;
  background: transparent;
  color: #667085;
  padding: 0;
}

.technical-log-stop:not(:disabled):hover,
.technical-log-stop:not(:disabled):focus-visible {
  outline: none;
  background: transparent;
  color: #dc2626;
}

.current-run-expandable .technical-log .timeline-item {
  border-radius: 10px;
  padding: 9px 0;
}

.current-run-expandable .technical-log .timeline-item.active {
  background: transparent;
}

@keyframes current-run-expand {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .run-preview {
    overflow-x: auto;
  }

  .run-preview-head,
  .run-preview-row,
  .run-skeleton-row {
    min-width: 760px;
  }
}

@media (max-width: 720px) {
  .current-run-expandable {
    margin-top: 14px;
    border-radius: 16px;
  }

  .current-run-compact {
    grid-template-columns: 1fr;
  }

  .current-run-compact {
    display: grid;
  }

  .run-compact-right {
    width: 100%;
    justify-content: flex-start;
  }

  .run-compact-left span:last-child,
  .run-preview-header span {
    white-space: normal;
  }

  .run-preview-header {
    min-height: auto;
    align-items: flex-start;
    padding: 14px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .current-run-expanded {
    animation: none;
  }

  .run-compact-progress div {
    transition: none;
  }
}

/* Public Platega/legal pages. Kept separate from the authenticated app shell. */
body.public-page {
  min-height: 100vh;
  background: #f4f4f2;
  color: #111827;
  font-family: var(--font-ui);
}

.public-header {
  height: 72px;
  background: #f4f4f2;
}

.public-header-inner {
  display: flex;
  width: 100%;
  max-width: 1120px;
  height: 100%;
  align-items: center;
  gap: 32px;
  margin: 0 auto;
  padding: 0 32px;
}

.public-brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: #111827;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.public-brand-logo {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: hidden;
}

.public-brand-logo img {
  display: block;
  width: 34px;
  height: 34px;
}

.public-header nav {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.public-header nav a {
  color: #667085;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
}

.public-header nav a:hover,
.public-header nav a:focus-visible,
.public-header nav a[aria-current="page"] {
  outline: none;
  color: #111827;
}

.public-login-button {
  display: inline-flex;
  flex: 0 0 auto;
  height: 44px;
  align-items: center;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.public-login-button:hover,
.public-login-button:focus-visible {
  outline: none;
  background: #0b1220;
}

.legal-page-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  max-width: 1120px;
  align-items: start;
  margin: 0 auto;
  padding: 48px 32px 72px;
}

.legal-sidebar {
  position: sticky;
  top: 24px;
  border: 1px solid #e5eaf1;
  border-radius: 24px;
  background: #ffffff;
  padding: 14px;
}

.legal-sidebar strong {
  display: block;
  margin: 2px 12px 10px;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.legal-sidebar nav {
  display: grid;
  gap: 2px;
}

.legal-sidebar a {
  display: flex;
  min-height: 40px;
  align-items: center;
  border-radius: 14px;
  color: #667085;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  text-decoration: none;
}

.legal-sidebar a:hover,
.legal-sidebar a:focus-visible,
.legal-sidebar a.active {
  outline: none;
  background: #f4f4f2;
  color: #111827;
}

.legal-document {
  border: 1px solid #e5eaf1;
  border-radius: 28px;
  background: #ffffff;
  padding: 44px;
}

.legal-document h1 {
  margin: 0;
  color: #111827;
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 48px;
  text-wrap: balance;
}

.legal-document .legal-updated {
  margin: 10px 0 0;
  color: #667085;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.legal-document h2 {
  margin: 34px 0 12px;
  color: #111827;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 30px;
  text-wrap: balance;
}

.legal-document h3 {
  margin: 24px 0 8px;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
}

.legal-document p,
.legal-document li {
  color: #475467;
  font-size: 16px;
  line-height: 26px;
}

.legal-document p {
  margin: 12px 0 0;
}

.legal-document ul,
.legal-document ol {
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
  padding-left: 22px;
}

.legal-document a {
  color: #111827;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-note {
  margin-top: 24px;
  border-radius: 20px;
  background: #f8fafc;
  padding: 16px 18px;
  color: #667085;
  font-size: 14px;
  line-height: 22px;
}

.support-lead {
  max-width: 720px;
  color: #667085;
  font-size: 18px;
  line-height: 28px;
}

.public-page .support-grid,
.public-page .pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 32px 0 0;
}

.support-document .support-grid {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
}

.support-document .support-card:last-child {
  grid-column: 1 / -1;
}

.public-page .support-card,
.public-page .pricing-card,
.legal-index-grid a {
  border: 1px solid #e5eaf1;
  border-radius: 24px;
  background: #ffffff;
  padding: 20px;
}

.public-page .pricing-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 24px;
}

.public-page .pricing-card.featured {
  border-color: #111827;
}

.public-page .pricing-card h2 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  font-weight: 600;
  line-height: 28px;
}

.public-page .pricing-price {
  margin: 14px 0 0;
  color: #111827;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 36px;
}

.public-page .pricing-card ul {
  display: grid;
  gap: 10px;
  margin: 22px 0 24px;
  padding-left: 0;
  list-style: none;
}

.public-page .pricing-card li {
  color: #475467;
  font-size: 15px;
  line-height: 22px;
}

.public-page .pricing-card li::before {
  content: "✓";
  color: #18a957;
  margin-right: 8px;
  font-weight: 600;
}

.public-page .pricing-button {
  display: flex;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f4f4f2;
  color: #111827;
  margin-top: auto;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.public-page .pricing-card.featured .pricing-button {
  background: #111827;
  color: #ffffff;
}

.public-page .pricing-button:hover,
.public-page .pricing-button:focus-visible {
  outline: none;
  background: #ececea;
}

.public-page .pricing-card.featured .pricing-button:hover,
.public-page .pricing-card.featured .pricing-button:focus-visible {
  background: #0b1220;
}

.public-page .support-card span {
  display: block;
  color: #667085;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.public-page .support-card strong {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-size: 19px;
  font-weight: 600;
  line-height: 25px;
  overflow-wrap: normal;
  word-break: normal;
}

.support-document .support-card strong a {
  white-space: nowrap;
}

.public-page .support-card p {
  margin-top: 8px;
  color: #667085;
  font-size: 14px;
  line-height: 21px;
}

.support-question-list,
.support-note {
  margin-top: 28px;
}

.support-question-list ul {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.legal-index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.legal-index-grid a {
  display: grid;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.legal-index-grid a:hover,
.legal-index-grid a:focus-visible {
  outline: none;
  border-color: #cfd6df;
}

.legal-index-grid span {
  color: #667085;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.legal-index-grid strong {
  color: #111827;
  font-size: 20px;
  font-weight: 600;
  line-height: 26px;
}

.legal-index-grid p {
  margin: 0;
  color: #667085;
  font-size: 14px;
  line-height: 21px;
}

.public-footer {
  display: flex;
  max-width: 1120px;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  padding: 36px 32px 48px;
  color: #667085;
}

.public-footer strong {
  color: #111827;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.public-footer p {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 20px;
}

.public-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
}

.public-footer a {
  color: #667085;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: none;
}

.public-footer a:hover,
.public-footer a:focus-visible {
  outline: none;
  color: #111827;
}

/* SEO landing pages and case pages */
.seo-public-page {
  background: #f4f4f2;
}

.seo-page-main {
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.seo-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 28px;
  align-items: stretch;
  margin-top: 22px;
}

.seo-hero-copy,
.seo-demo-panel,
.seo-proof-strip,
.seo-section,
.case-card {
  border: 1px solid #e4e9f0;
  background: #ffffff;
}

.seo-hero-copy {
  display: flex;
  min-height: 420px;
  flex-direction: column;
  justify-content: center;
  border-radius: 28px;
  padding: 46px;
}

.seo-eyebrow,
.seo-section-head span,
.seo-demo-header span,
.seo-proof-strip span,
.seo-author-card > span,
.case-card span,
.case-metrics span {
  color: #8a96a8;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  text-transform: uppercase;
}

.seo-hero h1,
.seo-section h2,
.seo-case-article h1 {
  margin: 0;
  color: #101828;
  font-weight: 600;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.seo-hero h1 {
  max-width: 760px;
  margin-top: 14px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
}

.seo-hero p {
  max-width: 720px;
  margin: 22px 0 0;
  color: #667085;
  font-size: 19px;
  line-height: 30px;
}

.seo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.seo-primary-action,
.seo-secondary-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.seo-primary-action {
  background: #101828;
  color: #ffffff;
}

.seo-secondary-action {
  background: #eef1ef;
  color: #101828;
}

.seo-primary-action:hover,
.seo-primary-action:focus-visible {
  outline: none;
  background: #0b1220;
}

.seo-secondary-action:hover,
.seo-secondary-action:focus-visible {
  outline: none;
  background: #e5e9e7;
}

.seo-demo-panel {
  display: flex;
  min-height: 420px;
  flex-direction: column;
  justify-content: center;
  border-radius: 28px;
  padding: 26px;
}

.seo-demo-header {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.seo-demo-header strong {
  color: #101828;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 30px;
}

.seo-result-row {
  display: grid;
  gap: 5px;
  border-top: 1px solid #edf1f5;
  padding: 16px 0;
}

.seo-result-row strong {
  color: #101828;
  font-size: 17px;
  font-weight: 600;
  line-height: 22px;
}

.seo-result-row span {
  color: #667085;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.seo-result-row.is-muted strong,
.seo-result-row.is-muted span {
  color: #98a2b3;
}

.seo-proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 22px;
}

.seo-proof-strip div {
  display: grid;
  gap: 7px;
  background: #ffffff;
  padding: 20px 22px;
}

.seo-proof-strip strong {
  color: #101828;
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
}

.seo-section {
  margin-top: 18px;
  border-radius: 28px;
  padding: 34px;
}

.seo-two-column {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 40px;
}

.seo-section-head {
  display: grid;
  align-content: start;
  gap: 10px;
}

.seo-section h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.06;
}

.seo-copy-block {
  display: grid;
  gap: 14px;
}

.seo-copy-block p,
.seo-section p,
.seo-section li {
  color: #667085;
  font-size: 16px;
  line-height: 26px;
}

.seo-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.seo-feature-grid article {
  border-radius: 18px;
  background: #f7f9fb;
  padding: 20px;
}

.seo-feature-grid h3 {
  margin: 0;
  color: #101828;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 25px;
}

.seo-feature-grid p {
  margin: 10px 0 0;
}

.seo-process ol {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: seo-process;
}

.seo-process li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border-radius: 18px;
  background: #f7f9fb;
  padding: 16px 18px;
}

.seo-process li::before {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  grid-row: 1 / span 2;
  border-radius: 999px;
  background: #e6f7ee;
  color: #108044;
  content: counter(seo-process);
  counter-increment: seo-process;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.seo-process li strong {
  display: block;
  grid-column: 2;
  color: #101828;
  font-size: 17px;
  font-weight: 600;
  line-height: 23px;
}

.seo-process li span {
  display: block;
  grid-column: 2;
  margin-top: 4px;
}

.seo-author-card,
.seo-note-block {
  background: #eef4f0;
}

.seo-author-card {
  display: grid;
  gap: 8px;
}

.seo-author-card strong {
  color: #101828;
  font-size: 21px;
  font-weight: 600;
  line-height: 27px;
}

.seo-author-card time {
  color: #667085;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.seo-ai-panel {
  background: #fbfcfb;
}

.case-card-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.case-card {
  display: grid;
  gap: 10px;
  border-radius: 24px;
  padding: 24px;
  color: inherit;
  text-decoration: none;
}

.case-card:hover,
.case-card:focus-visible {
  outline: none;
  border-color: #c9d3df;
}

.case-card strong {
  color: #101828;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 34px;
}

.case-card p {
  max-width: 680px;
  margin: 0;
  color: #667085;
  font-size: 16px;
  line-height: 25px;
}

.seo-case-article {
  display: block;
}

.case-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-content: center;
  border: 1px solid #e4e9f0;
  border-radius: 28px;
  background: #ffffff;
  padding: 26px;
}

.case-metrics div {
  border-radius: 18px;
  background: #f7f9fb;
  padding: 18px;
}

.case-metrics strong {
  display: block;
  margin-top: 6px;
  color: #101828;
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 46px;
}

.seo-note-block {
  display: grid;
  gap: 8px;
}

.seo-note-block strong {
  color: #9a4d10;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.seo-note-block p {
  margin: 0;
}

@media (max-width: 980px) {
  .seo-hero,
  .seo-two-column {
    grid-template-columns: 1fr;
  }

  .seo-hero-copy,
  .seo-demo-panel {
    min-height: auto;
  }

  .seo-proof-strip,
  .seo-feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .seo-page-main {
    width: 100%;
    padding: 20px 16px 48px;
  }

  .seo-hero {
    gap: 14px;
    margin-top: 18px;
  }

  .seo-hero-copy,
  .seo-demo-panel,
  .seo-section,
  .case-card,
  .case-metrics {
    border-radius: 22px;
  }

  .seo-hero-copy,
  .seo-section {
    padding: 22px;
  }

  .seo-demo-panel,
  .case-metrics {
    padding: 20px;
  }

  .seo-hero h1 {
    font-size: 36px;
    line-height: 1.02;
  }

  .seo-hero p {
    font-size: 17px;
    line-height: 27px;
  }

  .seo-actions {
    display: grid;
  }

  .seo-primary-action,
  .seo-secondary-action {
    width: 100%;
  }

  .seo-section h2 {
    font-size: 28px;
    line-height: 34px;
  }

  .seo-process li {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 14px;
  }

  .case-card strong {
    font-size: 23px;
    line-height: 29px;
  }

  .case-metrics strong {
    font-size: 34px;
    line-height: 38px;
  }
}

.auth-legal-copy {
  margin-top: 10px;
}

.auth-terms a {
  color: #111827;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-popover.account-dropdown .account-menu a {
  display: flex;
  min-height: 40px;
  align-items: center;
  border-radius: 14px;
  color: #111827;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: none;
}

.profile-popover.account-dropdown .account-menu a:hover,
.profile-popover.account-dropdown .account-menu a:focus-visible {
  outline: none;
  background: #f4f6f8;
}

.account-menu-docs {
  border-top: 1px solid #eef2f6;
  margin-top: 4px;
  padding-top: 8px;
}

/* Standalone pricing page */
body.pricing-page {
  min-height: 100dvh;
  background: #f4f4f2;
  color: #111827;
  font-family: var(--font-ui);
}

.pricing-page .pricing-app-header {
  background: #f4f4f2;
}

.pricing-page .app-header-inner,
.pricing-container,
.pricing-page .public-footer {
  width: min(1180px, calc(100% - 64px));
  max-width: none;
  margin-right: auto;
  margin-left: auto;
  padding-right: 0;
  padding-left: 0;
}

.pricing-page .main-nav-link.nav-pricing-link,
.pricing-page .main-nav-link.pricing-active {
  height: 42px;
  border-radius: 18px;
  background: #ffffff;
  color: #111827;
  opacity: 1;
  padding: 0 16px;
  font-weight: 600;
}

.pricing-page .main-nav-link.nav-pricing-link:hover,
.pricing-page .main-nav-link.nav-pricing-link:focus-visible,
.pricing-page .main-nav-link.pricing-active:hover,
.pricing-page .main-nav-link.pricing-active:focus-visible {
  color: #111827;
  background: #ffffff;
}

.pricing-top-actions .pricing-profile-link {
  color: #111827;
  text-decoration: none;
}

.pricing-usage-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  margin-top: 10px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.pricing-usage-link:hover,
.pricing-usage-link:focus-visible {
  outline: none;
  background: #1f2937;
}

.pricing-main {
  padding: 64px 0 96px;
}

.pricing-hero {
  max-width: 820px;
  padding: 72px 0 46px;
}

.pricing-eyebrow,
.section-heading > span,
.pricing-final-cta > div > span,
.pricing-mode-info span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border-radius: 999px;
  background: #e8f2ed;
  color: #278e61;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 600;
}

.pricing-hero h1 {
  max-width: 760px;
  margin: 20px 0 0;
  color: #111827;
  font-size: 68px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 0.98;
}

.pricing-hero p {
  max-width: 680px;
  margin: 20px 0 0;
  color: #667085;
  font-size: 20px;
  line-height: 30px;
}

.pricing-hero .pricing-hero-note {
  max-width: 560px;
  margin-top: 10px;
  color: #475467;
  font-size: 16px;
  line-height: 24px;
}

.pricing-hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.pricing-primary-action,
.pricing-secondary-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.pricing-primary-action {
  background: #111827;
  color: #ffffff;
}

.pricing-secondary-action {
  background: #ffffff;
  color: #111827;
}

.pricing-primary-action:hover,
.pricing-primary-action:focus-visible {
  outline: none;
  background: #1f2937;
}

.pricing-secondary-action:hover,
.pricing-secondary-action:focus-visible {
  outline: none;
  background: #ececea;
}

.pricing-mode-info {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  border-radius: 28px;
  background: #ffffff;
  padding: 24px;
}

.pricing-mode-info div {
  display: grid;
  align-content: start;
  gap: 13px;
}

.pricing-mode-info strong {
  max-width: 440px;
  color: #111827;
  font-size: 25px;
  font-weight: 600;
  line-height: 31px;
}

.pricing-mode-info p {
  margin: 0;
  color: #667085;
  font-size: 16px;
  line-height: 25px;
}

.pricing-section,
.credits-section,
.pricing-final-cta {
  margin-top: 58px;
}

.section-heading {
  max-width: 720px;
}

.section-heading h2,
.pricing-final-cta h2 {
  margin: 14px 0 0;
  color: #111827;
  font-size: 38px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 44px;
}

.section-heading p,
.pricing-final-cta p {
  margin: 12px 0 0;
  color: #667085;
  font-size: 16px;
  line-height: 24px;
}

.pricing-page .pricing-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.2fr) minmax(0, 0.85fr);
  gap: 12px;
  align-items: stretch;
  margin-top: 24px;
}

.pricing-page .pricing-card {
  display: flex;
  min-width: 0;
  min-height: 520px;
  flex-direction: column;
  border: 0;
  border-radius: 30px;
  background: #ffffff;
  padding: 24px;
}

.pricing-page .pricing-card-featured {
  background: #eaf3ef;
}

.plan-kicker {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 600;
  line-height: 17px;
  text-transform: uppercase;
}

.pricing-page .pricing-card h3 {
  margin: 12px 0 0;
  color: #111827;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 30px;
}

.plan-price {
  margin-top: 22px;
  color: #111827;
  font-size: 38px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 42px;
}

.plan-note {
  width: fit-content;
  margin: 8px 0 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  color: #278e61;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.pricing-page .pricing-card > header p {
  margin: 10px 0 0;
  color: #667085;
  font-size: 14px;
  line-height: 21px;
}

.plan-features {
  display: grid;
  gap: 11px;
  margin: 24px 0 24px;
  padding: 0;
  list-style: none;
}

.plan-features li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  color: #475467;
  font-size: 14px;
  line-height: 20px;
}

.plan-check {
  display: inline-flex;
  width: 17px;
  height: 17px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(36, 164, 101, 0.12);
  color: #24a465;
  margin-top: 1px;
  font-size: 11px;
  font-weight: 600;
}

.plan-action {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  background: #eeeeec;
  color: #111827;
  margin-top: auto;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

.pricing-card-featured .plan-action {
  background: #111827;
  color: #ffffff;
}

.plan-action:hover,
.plan-action:focus-visible {
  outline: none;
  background: #e3e3df;
}

.pricing-card-featured .plan-action:hover,
.pricing-card-featured .plan-action:focus-visible {
  background: #1f2937;
}

.credit-steps,
.pricing-features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.credit-step,
.pricing-feature-card {
  min-width: 0;
  border-radius: 26px;
  background: #ffffff;
  padding: 20px;
}

.credit-step {
  min-height: 180px;
}

.credit-step > span,
.pricing-feature-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eaf8f0;
  color: #118444;
  font-size: 14px;
  font-weight: 600;
}

.credit-step h3,
.pricing-feature-card h3 {
  margin: 18px 0 0;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
}

.credit-step p,
.pricing-feature-card p,
.pricing-credit-policy {
  margin: 8px 0 0;
  color: #667085;
  font-size: 14px;
  line-height: 21px;
}

.pricing-credit-policy {
  max-width: 780px;
  border-radius: 22px;
  background: #ffffff;
  margin-top: 10px;
  padding: 16px 18px;
}

.pricing-faq-list {
  margin-top: 20px;
}

.pricing-faq-item {
  border-bottom: 1px solid #e5eaf1;
}

.pricing-faq-trigger {
  display: flex;
  width: 100%;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: none;
  background: transparent;
  color: #111827;
  cursor: pointer;
  padding: 0;
  text-align: left;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
}

.pricing-faq-trigger em {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ffffff;
  color: #667085;
  font-style: normal;
  transition: transform 0.18s ease;
}

.pricing-faq-trigger[aria-expanded="true"] em {
  transform: rotate(45deg);
}

.pricing-faq-answer {
  max-width: 820px;
  padding: 0 0 20px;
}

.pricing-faq-answer p {
  margin: 0;
  color: #667085;
  font-size: 15px;
  line-height: 23px;
}

.pricing-final-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-radius: 30px;
  background: #ffffff;
  padding: 28px;
}

.pricing-final-cta > div {
  max-width: 720px;
}

.pricing-checkout-note {
  border-radius: 18px;
  background: #eaf8f0;
  color: #118444 !important;
  padding: 12px 14px;
  font-weight: 600;
}

.pricing-footer {
  align-items: center;
  max-width: none;
}

.pricing-mobile-menu-sheet .mobile-menu-account-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pricing-mobile-menu-sheet .mobile-menu-account-main strong,
.pricing-mobile-menu-sheet .mobile-menu-account-main span {
  display: block;
}

.pricing-mobile-menu-sheet .mobile-menu-account-main strong {
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
}

.pricing-mobile-menu-sheet .mobile-menu-account-main span {
  color: #667085;
  font-size: 13px;
  line-height: 18px;
}

.pricing-mobile-menu-sheet .mobile-menu-account-action {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 1120px) {
  .pricing-page .main-nav {
    gap: 18px;
  }

  .pricing-page .main-nav-link,
  .pricing-page .history-toggle.main-nav-link {
    font-size: 15px;
  }
}

@media (max-width: 860px) {
  .legal-page-layout {
    grid-template-columns: 1fr;
    padding: 28px 16px 48px;
  }

  .legal-sidebar {
    position: static;
  }

  .legal-document {
    border-radius: 24px;
    padding: 28px 20px;
  }

  .legal-document h1 {
    font-size: 32px;
    line-height: 38px;
  }

  .public-page .support-grid,
  .public-page .pricing-grid,
  .legal-index-grid,
  .support-question-list ul {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .pricing-page .app-header-inner,
  .pricing-container,
  .pricing-page .public-footer {
    width: 100%;
    padding-right: 16px;
    padding-left: 16px;
  }

  .pricing-main {
    padding: 30px 0 64px;
  }

  .pricing-hero {
    padding: 28px 0 30px;
  }

  .pricing-hero h1 {
    font-size: 42px;
    line-height: 0.98;
  }

  .pricing-hero p {
    font-size: 17px;
    line-height: 25px;
  }

  .pricing-hero .pricing-hero-note {
    font-size: 15px;
    line-height: 22px;
  }

  .pricing-hero-actions,
  .pricing-mode-info,
  .pricing-final-cta {
    display: grid;
  }

  .pricing-primary-action,
  .pricing-secondary-action {
    width: 100%;
  }

  .pricing-mode-info {
    grid-template-columns: 1fr;
    border-radius: 24px;
    padding: 20px;
  }

  .pricing-section,
  .credits-section,
  .pricing-final-cta {
    margin-top: 42px;
  }

  .section-heading h2,
  .pricing-final-cta h2 {
    font-size: 30px;
    line-height: 36px;
  }

  .pricing-page .pricing-grid,
  .credit-steps,
  .pricing-features-grid {
    grid-template-columns: 1fr;
  }

  .pricing-page .pricing-card {
    min-height: auto;
    border-radius: 28px;
    padding: 20px;
  }

  .pricing-page .pricing-card-featured {
    order: -1;
  }

  .plan-price {
    font-size: 34px;
    line-height: 38px;
  }

  .pricing-final-cta {
    border-radius: 28px;
    padding: 22px;
  }

  .pricing-page .public-footer {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 24px;
    padding-bottom: 40px;
  }

  .pricing-page .public-footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .public-header {
    height: auto;
  }

  .public-header-inner {
    padding: 18px 16px;
  }

  .public-header nav {
    display: none;
  }

  .public-brand {
    flex: 1 1 auto;
  }

  .public-login-button {
    height: 40px;
    padding: 0 15px;
  }

  .public-footer {
    flex-direction: column;
    padding: 28px 16px 40px;
  }

  .public-footer nav {
    justify-content: flex-start;
  }
}

/* Compact product pricing page */
body.pricing-shell {
  min-height: 100dvh;
  background: #f4f4f2;
  color: #111827;
  font-family: var(--font-ui);
}

.pricing-shell .pricing-app-header {
  background: #f4f4f2;
}

.pricing-shell .app-header-inner,
.pricing-shell .public-footer {
  width: min(1180px, calc(100% - 64px));
  max-width: none;
  margin-right: auto;
  margin-left: auto;
  padding-right: 0;
  padding-left: 0;
}

.pricing-shell .main-nav-link.nav-pricing-link,
.pricing-shell .main-nav-link.pricing-active {
  height: 42px;
  border-radius: 18px;
  background: #ffffff;
  color: #111827;
  opacity: 1;
  padding: 0 16px;
  font-weight: 600;
}

.pricing-shell .main-nav-link.nav-pricing-link:hover,
.pricing-shell .main-nav-link.nav-pricing-link:focus-visible,
.pricing-shell .main-nav-link.pricing-active:hover,
.pricing-shell .main-nav-link.pricing-active:focus-visible {
  color: #111827;
  background: #ffffff;
}

.pricing-shell .pricing-top-actions .pricing-profile-link {
  color: #111827;
  text-decoration: none;
}

.pricing-page {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
  padding: 32px 0 72px;
}

.pricing-intro {
  max-width: 760px;
  margin-bottom: 18px;
}

.pricing-intro h1 {
  margin: 0;
  color: #111827;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 40px;
}

.pricing-intro p {
  max-width: 640px;
  margin: 6px 0 0;
  color: #667085;
  font-size: 15px;
  line-height: 22px;
}

.pricing-plans-list {
  display: grid;
  gap: 10px;
}

.pricing-plan-row {
  display: grid;
  min-height: 124px;
  grid-template-columns: minmax(220px, 0.95fr) minmax(126px, 0.48fr) minmax(320px, 1.35fr) 154px;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(17, 24, 39, 0.05);
  border-radius: 24px;
  background: #ffffff;
  padding: 17px 22px;
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.03);
}

.pricing-plan-row--featured {
  background: #e8f2ed;
}

.pricing-plan-main h2 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 28px;
}

.pricing-plan-main p {
  max-width: 300px;
  margin: 6px 0 0;
  color: #677383;
  font-size: 13px;
  line-height: 19px;
}

.pricing-plan-price {
  display: grid;
  align-content: center;
  gap: 5px;
}

.pricing-plan-price strong {
  color: #111827;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 32px;
  white-space: nowrap;
}

.pricing-plan-price span {
  color: #168755;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.pricing-plan-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pricing-plan-features li {
  position: relative;
  min-width: 0;
  color: #465363;
  padding-left: 13px;
  font-size: 13px;
  line-height: 18px;
}

.pricing-plan-features li::before {
  position: absolute;
  top: 7px;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #8da399;
  content: "";
}

.pricing-plan-row--featured .pricing-plan-features li::before {
  background: #23885c;
}

.pricing-plan-action {
  display: inline-flex;
  width: 154px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: #111827;
  color: #ffffff;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition: background 0.16s ease, transform 0.16s ease;
}

.pricing-plan-row:not(.pricing-plan-row--featured) .pricing-plan-action {
  background: #eeeeec;
  color: #111827;
}

.pricing-plan-action:hover,
.pricing-plan-action:focus-visible {
  outline: none;
  background: #1f2937;
}

.pricing-plan-row:not(.pricing-plan-row--featured) .pricing-plan-action:hover,
.pricing-plan-row:not(.pricing-plan-row--featured) .pricing-plan-action:focus-visible {
  background: #deded9;
}

.pricing-plan-action:active {
  transform: translateY(1px);
}

.pricing-faq {
  max-width: 860px;
  margin-top: 44px;
}

.pricing-faq h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 30px;
}

.pricing-faq-list {
  margin-top: 0;
}

.pricing-faq-item {
  border-bottom: 1px solid #dfe3e8;
}

.pricing-faq-item h3 {
  margin: 0;
  padding: 18px 0 10px;
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 22px;
}

.pricing-faq-trigger {
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: none;
  background: transparent;
  color: #111827;
  cursor: pointer;
  padding: 0;
  text-align: left;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}

.pricing-faq-trigger em {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ffffff;
  color: #667085;
  font-style: normal;
  transition: transform 0.18s ease;
}

.pricing-faq-trigger[aria-expanded="true"] em {
  transform: rotate(45deg);
}

.pricing-faq-answer {
  max-width: 760px;
  padding: 0 0 18px;
}

.pricing-faq-answer p {
  margin: 0;
  color: #667085;
  font-size: 14px;
  line-height: 22px;
}

.pricing-footer {
  align-items: center;
  max-width: none;
}

.pricing-shell .public-footer {
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  padding-top: 26px;
  padding-bottom: 38px;
}

@media (max-width: 1120px) {
  .pricing-plan-row {
    grid-template-columns: minmax(0, 1fr) minmax(132px, 0.44fr) minmax(280px, 1fr);
  }

  .pricing-plan-action {
    width: 100%;
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .pricing-shell .app-header-inner,
  .pricing-shell .public-footer {
    width: 100%;
    padding-right: 16px;
    padding-left: 16px;
  }

  .pricing-page {
    width: 100%;
    padding: 24px 16px 56px;
  }

  .pricing-intro {
    margin-bottom: 20px;
  }

  .pricing-intro h1 {
    font-size: 34px;
    line-height: 38px;
  }

  .pricing-intro p {
    font-size: 15px;
    line-height: 22px;
  }

  .pricing-plan-row {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 14px;
    border-radius: 22px;
    padding: 18px;
  }

  .pricing-plan-main h2 {
    font-size: 21px;
    line-height: 27px;
  }

  .pricing-plan-main p {
    max-width: none;
  }

  .pricing-plan-price strong {
    font-size: 28px;
    line-height: 32px;
  }

  .pricing-plan-features {
    grid-template-columns: 1fr;
  }

  .pricing-plan-action {
    width: 100%;
  }

  .pricing-faq {
    margin-top: 34px;
  }

  .pricing-faq h2 {
    font-size: 23px;
    line-height: 29px;
  }

  .pricing-faq-item h3 {
    padding-top: 17px;
    font-size: 15px;
    line-height: 22px;
  }

  .pricing-shell .public-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .pricing-shell .public-footer nav {
    justify-content: flex-start;
  }
}

/* Blog pages: dense case-study feed and article layout, close to the reference pattern. */
.blog-shell {
  background: #f4f4f2;
}

.blog-index-page,
.blog-article-layout {
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
  padding: 28px 0 76px;
}

.blog-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #98a2b3;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.blog-breadcrumbs a {
  color: #667085;
  text-decoration: none;
}

.blog-breadcrumbs a:hover,
.blog-breadcrumbs a:focus-visible {
  outline: none;
  color: #111827;
}

.blog-list-head {
  margin-top: 34px;
}

.blog-kicker {
  display: inline-flex;
  color: #98a2b3;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
}

.blog-list-head h1 {
  margin: 2px 0 0;
  color: #111827;
  font-size: 46px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 50px;
}

.blog-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.blog-category-row a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border-radius: 999px;
  background: #ffffff;
  color: #667085;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.blog-category-row a:hover,
.blog-category-row a:focus-visible,
.blog-category-row a.active {
  outline: none;
  background: #111827;
  color: #ffffff;
}

.blog-feed {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.blog-feed-item {
  display: grid;
  min-height: 164px;
  align-content: space-between;
  gap: 14px;
  border: 1px solid #e5eaf1;
  border-radius: 24px;
  background: #ffffff;
  color: inherit;
  padding: 20px;
  text-decoration: none;
}

.blog-feed-item--lead {
  background: #e8f2ed;
}

.blog-feed-item span {
  width: fit-content;
  border-radius: 999px;
  background: #f4f4f2;
  color: #667085;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.blog-feed-item--lead span {
  background: #ffffff;
  color: #16794d;
}

.blog-feed-item strong {
  color: #111827;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 27px;
  text-wrap: balance;
}

.blog-feed-item time {
  color: #98a2b3;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.blog-feed-item:hover,
.blog-feed-item:focus-visible {
  outline: none;
  border-color: #cfd6df;
  transform: translateY(-1px);
}

.blog-article-layout {
  max-width: 980px;
}

.blog-cover {
  display: grid;
  min-height: 360px;
  align-content: end;
  gap: 10px;
  margin-top: 28px;
  overflow: hidden;
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 18%, rgba(35, 208, 139, 0.34), transparent 30%),
    linear-gradient(135deg, #101827 0%, #1e293b 52%, #e8f2ed 52%, #f9fafb 100%);
  color: #ffffff;
  padding: 34px;
}

.blog-cover--site {
  background:
    radial-gradient(circle at 82% 20%, rgba(35, 208, 139, 0.32), transparent 32%),
    linear-gradient(135deg, #111827 0%, #344054 58%, #f4f4f2 58%, #ffffff 100%);
}

.blog-cover--sources {
  background:
    radial-gradient(circle at 22% 78%, rgba(35, 208, 139, 0.35), transparent 28%),
    linear-gradient(135deg, #0b1220 0%, #17324d 50%, #e8f2ed 50%, #ffffff 100%);
}

.blog-cover--quality {
  background:
    radial-gradient(circle at 76% 76%, rgba(35, 208, 139, 0.35), transparent 30%),
    linear-gradient(135deg, #111827 0%, #243145 54%, #f4f4f2 54%, #ffffff 100%);
}

.blog-cover span {
  width: fit-content;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.78);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.blog-cover strong {
  max-width: 520px;
  color: #ffffff;
  font-size: 42px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 46px;
  text-wrap: balance;
}

.blog-article {
  max-width: 820px;
  margin-top: 34px;
}

.blog-article > .blog-kicker {
  color: #23a46d;
  font-size: 14px;
  line-height: 18px;
}

.blog-article h1 {
  margin: 10px 0 0;
  color: #111827;
  font-size: 48px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 52px;
  text-wrap: balance;
}

.blog-article-lead {
  margin: 18px 0 0;
  color: #475467;
  font-size: 19px;
  line-height: 30px;
}

.blog-meta {
  margin-top: 18px;
  color: #98a2b3;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.blog-toc,
.blog-brief {
  margin-top: 34px;
}

.blog-toc h2,
.blog-brief h2,
.blog-article section h2,
.blog-article-cta h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 32px;
  text-wrap: balance;
}

.blog-toc ol,
.blog-brief ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.blog-toc a {
  color: #111827;
  font-weight: 600;
  text-decoration: none;
}

.blog-toc a:hover,
.blog-toc a:focus-visible {
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-article section:not(.blog-toc):not(.blog-brief) {
  margin-top: 40px;
}

.blog-article p,
.blog-article li {
  color: #475467;
  font-size: 17px;
  line-height: 29px;
}

.blog-article p {
  margin: 12px 0 0;
}

.blog-article ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 22px;
}

.blog-callout {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  border-left: 4px solid #23d08b;
  background: #ffffff;
  padding: 14px 18px;
}

.blog-callout strong {
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
}

.blog-callout span {
  color: #475467;
  font-size: 16px;
  line-height: 24px;
}

.blog-article-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin-top: 48px;
  border-radius: 28px;
  background: #111827;
  color: #ffffff;
  padding: 28px;
}

.blog-article-cta h2,
.blog-article-cta p {
  color: #ffffff;
}

.blog-article-cta p {
  margin-top: 6px;
  opacity: 0.72;
}

.blog-article-cta a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.blog-article-cta a:hover,
.blog-article-cta a:focus-visible {
  outline: none;
  background: #e8f2ed;
}

@media (max-width: 920px) {
  .blog-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blog-article-cta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .blog-index-page,
  .blog-article-layout {
    width: 100%;
    padding: 22px 16px 58px;
  }

  .blog-list-head {
    margin-top: 26px;
  }

  .blog-list-head h1 {
    font-size: 40px;
    line-height: 44px;
  }

  .blog-category-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .blog-category-row a {
    flex: 0 0 auto;
  }

  .blog-feed {
    grid-template-columns: 1fr;
  }

  .blog-feed-item {
    min-height: 138px;
    border-radius: 22px;
    padding: 18px;
  }

  .blog-feed-item strong {
    font-size: 20px;
    line-height: 26px;
  }

  .blog-cover {
    min-height: 260px;
    border-radius: 24px;
    padding: 22px;
  }

  .blog-cover strong {
    font-size: 30px;
    letter-spacing: 0;
    line-height: 34px;
  }

  .blog-article {
    margin-top: 28px;
  }

  .blog-article h1 {
    font-size: 34px;
    line-height: 38px;
  }

  .blog-article-lead {
    font-size: 17px;
    line-height: 27px;
  }

  .blog-toc h2,
  .blog-brief h2,
  .blog-article section h2,
  .blog-article-cta h2 {
    font-size: 24px;
    line-height: 30px;
  }

  .blog-article p,
  .blog-article li {
    font-size: 16px;
    line-height: 27px;
  }

  .blog-article-cta {
    border-radius: 24px;
    padding: 22px;
  }

  .blog-article-cta a {
    width: 100%;
  }
}

/* Results/run history fixes: keep completed runs exportable and full-width. */
:root {
  --app-content-wide: min(1760px, calc(100vw - 80px));
}

.app-header-inner {
  max-width: var(--app-content-wide);
}

body[data-page="settings"] .input-stage.new-run-page,
body[data-page="leads"] .leads-page,
body[data-page="results"] .actor-head,
body[data-page="results"] .workspace-body {
  width: 100%;
  max-width: var(--app-content-wide);
  margin-right: auto;
  margin-left: auto;
}

body[data-page="leads"] .workspace-body {
  display: block;
  width: 100%;
  max-width: none;
  padding: 0;
  background: transparent;
}

body[data-page="leads"] .leads-page {
  padding: 44px 40px 72px;
}

body[data-page="leads"] .leads-toolbar,
body[data-page="leads"] .leads-table {
  width: 100%;
  box-sizing: border-box;
}

body[data-page="results"] .run-stage,
body[data-page="results"][data-job-status="running"] .run-stage,
body[data-page="results"][data-job-status="error"] .run-stage,
body[data-page="results"][data-job-status="cancelled"] .run-stage,
body[data-page="results"][data-job-status="done"] .run-stage {
  width: 100%;
  max-width: 100%;
  margin-right: auto;
  margin-left: auto;
}

body[data-page="results"] .ai-analysis-card,
body[data-page="results"] .progress-shell,
body[data-page="results"] .results-card {
  width: 100%;
}

body[data-page="results"][data-job-status="done"][data-has-results="true"] .workspace-actions,
body[data-page="results"][data-job-status="done"][data-has-results="true"] .workspace-head .export-actions {
  display: flex !important;
}

body[data-page="results"][data-job-status="done"][data-has-results="true"] .workspace-actions {
  align-items: center;
  justify-content: flex-end;
}

body[data-page="results"][data-job-status="done"][data-has-results="true"] .run-stage .workspace-head {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 14px;
}

body[data-page="results"][data-job-status="done"][data-has-results="true"] .run-stage .back-action {
  grid-column: 1;
  grid-row: 1;
}

body[data-page="results"][data-job-status="done"][data-has-results="true"] .run-stage .workspace-title {
  grid-column: 2;
  grid-row: 1;
}

body[data-page="results"][data-job-status="done"][data-has-results="true"] .run-stage .workspace-actions {
  grid-column: 3;
  grid-row: 1;
}

.run-actions {
  flex-wrap: wrap;
  align-items: center;
}

.run-export-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
}

.run-export-actions a {
  display: inline-flex;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.run-export-actions a:hover,
.run-export-actions a:focus-visible {
  outline: none;
  background: #1f2937;
  color: #ffffff;
}

@media (max-width: 700px) {
  :root {
    --app-content-wide: calc(100vw - 32px);
  }

  body[data-page="results"][data-job-status="done"][data-has-results="true"] .run-stage .workspace-head {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  body[data-page="results"][data-job-status="done"][data-has-results="true"] .run-stage .workspace-actions {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  body[data-page="results"][data-job-status="done"][data-has-results="true"] .workspace-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  body[data-page="leads"] .leads-page {
    padding: 32px 20px 56px;
  }
}

/* Watermelon/shadcn table reference: dense lead table with sticky identity columns. */
body[data-page="results"][data-has-results="true"] .results-card {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: none;
}

body[data-page="results"][data-has-results="true"] .table-toolbar {
  min-height: 58px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 12px 18px;
}

body[data-page="results"][data-has-results="true"] .result-tabs {
  gap: 8px;
}

body[data-page="results"][data-has-results="true"] .result-tabs button {
  height: 34px;
  border: 0;
  background: #f4f4f2;
  color: #4b5563;
  padding: 0 13px;
  font-size: 14px;
  font-weight: 600;
}

body[data-page="results"][data-has-results="true"] .result-tabs button:hover,
body[data-page="results"][data-has-results="true"] .result-tabs button.is-active {
  background: #e8ecea;
  color: #111827;
}

body[data-page="results"][data-has-results="true"] .result-search {
  flex: 0 0 min(330px, 32vw);
}

body[data-page="results"][data-has-results="true"] .result-search input {
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f4f4f2;
  color: #111827;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 620;
}

body[data-page="results"][data-has-results="true"] .result-search input::placeholder {
  color: #98a2b3;
}

body[data-page="results"][data-has-results="true"] .table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  background: #ffffff;
  overscroll-behavior-x: contain;
}

body[data-page="results"][data-has-results="true"] .results-table {
  display: table;
  width: 100%;
  min-width: 2400px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  background: #ffffff;
}

body[data-page="results"][data-has-results="true"] .results-table thead {
  display: table-header-group;
}

body[data-page="results"][data-has-results="true"] .results-table tbody {
  display: table-row-group;
}

body[data-page="results"][data-has-results="true"] .results-table tr {
  display: table-row;
  border-bottom: 0;
}

body[data-page="results"][data-has-results="true"] .results-table th,
body[data-page="results"][data-has-results="true"] .results-table td {
  display: table-cell;
  min-width: 0;
  border-bottom: 1px solid #eef2f7;
  background: #ffffff;
  padding: 12px 16px;
  text-align: left;
  vertical-align: middle;
}

body[data-page="results"][data-has-results="true"] .results-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 46px;
  color: #667085;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

body[data-page="results"][data-has-results="true"] .results-table td {
  height: 66px;
  color: #111827;
  font-size: 14px;
  line-height: 20px;
}

body[data-page="results"][data-has-results="true"] .results-table tbody tr:last-child > td {
  border-bottom: 0;
}

body[data-page="results"][data-has-results="true"] .results-table tbody tr.lead-row:hover > td {
  background: #f8fafc;
}

body[data-page="results"][data-has-results="true"] .results-table .select-column,
body[data-page="results"][data-has-results="true"] .results-table .sticky-select-cell {
  width: 52px;
  min-width: 52px;
  padding-right: 10px;
  padding-left: 16px;
  text-align: center;
}

body[data-page="results"][data-has-results="true"] .results-table .sticky-select-column,
body[data-page="results"][data-has-results="true"] .results-table .sticky-select-cell {
  position: sticky;
  left: 0;
  z-index: 5;
}

body[data-page="results"][data-has-results="true"] .results-table .sticky-select-column {
  z-index: 7;
}

body[data-page="results"][data-has-results="true"] .results-table .sticky-company-column,
body[data-page="results"][data-has-results="true"] .results-table .sticky-company-cell {
  position: sticky;
  left: 52px;
  z-index: 5;
  width: 360px;
  min-width: 360px;
  box-shadow: 1px 0 0 #eef2f7;
}

body[data-page="results"][data-has-results="true"] .results-table .sticky-company-column {
  z-index: 7;
}

body[data-page="results"][data-has-results="true"] .results-table .reputation-column,
body[data-page="results"][data-has-results="true"] .results-table .reviews-cell {
  width: 190px;
}

body[data-page="results"][data-has-results="true"] .results-table .contact-column,
body[data-page="results"][data-has-results="true"] .results-table .contact-cell {
  width: 170px;
}

body[data-page="results"][data-has-results="true"] .results-table .address-column,
body[data-page="results"][data-has-results="true"] .results-table .address-cell {
  width: 250px;
}

body[data-page="results"][data-has-results="true"] .results-table .legal-name-column,
body[data-page="results"][data-has-results="true"] .results-table .legal-name-cell {
  width: 220px;
}

body[data-page="results"][data-has-results="true"] .results-table .inn-column,
body[data-page="results"][data-has-results="true"] .results-table .inn-cell,
body[data-page="results"][data-has-results="true"] .results-table .ogrn-column,
body[data-page="results"][data-has-results="true"] .results-table .ogrn-cell {
  width: 136px;
}

body[data-page="results"][data-has-results="true"] .results-table .website-column,
body[data-page="results"][data-has-results="true"] .results-table .website-cell {
  width: 210px;
}

body[data-page="results"][data-has-results="true"] .results-table .email-column,
body[data-page="results"][data-has-results="true"] .results-table .email-cell {
  width: 240px;
}

body[data-page="results"][data-has-results="true"] .results-table .founder-email-column,
body[data-page="results"][data-has-results="true"] .results-table .founder-email-cell {
  width: 220px;
}

body[data-page="results"][data-has-results="true"] .results-table .socials-column,
body[data-page="results"][data-has-results="true"] .results-table .socials-cell {
  width: 180px;
}

body[data-page="results"][data-has-results="true"] .lead-company-cell {
  white-space: normal;
}

body[data-page="results"][data-has-results="true"] .lead-name {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-overflow: ellipsis;
}

body[data-page="results"][data-has-results="true"] .lead-description {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: #475467;
  font-size: 12px;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="results"][data-has-results="true"] .lead-meta {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: #667085;
  font-size: 12px;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="results"][data-has-results="true"] .reviews-cell {
  display: table-cell;
}

body[data-page="results"][data-has-results="true"] .review-source {
  display: block;
}

body[data-page="results"][data-has-results="true"] .review-source + .review-source {
  margin-top: 5px;
}

body[data-page="results"][data-has-results="true"] .source-name,
body[data-page="results"][data-has-results="true"] .source-badge {
  display: block;
  color: #667085;
  font-size: 13px;
  font-weight: 620;
  line-height: 18px;
}

body[data-page="results"][data-has-results="true"] .lead-niche-cell,
.current-run-expandable .run-preview-results-table .lead-niche-cell {
  display: block;
  min-width: 0;
}

body[data-page="results"][data-has-results="true"] .lead-niche-name,
.current-run-expandable .run-preview-results-table .lead-niche-name {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  text-overflow: ellipsis;
  text-wrap: pretty;
}

body[data-page="results"][data-has-results="true"] .lead-niche-cell small,
.current-run-expandable .run-preview-results-table .lead-niche-cell small {
  display: block;
  margin-top: 2px;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 620;
  line-height: 16px;
}

body[data-page="results"][data-has-results="true"] .rating-line {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

body[data-page="results"][data-has-results="true"] .review-source strong {
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

body[data-page="results"][data-has-results="true"] .review-source small {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 620;
  line-height: 18px;
}

body[data-page="results"][data-has-results="true"] .data-link,
body[data-page="results"][data-has-results="true"] .missing-value,
body[data-page="results"][data-has-results="true"] .muted-value {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  border-bottom: 0;
  font-size: 14px;
  line-height: 20px;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

body[data-page="results"][data-has-results="true"] .data-link {
  color: #111827;
  font-weight: 620;
  text-decoration: none;
}

body[data-page="results"][data-has-results="true"] .data-link:hover,
body[data-page="results"][data-has-results="true"] .data-link:focus-visible {
  outline: none;
  color: #118444;
}

body[data-page="results"][data-has-results="true"] .missing-value,
body[data-page="results"][data-has-results="true"] .muted-value {
  color: #98a2b3;
  font-weight: 620;
}

body[data-page="results"][data-has-results="true"] .lead-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

body[data-page="results"][data-has-results="true"] .social-chip {
  display: inline-flex;
  max-width: 100%;
  height: 24px;
  align-items: center;
  border: 0;
  border-radius: 999px;
  background: #f4f4f2;
  color: #4b5563;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

body[data-page="results"][data-has-results="true"] .social-chip:hover,
body[data-page="results"][data-has-results="true"] .social-chip:focus-visible {
  outline: none;
  background: #e8ecea;
  color: #111827;
}

body[data-page="results"][data-has-results="true"] .select-cell input,
body[data-page="results"][data-has-results="true"] .select-column input {
  vertical-align: middle;
}

body[data-page="results"][data-has-results="true"] .empty-row,
body[data-page="results"][data-has-results="true"] .locked-results-row {
  display: table-row;
}

body[data-page="results"][data-has-results="true"] .empty-row td,
body[data-page="results"][data-has-results="true"] .locked-results-row td {
  display: table-cell;
  width: auto;
  padding: 0;
}

.current-run-expandable .run-preview-table.table-wrap {
  height: auto;
  min-height: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  background: #ffffff;
  overscroll-behavior-x: contain;
}

body[data-page="results"][data-has-results="false"] .current-run-expandable .run-preview-table.table-wrap,
body[data-page="results"][data-job-status="running"][data-has-results="false"] .current-run-expandable .run-preview-table.table-wrap,
body[data-page="results"][data-job-status="queued"][data-has-results="false"] .current-run-expandable .run-preview-table.table-wrap {
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

body .current-run-expandable .run-preview-results-table {
  display: table;
  width: 100%;
  min-width: 2400px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  background: #ffffff;
}

.current-run-expandable .run-preview-results-table thead {
  display: table-header-group;
}

.current-run-expandable .run-preview-results-table tbody {
  display: table-row-group;
}

.current-run-expandable .run-preview-results-table tr {
  display: table-row;
  border-bottom: 0;
}

.current-run-expandable .run-preview-results-table th,
.current-run-expandable .run-preview-results-table td {
  display: table-cell;
  min-width: 0;
  border-bottom: 1px solid #eef2f7;
  background: #ffffff;
  padding: 12px 16px;
  text-align: left;
  vertical-align: middle;
}

.current-run-expandable .run-preview-results-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 46px;
  color: #667085;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.current-run-expandable .run-preview-results-table td {
  height: 66px;
  color: #111827;
  font-size: 14px;
  line-height: 20px;
}

.current-run-expandable .run-preview-results-table tbody tr:last-child > td {
  border-bottom: 0;
}

.current-run-expandable .run-preview-results-table tbody tr.lead-row:hover > td {
  background: #f8fafc;
}

.current-run-expandable .run-preview-results-table .select-column,
.current-run-expandable .run-preview-results-table .sticky-select-cell {
  width: 52px;
  min-width: 52px;
  padding-right: 10px;
  padding-left: 16px;
  text-align: center;
}

.current-run-expandable .run-preview-results-table .sticky-select-column,
.current-run-expandable .run-preview-results-table .sticky-select-cell {
  position: sticky;
  left: 0;
  z-index: 5;
}

.current-run-expandable .run-preview-results-table .sticky-select-column {
  z-index: 7;
}

.current-run-expandable .run-preview-results-table .sticky-company-column,
.current-run-expandable .run-preview-results-table .sticky-company-cell {
  position: sticky;
  left: 52px;
  z-index: 5;
  width: 360px;
  min-width: 360px;
  box-shadow: 1px 0 0 #eef2f7;
}

.current-run-expandable .run-preview-results-table .sticky-company-column {
  z-index: 7;
}

.current-run-expandable .run-preview-results-table .reputation-column,
.current-run-expandable .run-preview-results-table .reviews-cell {
  width: 190px;
}

.current-run-expandable .run-preview-results-table .address-column,
.current-run-expandable .run-preview-results-table .address-cell {
  width: 250px;
}

.current-run-expandable .run-preview-results-table .legal-name-column,
.current-run-expandable .run-preview-results-table .legal-name-cell {
  width: 220px;
}

.current-run-expandable .run-preview-results-table .inn-column,
.current-run-expandable .run-preview-results-table .inn-cell,
.current-run-expandable .run-preview-results-table .ogrn-column,
.current-run-expandable .run-preview-results-table .ogrn-cell {
  width: 136px;
}

.current-run-expandable .run-preview-results-table .contact-column,
.current-run-expandable .run-preview-results-table .contact-cell {
  width: 170px;
}

.current-run-expandable .run-preview-results-table .website-column,
.current-run-expandable .run-preview-results-table .website-cell {
  width: 210px;
}

.current-run-expandable .run-preview-results-table .email-column,
.current-run-expandable .run-preview-results-table .email-cell {
  width: 240px;
}

.current-run-expandable .run-preview-results-table .founder-email-column,
.current-run-expandable .run-preview-results-table .founder-email-cell {
  width: 220px;
}

.current-run-expandable .run-preview-results-table .socials-column,
.current-run-expandable .run-preview-results-table .socials-cell {
  width: 180px;
}

.current-run-expandable .run-preview-results-table .lead-name {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-overflow: ellipsis;
}

.current-run-expandable .run-preview-results-table .review-source {
  display: block;
}

.current-run-expandable .run-preview-results-table .review-source + .review-source {
  margin-top: 5px;
}

.current-run-expandable .run-preview-results-table .source-name,
.current-run-expandable .run-preview-results-table .source-badge {
  display: block;
  color: #667085;
  font-size: 13px;
  font-weight: 620;
  line-height: 18px;
}

.current-run-expandable .run-preview-results-table .rating-line {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

.current-run-expandable .run-preview-results-table .review-source strong {
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.current-run-expandable .run-preview-results-table .review-source small {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 620;
  line-height: 18px;
}

.current-run-expandable .run-preview-results-table .data-link,
.current-run-expandable .run-preview-results-table .missing-value,
.current-run-expandable .run-preview-results-table .muted-value {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  border-bottom: 0;
  font-size: 14px;
  line-height: 20px;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.current-run-expandable .run-preview-results-table .data-link {
  color: #111827;
  font-weight: 620;
  text-decoration: none;
}

.current-run-expandable .run-preview-results-table .data-link:hover,
.current-run-expandable .run-preview-results-table .data-link:focus-visible {
  outline: none;
  color: #118444;
}

.current-run-expandable .run-preview-results-table .missing-value,
.current-run-expandable .run-preview-results-table .muted-value {
  color: #98a2b3;
  font-weight: 620;
}

.current-run-expandable .run-preview-results-table .lead-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.current-run-expandable .run-preview-results-table .social-chip {
  display: inline-flex;
  max-width: 100%;
  height: 24px;
  align-items: center;
  border: 0;
  border-radius: 999px;
  background: #f4f4f2;
  color: #4b5563;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.current-run-expandable .run-preview-results-table .social-chip:hover,
.current-run-expandable .run-preview-results-table .social-chip:focus-visible {
  outline: none;
  background: #e8ecea;
  color: #111827;
}

.current-run-expandable .run-preview-results-table .lead-select:disabled,
.current-run-expandable .run-preview-results-table .select-column input:disabled {
  border-color: #d8e0ea;
  background: #f8fafc;
  cursor: default;
}

.current-run-expandable .run-preview-results-table .run-skeleton-checkbox,
.current-run-expandable .run-preview-results-table .run-skeleton-line,
.current-run-expandable .run-preview-results-table .run-skeleton-pill {
  display: block;
  border-radius: 999px;
  background: #eef2f7;
}

.current-run-expandable .run-preview-results-table .run-skeleton-checkbox {
  width: 17px;
  height: 17px;
  border-radius: 5px;
  margin: 0 auto;
}

.current-run-expandable .run-preview-results-table .run-skeleton-line {
  height: 12px;
}

.current-run-expandable .run-preview-results-table .run-skeleton-line + .run-skeleton-line {
  margin-top: 8px;
}

.current-run-expandable .run-preview-results-table .run-skeleton-pill {
  width: 72px;
  height: 24px;
}

.current-run-expandable .run-preview-results-table .run-preview-empty-row td {
  padding: 24px 22px;
  color: #667085;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.current-run-expandable .run-preview-results-table .run-preview-empty-row strong {
  display: block;
  color: #111827;
  font-size: 15px;
  font-weight: 600;
}

.current-run-expandable .run-preview-results-table .run-preview-empty-row span {
  display: block;
  margin-top: 4px;
}

.copy-fallback-shell {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.38);
}

.copy-fallback-card {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.16);
  padding: 22px;
}

.copy-fallback-card h2 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  font-weight: 600;
  line-height: 28px;
}

.copy-fallback-card p {
  margin: 8px 0 0;
  color: #667085;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.copy-fallback-card textarea {
  display: block;
  width: 100%;
  min-height: 240px;
  margin-top: 16px;
  resize: vertical;
  border: 1px solid #d8dee6;
  border-radius: 14px;
  outline: none;
  background: #f8fafc;
  color: #111827;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 20px;
}

.copy-fallback-card textarea:focus {
  border-color: #b8c0cc;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.06);
}

.copy-fallback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}

.copy-fallback-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: #f4f4f2;
  color: #111827;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.copy-fallback-actions button:first-child {
  background: #111827;
  color: #ffffff;
}

.copy-fallback-actions button:hover,
.copy-fallback-actions button:focus-visible {
  outline: none;
  filter: brightness(0.96);
}

/* Export format actions: icon-only controls using the supplied SVG masks. */
.export-format-action,
.export-actions .secondary-action.export-format-action,
body[data-page="results"] .export-actions .secondary-action.export-format-action,
body[data-page="results"][data-job-status="done"][data-has-results="true"] .workspace-head .export-actions .secondary-action.export-format-action,
.done-actions .done-export-action.export-format-action,
.done-export-action.export-format-action,
body[data-job-status="done"][data-has-results="true"] .done-export-action.export-format-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 58px;
  width: 58px;
  min-width: 58px;
  height: 58px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--green, #18a957);
  padding: 0;
}

.export-format-action:hover,
.export-format-action:focus-visible,
.export-actions .secondary-action.export-format-action:hover,
.done-actions .done-export-action.export-format-action:hover,
body[data-job-status="done"][data-has-results="true"] .done-export-action.export-format-action:hover {
  outline: none;
  background: transparent;
  color: var(--green-text, #118444);
}

.export-format-action.is-locked {
  color: var(--green, #18a957);
}

.export-format-action.disabled,
.secondary-action.export-format-action.disabled,
.done-export-action.export-format-action.disabled {
  opacity: 0.46;
}

.export-format-icon {
  display: block;
  width: 50px;
  height: 50px;
  background: currentColor;
  -webkit-mask: var(--export-format-icon) center / contain no-repeat;
  mask: var(--export-format-icon) center / contain no-repeat;
}

.export-format-icon-csv {
  --export-format-icon: url("/icons/export-csv.svg?v=20260621-export-icons-1");
}

.export-format-icon-excel {
  --export-format-icon: url("/icons/export-excel.svg?v=20260621-export-icons-1");
}

.export-format-icon-json {
  --export-format-icon: url("/icons/export-json.svg?v=20260621-export-icons-1");
}

.run-export-actions a {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 0;
  background: transparent;
  color: var(--green, #18a957);
  padding: 0;
}

.run-export-actions a:hover,
.run-export-actions a:focus-visible {
  outline: none;
  background: transparent;
  color: var(--green-text, #118444);
}

.run-export-actions .export-format-icon {
  width: 36px;
  height: 36px;
}

/* Result header/table polish: keep export icons visually aligned and prevent the search field from clipping. */
body[data-page="results"][data-job-status="done"][data-has-results="true"] .run-stage .workspace-actions {
  margin-top: 48px;
}

body[data-page="results"][data-has-results="true"] .table-toolbar {
  flex-wrap: wrap;
  align-items: center;
  row-gap: 10px;
}

body[data-page="results"][data-has-results="true"] .result-tabs {
  flex: 999 1 620px;
  min-width: 0;
}

body[data-page="results"][data-has-results="true"] .result-toolbar-actions {
  flex: 1 1 520px;
  min-width: 0;
  justify-content: flex-end;
}

body[data-page="results"][data-has-results="true"] .top-up-action {
  flex: 0 0 auto;
  min-width: 124px;
  white-space: nowrap;
}

body[data-page="results"][data-has-results="true"] .result-search {
  flex: 1 1 360px;
  min-width: min(320px, 100%);
  max-width: 460px;
}

body[data-page="results"][data-has-results="true"] .result-search input {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 1180px) {
  body[data-page="results"][data-has-results="true"] .result-toolbar-actions {
    flex-basis: 100%;
  }

  body[data-page="results"][data-has-results="true"] .result-search {
    max-width: none;
  }
}

@media (max-width: 900px) {
  body[data-page="results"][data-has-results="true"] .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  body[data-page="results"][data-has-results="true"] .result-search {
    flex: 1 1 auto;
    width: 100%;
  }

  body[data-page="results"][data-job-status="done"][data-has-results="true"] .run-stage .workspace-actions {
    margin-top: 0;
  }
}

@media (max-width: 620px) {
  .copy-fallback-shell {
    align-items: flex-end;
    padding: 12px;
  }

  .copy-fallback-card {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 18px;
    padding: 18px;
  }

  .copy-fallback-card textarea {
    min-height: 220px;
  }

  .copy-fallback-actions {
    flex-direction: column;
  }

  .copy-fallback-actions button {
    width: 100%;
  }
}

/* Leads database workspace: clearer metrics, toolbar, and lighter table. */
body[data-page="leads"] .page-actions button {
  height: 40px;
  border-radius: 999px;
  background: #f4f4f2;
  padding: 0 16px;
  font-weight: 600;
}

body[data-page="leads"] .page-actions .dark-button {
  background: #111827;
  color: #ffffff;
}

body[data-page="leads"] .leads-summary {
  gap: 8px;
  margin: 18px 0;
}

body[data-page="leads"] .summary-chip {
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f4f4f2;
  color: #667085;
  cursor: pointer;
  padding: 0 13px;
  font-size: 14px;
  font-weight: 600;
}

body[data-page="leads"] .summary-chip strong {
  color: #111827;
  font-size: 15px;
  font-weight: 600;
}

body[data-page="leads"] .summary-chip:hover {
  background: #ececea;
  color: #111827;
}

body[data-page="leads"] .summary-chip.active {
  background: #e1e7e4;
  color: #111827;
}

body[data-page="leads"] .summary-chip.warning {
  background: #fffbeb;
  color: #92400e;
}

body[data-page="leads"] .summary-chip.warning.active,
body[data-page="leads"] .summary-chip.warning:hover {
  background: #fef3c7;
  color: #78350f;
}

body[data-page="leads"] .ai-lead-search {
  margin-bottom: 14px;
}

body[data-page="leads"] .ai-lead-search label {
  display: block;
  margin-bottom: 8px;
  color: #667085;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

body[data-page="leads"] .ai-search-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

body[data-page="leads"] .ai-search-input-row input {
  height: 48px;
  border: 0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 0 0 1px #e5eaf1;
  color: #111827;
  padding: 0 16px;
  font-size: 15px;
}

body[data-page="leads"] .ai-search-input-row input:focus {
  outline: none;
  box-shadow: 0 0 0 1px #d8dee6, 0 8px 24px rgba(17, 24, 39, 0.06);
}

body[data-page="leads"] .ai-search-input-row button {
  height: 48px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 600;
}

body[data-page="leads"] .lead-views {
  margin: 0;
}

body[data-page="leads"] .lead-views button {
  height: 36px;
  background: #f4f4f2;
  color: #667085;
  font-weight: 600;
}

body[data-page="leads"] .lead-views button:hover {
  background: #ececea;
  color: #111827;
}

body[data-page="leads"] .lead-views button.active {
  background: #e1e7e4;
  color: #111827;
}

body[data-page="leads"] .leads-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
}

body[data-page="leads"] .leads-toolbar {
  min-height: 0;
  flex: 1 1 auto;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

body[data-page="leads"] .leads-tool-button {
  width: 46px;
  min-width: 46px;
  height: 46px;
  border-radius: 14px;
  background: transparent;
  padding: 0;
  gap: 0;
}

body[data-page="leads"] .leads-tool-button:hover,
body[data-page="leads"] .leads-tool-button:focus-visible {
  background: #ececea;
}

body[data-page="leads"] .leads-tool-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  margin-left: 0;
  font-size: 11px;
}

body[data-page="leads"] .leads-search input {
  width: min(330px, 25vw);
  height: 40px;
  border-radius: 16px;
}

body[data-page="leads"] .active-filters {
  margin: 8px 0 10px;
}

body[data-page="leads"] .active-filters button.clear {
  color: #667085;
  font-weight: 600;
}

body[data-page="leads"] .leads-table {
  border-radius: 24px;
}

body[data-page="leads"] .leads-row {
  min-width: 1490px;
  grid-template-columns:
    34px
    minmax(250px, 1.7fr)
    116px
    134px
    134px
    180px
    170px
    124px
    110px
    170px;
  column-gap: 12px;
  padding: 13px 18px;
}

body[data-page="leads"] .leads-head {
  min-height: 48px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 12px;
  font-weight: 600;
}

body[data-page="leads"] .leads-head > div {
  overflow: visible;
  white-space: nowrap;
}

body[data-page="leads"] .leads-row:not(.leads-head) {
  min-height: 74px;
}

body[data-page="leads"] .company-name-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

body[data-page="leads"] .duplicate-badge {
  width: fit-content;
  height: 26px;
  margin-top: 7px;
  border: 0;
  border-radius: 999px;
  background: #fffbeb;
  color: #92400e;
  cursor: pointer;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 600;
}

body[data-page="leads"] .duplicate-badge:hover,
body[data-page="leads"] .duplicate-badge:focus-visible {
  outline: none;
  background: #fef3c7;
}

body[data-page="leads"] .lead-row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-start;
  opacity: 0;
  transition: opacity 140ms ease;
}

body[data-page="leads"] .leads-row:hover .lead-row-actions,
body[data-page="leads"] .leads-row:focus-within .lead-row-actions {
  opacity: 1;
}

body[data-page="leads"] .lead-row-actions button {
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: #f4f4f2;
  color: #111827;
  cursor: pointer;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

body[data-page="leads"] .lead-row-actions button:hover,
body[data-page="leads"] .lead-row-actions button:focus-visible {
  outline: none;
  background: #ececea;
}

body[data-page="leads"] .lead-group-header {
  min-width: 1490px;
  height: 40px;
}

body[data-page="leads"] .leads-load-more {
  min-width: 1490px;
}

body[data-page="leads"] .duplicate-mode-bar {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 10px;
  border: 1px solid #f4e7c4;
  border-radius: 18px;
  background: #fffbeb;
  color: #92400e;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
}

body[data-page="leads"] .duplicate-mode-bar[hidden] {
  display: none;
}

body[data-page="leads"] .duplicate-mode-bar strong {
  color: #78350f;
  font-weight: 600;
}

body[data-page="leads"] .duplicate-mode-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

body[data-page="leads"] .duplicate-mode-actions button {
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}

body[data-page="leads"] .duplicate-mode-actions button:hover,
body[data-page="leads"] .duplicate-mode-actions button:focus-visible {
  outline: none;
  background: #fef3c7;
}

/* Admin workspace: compact operational dashboard for traffic and tariff control. */
body[data-page="admin"] .workspace-body {
  max-width: 1520px;
}

.admin-page {
  display: grid;
  gap: 18px;
}

.admin-page-header .page-actions button {
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  cursor: pointer;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
}

.admin-page-header .page-actions button:hover,
.admin-page-header .page-actions button:focus-visible {
  outline: none;
  background: #0b1220;
}

.admin-status {
  min-height: 42px;
  border: 1px solid #dbe3ec;
  border-radius: 16px;
  background: #ffffff;
  color: #667085;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 600;
}

.admin-status[data-state="error"] {
  border-color: #fecaca;
  background: #fff7f7;
  color: #b42318;
}

.admin-status[data-state="success"] {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #067647;
}

.admin-status[data-state="loading"] {
  border-color: #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
}

.admin-metrics {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.admin-metric-card {
  min-height: 126px;
  border: 1px solid #e4e9f0;
  border-radius: 18px;
  background: #ffffff;
  padding: 18px;
}

.admin-metric-card--primary {
  background: #111827;
  color: #ffffff;
}

.admin-metric-card span,
.admin-metric-card em {
  display: block;
  color: #667085;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  line-height: 18px;
}

.admin-metric-card--primary span,
.admin-metric-card--primary em {
  color: rgba(255, 255, 255, 0.66);
}

.admin-metric-card strong {
  display: block;
  margin: 10px 0 6px;
  color: #111827;
  font-variant-numeric: tabular-nums;
  font-size: 40px;
  font-weight: 600;
  line-height: 44px;
}

.admin-metric-card--primary strong {
  color: #ffffff;
}

.admin-metric-card em b {
  color: inherit;
  font: inherit;
  font-weight: 600;
}

.admin-funnel-panel {
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid #e4e9f0;
  border-radius: 22px;
  background: #ffffff;
}

.admin-funnel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #edf1f5;
  padding: 18px 20px;
}

.admin-funnel-head h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  font-weight: 600;
  line-height: 26px;
}

.admin-funnel-head p {
  max-width: 680px;
  margin: 4px 0 0;
  color: #667085;
  font-size: 13px;
  font-weight: 560;
  line-height: 19px;
}

.admin-funnel-head > span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #f4f4f2;
  color: #4b5563;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 650;
  line-height: 16px;
}

.admin-funnel {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.admin-funnel-step {
  min-width: 0;
  min-height: 112px;
  border-right: 1px solid #edf1f5;
  padding: 16px;
}

.admin-funnel-step:last-child {
  border-right: 0;
}

.admin-funnel-step span,
.admin-funnel-step em {
  display: block;
  color: #667085;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: 17px;
}

.admin-funnel-step strong {
  display: block;
  margin: 10px 0 5px;
  color: #111827;
  font-variant-numeric: tabular-nums;
  font-size: 30px;
  font-weight: 600;
  line-height: 34px;
}

.admin-funnel-step em {
  color: #98a2b3;
  font-weight: 550;
}

.admin-users-panel {
  overflow: hidden;
  border: 1px solid #e4e9f0;
  border-radius: 22px;
  background: #ffffff;
}

.admin-users-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #edf1f5;
  padding: 18px 20px;
}

.admin-users-head h2 {
  margin: 0;
  color: #111827;
  font-size: 24px;
  font-weight: 600;
  line-height: 30px;
}

.admin-users-head p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 14px;
  font-weight: 560;
  line-height: 20px;
}

.admin-user-search input {
  width: min(360px, 32vw);
  height: 42px;
  border: 0;
  border-radius: 15px;
  background: #f4f4f2;
  color: #111827;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 620;
}

.admin-user-search input:focus {
  outline: none;
  box-shadow: 0 0 0 2px #d8dee6;
}

.admin-users-table {
  overflow-x: auto;
}

.admin-users-row {
  display: grid;
  min-width: 1260px;
  grid-template-columns: minmax(250px, 1.35fr) 170px 130px 110px minmax(210px, 0.95fr) 180px 140px;
  align-items: center;
  column-gap: 14px;
  border-bottom: 1px solid #edf1f5;
  padding: 13px 20px;
}

.admin-users-row:last-child {
  border-bottom: 0;
}

.admin-users-row--head {
  min-height: 46px;
  background: #fafbfc;
  color: #667085;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  text-transform: uppercase;
}

.admin-users-row:not(.admin-users-row--head):hover {
  background: #fbfcfd;
}

.admin-user-cell {
  min-width: 0;
}

.admin-user-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-user-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
}

.admin-user-main strong,
.admin-number-cell strong,
.admin-last-run-cell strong,
.admin-date-cell strong {
  display: block;
  overflow: hidden;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.admin-user-main span:not(.admin-user-avatar),
.admin-number-cell span,
.admin-last-run-cell span:not(.admin-run-state),
.admin-date-cell span {
  display: block;
  overflow: hidden;
  color: #667085;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 560;
  line-height: 18px;
}

.admin-number-cell strong,
.admin-date-cell strong {
  font-variant-numeric: tabular-nums;
}

.admin-last-run-cell {
  display: grid;
  gap: 4px;
}

.admin-run-state {
  display: inline-flex;
  width: fit-content;
  min-height: 22px;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 650;
  line-height: 16px;
}

.admin-run-state.is-done {
  background: #e8f7ef;
  color: #067647;
}

.admin-run-state.is-empty {
  background: #fff7ed;
  color: #9a3412;
}

.admin-run-state.is-cancelled,
.admin-run-state.is-waiting {
  background: #f4f4f2;
  color: #667085;
}

.admin-run-state.is-running {
  background: #eff6ff;
  color: #1d4ed8;
}

.admin-run-state.is-error {
  background: #fef2f2;
  color: #b42318;
}

.admin-plan-control {
  display: grid;
  gap: 7px;
}

.admin-plan-control > span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.admin-plan-control > span.is-paid {
  background: #e8f7ef;
  color: #067647;
}

.admin-plan-control > span.is-free {
  background: #f4f4f2;
  color: #667085;
}

.admin-plan-control select {
  width: 150px;
  height: 36px;
  border: 1px solid #d8dee6;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 600;
}

.admin-plan-control select:focus {
  outline: none;
  border-color: #111827;
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.08);
}

.admin-plan-control select:disabled {
  cursor: wait;
  opacity: 0.62;
}

.admin-status-chip {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  background: #f4f4f2;
  color: #667085;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.admin-status-chip + .admin-status-chip {
  margin-left: 5px;
}

.admin-status-chip.is-ok {
  background: #e8f7ef;
  color: #067647;
}

.admin-status-chip.is-warning {
  background: #fffbeb;
  color: #92400e;
}

.admin-status-chip.is-admin {
  background: #111827;
  color: #ffffff;
}

.admin-users-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #667085;
  padding: 24px;
  text-align: center;
}

.admin-users-empty strong {
  color: #111827;
  font-size: 20px;
  font-weight: 600;
}

.admin-users-empty span {
  max-width: 420px;
  font-size: 14px;
  line-height: 20px;
}

.admin-users-row--loading {
  min-height: 74px;
}

@media (max-width: 1080px) {
  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-funnel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-funnel-step:nth-child(3n) {
    border-right: 0;
  }

  .admin-funnel-step:nth-child(-n + 3) {
    border-bottom: 1px solid #edf1f5;
  }

  .admin-users-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-user-search input {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .admin-metrics {
    grid-template-columns: 1fr;
  }

  .admin-metric-card {
    min-height: 108px;
  }

  .admin-funnel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-funnel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-funnel-step {
    min-height: 96px;
  }

  .admin-funnel-step:nth-child(3n) {
    border-right: 1px solid #edf1f5;
  }

  .admin-funnel-step:nth-child(2n) {
    border-right: 0;
  }

  .admin-funnel-step:nth-child(-n + 4) {
    border-bottom: 1px solid #edf1f5;
  }


  .admin-users-panel {
    border-radius: 18px;
  }

  .admin-users-row {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px;
  }

  .admin-users-row--head {
    display: none;
  }

  .admin-user-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .admin-user-main {
    justify-content: flex-start;
  }

  .admin-last-run-cell {
    display: grid;
    justify-content: stretch;
  }

  .admin-plan-control {
    width: 100%;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .admin-plan-control select {
    width: 138px;
  }
}

@media (max-width: 760px) {
  body[data-page="leads"] .ai-search-input-row,
  body[data-page="leads"] .leads-control-row,
  body[data-page="leads"] .leads-toolbar,
  body[data-page="leads"] .duplicate-mode-bar {
    align-items: stretch;
    flex-direction: column;
  }

  body[data-page="leads"] .ai-search-input-row {
    display: flex;
  }

  body[data-page="leads"] .ai-search-input-row button,
  body[data-page="leads"] .leads-search,
  body[data-page="leads"] .leads-search input {
    width: 100%;
  }
}

/* Final modal layer: every modal/drawer overlay dims the full viewport, including the header. */
.auth-overlay,
.paywall-overlay,
.account-modal-overlay,
.lead-drawer-shell,
.integration-modal-shell,
.filters-drawer-shell,
.merge-modal-shell,
.lead-list-modal-shell {
  inset: 0;
  z-index: 1200;
}

body.has-open-drawer .workspace {
  z-index: 1100;
}

.account-modal-overlay {
  place-items: center;
  padding: 24px;
}

.filters-drawer {
  top: 0;
  height: 100vh;
}

.merge-modal,
.lead-list-modal {
  max-height: calc(100vh - 24px);
}

.account-modal {
  max-height: calc(100dvh - 48px);
}

@media (max-width: 640px) {
  .account-modal-overlay {
    place-items: end center;
    padding: 12px;
  }

  .account-modal {
    max-height: calc(100dvh - 24px);
  }
}

/* Lead lists: saved selections and create-list flow. */
.lead-lists-menu-wrap {
  position: relative;
}

.lead-lists-toggle {
  display: inline-flex;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: #f4f4f2;
  color: #111827;
  cursor: pointer;
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.lead-lists-toggle:hover,
.lead-lists-toggle:focus-visible,
.lead-lists-toggle[aria-expanded="true"] {
  outline: none;
  background: #e1e7e4;
}

.lead-lists-toggle strong {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ffffff;
  color: #667085;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 600;
}

.lead-lists-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 1190;
  display: grid;
  width: min(360px, calc(100vw - 24px));
  gap: 8px;
  border: 1px solid #e5eaf1;
  border-radius: 20px;
  background: #ffffff;
  padding: 10px;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.12);
}

.lead-lists-menu[hidden] {
  display: none;
}

.lead-lists-menu-head {
  display: grid;
  gap: 2px;
  padding: 6px 8px 2px;
}

.lead-lists-menu-head strong {
  color: #111827;
  font-size: 15px;
  font-weight: 600;
}

.lead-lists-menu-head span {
  color: #667085;
  font-size: 12px;
  font-weight: 600;
}

.lead-lists-menu-body {
  display: grid;
  max-height: 310px;
  overflow: auto;
  gap: 5px;
}

.lead-lists-menu-item {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #111827;
  cursor: pointer;
  padding: 8px 10px;
  text-align: left;
  font: inherit;
}

.lead-lists-menu-item:hover,
.lead-lists-menu-item:focus-visible,
.lead-lists-menu-item.active {
  outline: none;
  background: #f4f4f2;
}

.lead-lists-menu-item span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.lead-lists-menu-item strong {
  overflow: hidden;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}

.lead-lists-menu-item small {
  overflow: hidden;
  color: #98a2b3;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}

.lead-lists-menu-item em {
  display: inline-flex;
  min-width: 34px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ffffff;
  color: #667085;
  padding: 0 8px;
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
}

.lead-lists-menu-empty {
  display: grid;
  gap: 4px;
  border-radius: 14px;
  background: #f8fafc;
  padding: 12px;
}

.lead-lists-menu-empty strong {
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

.lead-lists-menu-empty span {
  color: #667085;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.lead-lists-menu-create {
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}

.lead-lists-menu-create:hover,
.lead-lists-menu-create:focus-visible {
  outline: none;
  background: #1f2937;
}

.active-filters button.save {
  background: #111827;
  color: #ffffff;
}

.active-filters button.save:hover,
.active-filters button.save:focus-visible {
  outline: none;
  background: #1f2937;
}

.lead-list-modal {
  width: min(560px, calc(100vw - 28px));
}

.lead-list-content {
  display: grid;
  gap: 12px;
}

.lead-list-scope {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
}

.lead-list-scope-title,
.lead-list-options-title {
  color: #667085;
  font-size: 13px;
  font-weight: 600;
}

.lead-list-source-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  border: 1px solid #e5eaf1;
  border-radius: 16px;
  background: #ffffff;
  cursor: pointer;
  padding: 12px;
}

.lead-list-source-option:hover,
.lead-list-source-option:focus-within {
  background: #f8fafc;
  border-color: #d8dee6;
}

.lead-list-source-option.active {
  border-color: #c8d8ce;
  background: #eef6f1;
}

.lead-list-source-option.disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.lead-list-source-option input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: #4dac63;
}

.lead-list-source-option span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.lead-list-source-option strong {
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

.lead-list-source-option em {
  color: #667085;
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.lead-list-options {
  display: grid;
  gap: 8px;
  margin-top: 0;
}

.lead-list-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lead-list-filters em {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  background: #f4f4f2;
  color: #667085;
  padding: 0 10px;
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
}

.lead-list-options-empty {
  display: grid;
  gap: 4px;
  border-radius: 16px;
  background: #f8fafc;
  padding: 12px 14px;
}

.lead-list-options-empty strong {
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

.lead-list-options-empty span {
  color: #667085;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.lead-list-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1300;
  display: flex;
  max-width: min(430px, calc(100vw - 32px));
  align-items: center;
  gap: 14px;
  border: 1px solid #dbe7df;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(17, 24, 39, 0.16);
  padding: 12px 12px 12px 14px;
}

.lead-list-toast[hidden] {
  display: none;
}

.lead-list-toast span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.lead-list-toast strong {
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

.lead-list-toast small {
  overflow: hidden;
  color: #667085;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.lead-list-toast button {
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  cursor: pointer;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 760px) {
  .lead-lists-menu {
    right: 0;
    left: auto;
  }

  .lead-list-toast {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }
}

/* Mobile redesign: phone UI is a separate command surface, not compressed desktop. */
:root {
  --mobile-gutter: 16px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --surface: #ffffff;
  --surface-soft: #f7f8f7;
  --control-bg: #ededeb;
  --control-hover: #e4e4e1;
  --text-main: #111827;
  --text-muted: #667085;
  --text-soft: #98a2b3;
  --border: #e5e7eb;
  --brand: #62b98c;
  --brand-soft: #e8f2ed;
  --radius-sm: 14px;
  --radius-control: 18px;
  --radius-card: 26px;
  --radius-pill: 999px;
}

.mobile-menu-button,
.mobile-menu-sheet-shell,
.mobile-query-section,
.mobile-where-section,
.mobile-settings-trigger,
.mobile-launch-bar,
.mobile-run-compact,
.mobile-run-expanded,
.mobile-result-card-cell {
  display: none;
}

body[data-page="results"] .results-table tr.lead-row > .mobile-result-card-cell,
body .current-run-expandable .run-preview-results-table tr.lead-row > .mobile-result-card-cell {
  display: none;
}

@media (max-width: 767px) {
  html {
    -webkit-text-size-adjust: 100%;
    min-width: 320px;
  }

  body {
    overflow-x: clip;
    background: var(--page-bg);
  }

  button,
  input,
  textarea {
    font: inherit;
  }

  button {
    min-height: 44px;
  }

  .app-shell {
    display: block;
    min-height: 100dvh;
    background: var(--page-bg);
  }

  .workspace {
    min-height: auto;
    margin: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: var(--page-bg);
  }

  .workspace-body {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
  }

  .app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 64px;
    height: auto;
    border: 0;
    background: #f4f4f2;
    opacity: 1;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .app-header-inner {
    width: 100%;
    height: auto;
    min-height: 64px;
    padding: max(8px, env(safe-area-inset-top)) var(--mobile-gutter) 8px;
    gap: 6px;
    justify-content: space-between;
  }

  .main-nav {
    display: none;
  }

  .top-brand {
    min-width: 0;
    flex: 1 1 auto;
    gap: 7px;
  }

  .top-brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .top-brand-logo img,
  .top-brand-logo svg {
    width: 42px;
    height: 42px;
  }

  .top-brand-text {
    width: 62px;
    min-width: 62px;
    flex: 0 0 62px;
  }

  .top-brand .top-brand-text span {
    max-width: 62px;
    overflow: hidden;
    font-size: 13px;
    line-height: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top-actions {
    flex: 0 0 auto;
    gap: 6px;
  }

  .usage-button,
  .profile-button {
    height: 44px;
    min-height: 44px;
    border: 0;
    border-radius: 16px;
    background: #ffffff;
    color: var(--text-main);
    box-shadow: none;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
  }

  .usage-button span {
    display: none;
  }

  .profile-button {
    max-width: 86px;
    overflow: hidden;
  }

  .profile-button:not(.is-login-button) {
    width: 44px;
    padding: 0;
  }

  .profile-button:not(.is-login-button) > span:not(.profile-avatar) {
    display: none;
  }

  .profile-button.is-login-button {
    background: var(--brand);
    color: #ffffff;
    padding: 0 14px;
  }

  .mobile-menu-button {
    display: inline-flex;
    width: 44px;
    height: 44px;
    min-height: 44px;
    flex: 0 0 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-radius: 16px;
    background: #ffffff;
    color: var(--text-main);
    padding: 0;
  }

  .mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  .mobile-menu-button span + span {
    margin-top: 0;
  }

  @media (max-width: 374px) {
    .usage-menu {
      display: none;
    }
  }

  .mobile-menu-sheet-shell:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 1250;
    display: block;
  }

  .mobile-menu-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 100%;
    border: 0;
    background: rgba(17, 24, 39, 0.28);
  }

  .mobile-menu-sheet {
    position: absolute;
    inset: auto 0 0;
    max-height: calc(100dvh - 12px);
    overflow-y: auto;
    border-radius: 30px 30px 0 0;
    background: #ffffff;
    padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
  }

  .mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
  }

  .mobile-menu-head strong,
  .mobile-menu-head span {
    display: block;
  }

  .mobile-menu-head strong {
    color: var(--text-main);
    font-size: 18px;
    font-weight: 600;
    line-height: 23px;
  }

  .mobile-menu-head span {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
  }

  .mobile-menu-head button {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 16px;
    background: var(--control-bg);
    color: var(--text-main);
    font-size: 24px;
    line-height: 1;
  }

  .mobile-menu-nav {
    display: grid;
    gap: 3px;
  }

  .mobile-menu-nav a,
  .mobile-menu-nav button {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    min-height: 50px;
    align-items: center;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--text-main);
    gap: 10px;
    padding: 0 12px;
    text-align: left;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
  }

  .mobile-menu-secondary a {
    grid-template-columns: 24px minmax(0, 1fr);
    min-height: 46px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
  }

  .mobile-menu-nav a > span:not(.mobile-menu-icon),
  .mobile-menu-nav button > span:not(.mobile-menu-icon) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-menu-icon {
    width: 24px;
    height: 24px;
    border-radius: 9px;
    background: var(--control-bg);
    color: var(--text-muted);
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
  }

  .mobile-menu-nav em {
    color: var(--text-soft);
    font-style: normal;
    font-size: 18px;
    line-height: 1;
  }

  .mobile-menu-nav a:active,
  .mobile-menu-nav button:active,
  .mobile-menu-nav a.is-active,
  .mobile-menu-nav button.is-active {
    background: var(--brand-soft);
    color: var(--text-main);
  }

  .mobile-menu-nav .is-active .mobile-menu-icon {
    background: var(--brand);
    color: #ffffff;
  }

  .mobile-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
  }

  .mobile-menu-account {
    margin-top: 10px;
    border-radius: 22px;
    background: var(--surface-soft);
    padding: 13px;
  }

  .mobile-menu-account-head {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
  }

  .mobile-menu-account-head .profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .mobile-menu-account-head strong,
  .mobile-menu-account-head span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-menu-account-head strong {
    color: var(--text-main);
    font-size: 15px;
    line-height: 20px;
    font-weight: 600;
  }

  .mobile-menu-account-head span {
    margin-top: 1px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
  }

  .mobile-menu-usage {
    margin-top: 12px;
  }

  .mobile-menu-usage span {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 15px;
    font-weight: 600;
  }

  .mobile-menu-usage div {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e0e3e1;
  }

  .mobile-menu-usage i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--brand);
  }

  .mobile-menu-account > button {
    width: 100%;
    min-height: 44px;
    margin-top: 12px;
    border: 0;
    border-radius: 16px;
    background: #111827;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
  }

  body[data-page="settings"] .input-stage.new-run-page {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 26px var(--mobile-gutter) calc(28px + env(safe-area-inset-bottom));
  }

  @media (min-width: 480px) and (max-width: 767px) {
    body[data-page="settings"] .input-stage.new-run-page {
      padding-inline: 24px;
    }
  }

  .input-stage-head {
    max-width: 100%;
    margin-bottom: 20px;
  }

  .input-stage-head h1,
  .input-stage-head h2 {
    max-width: 100%;
    font-size: clamp(36px, 10vw, 42px);
    line-height: 1;
    font-weight: 600;
    letter-spacing: 0;
    text-wrap: balance;
  }

  .input-stage-head p {
    max-width: 360px;
    margin: 11px 0 0;
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1.38;
  }

  .mobile-query-section {
    display: block;
    margin-bottom: 16px;
  }

  .mobile-query-section > label {
    display: block;
    margin: 0 0 10px 4px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .mobile-query-control {
    position: relative;
    display: block;
    min-width: 0;
  }

  .mobile-query-section input,
  .mobile-query-section textarea {
    display: block;
    width: 100%;
    min-width: 0;
    border: 0;
    border-radius: 24px;
    background: #ffffff;
    color: var(--text-main);
    outline: none;
    box-shadow: none;
  }

  .mobile-query-section input {
    height: 60px;
    overflow: hidden;
    padding: 0 124px 0 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
  }

  .mobile-query-section textarea {
    min-height: 112px;
    padding: 14px 16px;
    resize: vertical;
    font-size: 16px;
    line-height: 23px;
  }

  .mobile-query-section input::placeholder,
  .mobile-query-section textarea::placeholder {
    color: #667085;
    opacity: 0.72;
  }

  .mobile-query-section input:focus,
  .mobile-query-section textarea:focus {
    box-shadow: 0 0 0 1px #d8dee6;
  }

  .mobile-typed-placeholder {
    left: 18px;
    right: 124px;
    top: 30px;
    height: 24px;
    transform: translateY(-50%);
    font-size: 16px;
  }

  .mobile-typed-placeholder::after {
    background: linear-gradient(90deg, rgb(255 255 255 / 0), #ffffff 78%);
  }

  .mobile-query-control.is-query-focused .mobile-typed-placeholder {
    opacity: 0.55;
  }

  .mobile-query-control.has-query-value .mobile-typed-placeholder,
  .mobile-query-section[data-mode="ai"] .mobile-typed-placeholder {
    opacity: 0;
    visibility: hidden;
  }

  .mobile-query-submit {
    position: absolute;
    top: 6px;
    right: 6px;
    width: auto;
    height: 48px;
    min-width: 104px;
    min-height: 48px;
    margin: 0;
    border: 0;
    border-radius: 20px;
    background: #111827;
    color: #ffffff;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
  }

  .mobile-query-section[data-mode="ai"] .mobile-query-control {
    display: grid;
    gap: 8px;
  }

  .mobile-query-section[data-mode="ai"] .mobile-query-submit {
    position: static;
    width: 100%;
    min-width: 0;
  }

  @media (max-width: 374px) {
    .mobile-query-section input {
      padding-right: 76px;
    }

    .mobile-typed-placeholder {
      right: 76px;
    }

    .mobile-query-submit {
      min-width: 50px;
      padding: 0 14px;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .typed-query-placeholder {
      transition: none;
    }

    .typed-placeholder-caret {
      display: none;
      animation: none;
    }
  }

  .mobile-query-state {
    min-height: 0;
    margin: 8px 4px 0;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
  }

  .mobile-query-state:empty,
  .mobile-query-state[hidden] {
    display: none;
  }

  .main-search-card,
  .ai-query-parser.main-search-card {
    display: none;
  }

  .launch-mode-switch {
    display: none;
  }

  .quick-categories {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0 calc(var(--mobile-gutter) * -1) 22px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 0 var(--mobile-gutter);
    scroll-padding-inline: var(--mobile-gutter);
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .quick-categories::-webkit-scrollbar {
    display: none;
  }

  .quick-categories .preset-chip {
    flex: 0 0 auto;
    height: 42px;
    min-height: 42px;
    border: 0;
    border-radius: 21px;
    background: #ffffff;
    color: var(--text-main);
    padding: 0 15px;
    scroll-snap-align: start;
    font-size: 15px;
    font-weight: 600;
  }

  .quick-categories .preset-chip.is-active {
    background: var(--brand-soft);
  }

  .action-cards {
    display: flex;
    gap: 10px;
    margin: 0 calc(var(--mobile-gutter) * -1) 28px;
    overflow-x: auto;
    padding: 0 var(--mobile-gutter);
    scroll-padding-inline: var(--mobile-gutter);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .action-cards::-webkit-scrollbar {
    display: none;
  }

  .action-card {
    flex: 0 0 min(70vw, 252px);
    min-height: 104px;
    border: 0;
    border-radius: 28px;
    background: #ffffff;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    scroll-snap-align: start;
    box-shadow: none;
  }

  .action-card.is-active {
    background: var(--brand-soft);
  }

  .action-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
  }

  .action-icon img {
    width: 48px;
    height: 48px;
  }

  .action-card span:last-child {
    color: var(--text-main);
    font-size: 18px;
    line-height: 22px;
    font-weight: 600;
  }

  .run-layout,
  .launch-grid.run-layout {
    display: block;
  }

  .run-main-column,
  .search-form.run-main-column {
    display: grid;
    gap: 12px;
    padding: 0;
  }

  .search-form.run-main-column .mobile-settings-section,
  .form-section.mobile-settings-section {
    position: relative;
    width: 100%;
    min-width: 0;
    height: auto;
    margin: 0;
    border: 0;
    border-radius: 28px;
    background: #ffffff;
    transform: none;
    overflow: hidden;
    padding: 0;
    scroll-margin-top: 80px;
  }

  .mobile-settings-section + .mobile-settings-section {
    margin-top: 0;
  }

  .mobile-settings-trigger {
    width: 100%;
    min-height: 76px;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 18px;
    text-align: left;
    touch-action: manipulation;
  }

  .mobile-settings-trigger:active {
    background: #f7f8f7;
  }

  .mobile-settings-section.is-open > .mobile-settings-trigger {
    border-bottom: 1px solid #edf0ed;
  }

  .mobile-settings-trigger span {
    min-width: 0;
    display: block;
  }

  .mobile-settings-trigger strong {
    display: block;
    color: var(--text-main);
    font-size: 19px;
    font-weight: 600;
    line-height: 24px;
  }

  .mobile-settings-trigger small {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: var(--text-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    line-height: 19px;
  }

  .mobile-settings-trigger em {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 999px;
    background: var(--control-bg);
    color: var(--text-muted);
    display: grid;
    place-items: center;
    font-style: normal;
    font-size: 18px;
    transition: transform 160ms ease;
  }

  .mobile-settings-trigger[aria-expanded="true"] em {
    transform: rotate(180deg);
  }

  .mobile-settings-trigger:focus-visible,
  .mobile-channel-tab:focus-visible,
  .mobile-geo-option:focus-visible,
  .mobile-launch-action:focus-visible {
    outline: 3px solid rgba(98, 185, 140, 0.42);
    outline-offset: -3px;
  }

  .source-option:has(input:focus-visible),
  .rating-options label:has(input:focus-visible),
  .toggle-grid label:has(input:focus-visible) {
    outline: 3px solid rgba(98, 185, 140, 0.42);
    outline-offset: 1px;
  }

  .mobile-settings-section > .section-head {
    display: none;
  }

  .mobile-settings-section:not(.is-open) > :not(.mobile-settings-trigger) {
    display: none !important;
  }

  .mobile-settings-section.is-open {
    padding-bottom: 20px;
  }

  .mobile-settings-section.is-open > :not(.mobile-settings-trigger):not(.section-head) {
    margin-right: 18px;
    margin-left: 18px;
  }

  .location-section.mobile-settings-section.is-open {
    padding-bottom: 0;
  }

  .location-section.mobile-settings-section.is-open > .mobile-where-section {
    margin-right: 0;
    margin-left: 0;
  }

  .location-section.mobile-settings-section.is-open > .command-flow {
    display: none;
  }

  .command-flow,
  .criteria-band,
  .toggle-grid {
    min-width: 0;
  }

  .mode-tabs-list,
  .rating-options,
  .limit-presets,
  .toggle-grid {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .mode-tabs-list::-webkit-scrollbar,
  .rating-options::-webkit-scrollbar,
  .limit-presets::-webkit-scrollbar,
  .toggle-grid::-webkit-scrollbar {
    display: none;
  }

  .mode-tab,
  .rating-options label,
  .limit-presets button,
  .toggle-grid label {
    flex: 0 0 auto;
    min-height: 44px;
  }

  .limit-presets,
  .rating-options,
  .toggle-grid {
    display: grid;
    overflow: visible;
    scrollbar-width: auto;
  }

  .limit-presets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .rating-options,
  .toggle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .limit-presets button,
  .rating-options label,
  .toggle-grid label {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    margin: 0;
  }

  .limit-presets button,
  .rating-options label {
    justify-content: center;
    padding: 0 8px;
    text-align: center;
  }

  .toggle-grid label {
    min-height: 52px;
    white-space: normal;
  }

  .query-main-field input,
  .form-section input[type="text"],
  .form-section input[type="number"],
  .geo-input-block input {
    min-width: 0;
    font-size: 16px;
  }

  .mobile-where-section {
    display: grid;
    gap: 20px;
    padding: 0 18px 20px;
  }

  .mobile-channel-tabs {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 52px;
    overflow: hidden;
    border-radius: 26px;
    background: #eeeeec;
    padding: 4px;
  }

  .mobile-channel-indicator {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc((100% - 8px) / 2);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
    transition: transform 180ms ease;
  }

  .mobile-channel-tabs[data-value="web"] .mobile-channel-indicator {
    transform: translateX(100%);
  }

  .mobile-channel-tab {
    position: relative;
    z-index: 1;
    min-width: 0;
    min-height: 44px;
    border: 0;
    border-radius: 22px;
    background: transparent;
    color: var(--text-muted);
    padding: 0 8px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    line-height: 20px;
    white-space: nowrap;
  }

  .mobile-channel-tab.active {
    color: var(--text-main);
  }

  .mobile-channel-hint {
    display: grid;
    gap: 4px;
    border-radius: 22px;
    background: #f7f7f4;
    padding: 15px 16px;
  }

  .mobile-channel-hint[hidden] {
    display: none !important;
  }

  .mobile-channel-hint strong {
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    line-height: 19px;
  }

  .mobile-channel-hint p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
  }

  .mobile-geo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .mobile-geo-option {
    position: relative;
    min-width: 0;
    min-height: 56px;
    overflow: hidden;
    border: 0;
    border-radius: 24px;
    background: #eeeeec;
    color: var(--text-main);
    padding: 0 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 20px;
  }

  .mobile-geo-option:disabled {
    cursor: not-allowed;
    opacity: 0.42;
  }

  .mobile-geo-indicator {
    position: absolute;
    inset: 4px;
    border-radius: 20px;
    background: #ffffff;
    opacity: 0;
    transform: scale(0.96);
    transition:
      opacity 180ms ease,
      transform 180ms ease;
  }

  .mobile-geo-option.active .mobile-geo-indicator {
    opacity: 1;
    transform: scale(1);
  }

  .mobile-geo-label {
    position: relative;
    z-index: 1;
    display: block;
    overflow-wrap: anywhere;
  }

  .mobile-geo-fields {
    display: grid;
    gap: 12px;
  }

  .mobile-field {
    display: grid;
    gap: 8px;
  }

  .mobile-field[hidden],
  .mobile-geo-info-card[hidden] {
    display: none !important;
  }

  .mobile-field span {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    line-height: 19px;
  }

  .mobile-field input {
    display: block;
    width: 100%;
    height: 56px;
    min-width: 0;
    border: 0;
    border-radius: 22px;
    background: #eeeeec;
    color: var(--text-main);
    outline: none;
    padding: 0 16px;
    font-size: 16px;
    font-weight: 600;
  }

  .mobile-field input:focus {
    box-shadow: 0 0 0 1px #d7dce3;
  }

  .mobile-geo-info-card {
    display: grid;
    gap: 4px;
    border-radius: 22px;
    background: #eeeeec;
    padding: 15px 16px;
  }

  .mobile-geo-info-card strong {
    color: var(--text-main);
    font-size: 15px;
    font-weight: 600;
    line-height: 20px;
  }

  .mobile-geo-info-card span {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
  }

  .launch-summary {
    display: none;
  }

  .mobile-launch-bar {
    position: static;
    z-index: auto;
    min-height: 68px;
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 8px 15px;
  }

  body:not([data-page="settings"]) .mobile-launch-bar,
  body[data-page="settings"] .input-stage[hidden] .mobile-launch-bar {
    display: none;
  }

  .mobile-launch-summary {
    min-width: 0;
    flex: 1;
  }

  .mobile-launch-summary strong,
  .mobile-launch-summary span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-launch-summary strong {
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    line-height: 18px;
  }

  .mobile-launch-summary span {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
  }

  .mobile-launch-action {
    height: 50px;
    min-height: 50px;
    max-width: 132px;
    overflow: hidden;
    border: 0;
    border-radius: 24px;
    background: var(--brand);
    color: #ffffff;
    padding: 0 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 600;
  }

  .mobile-launch-bar[hidden] {
    display: none !important;
  }

  .current-run-expandable {
    margin: 16px 0 22px;
    border: 1px solid #e5eaf1;
    border-radius: 28px;
    background: #ffffff;
    overflow: hidden;
  }

  #current-run-compact,
  #current-run-expanded {
    display: none !important;
  }

  .mobile-run-compact {
    display: block;
    width: 100%;
    min-height: 104px;
    border: 0;
    background: #ffffff;
    cursor: pointer;
    padding: 16px 18px 15px;
    text-align: left;
  }

  .mobile-run-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
  }

  .mobile-run-title {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
  }

  .mobile-run-dot {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    border-radius: 999px;
    background: #18a957;
    box-shadow: 0 0 0 4px rgba(24, 169, 87, 0.12);
  }

  .mobile-run-dot.error {
    background: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.11);
  }

  .mobile-run-dot.cancelled {
    background: #98a2b3;
    box-shadow: 0 0 0 4px rgba(152, 162, 179, 0.12);
  }

  .mobile-run-title strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--text-main);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 18px;
    font-weight: 600;
    line-height: 24px;
  }

  .mobile-run-progress-value {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
  }

  .mobile-run-progress-value strong {
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    line-height: 24px;
  }

  .mobile-run-chevron {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 999px;
    background: #f1f3f5;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    transition: transform 160ms ease;
  }

  .mobile-run-compact.is-expanded .mobile-run-chevron {
    transform: rotate(180deg);
  }

  .mobile-run-meta {
    display: block;
    margin: 9px 0 12px 22px;
    overflow: hidden;
    color: var(--text-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
  }

  .mobile-run-progress-track {
    display: block;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2f7;
  }

  .mobile-run-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #18a957;
    transition: width 220ms ease-out;
  }

  .current-run-expandable[data-status="error"] .mobile-run-progress-track span {
    background: #dc2626;
  }

  .current-run-expandable[data-status="cancelled"] .mobile-run-progress-track span {
    background: #98a2b3;
  }

  .mobile-run-expanded:not([hidden]) {
    display: grid;
    gap: 14px;
    border-top: 1px solid #eef2f7;
    padding: 14px 16px 16px;
  }

  .mobile-run-expanded[hidden],
  .mobile-run-open-result[hidden],
  .mobile-run-stop[hidden] {
    display: none !important;
  }

  .mobile-run-now {
    display: grid;
    gap: 3px;
    border-radius: 20px;
    background: #f8fafc;
    padding: 13px 14px;
  }

  .mobile-run-now span {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    text-transform: uppercase;
  }

  .mobile-run-now strong {
    color: var(--text-main);
    font-size: 15px;
    font-weight: 600;
    line-height: 21px;
  }

  .mobile-run-results {
    display: grid;
    gap: 10px;
    max-height: 268px;
    min-height: 0;
    overflow: hidden;
  }

  .mobile-run-results header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-run-results h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 16px;
    font-weight: 600;
    line-height: 21px;
  }

  .mobile-run-results header span {
    flex: 0 0 auto;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
  }

  .mobile-run-preview-list {
    display: grid;
    gap: 3px;
    max-height: 210px;
    overflow: hidden;
  }

  .mobile-run-lead-card,
  .mobile-run-skeleton,
  .mobile-run-ready {
    min-height: 68px;
    border-radius: 20px;
    background: #f8fafc;
    padding: 11px 12px;
  }

  .mobile-run-lead-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  .mobile-run-lead-card strong,
  .mobile-run-lead-card span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-run-lead-card strong {
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    line-height: 18px;
  }

  .mobile-run-lead-card span {
    margin-top: 1px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
  }

  .mobile-run-lead-contact {
    display: flex;
    min-width: 0;
    gap: 8px;
  }

  .mobile-run-lead-contact a,
  .mobile-run-lead-contact span {
    min-width: 0;
    max-width: 50%;
    overflow: hidden;
    color: var(--text-main);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
  }

  .mobile-run-lead-contact .missing-value {
    color: var(--text-soft);
  }

  .mobile-run-skeleton {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
  }

  .mobile-run-skeleton-dot,
  .mobile-run-skeleton-lines span {
    display: block;
    border-radius: 999px;
    background: #edf1f5;
  }

  .mobile-run-skeleton-dot {
    width: 32px;
    height: 32px;
  }

  .mobile-run-skeleton-lines {
    display: grid;
    gap: 8px;
  }

  .mobile-run-skeleton-lines span:first-child {
    width: 62%;
    height: 12px;
  }

  .mobile-run-skeleton-lines span:last-child {
    width: 86%;
    height: 10px;
  }

  .mobile-run-ready {
    display: grid;
    align-content: center;
    gap: 3px;
  }

  .mobile-run-ready strong {
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    line-height: 18px;
  }

  .mobile-run-ready span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
  }

  .mobile-run-actions {
    display: grid;
    gap: 8px;
  }

  .mobile-run-open-result,
  .mobile-run-stop {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
  }

  .mobile-run-open-result {
    background: #111827;
    color: #ffffff;
  }

  .mobile-run-stop {
    background: #fff1f1;
    color: #c81e1e;
  }

  .mobile-run-stop:disabled {
    opacity: 0.58;
  }

  .mobile-technical-log {
    border: 1px solid #e5eaf1;
    border-radius: 20px;
    background: #ffffff;
    padding: 11px 12px;
  }

  .mobile-technical-log summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
  }

  .mobile-technical-log summary span:last-child {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 600;
  }

  .mobile-technical-log .run-timeline {
    max-height: 260px;
    overflow-y: auto;
    padding-top: 8px;
  }

  .mobile-result-card-cell {
    display: none;
  }

  body[data-page="results"] .results-table,
  body .current-run-expandable .run-preview-results-table {
    display: block;
    width: 100%;
    min-width: 0;
    border-spacing: 0;
  }

  body[data-page="results"] .results-table thead,
  body .current-run-expandable .run-preview-results-table thead {
    display: none;
  }

  body[data-page="results"] .results-table tbody,
  body .current-run-expandable .run-preview-results-table tbody {
    display: grid;
    width: 100%;
    gap: 10px;
  }

  body[data-page="results"] .results-table tr.lead-row,
  body .current-run-expandable .run-preview-results-table tr.lead-row {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
  }

  body[data-page="results"] .results-table tr.lead-row > td:not(.mobile-result-card-cell),
  body .current-run-expandable .run-preview-results-table tr.lead-row > td:not(.mobile-result-card-cell) {
    display: none !important;
  }

  body[data-page="results"] .results-table tr.lead-row > .mobile-result-card-cell,
  body .current-run-expandable .run-preview-results-table tr.lead-row > .mobile-result-card-cell {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .mobile-lead-card {
    width: 100%;
    box-sizing: border-box;
    min-height: 190px;
    border-radius: 28px;
    background: #ffffff;
    padding: 18px;
  }

  .mobile-lead-card + .mobile-lead-card {
    margin-top: 10px;
  }

  .mobile-lead-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-lead-card-head > div {
    min-width: 0;
  }

  .mobile-lead-card-head strong,
  .mobile-lead-card-head span {
    display: block;
  }

  .mobile-lead-card-head strong {
    color: var(--text-main);
    font-size: 17px;
    font-weight: 600;
    line-height: 22px;
  }

  .mobile-lead-card-head span {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
  }

  .mobile-lead-check {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: var(--control-bg);
  }

  .mobile-lead-check span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .mobile-lead-check input {
    width: 20px;
    height: 20px;
  }

  .mobile-lead-status {
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--control-bg);
    color: var(--text-muted);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
  }

  .mobile-lead-contact {
    display: grid;
    gap: 7px;
    margin-top: 16px;
  }

  .mobile-lead-contact .lead-contact-stack {
    gap: 8px;
  }

  .mobile-lead-contact .lead-contact-item {
    align-items: flex-start;
  }

  .mobile-lead-contact .lead-contact-value .data-link,
  .mobile-lead-contact .lead-contact-value .masked-contact {
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .mobile-lead-contact a,
  .mobile-lead-contact span {
    min-width: 0;
    overflow: hidden;
    color: var(--text-main);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 600;
    line-height: 20px;
  }

  .mobile-lead-contact .missing-value {
    color: var(--text-soft);
    font-weight: 600;
  }

  .mobile-lead-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
  }

  .mobile-lead-chips span {
    min-height: 30px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
  }

  .mobile-lead-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
  }

  .mobile-lead-actions button {
    flex: 1;
    border: 0;
    border-radius: 18px;
    background: var(--control-bg);
    color: var(--text-main);
    padding: 0 12px;
    font-size: 14px;
    font-weight: 600;
  }

  .legal-details-shell {
    z-index: 1200;
    pointer-events: auto;
  }

  .legal-details-backdrop {
    background: rgba(15, 23, 42, 0.22);
  }

  .legal-details-popover {
    top: auto !important;
    right: 0;
    bottom: 0;
    left: 0 !important;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 70px);
    overflow: auto;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -12px 36px rgba(15, 23, 42, 0.12);
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  }

  .legal-details-content h3 {
    font-size: 18px;
    line-height: 24px;
  }

  .legal-details-row {
    grid-template-columns: 58px minmax(0, 1fr) 38px;
  }

  .table-toolbar,
  .result-tabs,
  .leads-summary,
  .integration-quick-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .table-toolbar::-webkit-scrollbar,
  .result-tabs::-webkit-scrollbar,
  .leads-summary::-webkit-scrollbar,
  .integration-quick-tabs::-webkit-scrollbar {
    display: none;
  }

  body[data-page="leads"] .leads-table {
    display: block;
  }

  body[data-page="leads"] .leads-head {
    display: none;
  }

  body[data-page="leads"] .leads-row:not(.leads-head) {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 12px;
    min-height: 190px;
    border: 0;
    border-radius: 28px;
    background: #ffffff;
    padding: 18px;
  }

  body[data-page="leads"] .leads-row:not(.leads-head) > div:nth-child(n + 3) {
    grid-column: 2;
  }

  body[data-page="leads"] .lead-row-actions {
    display: flex;
    gap: 8px;
  }

  body[data-page="leads"] .lead-row-actions button {
    flex: 1;
    min-height: 44px;
  }

  .account-modal-overlay,
  .auth-overlay,
  .paywall-overlay,
  .trial-offer-overlay,
  .checkout-overlay,
  .lead-drawer-shell,
  .integration-modal-shell,
  .filters-drawer-shell,
  .merge-modal-shell,
  .lead-list-modal-shell,
  .scenario-drawer-shell {
    align-items: flex-end;
    justify-items: stretch;
    padding: 0;
  }

  .auth-modal,
  .paywall-modal,
  .trial-offer-modal,
  .checkout-modal,
  .account-modal,
  .lead-drawer,
  .integration-modal,
  .filters-drawer,
  .merge-modal,
  .lead-list-modal,
  .scenario-drawer {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 12px);
    border-radius: 30px 30px 0 0;
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
    overflow-y: auto;
  }

  .trial-offer-modal {
    max-height: 92dvh;
    border-radius: 28px 28px 0 0;
    padding: 24px 20px calc(20px + env(safe-area-inset-bottom));
  }

  .checkout-purchase-modal {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 12px);
    border-radius: 30px 30px 0 0;
    padding: 28px 20px calc(22px + env(safe-area-inset-bottom));
    overflow-y: auto;
  }

  .checkout-purchase-modal .checkout-modal__close {
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
  }

  .checkout-purchase-modal .checkout-modal__title {
    max-width: 330px;
    margin-top: 22px;
    font-size: 34px;
    line-height: 38px;
  }

  .checkout-purchase-modal .checkout-modal__description {
    max-width: 330px;
    font-size: 16px;
    line-height: 22px;
  }

  .checkout-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    border-radius: 22px;
    padding: 16px;
  }

  .checkout-summary__price {
    text-align: left;
  }

  .checkout-purchase-actions {
    margin-top: 24px;
  }

  .checkout-purchase-modal .checkout-modal__primary {
    height: 56px;
    border-radius: 18px;
    font-size: 16px;
  }

  .checkout-purchase-modal .checkout-modal__legal {
    margin-top: 22px !important;
    font-size: 11px !important;
    line-height: 16px !important;
  }

  .pp-payment-overlay {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
  }

  .pp-payment-modal {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 8px);
    border-radius: 30px 30px 0 0;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  }

  .pp-payment-close {
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
  }

  .pp-payment-header {
    padding-right: 46px;
  }

  .pp-payment-brand span:not(.pp-payment-brand-mark) {
    font-size: 22px;
  }

  .pp-payment-badge {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }

  .pp-payment-hero {
    margin-top: 20px;
  }

  .pp-payment-hero h2 {
    max-width: 320px;
    font-size: 30px;
    line-height: 31px;
  }

  .pp-payment-hero p {
    max-width: 320px;
    margin-top: 8px;
    font-size: 14px;
    line-height: 19px;
  }

  .pp-payment-compare {
    margin-top: 16px;
    border-radius: 20px;
  }

  .pp-payment-compare__head,
  .pp-payment-compare__row {
    grid-template-columns: minmax(0, 1.15fr) repeat(3, minmax(48px, 0.7fr));
    gap: 6px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .pp-payment-compare__head {
    min-height: 38px;
    font-size: 12px;
  }

  .pp-payment-compare__row {
    min-height: 42px;
    font-size: 12px;
    line-height: 15px;
  }

  .pp-payment-compare__row strong {
    font-size: 12px;
  }

  .pp-payment-plans {
    grid-template-columns: 1fr;
  }

  .pp-payment-plan {
    min-height: 56px;
    border-radius: 18px;
    padding: 10px 12px;
  }

  .pp-payment-primary {
    position: sticky;
    bottom: 0;
    height: 56px;
    margin-top: 16px;
    border-radius: 18px;
    font-size: 16px;
  }

  .pp-payment-note {
    margin-top: 12px !important;
  }

  .pp-payment-legal {
    font-size: 11px !important;
    line-height: 15px !important;
  }

  .lead-drawer,
  .filters-drawer,
  .scenario-drawer {
    inset: auto 0 0;
    height: auto;
  }

  body[data-page="results"][data-has-results="true"] .results-table,
  body[data-page="results"][data-has-results="true"] .current-run-expandable .run-preview-results-table,
  body .current-run-expandable .run-preview-results-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: auto;
  }

  body[data-page="results"][data-has-results="true"] .results-table thead,
  body[data-page="results"][data-has-results="true"] .current-run-expandable .run-preview-results-table thead,
  body .current-run-expandable .run-preview-results-table thead {
    display: none !important;
  }

  body[data-page="results"][data-has-results="true"] .results-table tbody,
  body[data-page="results"][data-has-results="true"] .current-run-expandable .run-preview-results-table tbody,
  body .current-run-expandable .run-preview-results-table tbody {
    display: grid !important;
    width: 100% !important;
    gap: 10px;
  }

  body[data-page="results"][data-has-results="true"] .results-table tr.lead-row,
  body[data-page="results"][data-has-results="true"] .current-run-expandable .run-preview-results-table tr.lead-row,
  body .current-run-expandable .run-preview-results-table tr.lead-row {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    border: 0;
    background: transparent;
  }

  body[data-page="results"][data-has-results="true"] .results-table tr.lead-row > td:not(.mobile-result-card-cell),
  body[data-page="results"][data-has-results="true"] .current-run-expandable .run-preview-results-table tr.lead-row > td:not(.mobile-result-card-cell),
  body .current-run-expandable .run-preview-results-table tr.lead-row > td:not(.mobile-result-card-cell) {
    display: none !important;
  }

  body[data-page="results"][data-has-results="true"] .results-table tr.lead-row > .mobile-result-card-cell,
  body[data-page="results"][data-has-results="true"] .current-run-expandable .run-preview-results-table tr.lead-row > .mobile-result-card-cell,
  body .current-run-expandable .run-preview-results-table tr.lead-row > .mobile-result-card-cell {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    box-sizing: border-box;
    padding: 0;
    border: 0;
    background: transparent;
  }

  body[data-page="results"][data-has-results="true"] .results-table .mobile-lead-card,
  body[data-page="results"][data-has-results="true"] .current-run-expandable .run-preview-results-table .mobile-lead-card,
  body .current-run-expandable .run-preview-results-table .mobile-lead-card {
    width: 100% !important;
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-settings-trigger em,
  .action-card {
    transition: none;
  }
}

/* Trial offer modal, final product-card treatment. */
.trial-offer-overlay.trial-hh-overlay[hidden] {
  display: none !important;
}

.trial-offer-overlay.trial-hh-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 20, 23, 0.36);
  backdrop-filter: blur(10px);
}

.trial-offer-modal.trial-hh-modal {
  position: relative;
  width: min(620px, calc(100vw - 32px)) !important;
  max-width: min(620px, calc(100vw - 32px)) !important;
  max-height: calc(100dvh - 32px);
  display: grid;
  gap: 10px;
  padding: 14px !important;
  border: 0 !important;
  border-radius: 34px !important;
  background: #f3f2ee !important;
  color: #121823;
  overflow-y: auto;
  box-shadow: 0 26px 80px rgba(17, 24, 39, 0.22), 0 2px 0 rgba(255, 255, 255, 0.72) inset;
  letter-spacing: 0;
}

.trial-offer-modal.trial-hh-modal:focus {
  outline: none;
}

.trial-hh-close {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(18, 24, 35, 0.07);
  color: #121823;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.trial-hh-close:hover {
  background: rgba(18, 24, 35, 0.11);
  transform: translateY(-1px);
}

.trial-hh-close:focus-visible,
.trial-hh-primary:focus-visible,
.trial-hh-secondary:focus-visible,
.trial-hh-login button:focus-visible {
  outline: 3px solid rgba(35, 208, 139, 0.34);
  outline-offset: 3px;
}

.trial-hh-main-card,
.trial-hh-result-card,
.trial-hh-info-card {
  border: 1px solid rgba(18, 24, 35, 0.05);
  background: #ffffff;
}

.trial-hh-main-card {
  padding: 26px 74px 22px 26px;
  border-radius: 28px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset;
}

.trial-hh-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  min-width: 0;
}

.trial-hh-mark {
  position: relative;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: #151922;
  overflow: visible;
}

.trial-hh-mark::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -7px;
  height: 14px;
  background: #151922;
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}

.trial-hh-mark span {
  position: absolute;
  top: -7px;
  right: -4px;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background: #22c98c;
  border: 2px solid #ffffff;
}

.trial-hh-kicker,
.trial-hh-date,
.trial-hh-info-label,
.trial-hh-result-row span {
  color: #707989;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.trial-hh-kicker,
.trial-hh-date {
  padding: 8px 10px;
  border-radius: 999px;
  background: #f1f0ec;
}

.trial-hh-date {
  color: #8c94a1;
  background: #f7f6f2;
}

.trial-hh-main-card h2 {
  max-width: 430px;
  margin: 0;
  color: #121823;
  font-size: 38px;
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: 0;
}

.trial-hh-description {
  max-width: 460px;
  margin: 12px 0 0;
  color: #667085;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0;
}

.trial-hh-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
}

.trial-hh-tags span {
  max-width: 100%;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  color: #263243;
  background: #f0f1ed;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.trial-hh-tags span:nth-child(1) {
  background: #e7f0eb;
}

.trial-hh-tags span:nth-child(2) {
  background: #ecf1ff;
}

.trial-hh-tags span:nth-child(3) {
  background: #fff2dc;
}

.trial-hh-tags span:nth-child(4) {
  background: #f0ecfb;
}

.trial-hh-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.trial-hh-info-card {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 24px;
  padding: 18px;
}

.trial-hh-info-card-wide {
  grid-column: 1 / -1;
  min-height: 104px;
  background: #fbfbf8;
}

.trial-hh-info-value {
  margin-top: 10px;
  color: #121823;
  font-size: 34px;
  font-weight: 850;
  line-height: 0.95;
  letter-spacing: 0;
}

.trial-hh-info-text {
  margin-top: 10px;
  color: #5f6878;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0;
}

.trial-hh-info-card-wide .trial-hh-info-text {
  max-width: 480px;
  margin-top: 16px;
  color: #333c4b;
  font-size: 16px;
}

.trial-hh-result-card {
  display: grid;
  gap: 0;
  border-radius: 24px;
  overflow: hidden;
}

.trial-hh-result-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0 18px;
}

.trial-hh-result-row + .trial-hh-result-row {
  border-top: 1px solid rgba(18, 24, 35, 0.06);
}

.trial-hh-result-row strong {
  min-width: 0;
  color: #121823;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.trial-hh-error {
  margin: 0 !important;
  border: 1px solid rgba(176, 39, 30, 0.12);
  border-radius: 22px;
  padding: 12px 14px;
  background: #fff8f5;
  color: #b42318;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: 0;
}

.trial-hh-actions {
  order: 6;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 0 !important;
}

.trial-hh-primary,
.trial-hh-secondary {
  min-height: 52px;
  height: 52px;
  border: 0;
  border-radius: 18px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.trial-hh-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #121823;
  color: #ffffff;
}

.trial-hh-secondary {
  min-width: 118px;
  background: #ffffff;
  color: #121823;
}

.trial-hh-primary:hover,
.trial-hh-secondary:hover {
  transform: translateY(-1px);
}

.trial-hh-primary:disabled,
.trial-hh-secondary:disabled,
.trial-hh-login button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.trial-offer-button-spinner {
  width: 16px;
  height: 16px;
  display: inline-flex;
  color: currentColor;
  animation: spin 850ms linear infinite;
}

.trial-offer-button-spinner[hidden] {
  display: none !important;
}

.trial-offer-button-spinner svg {
  display: block;
  width: 16px;
  height: 16px;
}

.trial-hh-login {
  order: 7;
  color: #707989;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  letter-spacing: 0;
}

.trial-hh-login button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #121823;
  font: inherit;
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.trial-hh-modal[data-state="exhausted"] .trial-hh-primary {
  background: #22a86f;
}

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

@media (max-width: 640px) {
  .trial-offer-overlay.trial-hh-overlay {
    place-items: end stretch;
    padding: 0;
    background: rgba(18, 20, 23, 0.32);
  }

  .trial-offer-modal.trial-hh-modal {
    width: 100% !important;
    max-width: none !important;
    max-height: calc(100dvh - 12px);
    border-radius: 30px 30px 0 0 !important;
    padding: 12px 12px calc(14px + env(safe-area-inset-bottom)) !important;
  }

  .trial-hh-close {
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    font-size: 27px;
  }

  .trial-hh-main-card {
    padding: 22px 66px 20px 20px;
    border-radius: 25px;
  }

  .trial-hh-topline {
    margin-bottom: 20px;
  }

  .trial-hh-date {
    display: none;
  }

  .trial-hh-main-card h2 {
    max-width: 280px;
    font-size: 30px;
    line-height: 1.04;
  }

  .trial-hh-description {
    max-width: 290px;
    font-size: 15px;
    line-height: 1.38;
  }

  .trial-hh-tags {
    margin-top: 16px;
    gap: 7px;
  }

  .trial-hh-tags span {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 13px;
  }

  .trial-hh-grid {
    gap: 8px;
  }

  .trial-hh-info-card {
    min-height: 102px;
    border-radius: 22px;
    padding: 15px;
  }

  .trial-hh-info-card-wide {
    min-height: 92px;
  }

  .trial-hh-info-value {
    font-size: 29px;
  }

  .trial-hh-info-text,
  .trial-hh-info-card-wide .trial-hh-info-text {
    font-size: 14px;
  }

  .trial-hh-result-card {
    border-radius: 22px;
  }

  .trial-hh-result-row {
    min-height: 50px;
    grid-template-columns: 86px minmax(0, 1fr);
    padding: 0 15px;
  }

  .trial-hh-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .trial-hh-primary,
  .trial-hh-secondary {
    width: 100%;
    min-height: 52px;
    height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trial-hh-close,
  .trial-hh-primary,
  .trial-hh-secondary,
  .trial-offer-button-spinner {
    animation: none;
    transition: none;
  }
}

/* Trial offer modal: ProstoParser shell with a mint product card. */
.trial-offer-overlay.trial-pp-overlay[hidden] {
  display: none !important;
}

.trial-offer-overlay.trial-pp-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.34);
  backdrop-filter: blur(10px);
}

.trial-offer-modal.trial-pp-modal {
  position: relative;
  width: min(560px, calc(100vw - 32px)) !important;
  max-width: min(560px, calc(100vw - 32px)) !important;
  max-height: calc(100dvh - 32px);
  display: grid;
  gap: 10px;
  padding: 12px !important;
  border: 0 !important;
  border-radius: 38px !important;
  background: #ffffff !important;
  color: #101014;
  overflow-y: auto;
  box-shadow: 0 34px 90px rgba(17, 24, 39, 0.22), 0 8px 28px rgba(17, 24, 39, 0.12);
  letter-spacing: 0;
}

.trial-offer-modal.trial-pp-modal:focus {
  outline: none;
}

.trial-pp-card {
  min-height: 500px;
  display: flex;
  flex-direction: column;
  border-radius: 32px;
  padding: 38px;
  background: linear-gradient(135deg, #8ae8bf 0%, #73dfaf 100%);
  color: #101014;
}

.trial-pp-close {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #111827;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 150ms ease, transform 150ms ease;
}

.trial-pp-close:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.trial-pp-close:focus-visible,
.trial-pp-primary:focus-visible,
.trial-pp-secondary:focus-visible,
.trial-pp-login button:focus-visible {
  outline: 3px solid rgba(17, 24, 39, 0.22);
  outline-offset: 3px;
}

.trial-pp-top {
  order: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-right: 42px;
}

.trial-pp-meta {
  min-width: 0;
  color: rgba(16, 16, 20, 0.88);
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.trial-pp-arrow {
  flex: 0 0 auto;
  color: rgba(16, 16, 20, 0.72);
  font-size: 40px;
  font-weight: 520;
  line-height: 1;
}

.trial-pp-card h2 {
  order: 1;
  max-width: 390px;
  margin: 92px 0 0;
  color: #050509;
  font-size: 62px;
  font-weight: 850;
  line-height: 0.92;
  letter-spacing: 0;
  text-wrap: balance;
}

.trial-pp-description {
  order: 2;
  max-width: 395px;
  margin: 22px 0 0;
  color: rgba(16, 16, 20, 0.72);
  font-size: 21px;
  font-weight: 650;
  line-height: 1.22;
  letter-spacing: 0;
}

.trial-pp-bottom {
  order: 3;
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.trial-pp-query {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.trial-pp-query-badge {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #111827;
  color: #ffffff;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
}

.trial-pp-query-text {
  min-width: 0;
}

.trial-pp-query-text strong,
.trial-pp-query-text span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0;
}

.trial-pp-query-text strong {
  color: #101014;
  font-size: 21px;
  font-weight: 820;
  line-height: 1.05;
}

.trial-pp-query-text span {
  margin-top: 5px;
  color: rgba(16, 16, 20, 0.62);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.1;
}

.trial-pp-primary {
  min-width: 172px;
  height: 56px;
  min-height: 56px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 18px;
  background: #111827;
  color: #ffffff;
  padding: 0 24px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms ease, opacity 150ms ease, transform 150ms ease;
}

.trial-pp-primary:hover {
  background: #1f2937;
  transform: translateY(-1px);
}

.trial-pp-primary:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.trial-pp-primary .trial-offer-button-spinner {
  width: 16px;
  height: 16px;
  display: inline-flex;
  color: currentColor;
  animation: spin 850ms linear infinite;
}

.trial-pp-primary .trial-offer-button-spinner[hidden] {
  display: none !important;
}

.trial-pp-hidden-tags[hidden] {
  display: none !important;
}

.trial-pp-error {
  margin: 0 !important;
  border: 0;
  border-radius: 18px;
  background: #fff4f2;
  color: #b42318;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0;
}

.trial-pp-secondary {
  width: fit-content;
  min-height: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #667085;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 720;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}

.trial-pp-secondary:hover {
  background: #f5f6f7;
  color: #111827;
}

.trial-pp-login {
  color: #8a8f9c;
  padding: 4px 0 2px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  letter-spacing: 0;
}

.trial-pp-login button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #111827;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.trial-pp-login button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.trial-pp-modal[data-state="exhausted"] .trial-pp-card {
  background: linear-gradient(135deg, #edf2ee 0%, #dde8df 100%);
}

.trial-pp-modal[data-state="exhausted"] .trial-pp-primary {
  background: #22a86f;
}

@media (max-width: 640px) {
  .trial-offer-overlay.trial-pp-overlay {
    place-items: end stretch;
    padding: 0;
    background: rgba(17, 24, 39, 0.32);
  }

  .trial-offer-modal.trial-pp-modal {
    width: 100% !important;
    max-width: none !important;
    max-height: calc(100dvh - 10px);
    border-radius: 34px 34px 0 0 !important;
    padding: 10px 10px calc(12px + env(safe-area-inset-bottom)) !important;
  }

  .trial-pp-card {
    min-height: 460px;
    border-radius: 28px;
    padding: 30px 24px 24px;
  }

  .trial-pp-close {
    top: 22px;
    right: 22px;
    width: 42px;
    height: 42px;
  }

  .trial-pp-top {
    padding-right: 44px;
  }

  .trial-pp-meta {
    font-size: 17px;
  }

  .trial-pp-arrow {
    font-size: 34px;
  }

  .trial-pp-card h2 {
    max-width: 300px;
    margin-top: 76px;
    font-size: 52px;
    line-height: 0.92;
  }

  .trial-pp-description {
    max-width: 310px;
    margin-top: 18px;
    font-size: 18px;
    line-height: 1.24;
  }

  .trial-pp-bottom {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
  }

  .trial-pp-primary {
    width: 100%;
  }

  .trial-pp-query-text strong,
  .trial-pp-query-text span {
    white-space: normal;
  }
}

@media (max-width: 380px) {
  .trial-pp-card {
    min-height: 448px;
    padding: 28px 20px 22px;
  }

  .trial-pp-card h2 {
    max-width: 270px;
    font-size: 46px;
  }

  .trial-pp-description {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trial-pp-close,
  .trial-pp-primary,
  .trial-pp-secondary,
  .trial-pp-primary .trial-offer-button-spinner {
    animation: none;
    transition: none;
  }
}

/* Trial parser semantic pass: one green card, no promo footer. */
.trial-offer-modal.trial-pp-modal {
  width: min(540px, calc(100vw - 32px)) !important;
  max-width: min(540px, calc(100vw - 32px)) !important;
  gap: 0;
  padding: 10px !important;
  border-radius: 36px !important;
  overflow: visible;
}

.trial-pp-card {
  min-height: 420px;
  padding: 34px;
  border-radius: 30px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse 239% 239% at 13% 53%, #00b812 0%, rgba(0, 184, 18, 0.72) 18%, rgba(0, 184, 18, 0.24) 42%, rgba(0, 0, 0, 0.96) 66%, #000000 100%),
    #000000;
  color: #ffffff;
}

.trial-pp-card[data-paper-shader],
.trial-pp-card[data-shader-ready="true"] {
  background: #000000;
}

.trial-pp-card[data-paper-shader] canvas,
.trial-pp-card[data-shader-ready="true"] canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.trial-pp-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.65' numOctaves='5' seed='9' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .46 .46 .46 0 -.08'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(circle at 22% 38%, rgba(255, 255, 255, 0.34) 0 0.55px, transparent 0.72px);
  background-size: 96px 96px, 3px 3px;
  background-repeat: repeat;
  image-rendering: pixelated;
  mix-blend-mode: normal;
  opacity: 0.12;
}

.trial-pp-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 105% 105% at -74% 6%, rgba(0, 184, 18, 0.58) 0%, rgba(0, 184, 18, 0.2) 39%, transparent 66%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.12) 100%);
}

.trial-pp-card[data-paper-shader]::before,
.trial-pp-card[data-paper-shader]::after,
.trial-pp-card[data-shader-ready="true"]::before,
.trial-pp-card[data-shader-ready="true"]::after {
  content: none;
}

.trial-pp-card > * {
  position: relative;
  z-index: 2;
}

.trial-pp-close {
  top: 22px;
  right: 22px;
}

.trial-pp-top {
  display: block;
  padding-right: 48px;
}

.trial-pp-meta {
  color: rgba(255, 255, 255, 0.76);
  font-size: 18px;
  font-weight: 800;
}

.trial-pp-arrow,
.trial-pp-query,
.trial-pp-secondary,
.trial-pp-login {
  display: none !important;
}

.trial-pp-card h2 {
  max-width: min(452px, 100%);
  margin-top: 66px;
  color: #ffffff;
  font-size: 48px;
  font-weight: 850;
  line-height: 0.96;
  letter-spacing: 0;
  text-wrap: balance;
}

.trial-pp-card h2 span {
  display: block;
}

.trial-pp-card h2 span:first-child {
  white-space: nowrap;
}

.trial-pp-description {
  max-width: 420px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.28;
}

.trial-offer-modal.trial-pp-modal #trial-modal-description.trial-pp-description {
  max-width: 420px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.72) !important;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.28;
}

.trial-pp-tags {
  order: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.trial-pp-tags span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.trial-pp-actions {
  order: 4;
  display: grid;
  gap: 14px;
  margin-top: auto;
  padding-top: 24px;
}

.trial-pp-primary {
  width: 100%;
  min-width: 0;
  height: 58px;
  min-height: 58px;
  border-radius: 18px;
  background: #ffffff;
  color: #050509;
  padding: 0 22px;
}

.trial-pp-primary:hover {
  background: #e9fff0;
  color: #050509;
}

.trial-pp-ai-hint {
  display: block;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.76);
  cursor: pointer;
  padding: 14px 16px;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0;
  text-align: left;
  backdrop-filter: blur(14px);
  transition: background 150ms ease, transform 150ms ease;
}

.trial-pp-ai-hint strong,
.trial-pp-ai-hint span {
  display: block;
}

.trial-pp-ai-hint strong {
  color: #ffffff;
  font-weight: 850;
}

.trial-pp-ai-hint span {
  margin-top: 3px;
}

.trial-pp-ai-hint:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.trial-pp-ai-hint:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.trial-pp-ai-hint:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.26);
  outline-offset: 3px;
}

.trial-pp-error {
  margin-top: 10px !important;
}

.trial-ai-highlight {
  animation: trial-ai-highlight 1.6s ease-out;
}

@keyframes trial-ai-highlight {
  0% {
    box-shadow: 0 0 0 0 rgba(35, 208, 139, 0.28);
    transform: translateY(0);
  }
  28% {
    box-shadow: 0 0 0 8px rgba(35, 208, 139, 0.18);
    transform: translateY(-2px);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(35, 208, 139, 0);
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .trial-offer-modal.trial-pp-modal {
    width: 100% !important;
    max-width: none !important;
    max-height: calc(100dvh - 8px);
    border-radius: 30px 30px 0 0 !important;
    padding: 8px 8px calc(10px + env(safe-area-inset-bottom)) !important;
    overflow-y: auto;
  }

  .trial-pp-card {
    min-height: auto;
    padding: 26px 22px 22px;
    border-radius: 26px;
  }

  .trial-pp-close {
    top: 20px;
    right: 20px;
  }

  .trial-pp-meta {
    font-size: 16px;
  }

  .trial-pp-card h2 {
    max-width: 330px;
    margin-top: 52px;
    font-size: 36px;
    line-height: 0.98;
  }

  .trial-pp-description {
    max-width: 320px;
    font-size: 16px;
    line-height: 1.28;
  }

  .trial-offer-modal.trial-pp-modal #trial-modal-description.trial-pp-description {
    max-width: 320px;
    font-size: 16px;
    line-height: 1.28;
  }

  .trial-pp-tags {
    margin-top: 20px;
    gap: 7px;
  }

  .trial-pp-tags span {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 13px;
  }

  .trial-pp-actions {
    gap: 12px;
    padding-top: 22px;
  }

  .trial-pp-primary {
    height: 56px;
    min-height: 56px;
    font-size: 16px;
  }

  .trial-pp-ai-hint {
    border-radius: 18px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trial-pp-ai-hint,
  .trial-ai-highlight {
    animation: none;
    transition: none;
  }
}

/* Payment modal uses the same visual surface as the 10-lead trial modal. */
.pp-payment-overlay {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 24px 72px 24px 24px;
  background: rgba(8, 10, 14, 0.64);
  backdrop-filter: blur(10px);
}

.pp-payment-overlay[hidden] {
  display: none !important;
}

.pp-payment-modal {
  position: relative;
  isolation: isolate;
  --pp-payment-bg-height: 100%;
  width: min(560px, calc(100vw - 32px));
  max-width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow: hidden auto;
  border: 0;
  border-radius: 34px;
  background:
    radial-gradient(ellipse 239% 239% at 13% 53%, #00b812 0%, rgba(0, 184, 18, 0.72) 18%, rgba(0, 184, 18, 0.24) 42%, rgba(0, 0, 0, 0.96) 66%, #000000 100%),
    #000000;
  color: #ffffff;
  padding: 30px;
  box-shadow:
    0 44px 120px rgba(0, 0, 0, 0.48),
    0 14px 42px rgba(0, 0, 0, 0.34);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.26) transparent;
}

.pp-payment-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  height: var(--pp-payment-bg-height);
  min-height: 100%;
  z-index: 1;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.65' numOctaves='5' seed='9' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .46 .46 .46 0 -.08'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(circle at 22% 38%, rgba(255, 255, 255, 0.34) 0 0.55px, transparent 0.72px);
  background-size: 96px 96px, 3px 3px;
  background-repeat: repeat;
  image-rendering: pixelated;
  mix-blend-mode: normal;
  opacity: 0.12;
}

.pp-payment-modal::after {
  content: "";
  position: absolute;
  inset: 0;
  height: var(--pp-payment-bg-height);
  min-height: 100%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 105% 105% at -74% 6%, rgba(0, 184, 18, 0.58) 0%, rgba(0, 184, 18, 0.2) 39%, transparent 66%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.12) 100%);
}

.pp-payment-modal > * {
  position: relative;
  z-index: 2;
}

.pp-payment-modal:focus {
  outline: none;
}

.pp-payment-close {
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86);
}

.pp-payment-close:hover,
.pp-payment-close:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.pp-payment-header {
  justify-content: center;
  padding: 10px 54px 0;
}

.pp-payment-brand {
  color: #ffffff;
}

.pp-payment-brand-mark path {
  fill: #f8fff9;
}

.pp-payment-brand-mark circle {
  fill: #23d08b;
}

.pp-payment-brand span:not(.pp-payment-brand-mark) {
  color: #ffffff;
  font-size: 24px;
  line-height: 0.86;
}

.pp-payment-badge {
  min-height: 34px;
  margin: 0 auto 14px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
}

.pp-payment-hero {
  margin-top: 26px;
  text-align: center;
}

.pp-payment-hero h2 {
  max-width: 430px;
  color: #ffffff;
  font-size: 42px;
  font-weight: 860;
  letter-spacing: 0;
  line-height: 0.98;
}

.pp-payment-hero p {
  max-width: 390px;
  margin-top: 13px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.28;
}

.pp-payment-compare {
  margin-top: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
}

.pp-payment-compare h3 {
  margin: 0;
  padding: 18px 18px 4px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1.1;
}

.pp-pay-table {
  width: 100%;
}

.pp-payment-compare__head,
.pp-payment-compare__row {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) repeat(3, minmax(54px, 0.72fr));
  align-items: center;
  gap: 8px;
}

.pp-payment-compare__head {
  min-height: 42px;
  padding: 0 16px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 760;
  line-height: 1;
}

.pp-payment-compare__head span:not(:first-child) {
  text-align: center;
}

.pp-payment-compare__row {
  min-height: 50px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 16px;
  font-size: 13px;
  line-height: 1.22;
}

.pp-payment-compare__row span {
  color: rgba(255, 255, 255, 0.74);
  font-weight: 680;
}

.pp-payment-compare__row strong {
  color: #ffffff;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  font-weight: 820;
  line-height: 1.18;
  text-align: center;
  text-wrap: balance;
}

.pp-payment-plans {
  display: none !important;
}

.pp-pay-packages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.pp-pay-package {
  display: grid;
  min-width: 0;
  min-height: 86px;
  align-content: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
  padding: 14px 16px;
  text-align: left;
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.pp-pay-package:hover,
.pp-pay-package:focus-visible {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.16);
  outline: none;
  transform: translateY(-1px);
}

.pp-pay-package.is-selected {
  border-color: rgba(35, 208, 139, 0.72);
  background: rgba(35, 208, 139, 0.18);
}

.pp-pay-package span,
.pp-pay-package strong,
.pp-pay-package em {
  display: block;
  min-width: 0;
}

.pp-pay-package span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 720;
  line-height: 1;
}

.pp-pay-package strong {
  color: #ffffff;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  font-weight: 860;
  letter-spacing: 0;
  line-height: 1;
}

.pp-pay-package em {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-style: normal;
  font-weight: 680;
  line-height: 1;
}

.pp-pay-selected {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  margin-top: 16px;
  border-radius: 22px;
  background: #ffffff;
  color: #111827;
  padding: 16px 18px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
}

.pp-pay-selected__check {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #23d08b;
}

.pp-pay-selected__check img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.pp-pay-selected__body strong,
.pp-pay-selected__body span {
  display: block;
}

.pp-pay-selected__body strong {
  color: #111827;
  font-size: 18px;
  font-weight: 860;
  letter-spacing: 0;
  line-height: 1.1;
}

.pp-pay-selected__body span {
  margin-top: 5px;
  color: rgba(17, 24, 39, 0.62);
  font-size: 13px;
  font-weight: 720;
  line-height: 1;
}

.pp-pay-selected__price {
  color: #111827;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  font-weight: 880;
  line-height: 1;
  white-space: nowrap;
}

.pp-payment-primary {
  width: 100%;
  height: 58px;
  margin-top: 16px;
  border: 0;
  border-radius: 18px;
  background: #ffffff;
  color: #050509;
  font-size: 17px;
  font-weight: 850;
}

.pp-payment-primary:hover,
.pp-payment-primary:focus-visible {
  background: #e9fff0;
  color: #050509;
}

.pp-payment-primary:disabled {
  background: rgba(255, 255, 255, 0.72);
  color: rgba(5, 5, 9, 0.62);
}

.pp-pay-volume {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.84);
  cursor: pointer;
  padding: 0 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.15;
  text-align: center;
  backdrop-filter: blur(14px);
  transition: background-color 150ms ease, transform 150ms ease, color 150ms ease;
}

.pp-pay-volume:hover,
.pp-pay-volume:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  outline: none;
  transform: translateY(-1px);
}

.pp-payment-error:empty {
  display: none !important;
}

.pp-payment-error {
  margin-top: 12px !important;
  color: rgba(255, 255, 255, 0.78) !important;
}

.pp-payment-error[data-state="success"] {
  color: #bdf8dc !important;
}

.pp-payment-error[data-state="error"] {
  color: #ffd2d2 !important;
}

.pp-payment-note {
  max-width: 430px;
  margin-top: 14px !important;
  color: rgba(255, 255, 255, 0.66) !important;
  font-size: 13px !important;
  font-weight: 680;
  line-height: 1.35 !important;
}

.pp-payment-legal {
  max-width: 440px;
  margin-top: 9px !important;
  color: rgba(255, 255, 255, 0.42) !important;
  font-size: 12px !important;
  font-weight: 560;
  line-height: 1.35 !important;
}

.pp-payment-legal a {
  color: rgba(255, 255, 255, 0.76);
}

@media (max-width: 980px) {
  .pp-payment-overlay {
    justify-content: center;
    padding-right: 24px;
  }
}

@media (max-width: 640px) {
  .pp-payment-overlay {
    align-items: flex-end;
    justify-content: center;
    padding: 8px 8px 0;
  }

  .pp-payment-modal {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 8px);
    border-radius: 30px 30px 0 0;
    padding: 24px 20px calc(18px + env(safe-area-inset-bottom));
  }

  .pp-payment-close {
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
  }

  .pp-payment-header {
    padding: 4px 48px 0;
  }

  .pp-payment-brand span:not(.pp-payment-brand-mark) {
    font-size: 22px;
  }

  .pp-payment-hero {
    margin-top: 24px;
  }

  .pp-payment-hero h2 {
    max-width: 330px;
    font-size: 36px;
    line-height: 0.98;
  }

  .pp-payment-hero p {
    max-width: 320px;
    font-size: 16px;
  }

  .pp-payment-compare {
    margin-top: 22px;
    border-radius: 22px;
  }

  .pp-payment-compare h3 {
    padding: 16px 14px 2px;
  }

  .pp-payment-compare__head,
  .pp-payment-compare__row {
    grid-template-columns: minmax(0, 0.96fr) repeat(3, minmax(44px, 0.68fr));
    gap: 5px;
  }

  .pp-payment-compare__head,
  .pp-payment-compare__row {
    padding-right: 12px;
    padding-left: 12px;
  }

  .pp-payment-compare__row {
    min-height: 48px;
    font-size: 12px;
  }

  .pp-payment-compare__row strong {
    font-size: 11px;
  }

  .pp-pay-selected {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 70px;
    border-radius: 20px;
    padding: 14px;
  }

  .pp-pay-selected__check {
    width: 28px;
    height: 28px;
  }

  .pp-pay-selected__check img {
    width: 24px;
    height: 24px;
  }

  .pp-pay-selected__body strong {
    font-size: 16px;
  }

  .pp-pay-selected__price {
    font-size: 20px;
  }

  .pp-payment-primary {
    height: 56px;
    font-size: 16px;
  }

  .pp-pay-packages {
    gap: 8px;
  }

  .pp-pay-package {
    min-height: 78px;
    border-radius: 18px;
    padding: 12px 13px;
  }

  .pp-pay-package strong {
    font-size: 21px;
  }

  .pp-pay-volume {
    min-height: 48px;
    font-size: 14px;
  }
}

@media (min-width: 901px) and (max-width: 1400px) {
  .app-header-inner {
    gap: 24px;
  }

  .main-nav {
    gap: 20px;
  }

  .profile-button:not(.is-login-button) {
    max-width: 184px;
    justify-content: flex-start;
    overflow: hidden;
  }

  .profile-button:not(.is-login-button) > span:not(.profile-avatar) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .usage-button {
    padding-right: 14px;
    padding-left: 14px;
  }
}

.pp-payment-modal {
  width: min(540px, calc(100vw - 32px));
  max-width: min(540px, calc(100vw - 32px));
  padding: 24px;
}

.pp-payment-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.pp-payment-header {
  padding-top: 8px;
}

.pp-payment-badge {
  min-height: 30px;
  margin-bottom: 10px;
  padding: 0 11px;
  font-size: 12px;
}

.pp-payment-hero {
  margin-top: 20px;
}

.pp-payment-hero h2 {
  font-size: 36px;
  line-height: 0.98;
}

.pp-payment-hero p {
  max-width: 360px;
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.25;
}

.pp-payment-compare {
  margin-top: 20px;
  border-radius: 22px;
}

.pp-payment-compare h3 {
  padding: 16px 16px 2px;
  font-size: 14px;
}

.pp-payment-compare__head,
.pp-payment-compare__row {
  grid-template-columns: minmax(0, 0.84fr) repeat(3, minmax(76px, 1fr));
  gap: 7px;
  padding-right: 14px;
  padding-left: 14px;
}

.pp-payment-compare__head {
  min-height: 36px;
}

.pp-payment-compare__row {
  min-height: 42px;
  font-size: 12px;
}

.pp-payment-compare__row strong {
  font-size: 11.5px;
  line-height: 1.12;
}

.pp-pay-selected {
  min-height: 68px;
  margin-top: 12px;
  border-radius: 20px;
  padding: 13px 16px;
}

.pp-payment-primary {
  height: 54px;
  margin-top: 12px;
}

.pp-pay-volume {
  min-height: 46px;
  margin-top: 8px;
}

.pp-payment-modal[data-paper-shader],
.pp-payment-modal[data-shader-ready="true"] {
  background: #000000;
}

.pp-payment-modal {
  max-height: calc(100dvh - 24px);
}

.pp-payment-modal[data-paper-shader] canvas,
.pp-payment-modal[data-shader-ready="true"] canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: var(--pp-payment-bg-height);
  min-height: 100%;
  border-radius: inherit;
}

.pp-payment-modal[data-paper-shader]::before,
.pp-payment-modal[data-paper-shader]::after,
.pp-payment-modal[data-shader-ready="true"]::before,
.pp-payment-modal[data-shader-ready="true"]::after {
  content: none;
}

@media (max-width: 640px) {
  .pp-payment-modal {
    max-height: calc(100dvh - 8px);
  }
}

/* Checkout receipt pass: direct package purchase, no tariff comparison table. */
.pp-payment-compare {
  display: none !important;
}

.pp-pay-after {
  margin-top: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.075));
  color: #ffffff;
  padding: 22px;
  backdrop-filter: blur(18px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 14px 38px rgba(0, 0, 0, 0.16);
}

.pp-pay-after__label {
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1;
}

.pp-pay-after__main {
  margin-top: 15px;
  color: #ffffff;
  font-size: 42px;
  font-variant-numeric: tabular-nums;
  font-weight: 860;
  letter-spacing: 0;
  line-height: 0.96;
}

.pp-pay-after p {
  max-width: 420px;
  margin: 13px 0 0 !important;
  color: rgba(255, 255, 255, 0.72) !important;
  font-size: 15px !important;
  font-weight: 620;
  line-height: 1.34 !important;
}

.pp-pay-balance {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.pp-pay-balance div,
.pp-pay-after__note {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.pp-pay-balance div {
  min-width: 0;
  padding: 13px 14px;
}

.pp-pay-balance span {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 720;
  line-height: 1;
}

.pp-pay-balance strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
  font-weight: 840;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.pp-pay-after__note {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.74);
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
}

.pp-pay-after + .pp-pay-selected {
  margin-top: 14px;
}

@media (max-width: 640px) {
  .pp-pay-after {
    margin-top: 18px;
    border-radius: 22px;
    padding: 18px;
  }

  .pp-pay-after__main {
    margin-top: 13px;
    font-size: 36px;
  }

  .pp-pay-after p {
    font-size: 14px !important;
  }

  .pp-pay-balance {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 16px;
  }

  .pp-pay-balance div {
    padding: 12px 13px;
  }

  .pp-pay-balance strong {
    font-size: 17px;
  }
}

/* Keep checkout controls above the shader/header layers. */
.pp-payment-overlay {
  z-index: 2600;
}

.pp-payment-modal[data-paper-shader] canvas,
.pp-payment-modal[data-shader-ready="true"] canvas {
  pointer-events: none;
}

.pp-payment-modal .pp-payment-close {
  z-index: 20;
  pointer-events: auto;
}

/* Action card descriptions hot patch 20260708-action-font-1 */
.action-card .action-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: var(--text-main);
}

.action-card .action-copy strong {
  display: block;
  color: var(--text-main);
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
}

.action-card .action-copy small {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-wrap: pretty;
}

@media (max-width: 767px) {
  .action-card .action-copy strong {
    font-size: 15px;
    line-height: 19px;
  }

  .action-card .action-copy small {
    font-size: 13px;
    line-height: 18px;
  }
}

/* Hide quick niche presets hot patch 20260708-hide-quick-niches-1 */
.quick-categories {
  display: none !important;
}

.logo-chip-row,
.source-logo-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  vertical-align: middle;
}

.logo-chip-row {
  gap: 6px;
}

.provider-logo,
.social-logo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: 0;
  overflow: hidden;
  text-transform: uppercase;
}

.provider-logo img,
.social-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.provider-logo {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1;
}

.provider-logo--yandex {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.provider-logo--yandex img {
  width: 84%;
  height: 84%;
  object-fit: contain;
}

.provider-logo--twogis,
.provider-logo--google,
.provider-logo--maps {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.provider-logo--web {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  color: #111827;
  font-size: 9px;
}

.provider-logo--web img {
  width: 86%;
  height: 86%;
  object-fit: contain;
}

.provider-logo--hh,
.provider-logo--seed,
.provider-logo--source {
  background: #667085;
  font-size: 9px;
}

.social-logo {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  font-size: 9px;
  line-height: 1;
}

.social-logo--telegram,
.social-logo--instagram,
.social-logo--vk,
.social-logo--whatsapp {
  background: transparent;
}

.social-logo--facebook,
.social-logo--link {
  background: #475467;
}

.provider-chip {
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
  height: 28px;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: #f4f6f5;
  color: var(--text-main);
  padding: 3px 9px 3px 4px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.provider-chip .provider-logo {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  font-size: 8px;
}

.source-option {
  grid-template-columns: 28px 38px minmax(0, 1fr);
}

.source-option .provider-logo {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  justify-self: center;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.source-option .provider-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.source-option .provider-logo--twogis img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.source-option .provider-logo--yandex img {
  width: 28px;
  height: 36px;
}

.source-option .provider-logo--google img,
.source-option .provider-logo--maps img {
  width: 31px;
  height: 36px;
}

.source-name .provider-logo,
.source-badge .provider-logo,
.reputation-cell .source .provider-logo,
.run-source .provider-logo,
.social-chip .social-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.source-name,
.source-badge,
.reputation-cell .source,
.run-source > span,
.run-source > a {
  display: inline-flex !important;
  min-width: 0;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  border-radius: 999px;
  background: #f4f6f5;
  padding: 3px 9px 3px 4px;
  color: var(--text-main) !important;
  font-weight: 700;
}

a.source-name,
a.source-badge,
.reputation-cell a.source,
.run-source > a {
  cursor: pointer;
  text-decoration: none;
  transition:
    background 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

a.source-name:hover,
a.source-badge:hover,
.reputation-cell a.source:hover,
.run-source > a:hover,
a.source-name:focus-visible,
a.source-badge:focus-visible,
.reputation-cell a.source:focus-visible,
.run-source > a:focus-visible {
  outline: none;
  background: #e9efec;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

a.source-name:focus-visible,
a.source-badge:focus-visible,
.reputation-cell a.source:focus-visible,
.run-source > a:focus-visible {
  outline: 3px solid rgba(34, 197, 94, 0.22);
  outline-offset: 2px;
}

.source-name > span:last-child,
.source-badge > span:last-child,
.reputation-cell .source > span:last-child,
.run-source > span > span:last-child,
.run-source > a > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-chip {
  gap: 5px;
  padding-left: 4px !important;
}

.social-chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-chip .social-logo {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  font-size: 7px;
}

body:not([data-settings-expanded="true"]) .mobile-launch-bar {
  display: none !important;
}

@media (max-width: 767px) {
  body[data-page="settings"][data-launch-mode="direct"] .mobile-launch-bar:not([hidden]) {
    display: flex !important;
  }

  body[data-page="settings"][data-launch-mode="ai"] .mobile-launch-bar {
    display: none !important;
  }

  .source-option {
    grid-template-columns: 28px 30px minmax(0, 1fr);
  }
}

/* Runs dropdown compact redesign: quick recent runs menu, not a modal surface. */
.history-menu.nav-history .history-popover.runs-dropdown {
  position: fixed;
  top: var(--runs-popover-top, 76px);
  left: var(--runs-popover-left, 24px);
  right: auto;
  bottom: auto;
  z-index: 420;
  width: var(--runs-popover-width, 520px);
  max-width: calc(100vw - 24px);
  max-height: min(68vh, 600px, calc(100dvh - var(--runs-popover-top, 76px) - 20px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  background: #ffffff;
  box-shadow:
    0 18px 56px rgba(15, 23, 42, 0.12),
    0 6px 18px rgba(15, 23, 42, 0.07);
  transform: none;
}

.history-menu.nav-history .history-popover.runs-dropdown[hidden] {
  display: none !important;
}

.history-menu.nav-history .runs-dropdown-header {
  padding: 16px 20px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.history-menu.nav-history .runs-dropdown-header h3 {
  margin: 0;
  color: #0f172a;
  font-size: 19px;
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.history-menu.nav-history .runs-count {
  min-width: 42px;
  height: 30px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 999px;
  background: #f4f5f3;
  color: #667085;
  font-size: 14px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.history-menu.nav-history .runs-dropdown-search {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.history-menu.nav-history .runs-dropdown-search[hidden],
.history-menu.nav-history .runs-dropdown-footer[hidden] {
  display: none;
}

.history-menu.nav-history .runs-dropdown-search input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 13px;
  outline: none;
  background: #f4f5f3;
  color: #0f172a;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  transition-property: background-color, border-color, box-shadow;
  transition-duration: 160ms;
  transition-timing-function: ease-out;
}

.history-menu.nav-history .runs-dropdown-search input::placeholder {
  color: #98a2b3;
}

.history-menu.nav-history .runs-dropdown-search input:focus {
  border-color: rgba(15, 23, 42, 0.12);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(35, 208, 139, 0.08);
}

.history-menu.nav-history .history-popover.runs-dropdown .runs-list {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding: 8px 10px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.18) transparent;
}

.history-menu.nav-history .run-group + .run-group {
  margin-top: 2px;
}

.history-menu.nav-history .run-group-label {
  padding: 8px 6px 5px;
  color: #8a94a6;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.history-menu.nav-history .history-popover.runs-dropdown .run-item {
  position: relative;
  min-height: 64px;
  padding: 10px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition-property: background-color, border-color;
  transition-duration: 160ms;
  transition-timing-function: ease-out;
}

.history-menu.nav-history .history-popover.runs-dropdown .run-item:hover,
.history-menu.nav-history .history-popover.runs-dropdown .run-item:focus-visible {
  border-color: rgba(15, 23, 42, 0.06);
  outline: none;
  background: #f7f8f6;
}

.history-menu.nav-history .history-popover.runs-dropdown .run-item.is-active,
.history-menu.nav-history .history-popover.runs-dropdown .run-item.is-latest {
  border-color: rgba(15, 23, 42, 0.06);
  background: #f7f8f6;
}

.history-menu.nav-history .history-popover.runs-dropdown .run-item.is-latest {
  min-height: 70px;
}

.history-menu.nav-history .run-item-main {
  min-width: 0;
  flex: 1 1 auto;
}

.history-menu.nav-history .run-item-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.history-menu.nav-history .history-popover.runs-dropdown .run-title {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-menu.nav-history .history-popover.runs-dropdown .run-meta {
  margin-top: 5px;
  display: block;
  overflow: hidden;
  color: #667085;
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-menu.nav-history .history-popover.runs-dropdown .run-meta span {
  display: inline;
}

.history-menu.nav-history .run-meta-separator {
  color: #aab3c1;
}

.history-menu.nav-history .history-popover.runs-dropdown .run-actions {
  position: relative;
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.history-menu.nav-history .run-action-button,
.history-menu.nav-history .run-action-more {
  border: 0;
  border-radius: 999px;
  background: #f0f1ef;
  color: #0f172a;
  cursor: pointer;
  font-weight: 650;
  transition-property: background-color, color, scale;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.history-menu.nav-history .run-action-button {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.history-menu.nav-history .run-action-more {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #667085;
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
}

.history-menu.nav-history .run-action-button:hover,
.history-menu.nav-history .run-action-more:hover,
.history-menu.nav-history .run-action-button:focus-visible,
.history-menu.nav-history .run-action-more:focus-visible {
  outline: none;
  background: #e7e9e5;
  color: #0f172a;
}

.history-menu.nav-history .run-action-button:active,
.history-menu.nav-history .run-action-more:active,
.history-menu.nav-history .runs-footer-button:active {
  scale: 0.96;
}

.history-menu.nav-history .run-action-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 2;
  width: 206px;
  padding: 6px;
  display: grid;
  gap: 2px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #ffffff;
  box-shadow:
    0 18px 48px rgba(15, 23, 42, 0.14),
    0 6px 18px rgba(15, 23, 42, 0.08);
}

.history-menu.nav-history .run-action-menu button,
.history-menu.nav-history .run-action-menu a {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #0f172a;
  cursor: pointer;
  font-size: 14px;
  line-height: 18px;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
  transition-property: background-color, color;
  transition-duration: 140ms;
  transition-timing-function: ease-out;
}

.history-menu.nav-history .run-action-menu button:hover,
.history-menu.nav-history .run-action-menu a:hover,
.history-menu.nav-history .run-action-menu button:focus-visible,
.history-menu.nav-history .run-action-menu a:focus-visible {
  outline: none;
  background: #f4f5f3;
}

.history-menu.nav-history .run-action-menu .is-disabled,
.history-menu.nav-history .run-action-menu .is-disabled:hover {
  background: transparent;
  color: #a3acba;
  cursor: not-allowed;
}

.history-menu.nav-history .run-status {
  height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
  font-weight: 750;
  white-space: nowrap;
}

.history-menu.nav-history .run-status--ready {
  background: rgba(34, 197, 94, 0.10);
  color: #159455;
}

.history-menu.nav-history .run-status--running {
  background: rgba(59, 130, 246, 0.10);
  color: #2563eb;
}

.history-menu.nav-history .run-status--error {
  background: rgba(239, 68, 68, 0.10);
  color: #dc2626;
}

.history-menu.nav-history .run-status--pending,
.history-menu.nav-history .run-status--stopped {
  background: #f4f5f3;
  color: #667085;
}

.history-menu.nav-history .history-popover.runs-dropdown .runs-dropdown-footer {
  position: static;
  bottom: auto;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  background: #ffffff;
}

.history-menu.nav-history .runs-footer-button {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  cursor: pointer;
  font-size: 14px;
  line-height: 20px;
  font-weight: 750;
  text-decoration: none;
  transition-property: background-color, color, scale, opacity;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.history-menu.nav-history .runs-footer-button--primary {
  border: 0;
  background: #0f172a;
  color: #ffffff;
}

.history-menu.nav-history .runs-footer-button--primary:hover,
.history-menu.nav-history .runs-footer-button--primary:focus-visible {
  outline: none;
  background: #111827;
}

.history-menu.nav-history .runs-footer-button--secondary {
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #f4f5f3;
  color: #0f172a;
}

.history-menu.nav-history .runs-footer-button--secondary:hover,
.history-menu.nav-history .runs-footer-button--secondary:focus-visible {
  outline: none;
  background: #e9ebe7;
}

.history-menu.nav-history .runs-footer-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.history-menu.nav-history .runs-empty {
  min-height: 142px;
  padding: 36px 24px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.history-menu.nav-history .runs-empty h4 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  line-height: 22px;
  font-weight: 750;
}

.history-menu.nav-history .runs-empty p {
  max-width: 320px;
  margin: 6px auto 0;
  color: #667085;
  font-size: 14px;
  line-height: 20px;
}

.history-menu.nav-history .runs-empty a {
  height: 40px;
  margin-top: 14px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.history-menu.nav-history .runs-loading {
  padding: 8px 0;
  display: grid;
  gap: 6px;
}

.history-menu.nav-history .runs-skeleton-row {
  height: 62px;
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 9px;
  border-radius: 14px;
  background: #f4f5f3;
}

.history-menu.nav-history .runs-skeleton-row span {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #edf0ec 0%, #f7f8f6 45%, #edf0ec 100%);
}

.history-menu.nav-history .runs-skeleton-row span:first-child {
  width: 68%;
}

.history-menu.nav-history .runs-skeleton-row span:last-child {
  width: 46%;
}

@media (max-width: 720px) {
  .main-nav:has(#history-popover:not([hidden])) {
    position: fixed;
    inset: 0;
    z-index: 430;
    display: block;
    width: 0;
    height: 0;
    overflow: visible;
    pointer-events: none;
  }

  .main-nav:has(#history-popover:not([hidden])) > * {
    display: none;
  }

  .main-nav:has(#history-popover:not([hidden])) .history-menu.nav-history {
    display: block;
    pointer-events: auto;
  }

  .main-nav:has(#history-popover:not([hidden])) .history-toggle {
    display: none;
  }

  .history-menu.nav-history .history-popover.runs-dropdown {
    width: calc(100vw - 24px);
    max-width: none;
    max-height: calc(100dvh - var(--runs-popover-top, 72px) - 18px);
    border-radius: 18px;
    pointer-events: auto;
  }

  .history-menu.nav-history .history-popover.runs-dropdown .runs-list {
    padding: 8px;
  }

  .history-menu.nav-history .history-popover.runs-dropdown .run-item {
    align-items: flex-start;
    gap: 10px;
  }

  .history-menu.nav-history .history-popover.runs-dropdown .run-title,
  .history-menu.nav-history .history-popover.runs-dropdown .run-meta {
    max-width: none;
  }

  .history-menu.nav-history .run-action-button {
    display: none;
  }

  .history-menu.nav-history .run-actions {
    align-self: center;
  }

  .history-menu.nav-history .run-action-menu {
    right: 0;
  }

  .history-menu.nav-history .runs-dropdown-footer {
    grid-template-columns: 1fr;
  }
}

/* Lead top-up checkout: one-time balance purchase, not SaaS pricing. */
.pp-payment-overlay {
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
  background: rgba(5, 10, 20, 0.48) !important;
  backdrop-filter: blur(3px);
}

.pp-payment-modal {
  width: min(980px, calc(100vw - 40px)) !important;
  max-width: 980px !important;
  max-height: calc(100dvh - 48px) !important;
  overflow: auto;
  border: 1px solid #e3e7ed !important;
  border-radius: 28px !important;
  background: #f7f8f6 !important;
  color: #111827 !important;
  padding: 30px !important;
  box-shadow: 0 28px 80px rgba(17, 24, 39, 0.22) !important;
  scrollbar-width: thin;
  scrollbar-color: #c8d0dc transparent;
}

.pp-payment-modal::before,
.pp-payment-modal::after,
.pp-payment-modal canvas {
  content: none !important;
  display: none !important;
}

.pp-payment-modal > * {
  position: relative;
  z-index: 1;
}

.pp-payment-header {
  display: none !important;
}

.pp-payment-close {
  position: absolute !important;
  top: 18px !important;
  right: 18px !important;
  left: auto !important;
  width: 38px !important;
  height: 38px !important;
  border: 1px solid #e3e7ed !important;
  background: #ffffff !important;
  color: #667085 !important;
  font-size: 24px !important;
  box-shadow: none !important;
}

.pp-payment-close:hover,
.pp-payment-close:focus-visible {
  background: #111827 !important;
  color: #ffffff !important;
}

.pp-payment-hero {
  margin: 0 !important;
  padding-right: 48px;
  text-align: left !important;
}

.pp-payment-badge {
  min-height: 28px !important;
  margin: 0 0 12px !important;
  border: 1px solid #cfeedd;
  background: #eaf8f0 !important;
  color: #138a4d !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  font-weight: 780 !important;
  backdrop-filter: none !important;
}

.pp-payment-hero h2 {
  max-width: none !important;
  margin: 0 !important;
  color: #111827 !important;
  font-size: 32px !important;
  font-weight: 860 !important;
  letter-spacing: 0 !important;
  line-height: 1.04 !important;
}

.pp-payment-hero p {
  max-width: 720px !important;
  margin: 10px 0 0 !important;
  color: #667085 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.42 !important;
}

.pp-pay-after {
  margin-top: 22px !important;
  border: 1px solid #e3e7ed !important;
  border-radius: 20px !important;
  background: #ffffff !important;
  color: #111827 !important;
  padding: 16px !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.pp-pay-balance {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  align-items: center;
  gap: 12px !important;
  margin: 0 !important;
}

.pp-pay-balance__item,
.pp-pay-balance div {
  min-width: 0;
  border: 0 !important;
  border-radius: 16px !important;
  background: #f1f3f1 !important;
  padding: 14px 16px !important;
  box-shadow: none !important;
}

.pp-pay-balance__item--after {
  background: #eaf8f0 !important;
}

.pp-pay-balance span {
  display: block;
  color: #667085 !important;
  font-size: 12px !important;
  font-weight: 760 !important;
  line-height: 1 !important;
}

.pp-pay-balance strong {
  display: block;
  margin-top: 8px !important;
  color: #111827 !important;
  font-size: 21px !important;
  font-variant-numeric: tabular-nums;
  font-weight: 860 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  white-space: nowrap;
}

.pp-pay-balance__arrow {
  color: #98a2b3 !important;
  font-size: 20px !important;
  font-weight: 800 !important;
}

.pp-pay-packages {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-top: 14px !important;
}

.pp-pay-package {
  display: grid !important;
  min-width: 0;
  min-height: 286px !important;
  align-content: stretch !important;
  gap: 0 !important;
  border: 1px solid #e3e7ed !important;
  border-radius: 22px !important;
  background: #ffffff !important;
  color: #111827 !important;
  cursor: pointer;
  padding: 18px !important;
  text-align: left !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  transition: border-color 150ms ease, transform 150ms ease, background-color 150ms ease;
}

.pp-pay-package:hover,
.pp-pay-package:focus-visible {
  border-color: #23d08b !important;
  background: #ffffff !important;
  outline: none !important;
  transform: translateY(-2px);
}

.pp-pay-package:active {
  transform: translateY(0);
}

.pp-pay-package.is-selected {
  border-color: #23d08b !important;
  box-shadow: 0 0 0 2px rgba(35, 208, 139, 0.16) !important;
}

.pp-pay-package--optimal {
  border-color: #cfebdc !important;
  background: #eaf8f0 !important;
}

.pp-pay-package--optimal:hover,
.pp-pay-package--optimal:focus-visible {
  background: #eaf8f0 !important;
}

.pp-pay-package--best {
  border-color: #111827 !important;
  background: #111827 !important;
  color: #ffffff !important;
}

.pp-pay-package--best:hover,
.pp-pay-package--best:focus-visible,
.pp-pay-package--best.is-selected {
  border-color: #23d08b !important;
  background: #111827 !important;
}

.pp-pay-package span,
.pp-pay-package strong,
.pp-pay-package em {
  display: block;
  min-width: 0;
}

.pp-pay-package__badge {
  width: fit-content;
  min-height: 26px;
  border-radius: 999px;
  background: #f1f3f1;
  color: #667085 !important;
  padding: 0 10px;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 26px !important;
}

.pp-pay-package--optimal .pp-pay-package__badge,
.pp-pay-package--best .pp-pay-package__badge {
  background: #23d08b;
  color: #082114 !important;
}

.pp-pay-package__title {
  margin-top: 18px;
  color: currentColor !important;
  font-size: 18px !important;
  font-weight: 820 !important;
  line-height: 1.1 !important;
}

.pp-pay-package__leads {
  margin-top: 18px;
  color: currentColor !important;
  font-size: 32px !important;
  font-variant-numeric: tabular-nums;
  font-weight: 880 !important;
  letter-spacing: 0 !important;
  line-height: 0.98 !important;
}

.pp-pay-package__price {
  margin-top: 6px;
  color: currentColor !important;
  font-size: 22px !important;
  font-variant-numeric: tabular-nums;
  font-weight: 840 !important;
  line-height: 1 !important;
}

.pp-pay-package__unit,
.pp-pay-package__description {
  color: #667085 !important;
  font-size: 13px !important;
  font-style: normal !important;
  font-weight: 680 !important;
  line-height: 1.35 !important;
}

.pp-pay-package__unit {
  margin-top: 10px;
}

.pp-pay-package__description {
  min-height: 36px;
  margin-top: 14px;
}

.pp-pay-package--best .pp-pay-package__unit,
.pp-pay-package--best .pp-pay-package__description {
  color: rgba(255, 255, 255, 0.72) !important;
}

.pp-pay-package__cta {
  display: inline-flex !important;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  align-self: end;
  margin-top: 18px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff !important;
  padding: 0 16px;
  font-size: 14px !important;
  font-weight: 820 !important;
  line-height: 1 !important;
  text-align: center;
}

.pp-pay-package--best .pp-pay-package__cta {
  background: #ffffff;
  color: #111827 !important;
}

.pp-pay-package:disabled,
.pp-pay-volume:disabled {
  cursor: wait;
  opacity: 0.64;
  transform: none !important;
}

.pp-payment-modal.is-payment-loading .pp-pay-package__cta {
  opacity: 0.72;
}

.pp-pay-volume {
  display: inline-flex !important;
  width: auto !important;
  min-height: auto !important;
  align-items: center;
  justify-content: flex-start;
  margin-top: 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #118444 !important;
  cursor: pointer;
  padding: 0 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-align: left !important;
  backdrop-filter: none !important;
}

.pp-pay-volume:hover,
.pp-pay-volume:focus-visible {
  color: #0b6f37 !important;
  outline: none !important;
  text-decoration: underline;
  text-underline-offset: 4px;
  transform: none !important;
}

.pp-payment-error:empty {
  display: none !important;
}

.pp-payment-error {
  margin-top: 14px !important;
  border: 1px solid #e3e7ed !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  color: #667085 !important;
  padding: 12px 14px !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  line-height: 1.35 !important;
}

.pp-payment-error[data-state="loading"] {
  border-color: #cfeedd !important;
  background: #eaf8f0 !important;
  color: #118444 !important;
}

.pp-payment-error[data-state="error"] {
  border-color: #ffd0d0 !important;
  background: #fff4f4 !important;
  color: #b42318 !important;
}

.pp-payment-note {
  max-width: none !important;
  margin: 16px 0 0 !important;
  color: #667085 !important;
  font-size: 13px !important;
  font-weight: 680 !important;
  line-height: 1.35 !important;
  text-align: left !important;
}

.pp-payment-legal {
  max-width: none !important;
  margin: 8px 0 0 !important;
  color: #98a2b3 !important;
  font-size: 12px !important;
  font-weight: 560 !important;
  line-height: 1.35 !important;
  text-align: left !important;
}

.pp-payment-legal a {
  color: #667085 !important;
  font-weight: 700;
}

@media (max-width: 760px) {
  .pp-payment-overlay {
    align-items: center !important;
    padding: 12px !important;
  }

  .pp-payment-modal {
    width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    border-radius: 22px !important;
    padding: 22px !important;
  }

  .pp-payment-hero {
    padding-right: 44px;
  }

  .pp-payment-hero h2 {
    font-size: 28px !important;
  }

  .pp-payment-hero p {
    font-size: 15px !important;
  }

  .pp-pay-balance {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .pp-pay-balance__arrow {
    display: none !important;
  }

  .pp-pay-packages {
    grid-template-columns: 1fr !important;
  }

  .pp-pay-package {
    min-height: 0 !important;
    border-radius: 18px !important;
    padding: 16px !important;
  }

  .pp-pay-package__title,
  .pp-pay-package__leads {
    margin-top: 12px;
  }

  .pp-pay-package__leads {
    font-size: 28px !important;
  }

  .pp-pay-package__description {
    min-height: 0;
  }
}

/* Checkout compact decision pass: package selection first, one payment CTA. */
.pp-payment-badge {
  display: none !important;
}

.pp-payment-modal {
  width: min(920px, calc(100vw - 40px)) !important;
  max-width: 920px !important;
  border-radius: 22px !important;
  padding: 28px !important;
}

.pp-payment-hero {
  padding-right: 52px;
}

.pp-payment-hero h2 {
  font-size: 32px !important;
  font-weight: 600 !important;
  letter-spacing: -0.04em !important;
  line-height: 38px !important;
}

.pp-payment-hero p {
  max-width: 720px !important;
  margin-top: 8px !important;
  color: var(--text-muted, #667085) !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 22px !important;
}

.pp-pay-after {
  margin-top: 18px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 0 !important;
}

.pp-pay-balance {
  display: flex !important;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 10px !important;
  margin: 0 !important;
  border-radius: 999px;
  background: #eef1ef;
  padding: 8px 12px;
  color: #667085;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.1;
}

.pp-pay-balance__item,
.pp-pay-balance div {
  display: contents !important;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
}

.pp-pay-balance span,
.pp-pay-balance strong {
  display: inline !important;
  margin: 0 !important;
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
}

.pp-pay-balance__current,
.pp-pay-balance__after {
  white-space: nowrap;
}

.pp-pay-balance__delta {
  border-radius: 999px;
  background: #19b86a;
  color: #ffffff !important;
  padding: 5px 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 800 !important;
}

.pp-pay-balance__arrow {
  display: none !important;
}

.pp-pay-packages {
  gap: 10px !important;
  margin-top: 18px !important;
}

.pp-pay-package {
  min-height: 208px !important;
  align-content: start !important;
  border-color: #dce2e7 !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  padding: 20px !important;
  box-shadow: none !important;
  transition-property: border-color, background-color, transform;
}

.pp-pay-package:hover,
.pp-pay-package:focus-visible {
  border-color: #111827 !important;
  background: #ffffff !important;
  transform: translateY(-1px);
}

.pp-pay-package.is-selected {
  border-color: #111827 !important;
  box-shadow: none !important;
}

.pp-pay-package--optimal {
  border-color: #b9e8ca !important;
  background: #dff7e9 !important;
}

.pp-pay-package--optimal:hover,
.pp-pay-package--optimal:focus-visible,
.pp-pay-package--optimal.is-selected {
  border-color: #159a56 !important;
  background: #d5f4e2 !important;
}

.pp-pay-package--best {
  border-color: #0b1220 !important;
  background: #0b1220 !important;
  color: #ffffff !important;
}

.pp-pay-package--best:hover,
.pp-pay-package--best:focus-visible,
.pp-pay-package--best.is-selected {
  border-color: #0b1220 !important;
  background: #0b1220 !important;
}

.pp-pay-package__badge,
.pp-pay-package__title,
.pp-pay-package__cta {
  display: none !important;
}

.pp-pay-package__leads {
  margin: 0 !important;
  color: currentColor !important;
  font-size: 34px !important;
  font-variant-numeric: tabular-nums;
  font-weight: 600 !important;
  letter-spacing: -0.04em !important;
  line-height: 1.02 !important;
}

.pp-pay-package__description {
  order: 2;
  min-height: 44px !important;
  margin-top: 10px !important;
  color: #667085 !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 20px !important;
}

.pp-pay-package__price {
  order: 3;
  margin-top: 20px !important;
  color: currentColor !important;
  font-size: 28px !important;
  font-variant-numeric: tabular-nums;
  font-weight: 600 !important;
  letter-spacing: -0.03em !important;
  line-height: 1 !important;
}

.pp-pay-package__unit {
  order: 4;
  margin-top: 8px !important;
  color: #667085 !important;
  font-size: 14px !important;
  font-style: normal !important;
  font-weight: 600 !important;
  line-height: 18px !important;
}

.pp-pay-package--best .pp-pay-package__description,
.pp-pay-package--best .pp-pay-package__unit {
  color: rgba(255, 255, 255, 0.68) !important;
}

.pp-pay-selected {
  display: flex !important;
  min-height: 0 !important;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #111827 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.pp-pay-selected__body {
  min-width: 0;
}

.pp-pay-selected__body span,
.pp-pay-selected__body strong {
  display: inline;
}

.pp-pay-selected__body span {
  color: #667085;
  font-size: 14px;
  font-weight: 600;
}

.pp-pay-selected__body strong {
  margin-left: 8px;
  color: #111827;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
}

.pp-pay-selected__meta {
  color: #667085;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.pp-payment-primary {
  display: inline-flex !important;
  width: 100% !important;
  min-height: 54px !important;
  align-items: center;
  justify-content: center;
  margin-top: 12px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #0b1220 !important;
  color: #ffffff !important;
  cursor: pointer;
  padding: 0 22px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  transition-property: background-color, transform, opacity;
  transition-duration: 150ms;
  transition-timing-function: ease;
}

.pp-payment-primary:hover,
.pp-payment-primary:focus-visible {
  background: #111827 !important;
  outline: none;
  transform: translateY(-1px);
}

.pp-payment-primary:active {
  transform: scale(0.96);
}

.pp-payment-primary:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.pp-pay-volume {
  margin-top: 14px !important;
  color: #159a56 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

.pp-payment-note {
  margin-top: 14px !important;
}

@media (max-width: 760px) {
  .pp-payment-modal {
    width: calc(100vw - 24px) !important;
    border-radius: 20px !important;
    padding: 22px !important;
  }

  .pp-payment-hero h2 {
    font-size: 28px !important;
    line-height: 34px !important;
  }

  .pp-pay-balance {
    width: 100%;
    flex-wrap: wrap;
    border-radius: 18px;
  }

  .pp-pay-packages {
    grid-template-columns: 1fr !important;
  }

  .pp-pay-package {
    min-height: 0 !important;
  }

  .pp-pay-selected {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .pp-pay-selected__meta {
    white-space: normal;
  }
}

/* Checkout offer CTA pass: each package owns its buy action. */
.pp-pay-overlay .pp-payment-modal {
  border-radius: 32px !important;
}

.pp-pay-overlay .pp-payment-close {
  border-radius: 999px !important;
}

.pp-pay-overlay .pp-payment-hero h2 {
  text-transform: none !important;
}

.pp-pay-overlay .pp-pay-balance {
  border-radius: 999px !important;
}

.pp-pay-overlay .pp-pay-balance__delta {
  background: #19b86a !important;
  color: #0b1220 !important;
}

.pp-pay-overlay .pp-pay-packages {
  gap: 12px !important;
}

.pp-pay-overlay .pp-pay-package {
  display: flex !important;
  min-height: 282px !important;
  flex-direction: column;
  align-items: flex-start;
  border-radius: 42px !important;
  padding: 24px !important;
  text-align: left;
}

.pp-pay-overlay .pp-pay-package--optimal {
  border-color: #13a866 !important;
  background: #d2f7df !important;
}

.pp-pay-overlay .pp-pay-package--optimal:hover,
.pp-pay-overlay .pp-pay-package--optimal:focus-visible,
.pp-pay-overlay .pp-pay-package--optimal.is-selected {
  border-color: #0c9e56 !important;
  background: #c8f4d8 !important;
}

.pp-pay-overlay .pp-pay-package--best {
  background: #08111f !important;
}

.pp-pay-overlay .pp-pay-package__description {
  min-height: 44px !important;
  text-wrap: pretty;
}

.pp-pay-overlay .pp-pay-package__cta {
  display: inline-flex !important;
  order: 5;
  width: min(82%, 360px);
  min-height: 48px;
  align-items: center;
  align-self: center;
  justify-content: center;
  margin-top: auto;
  border-radius: 999px;
  background: #0b1220;
  color: #ffffff !important;
  padding: 0 16px;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-align: center;
  transition-property: background-color, color, transform, opacity;
  transition-duration: 150ms;
  transition-timing-function: ease;
}

.pp-pay-overlay .pp-pay-package:hover .pp-pay-package__cta,
.pp-pay-overlay .pp-pay-package:focus-visible .pp-pay-package__cta {
  background: #111827;
}

.pp-pay-overlay .pp-pay-package--best .pp-pay-package__cta {
  background: #ffffff;
  color: #0b1220 !important;
}

.pp-pay-overlay .pp-pay-package--best:hover .pp-pay-package__cta,
.pp-pay-overlay .pp-pay-package--best:focus-visible .pp-pay-package__cta {
  background: #f3f4f6;
}

.pp-pay-overlay .pp-pay-package:active .pp-pay-package__cta {
  transform: scale(0.96);
}

.pp-pay-overlay .pp-pay-selected,
.pp-pay-overlay .pp-payment-primary {
  display: none !important;
}

.pp-pay-overlay .pp-payment-error {
  width: fit-content;
  min-height: 20px !important;
  margin: 12px 0 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #667085 !important;
  padding: 0 !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 20px !important;
}

.pp-pay-overlay .pp-payment-error[data-state="loading"] {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  border: 0 !important;
  background: transparent !important;
  color: #667085 !important;
}

.pp-pay-overlay .pp-payment-error[data-state="loading"]::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #8b95a1;
}

.pp-pay-overlay .pp-payment-error[data-state="error"] {
  width: auto;
  border: 1px solid #ffd0d0 !important;
  border-radius: 18px !important;
  background: #fff7f7 !important;
  color: #b42318 !important;
  padding: 11px 14px !important;
}

@media (max-width: 760px) {
  .pp-pay-overlay .pp-payment-modal {
    border-radius: 26px !important;
  }

  .pp-pay-overlay .pp-pay-package {
    min-height: 252px !important;
    border-radius: 34px !important;
  }

  .pp-pay-overlay .pp-pay-package__cta {
    width: min(88%, 360px);
  }
}

/* Mobile workbench 20260713: compact presentation over the shared launch state. */
.mobile-stage-title,
.mobile-stage-copy,
.mobile-trial-note,
.mobile-launch-mode-label,
.mobile-scenario-card,
.mobile-filter-sheet-shell,
.mobile-export-trigger,
.mobile-export-sheet-shell,
.pp-footer__toggle {
  display: none;
}

.mobile-scenario-card[hidden],
.mobile-filter-sheet-shell[hidden],
.mobile-export-sheet-shell[hidden] {
  display: none !important;
}

@media (max-width: 1023px) {
  body[data-page="settings"] {
    --mobile-page-padding: 16px;
    --mobile-surface: #f5f5f2;
    --mobile-card: #ffffff;
    --mobile-muted: #f0f1ee;
    --mobile-active: #e9f7ef;
    --mobile-text: #0f172a;
    --mobile-text-muted: #667085;
    --mobile-border: rgba(15, 23, 42, 0.08);
  }

  body.has-mobile-menu-open,
  body.has-mobile-filter-sheet,
  body.has-mobile-export-sheet {
    overflow: hidden;
    overscroll-behavior: none;
  }

  /* The settings workspace is an isolated stacking context; raise it above the footer for its sheet. */
  body.has-mobile-filter-sheet .workspace,
  body.has-mobile-export-sheet .workspace {
    z-index: 1500;
  }

  .app-header {
    position: sticky;
    top: 0;
    z-index: 110;
    min-height: 60px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: rgb(245 245 242 / 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .app-header-inner {
    width: 100%;
    min-height: 60px;
    padding: max(8px, env(safe-area-inset-top)) var(--mobile-page-padding) 8px;
  }

  .main-nav,
  .top-actions .profile-menu {
    display: none !important;
  }

  .top-brand {
    min-width: 0;
    flex: 1 1 auto;
    gap: 8px;
  }

  .top-brand-logo,
  .top-brand-logo img,
  .top-brand-logo svg {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .top-brand-text {
    width: 66px;
    min-width: 66px;
    flex: 0 0 66px;
  }

  .top-brand .top-brand-text span {
    max-width: 66px;
    font-size: 13px;
    line-height: 14px;
  }

  .usage-button {
    height: 40px;
    min-height: 40px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 13px;
    background: #ffffff;
    padding: 0 11px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
  }

  .usage-menu {
    display: block !important;
  }

  .usage-button span {
    display: none;
  }

  .mobile-menu-button {
    display: inline-flex;
    width: 40px;
    height: 40px;
    min-height: 40px;
    flex: 0 0 40px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 13px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  }

  .mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  .mobile-menu-sheet-shell:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 1320;
    display: block;
  }

  .mobile-menu-backdrop {
    background: rgb(15 23 42 / 0.32);
    backdrop-filter: blur(2px);
  }

  .mobile-menu-sheet {
    position: absolute;
    inset: 0 0 0 auto;
    width: min(92vw, 360px);
    max-height: none;
    border-radius: 24px 0 0 24px;
    box-shadow: -18px 0 48px rgb(15 23 42 / 0.16);
    padding: max(16px, env(safe-area-inset-top)) 14px calc(16px + env(safe-area-inset-bottom));
  }

  .mobile-menu-head {
    min-height: 48px;
    padding: 0 2px 12px;
  }

  .mobile-menu-head button {
    display: grid;
    width: 40px;
    height: 40px;
    min-height: 40px;
    place-items: center;
    border-radius: 13px;
    font-size: 0;
  }

  .mobile-menu-head button svg,
  .mobile-menu-icon svg,
  .mobile-menu-nav em svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }

  .mobile-menu-nav a,
  .mobile-menu-nav button {
    min-height: 52px;
    border-radius: 14px;
    font-size: 15px;
  }

  .mobile-menu-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 10px;
    background: #eef1ef;
    font-size: 0;
  }

  .mobile-menu-icon svg {
    width: 18px;
    height: 18px;
  }

  .mobile-menu-nav em {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    font-size: 0;
  }

  .mobile-menu-nav em svg {
    width: 16px;
    height: 16px;
  }

  .workspace,
  .workspace-body {
    min-width: 0;
    overflow: visible;
  }

  body[data-page="settings"] .input-stage.new-run-page {
    width: min(100%, 920px);
    max-width: none;
    min-width: 0;
    margin: 0 auto;
    padding: 20px var(--mobile-page-padding) calc(108px + env(safe-area-inset-bottom));
  }

  .desktop-stage-title,
  .desktop-stage-copy,
  .desktop-launch-mode-label {
    display: none;
  }

  .mobile-stage-title,
  .mobile-stage-copy,
  .mobile-trial-note,
  .mobile-launch-mode-label {
    display: inline;
  }

  .input-stage-head {
    max-width: 560px;
    margin-bottom: 16px;
  }

  .input-stage-head h1,
  .input-stage-head h2 {
    margin: 0;
    color: var(--mobile-text);
    font-size: 30px;
    font-weight: 780;
    letter-spacing: -0.04em;
    line-height: 33px;
  }

  .input-stage-head p {
    max-width: 360px;
    margin: 8px 0 0;
    color: var(--mobile-text-muted);
    font-size: 14px;
    line-height: 20px;
  }

  .mobile-trial-note {
    margin-top: 7px;
    color: #16834d;
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
  }

  .mobile-query-section {
    display: block;
    max-width: 620px;
    margin: 0 0 12px;
  }

  .mobile-query-section > label {
    margin: 0 0 7px;
    color: var(--mobile-text-muted);
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0;
    line-height: 18px;
    text-transform: none;
  }

  .mobile-query-control,
  .mobile-query-section[data-mode="ai"] .mobile-query-control {
    position: relative;
    display: grid;
    gap: 8px;
  }

  .mobile-query-section input,
  .mobile-query-section textarea {
    min-height: 52px;
    border: 1px solid var(--mobile-border);
    border-radius: 16px;
    background: #ffffff;
    padding: 0 16px;
    font-size: 16px;
  }

  .mobile-query-section input {
    height: 52px;
    padding-right: 16px;
  }

  .mobile-query-section textarea {
    min-height: 112px;
    padding: 14px 16px;
    line-height: 22px;
  }

  .mobile-typed-placeholder {
    left: 16px;
    right: 16px;
    top: 26px;
    font-size: 16px;
  }

  .mobile-query-submit,
  .mobile-query-section[data-mode="ai"] .mobile-query-submit {
    position: static;
    width: 100%;
    min-width: 0;
    height: 48px;
    min-height: 48px;
    border: 0;
    border-radius: 15px;
    background: #0f172a;
    color: #ffffff;
    font-size: 15px;
    font-weight: 720;
  }

  .main-search-card,
  .ai-query-parser.main-search-card {
    display: none !important;
  }

  .launch-mode-switch {
    display: grid;
    width: min(100%, 620px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 44px;
    margin: 14px 0 0;
    border-radius: 15px;
    background: var(--mobile-muted);
    padding: 3px;
  }

  .launch-mode-switch button {
    min-width: 0;
    min-height: 38px;
    border-radius: 12px;
    color: var(--mobile-text-muted);
    font-size: 13px;
    font-weight: 650;
    line-height: 17px;
  }

  .launch-mode-switch button.active {
    background: #ffffff;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.08);
    color: var(--mobile-text);
  }

  .quick-categories {
    display: flex !important;
    gap: 8px;
    margin: 10px calc(var(--mobile-page-padding) * -1) 0;
    overflow-x: auto;
    padding: 0 var(--mobile-page-padding);
    scrollbar-width: none;
  }

  .quick-categories .preset-chip {
    height: 32px;
    min-height: 32px;
    border: 1px solid var(--mobile-border);
    border-radius: 999px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 650;
  }

  .action-cards {
    display: flex;
    gap: 10px;
    margin: 14px calc(var(--mobile-page-padding) * -1) 0;
    overflow-x: auto;
    padding: 0 var(--mobile-page-padding) 4px;
    scrollbar-width: none;
  }

  .action-card {
    flex: 0 0 176px;
    min-height: 104px;
    align-items: flex-start;
    border: 1px solid var(--mobile-border);
    border-radius: 18px;
    background: #ffffff;
    gap: 10px;
    padding: 13px;
  }

  .action-card.is-active {
    border-color: rgba(26, 170, 89, 0.4);
    background: var(--mobile-active);
  }

  .action-icon,
  .action-icon img {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
  }

  .action-card .action-copy strong {
    font-size: 15px;
    line-height: 19px;
  }

  .action-card .action-copy small {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    line-height: 16px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .mobile-scenario-card {
    display: grid;
    width: min(100%, 620px);
    gap: 5px;
    margin: 14px 0 0;
    border: 1px solid var(--mobile-border);
    border-radius: 18px;
    background: #ffffff;
    padding: 14px;
  }

  .mobile-scenario-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--mobile-text-muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 16px;
  }

  .mobile-scenario-card__head strong {
    border-radius: 999px;
    background: #e9f7ef;
    color: #16834d;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 750;
  }

  .mobile-scenario-card > b,
  .mobile-scenario-card > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-scenario-card > b {
    color: var(--mobile-text);
    font-size: 16px;
    font-weight: 720;
    line-height: 21px;
  }

  .mobile-scenario-card > span {
    color: var(--mobile-text-muted);
    font-size: 13px;
    line-height: 18px;
  }

  .mobile-scenario-card > button {
    width: fit-content;
    min-height: 36px;
    border: 0;
    background: transparent;
    color: #16834d;
    padding: 0;
    font-size: 13px;
    font-weight: 700;
  }

  .run-layout,
  .launch-grid.run-layout {
    display: block;
    width: min(100%, 920px);
    margin: 14px auto 0;
  }

  .launch-summary {
    display: none !important;
  }

  .run-main-column,
  .search-form.run-main-column {
    display: grid;
    gap: 12px;
    padding: 0;
  }

  .search-form.run-main-column .mobile-settings-section,
  .form-section.mobile-settings-section {
    width: 100%;
    min-width: 0;
    margin: 0;
    border: 1px solid var(--mobile-border);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: none;
    overflow: hidden;
    padding: 0;
  }

  .mobile-settings-trigger {
    display: flex;
    width: 100%;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    background: transparent;
    padding: 10px 12px 10px 14px;
    text-align: left;
  }

  .mobile-settings-trigger > span,
  .mobile-settings-trigger strong,
  .mobile-settings-trigger small {
    display: block;
    min-width: 0;
  }

  .mobile-settings-trigger strong {
    overflow: hidden;
    color: var(--mobile-text);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 700;
    line-height: 20px;
  }

  .mobile-settings-trigger small {
    margin-top: 2px;
    overflow: hidden;
    color: var(--mobile-text-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    line-height: 18px;
  }

  .mobile-settings-trigger em {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border-radius: 10px;
    background: var(--mobile-muted);
    font-size: 0;
  }

  .mobile-settings-trigger em::after {
    display: block;
    width: 7px;
    height: 7px;
    border-right: 1.75px solid currentColor;
    border-bottom: 1.75px solid currentColor;
    content: "";
    transform: rotate(45deg) translate(-1px, -1px);
  }

  .mobile-settings-trigger[aria-expanded="true"] em::after {
    transform: rotate(225deg) translate(-1px, -1px);
  }

  .mobile-settings-section.is-open > .mobile-settings-trigger {
    border-bottom: 1px solid var(--mobile-border);
  }

  .mobile-settings-section > .section-head {
    display: none !important;
  }

  .mobile-settings-section:not(.is-open) > :not(.mobile-settings-trigger) {
    display: none !important;
  }

  .mobile-settings-section.is-open > :not(.mobile-settings-trigger):not(.section-head) {
    margin-right: 14px;
    margin-left: 14px;
  }

  .mobile-settings-section.is-open .command-flow {
    padding: 14px 0 16px;
  }

  .location-section.mobile-settings-section.is-open > .mobile-where-section {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 14px;
  }

  .location-section.mobile-settings-section.is-open > .command-flow {
    display: none !important;
  }

  .mobile-channel-tabs {
    min-height: 44px;
    border-radius: 14px;
    padding: 3px;
  }

  .mobile-channel-indicator {
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc((100% - 6px) / 2);
    border-radius: 11px;
  }

  .mobile-channel-tab {
    min-height: 38px;
    border-radius: 11px;
    font-size: 13px;
  }

  .mobile-channel-hint {
    border-radius: 12px;
    padding: 10px 12px;
  }

  .mobile-channel-hint strong,
  .mobile-channel-hint p,
  .mobile-field span {
    font-size: 12px;
    line-height: 17px;
  }

  .mobile-geo-grid {
    gap: 8px;
  }

  .mobile-geo-option {
    min-height: 42px;
    border-radius: 12px;
    font-size: 13px;
  }

  .mobile-geo-indicator {
    inset: 2px;
    border-radius: 10px;
  }

  .mobile-field input {
    height: 48px;
    border: 1px solid var(--mobile-border);
    border-radius: 14px;
    background: #ffffff;
    font-size: 16px;
    font-weight: 500;
  }

  .source-list {
    display: grid;
    gap: 8px;
    padding: 14px 0 16px;
  }

  .source-option {
    min-height: 58px;
    grid-template-columns: 24px 32px minmax(0, 1fr);
    border-radius: 14px;
    background: #f7f8f7;
    padding: 10px 11px;
  }

  .source-option .source-check {
    width: 22px;
    height: 22px;
    border-radius: 7px;
  }

  .source-option .provider-logo {
    width: 30px;
    height: 30px;
  }

  .source-option .source-copy strong {
    font-size: 14px;
    line-height: 18px;
  }

  .source-option .source-copy > span {
    font-size: 12px;
    line-height: 16px;
  }

  .mobile-filter-sheet-shell:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: block;
  }

  .mobile-filter-sheet-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 100%;
    border: 0;
    background: rgb(15 23 42 / 0.34);
    backdrop-filter: blur(2px);
  }

  .mobile-filter-sheet {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    width: 100%;
    height: min(88dvh, 760px);
    max-height: min(88dvh, 760px);
    flex-direction: column;
    border-radius: 24px 24px 0 0;
    background: #ffffff;
    box-shadow: 0 -16px 50px rgb(15 23 42 / 0.18);
    outline: none;
  }

  .mobile-filter-sheet__handle {
    width: 36px;
    height: 4px;
    flex: 0 0 auto;
    margin: 9px auto 2px;
    border-radius: 999px;
    background: #d7dcd8;
  }

  .mobile-filter-sheet__head {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--mobile-border);
    padding: 0 14px;
  }

  .mobile-filter-sheet__head h2 {
    margin: 0;
    color: var(--mobile-text);
    font-size: 18px;
    font-weight: 750;
    line-height: 22px;
  }

  .mobile-filter-sheet__head > div {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .mobile-filter-sheet__head button {
    min-height: 40px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #16834d;
    padding: 0 8px;
    font-size: 13px;
    font-weight: 700;
  }

  .mobile-filter-sheet__head button[aria-label] {
    display: grid;
    width: 40px;
    place-items: center;
    color: var(--mobile-text);
    padding: 0;
  }

  .mobile-filter-sheet__head svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
  }

  .mobile-filter-sheet__body {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 14px 18px;
  }

  .mobile-filter-sheet__body .section-head {
    display: none;
  }

  .mobile-filter-sheet__body .section-head h3 {
    margin: 0;
    color: var(--mobile-text);
    font-size: 16px;
    line-height: 21px;
  }

  .mobile-filter-sheet__body .section-head p {
    display: none;
  }

  .mobile-filter-sheet__body .criteria-band {
    display: grid;
    gap: 14px;
  }

  .mobile-filter-sheet__body .criteria-band > label,
  .mobile-filter-sheet__body .limit-field > label {
    display: grid;
    gap: 6px;
  }

  .mobile-filter-sheet__body .criteria-band > label > span,
  .mobile-filter-sheet__body .limit-field > label > span,
  .mobile-filter-sheet__body .field-label {
    color: var(--mobile-text-muted);
    font-size: 13px;
    font-weight: 650;
    line-height: 18px;
  }

  .mobile-filter-sheet__body input[type="number"] {
    width: 100%;
    height: 48px;
    border: 1px solid var(--mobile-border);
    border-radius: 14px;
    padding: 0 14px;
    font-size: 16px;
  }

  .mobile-filter-sheet__body .limit-presets,
  .mobile-filter-sheet__body .rating-options,
  .mobile-filter-sheet__body .toggle-grid {
    display: grid;
    overflow: visible;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 9px;
  }

  .mobile-filter-sheet__body .rating-options,
  .mobile-filter-sheet__body .toggle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-filter-sheet__body .limit-presets button,
  .mobile-filter-sheet__body .rating-options label,
  .mobile-filter-sheet__body .toggle-grid label {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    margin: 0;
    border-radius: 12px;
    font-size: 13px;
  }

  .mobile-filter-sheet__body .toggle-grid label {
    min-height: 46px;
    white-space: normal;
  }

  .mobile-filter-sheet__body .field-hint {
    margin-top: 6px;
    color: var(--mobile-text-muted);
    font-size: 12px;
    line-height: 17px;
  }

  .mobile-filter-sheet__foot {
    flex: 0 0 auto;
    border-top: 1px solid var(--mobile-border);
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  }

  .mobile-filter-sheet__foot button {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 15px;
    background: #0f172a;
    color: #ffffff;
    font-size: 15px;
    font-weight: 720;
  }

  .mobile-launch-bar,
  body[data-page="settings"][data-launch-mode="direct"] .mobile-launch-bar:not([hidden]) {
    position: fixed;
    right: var(--mobile-page-padding);
    bottom: max(8px, env(safe-area-inset-bottom));
    left: var(--mobile-page-padding);
    z-index: 700;
    display: flex !important;
    min-height: 72px;
    align-items: center;
    gap: 10px;
    margin: 0;
    border: 1px solid var(--mobile-border);
    border-radius: 18px;
    background: rgb(255 255 255 / 0.94);
    box-shadow: 0 8px 28px rgb(15 23 42 / 0.14);
    padding: 8px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  body[data-page="settings"][data-launch-mode="ai"] .mobile-launch-bar,
  body[data-mobile-settings-open="true"] .mobile-launch-bar,
  body[data-mobile-form-focus="true"] .mobile-launch-bar,
  body.has-mobile-filter-sheet .mobile-launch-bar,
  body:not([data-page="settings"]) .mobile-launch-bar,
  body[data-page="settings"] .input-stage[hidden] .mobile-launch-bar {
    display: none !important;
  }

  .mobile-launch-summary {
    min-width: 0;
    flex: 1 1 auto;
    padding-left: 4px;
  }

  .mobile-launch-summary strong {
    color: var(--mobile-text);
    font-size: 13px;
    font-weight: 700;
    line-height: 17px;
  }

  .mobile-launch-summary span {
    color: var(--mobile-text-muted);
    font-size: 12px;
    line-height: 16px;
  }

  .mobile-launch-action {
    height: 48px;
    min-height: 48px;
    min-width: 142px;
    max-width: none;
    border-radius: 14px;
    background: #1aa659;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 720;
  }

  .mobile-settings-trigger:focus-visible,
  .mobile-query-submit:focus-visible,
  .mobile-launch-action:focus-visible,
  .mobile-filter-sheet button:focus-visible {
    outline: 3px solid rgb(26 166 89 / 0.32);
    outline-offset: 2px;
  }
}

@media (max-width: 767px) {
  html {
    min-width: 320px;
    -webkit-text-size-adjust: 100%;
  }

  body[data-page="settings"] .input-stage.new-run-page {
    padding-top: 18px;
  }

  /* The fixed action owns the first viewport; settings begin below it instead of underneath it. */
  .run-layout,
  .launch-grid.run-layout {
    margin-top: 102px;
  }

  .input-stage-head h1,
  .input-stage-head h2 {
    font-size: 28px;
    line-height: 31px;
  }

  .input-stage-head p {
    max-width: 320px;
  }

  .mobile-lead-card {
    min-height: 0;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    padding: 14px;
  }

  .mobile-lead-card-head strong {
    font-size: 16px;
    line-height: 21px;
  }

  /* Keep result filters compact on phones: the desktop flex basis otherwise
     becomes the toolbar height after the tablet column layout is applied. */
  body[data-page="results"][data-has-results="true"] .table-toolbar {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
  }

  body[data-page="results"][data-has-results="true"] .result-tabs {
    flex: 0 0 auto;
    min-width: max-content;
    flex-wrap: nowrap;
  }

  body[data-page="results"][data-has-results="true"] .result-toolbar-actions {
    flex: 0 0 180px;
    width: 180px;
    min-width: 180px;
  }

  body[data-page="results"][data-has-results="true"] .result-search {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }

  .pp-footer {
    margin-top: 32px;
  }

  .pp-footer__inner {
    width: calc(100% - 32px);
    padding: 30px 0 calc(24px + env(safe-area-inset-bottom));
  }

  .pp-footer__grid {
    gap: 0;
  }

  .pp-footer__col {
    display: contents;
  }

  .pp-footer__col--brand {
    display: block;
  }

  .pp-footer__description {
    display: -webkit-box;
    margin: 14px 0 18px;
    overflow: hidden;
    font-size: 13px;
    line-height: 19px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .pp-footer__group {
    margin: 0 !important;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding: 0;
  }

  .pp-footer__group h2 {
    margin: 0;
  }

  .pp-footer__toggle {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    border: 0;
    background: transparent;
    color: #0f172a;
    padding: 0;
    text-align: left;
    font-size: 14px;
    font-weight: 700;
  }

  .pp-footer__toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    transition: transform 160ms ease;
  }

  .pp-footer__group[data-footer-expanded="true"] .pp-footer__toggle svg {
    transform: rotate(180deg);
  }

  .pp-footer__group[data-footer-expanded="false"] > :not(h2) {
    display: none !important;
  }

  .pp-footer__group[data-footer-expanded="true"] > a,
  .pp-footer__group[data-footer-expanded="true"] > .pp-footer__item {
    display: block;
    width: auto;
    margin: 0 0 10px;
    color: #667085;
    font-size: 13px;
    line-height: 18px;
  }

  .pp-footer__bottom {
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    font-size: 12px;
    line-height: 17px;
  }

  .pp-footer__to-top {
    bottom: calc(90px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 359px) {
  body[data-page="settings"] {
    --mobile-page-padding: 12px;
  }

  .mobile-launch-action {
    min-width: 126px;
    padding: 0 10px;
    font-size: 13px;
  }

  .mobile-filter-sheet__body .toggle-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  body[data-page="settings"] {
    --mobile-page-padding: 32px;
  }

  body[data-page="settings"] .input-stage.new-run-page {
    padding-top: 30px;
  }

  .input-stage-head h1,
  .input-stage-head h2 {
    font-size: 36px;
    line-height: 40px;
  }

  .mobile-query-section,
  .launch-mode-switch,
  .mobile-scenario-card {
    max-width: 680px;
  }

  .mobile-scenario-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 12px;
    padding: 12px 14px;
  }

  .mobile-scenario-card__head {
    grid-column: 1 / -1;
  }

  .mobile-scenario-card > b,
  .mobile-scenario-card > span {
    grid-column: 1;
  }

  .mobile-scenario-card > #mobile-scenario-filters {
    display: none;
  }

  .mobile-scenario-card > button {
    grid-column: 2;
    grid-row: 2 / span 2;
    align-self: center;
  }

  .action-card {
    flex-basis: 210px;
  }

  .search-form.run-main-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .search-form.run-main-column .location-section.is-open,
  .search-form.run-main-column .source-section.is-open {
    grid-column: span 2;
  }

  .mobile-filter-sheet {
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(520px, 72vw);
    height: 100dvh;
    max-height: none;
    border-radius: 22px 0 0 22px;
    box-shadow: -18px 0 48px rgb(15 23 42 / 0.16);
  }

  .mobile-filter-sheet__handle {
    display: none;
  }

  .mobile-launch-bar,
  body[data-page="settings"][data-launch-mode="direct"] .mobile-launch-bar:not([hidden]) {
    right: 24px;
    bottom: 16px;
    left: auto;
    width: min(520px, calc(100vw - 48px));
  }
}

/* Results export stays one deliberate action on phones, not a row of tiny format icons. */
@media (max-width: 767px) {
  body[data-page="results"] .workspace-head .export-actions,
  body[data-page="results"] .done-actions {
    display: none !important;
  }

  body[data-page="results"] .workspace-actions {
    width: auto;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
  }

  body[data-page="results"] .run-header-status {
    display: none;
  }

  body[data-page="results"] .mobile-export-trigger {
    display: inline-flex;
    min-width: 0;
    height: 40px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 13px;
    background: #ffffff;
    color: #0f172a;
    padding: 0 11px;
    font-size: 13px;
    font-weight: 720;
    line-height: 1;
  }

  body[data-page="results"] .mobile-export-trigger:disabled {
    cursor: default;
    opacity: 0.48;
  }

  body[data-page="results"] .mobile-export-trigger:not(:disabled):active {
    transform: scale(0.98);
  }

  .mobile-export-trigger svg,
  .mobile-export-sheet__head button svg,
  .mobile-export-option > svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }

  .mobile-export-sheet-shell:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 1600;
    display: block;
  }

  .mobile-export-sheet__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgb(15 23 42 / 0.36);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  .mobile-export-sheet {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    max-height: min(88dvh, 560px);
    min-height: 0;
    flex-direction: column;
    border-radius: 24px 24px 0 0;
    background: #ffffff;
    box-shadow: 0 -18px 48px rgb(15 23 42 / 0.18);
    outline: none;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-export-sheet__handle {
    width: 36px;
    height: 4px;
    flex: 0 0 auto;
    align-self: center;
    border-radius: 999px;
    background: #d7dce1;
    margin: 10px 0 0;
  }

  .mobile-export-sheet__head {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    padding: 8px 16px;
  }

  .mobile-export-sheet__head h2,
  .mobile-export-sheet__head p {
    margin: 0;
  }

  .mobile-export-sheet__head h2 {
    color: #0f172a;
    font-size: 18px;
    font-weight: 760;
    letter-spacing: -0.02em;
    line-height: 23px;
  }

  .mobile-export-sheet__head p {
    margin-top: 2px;
    color: #667085;
    font-size: 12px;
    line-height: 17px;
  }

  .mobile-export-sheet__head button {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border: 0;
    border-radius: 13px;
    background: #f2f3f1;
    color: #344054;
  }

  .mobile-export-sheet__options {
    display: grid;
    gap: 8px;
    overflow-y: auto;
    padding: 14px 16px 18px;
  }

  .mobile-export-option {
    display: grid;
    min-height: 68px;
    grid-template-columns: 42px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: 16px;
    background: #ffffff;
    color: #0f172a;
    padding: 10px 13px;
    text-decoration: none;
  }

  .mobile-export-option:active {
    background: #f6f8f7;
    transform: scale(0.99);
  }

  .mobile-export-option > span:nth-child(2) {
    min-width: 0;
  }

  .mobile-export-option strong,
  .mobile-export-option small {
    display: block;
  }

  .mobile-export-option strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 730;
    line-height: 19px;
  }

  .mobile-export-option small {
    margin-top: 2px;
    color: #667085;
    font-size: 12px;
    line-height: 16px;
  }

  .mobile-export-option__icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    color: #17603c;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
  }

  .mobile-export-option__icon--csv {
    background: #e9f7ef;
  }

  .mobile-export-option__icon--excel {
    background: #eaf3ff;
    color: #205f9c;
  }

  .mobile-export-option__icon--json {
    background: #f3edff;
    color: #6a43a1;
    font-size: 13px;
  }

  .mobile-export-option.is-locked::after {
    content: "доступ по тарифу";
    grid-column: 2 / -1;
    color: #8a5c14;
    font-size: 11px;
    font-weight: 650;
    line-height: 14px;
  }

  .mobile-export-option.is-locked {
    grid-template-rows: auto auto;
    min-height: 82px;
    border-color: rgba(186, 130, 33, 0.28);
    background: #fffbf1;
  }

  .mobile-export-option.is-locked > svg {
    grid-column: 3;
    grid-row: 1;
  }

  .mobile-export-option[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.45;
  }

  .mobile-export-trigger:focus-visible,
  .mobile-export-sheet button:focus-visible,
  .mobile-export-option:focus-visible {
    outline: 3px solid rgb(26 166 89 / 0.32);
    outline-offset: 2px;
  }
}
