:root {
  --ink: #07142e;
  --muted: #596a86;
  --line: #d6e1f2;
  --wash: #f1f5fb;
  --green: #2f6bff;
  --green-dark: #173fa4;
  --navy: #050f26;
  --cyan: #54d6ff;
  --violet: #7161f6;
}

.form-message {
  min-height: 22px;
  margin: 4px 0 12px;
  color: #b42318;
  font-size: 0.92rem;
}

.form-message[data-type="info"] {
  color: #155eef;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cfd7d4;
  border-radius: 6px;
  background: #fff;
  padding: 0 12px;
}

.other-trade {
  margin-top: 10px;
}

.field #service {
  min-height: 60px;
  padding: 0 16px;
  border-width: 2px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
body {
  font-family:
    "Avenir Next",
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: linear-gradient(180deg, #fff 0%, #f7f9fe 100%);
}
h1,
h2,
h3 {
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
}
.site-header {
  background: rgba(250, 252, 255, 0.9);
  border-bottom: 1px solid rgba(18, 52, 112, 0.13);
  backdrop-filter: blur(18px);
}
.brand-mark {
  border-radius: 11px 4px 11px 4px;
  background: linear-gradient(
    145deg,
    var(--cyan),
    var(--green) 55%,
    var(--violet)
  );
  box-shadow: 0 8px 22px rgba(47, 107, 255, 0.28);
}
.button {
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, #3a7cff, #3159dc 58%, #6b5ef0);
  box-shadow: 0 11px 28px rgba(32, 78, 190, 0.22);
}
.button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}
.hero {
  position: relative;
  isolation: isolate;
  background: radial-gradient(
    circle at 67% 34%,
    #2255ad 0,
    #0b2a5e 31%,
    #050f26 72%
  );
}
.hero::before {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  right: -170px;
  top: -300px;
  border: 1px solid rgba(114, 181, 255, 0.2);
  border-radius: 50%;
  box-shadow:
    0 0 0 85px rgba(70, 123, 255, 0.035),
    0 0 0 170px rgba(92, 82, 240, 0.025);
  z-index: -1;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 84%);
  z-index: -1;
}
.process-strip {
  border-radius: 18px 18px 0 0;
  backdrop-filter: blur(18px);
  box-shadow: 0 -24px 80px rgba(55, 105, 255, 0.12);
}
.card {
  border-radius: 16px;
  box-shadow: 0 18px 55px rgba(25, 54, 105, 0.08);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 65px rgba(25, 54, 105, 0.14);
}
.service-card h3 {
  font-size: 32px;
  letter-spacing: -0.04em;
}
.faq-item {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 13px;
  padding: 0 20px;
  margin-bottom: 11px;
  box-shadow: 0 10px 30px rgba(20, 48, 96, 0.055);
}
.faq-question {
  font-size: 17px;
  font-weight: 800;
}
.faq-answer {
  font-size: 16px;
  line-height: 1.75;
}
.section.dark,
.simple-cta {
  background: radial-gradient(circle at 75% 10%, #183d83, #07162f 48%, #050f26);
}
html { color-scheme: light; }
.theme-floating {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(80, 118, 185, 0.35);
  border-radius: 50%;
  background: #ffffff;
  color: #102656;
  box-shadow: 0 12px 32px rgba(5, 20, 47, 0.18);
  font-size: 22px;
  cursor: pointer;
}

html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] body { background: #07101f; color: #e8eef9; }
html[data-theme="dark"] .site-header { background: rgba(7, 16, 31, 0.92); border-color: #20324f; }
/* Keep the page intro dark when its headings switch to light text. */
html[data-theme="dark"] .page-hero:not(.support-hero) {
  background: radial-gradient(circle at 70% 12%, #1b3763 0, #101f39 38%, #091426 82%);
  border-color: #2b4160;
}
html[data-theme="dark"] .page-hero:not(.support-hero) h1 { color: #f4f7ff; }
html[data-theme="dark"] .page-hero:not(.support-hero) .eyebrow { color: #91c7ff; }
html[data-theme="dark"] .page-hero:not(.support-hero) .sublead { color: #c8d6e9; }
html[data-theme="dark"] .nav-links.open { background: #101d31; border-color: #2b4160; }
html[data-theme="dark"] .menu-button { color: #edf3ff; }
html[data-theme="dark"] .brand,
html[data-theme="dark"] .nav-links a:not(.button),
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] label { color: #eef4ff; }
html[data-theme="dark"] .soft,
html[data-theme="dark"] .section,
html[data-theme="dark"] .auth-page { background-color: #091426; }
html[data-theme="dark"] .card,
html[data-theme="dark"] .issue,
html[data-theme="dark"] .service-card,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] form { background: #101d31; border-color: #263a59; color: #e8eef9; }
html[data-theme="dark"] p,
html[data-theme="dark"] .lead,
html[data-theme="dark"] .sublead { color: #aebbd0; }
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea { background: #0a1527; border-color: #334967; color: #eef4ff; }
/* The trade selector has a more specific white background in .field select.
   Give Safari's native mobile picker the matching dark color scheme too. */
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field #service,
html[data-theme="dark"] .field input[list] {
  color-scheme: dark;
  background-color: #0a1527;
  border-color: #526b8f;
  color: #eef4ff;
}
html[data-theme="dark"] .field select option,
html[data-theme="dark"] .field datalist option {
  background-color: #0a1527;
  color: #eef4ff;
}
html[data-theme="dark"] .field input[list]::placeholder,
html[data-theme="dark"] .field select:invalid { color: #b7c7dc; }
html[data-theme="dark"] .form-message,
html[data-theme="dark"] .form-message[data-type="error"] { color: #ffb4a8; }
html[data-theme="dark"] .form-message[data-type="info"] { color: #a7c8ff; }
html[data-theme="dark"] .form-message[data-type="success"] { color: #a4e7c3; }
html[data-theme="dark"] .theme-floating { background: #13213a; color: #f7d36a; border-color: #385173; }

/* Sign-in is a compact, safe-area-aware screen on phones. The desktop
   marketing panel should not push the form under mobile browser chrome. */
@media (min-width: 901px) {
  .login-page { min-height: 100vh; min-height: 100dvh; grid-template-columns: minmax(330px, 44%) minmax(0, 1fr); }
  .login-brand { padding: clamp(32px, 4vw, 64px); }
  .login-brand h1 { color: #f3f7ff; }
  .login-form-wrap { min-width: 0; padding: clamp(28px, 5vw, 80px); }
  .login-form {
    box-sizing: border-box;
    width: min(100%, 470px);
    padding: clamp(28px, 3vw, 46px);
    border: 1px solid #d6e1f2;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(9, 31, 69, .10);
  }
  .login-form .field input { box-sizing: border-box; min-height: 48px; }
  html[data-theme="dark"] .login-form { background: #101d31; border-color: #334967; box-shadow: 0 18px 55px rgba(0, 0, 0, .22); }
  html[data-theme="dark"] .login-form .eyebrow,
  html[data-theme="dark"] .login-form h2,
  html[data-theme="dark"] .login-form label { color: #edf3ff; }
  html[data-theme="dark"] .login-form a { color: #a7c8ff; }
  html[data-theme="light"] .login-form a { color: #173fa4; }
}
@media (max-width: 900px) {
  .login-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
  }
  .login-brand {
    min-height: 0;
    padding: calc(18px + env(safe-area-inset-top, 0px)) 22px 18px;
    display: block;
  }
  .login-brand > div,
  .login-brand > small { display: none; }
  .login-brand .brand { display: inline-flex; align-items: center; font-size: 16px; }
  .login-form-wrap {
    flex: 1;
    display: grid;
    place-items: start center;
    padding: 28px 18px calc(72px + env(safe-area-inset-bottom, 0px));
  }
  .login-form {
    box-sizing: border-box;
    width: min(100%, 440px);
    margin: 0;
    padding: 26px 22px;
    border: 1px solid #d6e1f2;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(9, 31, 69, .08);
  }
  .login-form h2 { margin-top: 8px; font-size: clamp(26px, 8vw, 34px); line-height: 1.15; }
  .login-form .sublead { margin-bottom: 20px; }
  .login-form .field { margin: 14px 0; }
  .login-form .field input { min-height: 48px; font-size: 16px; }
  html[data-theme="dark"] .login-form {
    background: #101d31;
    border-color: #334967;
    color: #edf3ff;
    box-shadow: 0 16px 42px rgba(0, 0, 0, .18);
  }
  html[data-theme="dark"] .login-form .eyebrow,
  html[data-theme="dark"] .login-form h2,
  html[data-theme="dark"] .login-form label { color: #edf3ff; }
  html[data-theme="dark"] .login-form a { color: #a7c8ff; }
  html[data-theme="light"] .login-form a { color: #173fa4; }
}

/* Keep every public-site card readable in dark mode. */
html[data-theme="dark"] .problem-row,
html[data-theme="dark"] .compare-card,
html[data-theme="dark"] .compare-card.green,
html[data-theme="dark"] .tracked-box {
  background: #101d31;
  border-color: #2b4263;
  color: #edf3ff;
}
html[data-theme="dark"] .problem-chip { color: #edf3ff; border-color: #2b4263; }
html[data-theme="dark"] .trade-card li,
html[data-theme="dark"] .check-list li,
html[data-theme="dark"] .card .result,
html[data-theme="dark"] .tracked-item,
html[data-theme="dark"] .compare-card li { color: #b7c4d8; }
html[data-theme="dark"] .compare-card h3,
html[data-theme="dark"] .compare-card strong,
html[data-theme="dark"] .card .result strong { color: #edf3ff; }

/* Light surfaces must always retain dark text. */
html[data-theme="light"] .problem-row,
html[data-theme="light"] .compare-card,
html[data-theme="light"] .compare-card.green {
  color: #07142e;
}
html[data-theme="light"] .problem-chip,
html[data-theme="light"] .compare-card h3,
html[data-theme="light"] .card .result { color: #07142e; }

html[data-theme="dark"] .support-card,
html[data-theme="dark"] .support-details { background: #101d31; border-color: #2b4160; color: #edf3ff; }
html[data-theme="dark"] .page-hero.support-hero {
  background:
    radial-gradient(circle at 18% 10%, rgba(84, 214, 255, 0.16), transparent 28%),
    radial-gradient(circle at 82% 20%, rgba(113, 97, 246, 0.2), transparent 30%),
    linear-gradient(135deg, #040b19, #0b1d43 58%, #102d6c);
}
html[data-theme="dark"] .section.support-section { background: #07101f; }
html[data-theme="dark"] .support-card strong,
html[data-theme="dark"] .support-details h2 { color: #edf3ff; }
html[data-theme="dark"] .support-card p,
html[data-theme="dark"] .support-card small,
html[data-theme="dark"] .support-details ul,
html[data-theme="dark"] .support-note { color: #aebdd3; }
html[data-theme="dark"] .support-note { border-color: #2b4160; }

/* Support CTAs sit on a pale page, unlike the dark hero CTAs elsewhere.
   Give their outlined variants a readable foreground in either theme. */
.support-page .button:not(.secondary) {
  background: linear-gradient(135deg, #245ed6, #3159dc 58%, #594cce);
  color: #fff;
}
.support-page .button:not(.secondary):hover {
  background: linear-gradient(135deg, #194fbf, #2349bc 58%, #4b3cb5);
  filter: none;
}
.support-actions .button.secondary {
  background: #fff;
  border: 1px solid #b8cae6;
  color: #173468;
  box-shadow: 0 5px 18px rgba(23, 54, 104, 0.08);
}
.support-actions .button.secondary:hover {
  background: #eaf2ff;
  border-color: #718fca;
  color: #102a58;
}
.support-actions .button:focus-visible {
  outline: 3px solid #1b5ad1;
  outline-offset: 3px;
}
html[data-theme="dark"] .support-actions .button.secondary {
  background: #142644;
  border-color: #536d96;
  color: #edf4ff;
}
html[data-theme="dark"] .support-actions .button.secondary:hover {
  background: #1e3964;
  border-color: #80a7e5;
  color: #fff;
}
html[data-theme="dark"] .support-actions .button:focus-visible {
  outline-color: #9ec7ff;
}


/* ===== Apex Leads Inc. V2 public-site mobile polish ===== */
:root { --mobile-safe: max(18px, env(safe-area-inset-left)); }
@media (max-width: 700px) {
  .container { width: min(100% - 28px, var(--max)); }
  .site-header { height: 64px; }
  .nav { gap: 12px; }
  .brand { font-size: 14px; }
  .brand-mark { flex: 0 0 auto; }
  .page-hero { padding-top: 52px; padding-bottom: 56px; }
  .page-hero h1, .hero h1 { font-size: clamp(38px, 12vw, 58px); line-height: .98; letter-spacing: -.055em; }
  .hero { padding-top: 58px; }
  .hero-copy .lead, .sublead { font-size: 16px; line-height: 1.65; }
  .hero-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .hero-actions .button, .simple-cta .button { width: 100%; min-height: 52px; }
  .section { padding-top: 58px; padding-bottom: 58px; }
  .grid-2, .grid-3, .grid-4, .split, .dashboard, .comparison { grid-template-columns: 1fr !important; }
  .card, .service-card, .form-card, form.card { border-radius: 16px; padding: 20px; }
  .service-card h3 { font-size: 27px; }
  input, select, textarea, .field #service { font-size: 16px; min-height: 50px; border-radius: 10px; }
  textarea { min-height: 130px; }
  form .button { width: 100%; min-height: 52px; }
  .process-strip { overflow-x: auto; display: flex; scroll-snap-type: x proximity; padding-bottom: 8px; }
  .process-step { flex: 0 0 138px; scroll-snap-align: start; }
}


/* Batch 61: consistent form controls across the live Growth Audit form. */
#lead-form .field { min-width: 0; }
#lead-form .field > input:not([type="checkbox"]),
#lead-form .field > select {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 52px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid #b9c8dd;
  border-radius: 10px;
  background-color: #fff;
  color: #14243e;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: normal;
  box-shadow: none;
}
#lead-form .field > select,
#lead-form .field > #service {
  -webkit-appearance: none;
  appearance: none;
  height: 52px;
  min-height: 52px;
  padding: 0 44px 0 16px;
  border-width: 1px;
  border-radius: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23526787' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  font-weight: 500;
  cursor: pointer;
}
#lead-form .field > input::placeholder,
#lead-form .field > textarea::placeholder { color: #72819a; opacity: 1; }
#lead-form .field > textarea {
  box-sizing: border-box;
  border-color: #b9c8dd !important;
  border-radius: 10px !important;
  color: #14243e;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
}
#lead-form .field > input:focus-visible,
#lead-form .field > select:focus-visible,
#lead-form .field > textarea:focus-visible {
  outline: 2px solid #4c82ec;
  outline-offset: 2px;
  border-color: #4c82ec;
}
html[data-theme="dark"] #lead-form .field > input,
html[data-theme="dark"] #lead-form .field > select,
html[data-theme="dark"] #lead-form .field > textarea {
  background-color: #0a1527;
  border-color: #405778 !important;
  color: #edf3ff;
}
html[data-theme="dark"] #lead-form .field > select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23c9d8ee' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
html[data-theme="dark"] #lead-form .field > input::placeholder,
html[data-theme="dark"] #lead-form .field > textarea::placeholder { color: #aabbd2; }
@media (max-width: 700px) {
  #lead-form .grid-2 { grid-template-columns: minmax(0, 1fr) !important; }
  #lead-form .field > input:not([type="checkbox"]),
  #lead-form .field > select,
  #lead-form .field > #service { height: 52px; min-height: 52px; }
}

/* Batch 66: polish the public site's phone layout and FAQ contrast. */
html[data-theme="dark"] .faq-question { color: #f1f6ff; }
html[data-theme="dark"] .faq-question::after { color: #9ec0ff; }
html[data-theme="dark"] .faq-answer { color: #c5d2e6; }
html[data-theme="light"] .faq-question { color: #142747; }
.faq-question:focus-visible { outline: 2px solid #4c82ec; outline-offset: 3px; border-radius: 7px; }

/* Carry the same card spacing and timeline alignment onto wider screens. */
@media (min-width: 621px) {
  .problem-row {
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 12px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .problem-chip,
  .problem-chip:last-child {
    min-width: 0;
    padding: 22px 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(18, 42, 84, .055);
  }
  html[data-theme="dark"] .problem-row { background: transparent; border: 0; }
  html[data-theme="dark"] .problem-chip { background: #16253b; border-color: #344a68; }

  .issue-list { gap: 16px; }
  .issue {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
  }
  html[data-theme="dark"] .issue { background: #16253b; border-color: #344a68; }

  .process-strip {
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 18px;
  }
  .process-step b { overflow-wrap: anywhere; }

  .timeline { position: relative; padding-left: 64px; border-left: 0; }
  .timeline::before {
    content: "";
    position: absolute;
    top: 11px;
    bottom: 11px;
    left: 20px;
    width: 2px;
    background: #7895c5;
  }
  .timeline-item::before {
    left: -53px;
    top: 2px;
    width: 18px;
    height: 18px;
    border: 4px solid #e4edff;
  }
}

@media (max-width: 620px) {
  .problem-row {
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .problem-chip,
  .problem-chip:last-child {
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 72px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    text-align: left;
    font-size: 15px;
    box-shadow: 0 8px 25px rgba(18, 42, 84, .055);
  }
  .problem-chip .icon { flex: 0 0 38px; margin: 0; }
  html[data-theme="dark"] .problem-row { background: transparent; border: 0; }
  html[data-theme="dark"] .problem-chip { background: #16253b; border-color: #344a68; }

  .issue-list { gap: 12px; }
  .issue {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
  }
  html[data-theme="dark"] .issue { background: #16253b; border-color: #344a68; }

  .process-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow: visible;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 18px;
  }
  .process-step { min-width: 0; padding: 12px 4px; }
  .process-step b { overflow-wrap: anywhere; }

  .timeline {
    position: relative;
    padding-left: 64px;
    border-left: 0;
  }
  .timeline::before {
    content: "";
    position: absolute;
    top: 11px;
    bottom: 11px;
    left: 20px;
    width: 2px;
    background: #7895c5;
  }
  .timeline-item::before {
    left: -53px;
    top: 2px;
    width: 18px;
    height: 18px;
    border: 4px solid #e4edff;
  }
}
