/* webredesign-leads dev UI — EarlyBird-inspired theme.
   Reference: https://dynamic-pineapples-864043.framer.app/
   Palette chosen by eye from the reference screenshots:
   neutral off-white base with soft low-opacity "cloud puffs" hugging the
   viewport edges, near-black foreground, soft warm-gray borders,
   rounded-full pills and buttons, generous vertical rhythm. */

:root {
  --bg:         #F9F9F9;
  --bg-soft:    #FFFFFF;
  --surface:    #FFFFFF;
  --fg:         #0B0B0F;
  --fg-soft:    #3A3A40;
  --muted:      #6E6E75;
  --border:     #E8E6DF;
  --border-strong: #D9D5CB;
  --accent:     #22C55E;
  --danger:     #DC2626;
  --warn:       #B45309;
  --ring:       rgba(11, 11, 15, 0.08);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(17,17,20,0.04), 0 1px 1px rgba(17,17,20,0.03);
  --shadow-md: 0 1px 2px rgba(17,17,20,0.05), 0 8px 24px rgba(17,17,20,0.06);

  /* Framer/EarlyBird-style "floating dark element" shadow.
     Copied verbatim from the reference site — 8 stacked black shadows with
     compressed spread give a soft, realistic depth cue, and the inset white
     highlight rim fakes a subtle rim-light on the top edge.            */
  --shadow-dark:
    rgba(255, 255, 255, 0.15)  0 0 20px 1.64px inset,
    rgba(0, 0, 0, 0.13)  0 0.84px  0.50px -0.3125px,
    rgba(0, 0, 0, 0.13)  0 1.99px  1.19px -0.6250px,
    rgba(0, 0, 0, 0.13)  0 3.63px  2.18px -0.9375px,
    rgba(0, 0, 0, 0.13)  0 6.04px  3.62px -1.2500px,
    rgba(0, 0, 0, 0.13)  0 9.75px  5.85px -1.5625px,
    rgba(0, 0, 0, 0.13)  0 15.96px 9.57px -1.8750px,
    rgba(0, 0, 0, 0.13)  0 27.48px 16.49px -2.1875px,
    rgba(0, 0, 0, 0.13)  0 50.00px 30.00px -2.5000px;

  --dark-surface: #1C1C1C;   /* Framer uses this instead of pure black */

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Instrument Serif", "Times New Roman", Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--fg); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono  { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.center { text-align: center; }

/* ---------- cloud backdrop ----------
   Faithful port of the EarlyBird reference. I inspected their DOM and
   this is literally what they do:
     body { background: #F9F9F9 }
     <figure position:fixed; top:0; left:0; right:0; bottom:200px >
       <div position:absolute; inset:0 >
         <img src=clouds.png style="object-fit:cover" />
       </div>
     </figure>
   The 200px bottom inset keeps the clouds floating in the upper part of
   the viewport instead of covering the whole screen — content near the
   fold then sits against the clean base color.                          */
.backdrop {
  position: fixed;
  inset: 0;                /* full viewport — the PNG fades to transparent
                              at its edges so no visible seam at the bottom */
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.backdrop .clouds {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  user-select: none;
}

.site-header,
.container {
  position: relative;
  z-index: 1;
}

/* The header needs its own stacking context ABOVE the container so that
   the login popover panel (absolutely positioned, extends below the
   header row into the hero area) isn't painted-over by the hero / scan
   form. Without this bump, clicks on the popover's input fields land
   on the hero behind it and never reach the input. */
.site-header { z-index: 50; }

/* ---------- page-load appear animation ----------
   Faithful port of the Framer "appear" animation. I inspected their SSR
   markup: every appear-enabled element is rendered with the inline style
     opacity: 0.001; transform: translateY(100px) scale(0.9);
   then framer-motion animates it to opacity:1 / transform:none with
   ease-out. We reproduce the exact same from/to values and easing using
   pure CSS + staggered animation-delay — no JS runtime needed.

   Staggered reading-order: header -> hero pill -> h1 -> lede -> form ->
   tiles. Clouds get a separate longer fade because translating them
   would look wrong.                                                    */
@keyframes appear {
  from {
    opacity: 0.001;
    transform: translateY(100px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes appear-clouds {
  from { opacity: 0; transform: scale(1.04); }
  to   { opacity: 1; transform: scale(1);    }
}

.appear {
  /* Pre-animation state so there's no flash of final layout before the
     animation begins (matches Framer's SSR opacity:0.001). */
  opacity: 0.001;
  transform: translateY(100px) scale(0.9);
  animation: appear 760ms cubic-bezier(0, 0, 0.58, 1) both;
  /* `both` keeps the element at the final state after animation ends. */
}

/* Stagger: each step is ~80ms later than the previous one, which is the
   "feel" Framer ships with for hero stacks. */
.appear.d-0 { animation-delay: 0ms; }
.appear.d-1 { animation-delay: 80ms; }
.appear.d-2 { animation-delay: 160ms; }
.appear.d-3 { animation-delay: 240ms; }
.appear.d-4 { animation-delay: 320ms; }
.appear.d-5 { animation-delay: 400ms; }
.appear.d-6 { animation-delay: 480ms; }
.appear.d-7 { animation-delay: 560ms; }
.appear.d-8 { animation-delay: 640ms; }
.appear.d-9 { animation-delay: 720ms; }
.appear.d-10 { animation-delay: 800ms; }

.backdrop .clouds {
  animation: appear-clouds 1400ms ease-out both;
}

/* Note: we intentionally do NOT honor `prefers-reduced-motion: reduce` here.
   Windows' "Show animations in Windows" toggle (and Brave's matching
   setting) flip that media query on, which silently kills the entire intro
   animation on machines where that toggle is off. For a <1.5s non-looping,
   non-parallax intro that's a regression, not an a11y win. Real a11y-
   sensitive flows (spinners, scroll-jacking, parallax) should reintroduce
   the guard locally. */

/* ---------- layout ---------- */
.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 8px 24px 80px;
}

.site-header {
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  position: relative;
}

/* TecAdRise marketing footer (ported from website2026 Footer.css). */
.site-footer.ft-tec {
  --ft-bg-navy: #0c1829;
  --ft-text: #f8fafc;
  --ft-text-muted: rgba(248, 250, 252, 0.65);
  --ft-border-navy: rgba(255, 255, 255, 0.08);
  --ft-teal-light: #f97316;

  position: relative;
  z-index: 2;
  max-width: none;
  margin: 56px 0 0;
  padding: 0;
  text-align: left;
  border-top: none;
  background: var(--ft-bg-navy);
  color: var(--ft-text);
  border-radius: 40px 40px 0 0;
}
.site-footer.ft-tec .ft-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 56px 24px 0;
  box-sizing: border-box;
}
.site-footer.ft-tec .ft-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 56px;
  padding-bottom: 36px;
}
.site-footer.ft-tec .ft-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  text-decoration: none;
  color: inherit;
}
.site-footer.ft-tec .ft-brand-lockup:hover {
  text-decoration: none;
}
.site-footer.ft-tec .ft-brand-lockup:hover .brand-name {
  text-decoration: none;
}
.site-footer.ft-tec .ft-brand-name-on-dark {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ft-text);
}
.site-footer.ft-tec .ft-brand-name-on-dark .ft-for,
.site-footer.ft-tec .ft-brand-name-on-dark .ft-dotcom {
  color: var(--ft-text-muted);
  font-weight: 600;
}
.site-footer.ft-tec .ft-brand-desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ft-text-muted);
  line-height: 1.7;
}
.site-footer.ft-tec .ft-col-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.6);
}
.site-footer.ft-tec .ft-address-title {
  margin-top: 22px;
}
.site-footer.ft-tec .ft-nav a {
  display: block;
  font-size: 0.92rem;
  color: var(--ft-text-muted);
  padding: 4px 0;
  text-decoration: none;
  transition: color 0.2s ease;
}
.site-footer.ft-tec .ft-nav a:hover {
  color: var(--ft-teal-light);
  text-decoration: none;
}
.site-footer.ft-tec .ft-col p {
  margin: 0 0 6px;
  font-size: 0.92rem;
  color: var(--ft-text-muted);
  line-height: 1.6;
}
.site-footer.ft-tec .ft-contact-link {
  color: inherit;
  text-decoration: none;
}
.site-footer.ft-tec .ft-contact-link:hover {
  color: var(--ft-teal-light);
  text-decoration: none;
}
.site-footer.ft-tec .ft-company-line {
  font-weight: 600;
  color: var(--ft-text);
}
.site-footer.ft-tec .ft-bottom {
  padding: 18px 0 28px;
  border-top: 1px solid var(--ft-border-navy);
  text-align: center;
}
.site-footer.ft-tec .ft-ai-disclosure {
  margin: 0 0 10px;
  font-size: 0.85em;
  opacity: 0.85;
  color: var(--ft-text-muted);
}
.site-footer.ft-tec .ft-ai-disclosure strong {
  color: var(--ft-text);
}
.site-footer.ft-tec .ft-legal {
  margin: 0;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.5;
}
@media (max-width: 1024px) {
  .site-footer.ft-tec .ft-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .site-footer.ft-tec .ft-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}


/* ---------- brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: var(--r-pill);
  background: var(--dark-surface);
  color: #fff;
  display: inline-flex;
  align-items: center; justify-content: center;
  box-shadow: var(--shadow-dark);
}
.brand-name { font-size: 15px; }

.header-menu {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}
.mobile-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  background: var(--dark-surface);
  color: #fff;
  box-shadow: var(--shadow-dark);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.mobile-menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 160ms ease, opacity 160ms ease;
}
.site-header.is-menu-open .mobile-menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-header.is-menu-open .mobile-menu-toggle span:nth-child(2) {
  opacity: 0;
}
.site-header.is-menu-open .mobile-menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 11px;
  border-radius: var(--r-pill);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(28, 28, 28, 0.06);
  color: var(--fg);
}
.site-nav-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(28, 28, 28, 0.28);
  flex: 0 0 auto;
}

/* ---------- pills / badges ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  box-shadow: var(--shadow-sm);
}
.pill-soft { background: rgba(255,255,255,0.7); }
.dot {
  width: 8px; height: 8px;
  border-radius: var(--r-pill);
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.18);
}

/* ---------- hero ---------- */
.hero {
  text-align: center;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 30px;
}
.hero-tight { padding: 24px 0 8px; }

/* ---------- side-by-side "steps" section ----------
   Holds the step-2 / step-3 hero blocks with an arrow SVG between
   them. Desktop: three-column flex row (step | arrow | step).
   Mobile / narrow (<=960px): stacks vertically, arrow is hidden. */
.how-section {
  margin-top: 64px;
  padding: 28px 0 8px;
  scroll-margin-top: 92px;
}
.section-spacer {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1320px;
  margin: 0 auto 48px;
}
.section-spacer::before,
.section-spacer::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(28, 28, 28, 0.16)
  );
}
.section-spacer::after {
  background: linear-gradient(
    90deg,
    rgba(28, 28, 28, 0.16),
    transparent
  );
}
.section-spacer span {
  width: 8px;
  height: 8px;
  margin: 0 14px;
  border-radius: 50%;
  background: #716435;
  box-shadow: 0 0 0 6px rgba(113, 100, 53, 0.08);
}
.section-title {
  margin: 0;
  text-align: center;
  font-family: var(--font-sans);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #716435;
}
.step-flow {
  width: 100%;
  max-width: 1320px;
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr) 64px minmax(0, 1fr);
  align-items: stretch;
  justify-content: center;
  gap: 12px;
}

/* Each step column: equal-width, top-aligned content, left-aligned
   text so paragraphs read cleanly. Inherits all `.hero` typography
   (display heading, serif italic em, lede paragraph) but overrides
   the centered flex layout. */
.step-flow .hero-step {
  min-width: 0;           /* allow shrinking inside the flex row */
  max-width: none;
  margin: 0;
  padding: 26px 24px;
  border: 1px solid rgba(28, 28, 28, 0.08);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 18px 45px rgba(28, 28, 28, 0.05);
  align-items: flex-start;
  text-align: left;
  gap: 13px;
  backdrop-filter: blur(8px);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}
.step-flow .hero-step:hover {
  transform: translateY(-3px);
  border-color: rgba(28, 28, 28, 0.14);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 24px 60px rgba(28, 28, 28, 0.09);
}
.step-flow .hero-step .display {
  max-width: 100%;
  font-size: clamp(28px, 2.8vw, 42px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.step-flow .hero-step .lede {
  max-width: 100%;
  font-size: 14.5px;
  line-height: 1.55;
}

/* Arrow: sits in the middle column, vertically centered so its
   baseline lines up roughly with the headings above. */
.step-arrow {
  color: #716435;
  opacity: 0.85;
  flex: 0 0 auto;
  pointer-events: none;
}
.step-arrow-right {
  width: 64px;
  height: auto;
  align-self: center;
  justify-self: center;
  margin-top: 0;       /* visual tweak so the curve aligns with h1 */
  transition: transform 180ms ease, opacity 180ms ease;
}
.step-flow:hover .step-arrow-right {
  opacity: 1;
  transform: translateX(3px);
}

/* Arrow entrance: uses the shared .appear.d-8 helper directly (HTML
   carries `class="... appear d-8"`), so the SVG fades, slides up
   and scales in with the EXACT same keyframe / timing / easing as
   Step 2's heading and paragraph. No overrides, no custom keyframe
   — the three elements are visually inseparable during the
   entrance animation. */

/* Narrow viewports: collapse to a vertical stack. Arrow hidden — a
   simple "one under the other" layout reads cleaner than repurposing
   the horizontal arrow. Breakpoint is generous (960px) because the
   side-by-side layout already feels cramped well before true mobile
   widths — the two .display headings don't breathe below ~500px each. */
@media (max-width: 960px) {
  .step-flow {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 18px;
    margin-top: 24px;
  }
  .step-flow .hero-step {
    max-width: 100%;
    align-items: center;
    text-align: center;
    padding: 24px 20px;
  }
  .step-arrow-right { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .step-flow .hero-step,
  .step-arrow-right,
  .tile,
  .tile-icon {
    transition: none;
  }
  .step-flow .hero-step:hover,
  .step-flow:hover .step-arrow-right,
  .tile:hover,
  .tile:hover .tile-icon {
    transform: none;
  }
}

.display {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--fg);
  max-width: 780px;
}
.display em,
.display-sm em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}
/* Hero overline: "Get customers in 3 steps" line that sits directly
   above the main display heading and reads as one title block with it.
   Olive-gold picks up on the warm tones in the cloud backdrop without
   competing with the black body text below. */
.hero-overline {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: #716435;
  margin-bottom: 10px;
}
/* Step number prefix ("1.") inside the display heading — same weight
   as the heading text, nudged tighter so it reads as a label, not a
   decimal point. */
.display .step-num {
  display: inline-block;
  margin-right: 0.15em;
  font-feature-settings: "tnum" 1;
}
.display-sm {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(26px, 3.5vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.hero-subtitle {
  font-size: clamp(18px, 2.3vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--fg);
}
.hero-pricing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 9px 16px;
  border: 1px solid rgba(28, 28, 28, 0.10);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 30px rgba(28, 28, 28, 0.06);
  color: var(--fg);
  font-size: clamp(14px, 1.5vw, 17px);
  font-weight: 600;
  letter-spacing: -0.01em;
  backdrop-filter: blur(8px);
}
.hero-pricing strong {
  font-weight: 750;
}
.hero-pricing-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(28, 28, 28, 0.28);
}
.hero-pricing-price {
  padding: 2px 9px;
  border-radius: var(--r-pill);
  background: var(--fg);
  color: #fff;
  font-weight: 600;
}

.lede {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  max-width: 780px;
}

.back {
  display: inline-block;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 4px;
}

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 28px;
}
.card + .card { margin-top: 20px; }

.card-warn {
  border-color: #F5D29A;
  background: #FFF8EC;
  color: var(--warn);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card-error {
  border-color: #F4C3C3;
  background: #FFF3F3;
  color: var(--danger);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card-empty {
  text-align: center;
  padding: 48px 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ---------- terms / legal (scanforleads.com/terms) ---------- */
.terms-legal {
  max-width: 860px;
  margin: 0 auto 48px;
  padding: 0 8px;
}
.terms-legal .card {
  text-align: left;
  padding: 32px 36px 40px;
}
.terms-legal .terms-meta {
  margin: 0 0 20px;
}
.terms-legal h2 {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 28px 0 12px;
  scroll-margin-top: 96px;
}
.terms-legal h2:first-of-type {
  margin-top: 0;
}
.terms-legal p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--fg-soft);
}
.terms-legal ul {
  margin: 0 0 14px 1.25rem;
  padding: 0;
  color: var(--fg-soft);
  font-size: 15px;
  line-height: 1.65;
}
.terms-legal li { margin-bottom: 6px; }
.terms-legal a { text-decoration: underline; text-underline-offset: 3px; }
.terms-legal a:hover { color: var(--fg); }

/* ---------- form ---------- */
.form {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}
.field .hint {
  font-size: 12.5px;
  color: var(--muted);
}

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font: inherit;
  color: var(--fg);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--fg);
  box-shadow: 0 0 0 4px var(--ring);
}
textarea { resize: vertical; font-family: var(--font-sans); }
select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
select:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

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

.row-scan-counts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.row-city-nh {
  align-items: start;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}
.check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--fg); }

/* ---------- city picker ----------
   Searchable single-select dropdown with an optional min/max population
   pre-filter. All interaction is client-side against /api/cities; see
   the <script> at the bottom of templates/index.html for the logic. */
.city-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* extra breathing room between the field-head and the picker body -
     the label row sat too close to the min/max pop inputs below */
  margin-top: 8px;
}

.city-pop-row {
  /* Matches the `.row` grid below (1fr|1fr, gap:20px) so the Min/Max
     population inputs line up perfectly under the Target-city and
     Neighborhoods comboboxes. */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: end;
}
.city-pop {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.city-pop input[type="number"] { padding: 10px 12px; }

.btn-link {
  background: transparent;
  border: none;
  padding: 10px 0;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-link:hover { color: var(--fg); }

.city-combo {
  position: relative;
}
.city-combo input[type="text"] {
  padding-right: 38px;            /* room for the caret icon */
  font-size: 14px;                /* smaller than the default 16px input font -
                                     the default looked oversized for a combobox */
}
.city-combo input[type="text"]::placeholder { font-size: 14px; }
.city-caret {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  transition: transform 120ms ease;
}
.city-combo.open .city-caret {
  transform: translateY(-50%) rotate(180deg);
  color: var(--fg);
}

.city-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}
.city-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
}
.city-item:hover,
.city-item.active {
  background: var(--bg-soft);
}
.city-main { color: var(--fg); font-weight: 500; }
.city-pop-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}
.city-empty {
  padding: 16px 12px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.city-status { min-height: 18px; }

@media (max-width: 560px) {
  .city-pop-row {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

/* ---------- neighborhood picker ---------- */
/* Reuses the city-combo visual grammar (caret, list, hover state) so
   the two pickers feel like a pair. Chips row sits ABOVE the search
   input: selections are the primary signal, the input is a secondary
   action ("add another"). */
.nh-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.row-city-nh .nh-picker {
  margin-top: 8px;
}
.nh-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
}
.nh-chips:empty { display: none; }
.nh-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 13px;
  color: var(--fg);
  max-width: 100%;
}
.nh-chip-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.nh-chip-x {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.nh-chip-x:hover { background: rgba(0, 0, 0, 0.08); color: var(--fg); }

.nh-combo {
  position: relative;
}
.nh-combo input[type="text"] {
  padding-right: 38px;
  font-size: 14px;
}
.nh-combo input[type="text"]::placeholder { font-size: 14px; }
.nh-combo input[type="text"]:disabled {
  background: var(--bg-soft);
  color: var(--muted);
  cursor: not-allowed;
}
.nh-caret {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
  transition: transform 120ms ease, color 120ms ease;
}
.nh-combo.open .nh-caret {
  transform: translateY(-50%) rotate(180deg);
  color: var(--fg);
}
.nh-list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}
.nh-item {
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--fg);
}
.nh-item:hover { background: var(--bg-soft); }
.nh-empty {
  padding: 14px 12px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* Field row containing two .check checkboxes on ONE line. Used for
   "Include leads without a website" + "Select all penalties".
   Overrides the base .field rule (display:flex; flex-direction:column)
   to put the two labels side-by-side horizontally. */
.field-inline-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
}
.field-inline-row .check {
  /* .check is already inline-flex; in a row-flex parent that's fine,
     but we explicitly zero any implicit width so the checkbox hugs its
     label and sits flush-left beside the next one. */
  margin: 0;
  flex: 0 0 auto;
}

/* ---------- penalty grid ---------- */
.pen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  align-items: stretch;
}
.pen {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 12px 14px;
  min-height: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.pen:hover { background: #fff; border-color: var(--border-strong); }
.pen input[type="checkbox"] {
  margin-top: 3px;
  width: 16px; height: 16px;
  accent-color: var(--fg);
  flex-shrink: 0;
}
.pen:has(input[name="penalties"]:checked) {
  background: #fff;
  border-color: var(--fg);
  box-shadow: 0 0 0 3px var(--ring);
}
.pen-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
  min-width: 0;
}
.pen-label { font-size: 13.5px; font-weight: 600; cursor: pointer; }
.pen-desc { font-size: 12px; color: var(--muted); line-height: 1.4; }
.pen-checks {
  display: flex;
  flex: 0 0 18px;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 3px;
}
.pen-checks > input[type="checkbox"] { margin-top: 0; }
.pen-score {
  display: inline-flex;
  margin-top: auto;
  padding-top: 10px;
}
.score-mode-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.score-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 26px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--fg-soft);
  cursor: pointer;
  user-select: none;
}
.score-toggle-opt {
  min-width: 38px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  transition: background 120ms ease, color 120ms ease;
}
.score-toggle.is-ok .score-toggle-ok {
  background: #166534;
  color: #fff;
}
.score-toggle.is-nok .score-toggle-nok {
  background: var(--danger, #d12f2f);
  color: #fff;
}
.pen-mandatory {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  line-height: 1;
  cursor: pointer;
}
.pen-mandatory input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1px solid rgba(209, 47, 47, 0.72);
  border-radius: 3px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(209, 47, 47, 0.08);
  cursor: pointer;
}
.pen-mandatory input[type="checkbox"]:checked {
  border-color: var(--danger, #d12f2f);
  background: var(--danger, #d12f2f);
  box-shadow: none;
}
.pen-mandatory input[type="checkbox"]:checked::after {
  content: "";
  display: block;
  width: 5px;
  height: 9px;
  margin: 1px 0 0 5px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.pen-mandatory input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(209, 47, 47, 0.32);
  outline-offset: 2px;
}
.pen:has(input[name="mandatory_penalties"]:checked) {
  border-color: var(--danger, #d12f2f);
  box-shadow: 0 0 0 3px rgba(209, 47, 47, 0.12);
}

/* Custom (user-defined) penalty chip: dashed accent + room for the
   delete handle. The dashed edge is the cheapest visual signal that
   "this one is mine, the built-ins are not deletable". */
.pen-custom {
  position: relative;
  border-style: dashed;
  padding-right: 28px; /* leave space for the x handle */
}
.pen-del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 100ms ease, color 100ms ease, border-color 100ms ease;
}
.pen-del:hover {
  background: #fee;
  color: #b91c1c;
  border-color: #f5a5a5;
}

/* "+ Add custom" card. Rendered as a <button> so keyboard users can
   tab to it; styled as a dashed, muted peer of the regular chips. */
.pen-add {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  min-height: 100%;
  background: transparent;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  color: var(--muted);
  text-align: left;
  font: inherit;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.pen-add:hover {
  background: var(--bg-soft);
  border-color: var(--fg);
  color: var(--fg);
}
.pen-add-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

/* Anonymous-visitor sell-point callout. Lives INSIDE the pen-grid as
   a grid cell immediately after the "+ Add custom" card, spanning
   the remaining cells on that row so it sits beside the "+" card on
   the SAME line. Arrow + text are a horizontal flex row inside the
   cell. Uses the olive/thin-stroke look from `.step-arrow` further
   down the page so the two hand-drawn arrows match. */
.pen-sell {
  grid-column: span 3;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 0 4px;
  pointer-events: none;
}
.pen-sell-arrow {
  flex-shrink: 0;
  width: 50px;
  height: 32px;
  color: #716435;                /* olive, matches .step-arrow */
  opacity: 0.85;
}
.pen-sell-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.3;
  min-width: 0;
  max-width: 200px;
}
.pen-sell-head {
  font-size: 15px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.01em;
  color: #716435;
}
.pen-sell-sub {
  font-size: 12.5px;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  /* At this width the .pen-grid collapses to 1-2 cols anyway, so the
     callout just claims its own row below the "+" card. */
  .pen-sell {
    grid-column: 1 / -1;
    padding: 4px 4px 0;
  }
  .pen-sell-arrow { width: 90px; height: 28px; }
}

/* ---------- custom-penalty modal ---------- */
.pen-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pen-modal.active { display: flex; }
.pen-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 20, 0.45);
  backdrop-filter: blur(2px);
}
.pen-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px 24px 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pen-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}
.pen-modal-close:hover { background: var(--bg-soft); color: var(--fg); }
.pen-modal-head {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}
.pen-modal-sub {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
}
/* Inline error banner inside the create-penalty modal. Shown only
   when the server rejects the submission (e.g. label empty, cap
   reached); the JS inserts this node right after .pen-modal-sub. */
.pen-modal-err {
  margin: 0;
  padding: 8px 12px;
  font-size: 13px;
  color: #7a1f1f;
  background: #fdecec;
  border: 1px solid #f1b7b7;
  border-radius: var(--r-sm);
}
.pen-modal-card .field label { font-size: 13px; font-weight: 600; }
.pen-modal-card textarea {
  width: 100%;
  resize: vertical;
  min-height: 72px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font: inherit;
  background: var(--bg-soft);
}
.pen-modal-card textarea:focus {
  outline: none;
  border-color: var(--fg);
  box-shadow: 0 0 0 3px var(--ring);
  background: #fff;
}
.pen-modal-card .actions { justify-content: flex-end; }

/* ---------- buttons ---------- */
.actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font: inherit;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
}
.btn-primary {
  background: var(--dark-surface);
  color: #fff;
  box-shadow: var(--shadow-dark);
}
.btn-primary:hover { transform: translateY(-1px); background: #272727; }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: #fff;
  color: var(--fg);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-soft); }
.btn-danger {
  background: #B91C1C;
  color: #fff;
  box-shadow: 0 12px 28px rgba(185, 28, 28, 0.24);
}
.btn-danger:hover { transform: translateY(-1px); background: #991B1B; }
.btn-danger:active { transform: translateY(0); }

/* ---------- submit button loading state ----------
   When the form is submitting, swap the arrow icon for a spinning ring
   and dim the label slightly. The button stays the same width so the
   layout doesn't jump. */
.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.75s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

.btn.is-loading { cursor: progress; opacity: 0.85; }
.btn.is-loading .btn-label { opacity: 0.8; }
.btn.is-loading .btn-arrow { display: none; }
.btn.is-loading .btn-spinner { display: inline-block; }

/* While the form is locked, block all further input without losing the
   fields' values on POST (disabled inputs don't get submitted). */
.form.is-locked { pointer-events: none; user-select: none; opacity: 0.85; }
.form.is-locked .btn-primary { opacity: 1; }   /* keep the button visible */

/* ---------- indeterminate top progress bar ----------
   Thin 2px sweep across the very top of the viewport while /scan is in
   flight. Green (same accent as the dots) so it's recognisable as
   "progress" across the whole UI. */
.scan-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  z-index: 100;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
}
.scan-progress.active { visibility: visible; }
.scan-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 40%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent) 40%,
    var(--accent) 60%,
    transparent 100%
  );
}
.scan-progress.active .scan-progress-bar {
  animation: scan-sweep 1.4s ease-in-out infinite;
}
@keyframes scan-sweep {
  from { transform: translateX(-100%); }
  to   { transform: translateX(350%); }
}

/* ---------- full-screen scan overlay ---------- */
.scan-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(249, 249, 249, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}
.scan-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.scan-overlay-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 36px;
  max-width: 440px;
  text-align: center;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.scan-overlay-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--fg);
  border-radius: 50%;
  animation: btn-spin 0.85s linear infinite;
  margin-bottom: 4px;
}
.scan-overlay-head {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.scan-overlay-body {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.scan-overlay-timer {
  margin-top: 6px;
  color: var(--fg);
  font-size: 13px;
  padding: 4px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}

/* ---------- tiles ---------- */
.tiles {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.how-tiles {
  width: 100%;
  max-width: 1320px;
  margin: 22px auto 0;
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr) 64px minmax(0, 1fr);
  gap: 12px;
}
.how-tile-1 { grid-column: 1; }
.how-tile-2 { grid-column: 3; }
.how-tile-3 { grid-column: 5; }
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}
.tile:hover {
  transform: translateY(-3px);
  border-color: rgba(28, 28, 28, 0.14);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 45px rgba(28, 28, 28, 0.08);
}
.tile-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-pill);
  background: var(--dark-surface);
  color: #fff;
  display: inline-flex;
  align-items: center; justify-content: center;
  margin-bottom: 4px;
  box-shadow: var(--shadow-dark);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.tile:hover .tile-icon {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 16px 32px rgba(28, 28, 28, 0.28);
}
.tile-icon svg { width: 20px; height: 20px; }
.tile h6 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.tile p { margin: 0; color: var(--muted); font-size: 14px; max-width: 220px; }

/* ---------- inline scan results (rendered below the form after POST /) ---------- */
.scan-results {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.results-header { padding: 0 0 8px; }
.results-header .display-sm { margin: 0 0 8px; }
.results-header .lede { margin: 0; }

/* Results span the full container width. Table uses 100% of this. */

/* ---------- stat row ---------- */
.stat-row {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.scan-results > .card-warn {
  margin-top: 0;
  position: relative;
  z-index: 1;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  box-shadow: var(--shadow-sm);
}
.stat-k {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.045em;
  white-space: nowrap;
}
.stat-v { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }

/* ---------- scheduler cards ---------- */
.scheduler-panel {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
}
.scheduler-panel.is-empty { display: none; }
.scheduler-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.scheduler-head h2 {
  margin: 0 0 3px;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.scheduler-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.scheduler-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: #fff;
}
.scheduler-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.scheduler-status {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.scheduler-pos {
  font-size: 11px;
  color: var(--fg-soft);
}
.scheduler-card strong {
  font-size: 14px;
  line-height: 1.25;
}
.scheduler-card-running {
  border-color: var(--fg);
  box-shadow: 0 0 0 3px var(--ring);
}
.scheduler-card-succeeded {
  border-color: rgba(21, 128, 61, 0.28);
  background: #F0FDF4;
}
.scheduler-card-failed {
  border-color: #F4C3C3;
  background: #FFF7F7;
}
.scheduler-result {
  font-size: 12px;
  font-weight: 600;
  color: #15803d;
}
.scheduler-error {
  font-size: 12px;
  line-height: 1.35;
  color: var(--danger, #d12f2f);
}

/* ---------- results table ---------- */
/* overflow-x: auto on the wrapper + min-width on the table = responsive.
   On wide viewports the table fits the container at 100%. On narrow
   viewports (phones, half-screen browsers) the wrapper scrolls
   horizontally instead of squeezing columns into unreadable strips. */
.card-table { padding: 0; overflow-x: auto; margin-top: 20px; position: relative; }

/* Table header toolbar: filter input left, view/export controls right. */
.leads-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.leads-filter-input {
  flex: 1 1 180px;
  max-width: min(420px, 100%);
  min-width: 140px;
  padding: 7px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--fg);
  font-size: 13px;
  line-height: 1.35;
}
.leads-filter-input::placeholder {
  color: var(--muted);
}
.leads-filter-input:focus {
  outline: none;
  border-color: var(--fg);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
}
.leads-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.leads-archive-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.leads-archive-filter:focus {
  outline: none;
}
.leads-archive-filter:hover,
.leads-archive-filter:focus-visible {
  border-color: var(--fg);
  color: var(--fg);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
}
.leads-archive-filter.is-active {
  border-color: var(--fg);
  background: var(--fg);
  color: #fff;
}
.leads-csv-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--fg);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.leads-csv-btn svg {
  width: 16px; height: 16px;
  stroke: currentColor;
}
.leads-csv-btn:hover {
  border-color: var(--fg);
  background: var(--fg);
  color: #fff;
}

table.leads {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}

/* Column widths: score column boosted (+10pp vs prior tight layout).
   Target items and Score items stay equal width. */
table.leads col.col-business { width: 15%; }
table.leads col.col-website  { width: 9%; }
table.leads col.col-type    { width: 8%; }
table.leads col.col-listing  { width: 7%; }
table.leads col.col-phone    { width: 11%; }
table.leads col.col-city     { width: 8%; }
table.leads col.col-score    { width: 8%; }
table.leads col.col-target   { width: 17%; }
table.leads col.col-missing  { width: 17%; } 

/* All cells wrap on word boundaries so narrower columns don't blow
   out the fixed layout with long urls or business names. */
table.leads th, table.leads td {
  overflow-wrap: anywhere;
  word-break: break-word;
}
table.leads thead th {
  position: sticky;
  top: 0;
  background: var(--bg-soft);
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
table.leads th.num, table.leads td.num { text-align: right; }
table.leads tbody td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.leads tbody tr:last-child td { border-bottom: none; }
table.leads tbody tr[data-lead-archived="1"] td {
  background: #fafafa;
}

.lead-name { font-weight: 600; }
tr[data-lead-archived="1"] .lead-name {
  color: var(--muted);
}
.lead-added-at {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}
.lead-name.lead-name--mark-green { color: #15803d; }
.lead-name.lead-name--mark-yellow { color: #a16207; }
.lead-name.lead-name--mark-red { color: #b91c1c; }
.count {
  display: inline-flex;
  min-width: 28px; height: 28px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: var(--fg);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  align-items: center; justify-content: center;
}

/* Penalty list: one item per line, plain text, no pill/bubble styling.
   The old pill UI got cluttered when leads had 6+ missing items. */
.pen-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pen-item {
  font-size: 13px;
  line-height: 1.35;
  color: var(--fg-soft);
}
/* Target item = one of the items that satisfied the configured score mode.
   Bold so it stands out in the "Score items" column without being a
   loud colored pill. */
.pen-item-target {
  color: var(--fg);
  font-weight: 600;
}
/* .tag / .tag-red is still used elsewhere (e.g. the "no website" chip) so
   it stays. */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 12px;
  color: var(--fg-soft);
}
.tag-red { background: #FFF3F3; border-color: #F4C3C3; color: var(--danger); }
/* Warn tag: used for leads whose site couldn't be audited (bot-wall /
   parked / dead). The row itself is also dimmed (.row-unreachable) so
   these visually subside relative to real, paid leads. */
.tag-warn { background: #FFF7E6; border-color: #F2D19A; color: #8A5A00; }
.leads tr.row-unreachable { background: #FAFAF8; }
.leads tr.row-unreachable td { color: var(--fg-soft); }
.leads tr.row-unreachable .lead-name { color: var(--fg); }
.leads tr.row-unreachable .lead-name.lead-name--mark-green { color: #15803d; }
.leads tr.row-unreachable .lead-name.lead-name--mark-yellow { color: #a16207; }
.leads tr.row-unreachable .lead-name.lead-name--mark-red { color: #b91c1c; }
/* Google Maps deep-link in its own column. Subtle button-ish look so
   it reads as an affordance without competing with the website link
   (which is the primary CTA for a lead). `.gmaps-link.muted` is used
   for the fallback search URL when we didn't capture a direct place
   URL — still usable, but visually downplayed to signal "best-effort". */
.leads a.gmaps-link {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--fg);
  font-size: 12.5px;
  text-decoration: none;
  white-space: nowrap;
}
.leads a.gmaps-link:hover { border-color: var(--fg); }
.leads a.gmaps-link.muted { color: var(--muted); }

/* Sortable column headers (Score, Type): three-state cycle in JS:
   none -> desc -> asc -> none. The SVG has both up and down arrows;
   class toggles in the script light up whichever one matches the
   current direction (both dim in the 'none' state so the user can
   still see sort is available). */
table.leads thead th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color .12s ease;
}
/* Left-align the sortable header label so wrapped words ("Penalty" /
   "Score") start at the same x position instead of stacking on the
   right edge (inherited from th.num). */
table.leads thead th.num.sortable { text-align: left; }
table.leads thead th.sortable:hover,
table.leads thead th.sortable:focus-visible {
  color: var(--fg);
}
table.leads thead th.sortable .th-label { margin-right: 6px; }
table.leads thead th.sortable .sort-caret {
  display: inline-flex;
  vertical-align: middle;
  color: var(--muted);
  opacity: 0.55;
  transition: opacity .12s ease, color .12s ease;
}
table.leads thead th.sortable .sort-caret svg { width: 10px; height: 12px; }
table.leads thead th.sortable:hover .sort-caret { opacity: 1; }
table.leads thead th.sortable.is-sort-desc,
table.leads thead th.sortable.is-sort-asc { color: var(--fg); }
table.leads thead th.sortable.is-sort-desc .sort-caret,
table.leads thead th.sortable.is-sort-asc  .sort-caret {
  color: var(--fg);
  opacity: 1;
}
/* Dim the inactive half of the caret pair so the active direction
   reads unambiguously. In 'none' state both stay at the default
   50% opacity so the column still looks "sortable" at a glance. */
table.leads thead th.sortable.is-sort-desc .caret-up   { opacity: 0.25; }
table.leads thead th.sortable.is-sort-asc  .caret-down { opacity: 0.25; }

/* Per-row delete handle. Pinned to the row's top-right corner via
   `position: relative` on the <tr> + `position: absolute` on the
   button. Stays low-contrast by default (this is a destructive
   action that shouldn't shout) and fades in when the row is hovered
   or the button itself is focused, so keyboard users can find it
   without a mouse. */
table.leads tbody tr { position: relative; }
table.leads tbody td.cell-business {
  /* Leave room on the right so the business-name text doesn't run
     under the absolute-positioned corner stack (delete + markers). */
  padding-right: 52px;
}
/* Delete + color markers: pinned to the row's top-right (same box as
   the old solo delete button). Markers stay visible; delete fades in
   on row hover or focus for keyboard users. */
.lead-corner-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  /* Same horizontal center for X and the marker column underneath. */
  align-items: center;
  gap: 4px;
}
.lead-markers {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.lead-mark {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  cursor: pointer;
  box-sizing: border-box;
  transition: transform .1s ease, box-shadow .1s ease, opacity .12s ease;
}
.lead-mark--green { background: #22c55e; }
.lead-mark--yellow { background: #eab308; }
.lead-mark--red { background: #ef4444; }
.lead-mark:hover { transform: scale(1.08); }
.lead-mark.is-active {
  box-shadow: 0 0 0 1px var(--fg);
}
.lead-mark:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}
.lead-del,
.lead-archive {
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity .12s ease, border-color .12s ease,
              background .12s ease, color .12s ease;
}
.lead-del svg { width: 14px; height: 14px; }
.lead-archive svg { width: 14px; height: 14px; }
table.leads tbody tr:hover .lead-del,
table.leads tbody tr:hover .lead-archive,
.lead-del:focus-visible,
.lead-archive:focus-visible { opacity: 1; }
.lead-del:hover {
  border-color: #F4C3C3;
  background: #FFF3F3;
  color: var(--danger, #d12f2f);
}
.lead-archive:hover,
tr[data-lead-archived="1"] .lead-archive {
  border-color: #CBD5E1;
  background: #F8FAFC;
  color: #475569;
}
.lead-del:disabled,
.lead-archive:disabled { opacity: 0.4; cursor: default; }

/* ---------- lead delete modal ---------- */
body.has-lead-delete-modal { overflow: hidden; }
.lead-delete-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lead-delete-modal.active { display: flex; }
.lead-delete-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(3px);
}
.lead-delete-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 22px;
  padding: 26px 28px 22px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}
.lead-delete-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.lead-delete-close:hover { background: var(--bg-soft); color: var(--fg); }
.lead-delete-kicker {
  margin: 0 0 8px;
  color: #B91C1C;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.lead-delete-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.lead-delete-copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.lead-delete-name {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--fg);
  font-size: 13px;
  font-weight: 700;
}
.lead-delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.lead-delete-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

/* City / Area cell: city on top line, neighborhood (if present) on a
   second, visually-secondary line. Matches the label hierarchy used
   for the "Business" column (name + rating) so the two columns read
   the same way. */
.lead-city { font-weight: 500; }
.lead-area { margin-top: 2px; font-style: italic; }

/* Client-side pagination footer. Hidden by default when a single page
   covers every row (see inline script in _results.html). */
.leads-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 13px;
  color: var(--fg-soft);
}
.leads-pager-info { letter-spacing: 0.01em; }
.leads-pager-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--fg);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.leads-pager-btn:hover:not(:disabled) {
  border-color: var(--fg);
  background: var(--fg);
  color: #fff;
}
.leads-pager-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hint { font-size: 12.5px; color: var(--muted); }
.hint-error { color: var(--danger, #d12f2f); font-weight: 500; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .site-header {
    flex-wrap: nowrap;
    align-items: center;
  }
  .mobile-menu-toggle { display: inline-flex; }
  .header-menu {
    position: absolute;
    top: calc(100% - 4px);
    right: 16px;
    z-index: 80;
    display: none;
    width: min(320px, calc(100vw - 32px));
    margin-left: 0;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 22px;
    background: rgba(28, 28, 28, 0.96);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .site-header.is-menu-open .header-menu { display: flex; }
  .site-nav {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .site-nav a {
    min-height: 42px;
    justify-content: space-between;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 15px;
  }
  .site-nav a:hover,
  .site-nav a:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
  }
  .site-nav-sep { display: none; }
  .header-menu .header-right {
    width: 100%;
    margin-left: 0;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    justify-content: stretch;
  }
  .header-menu .login-pop,
  .header-menu .login-pop-trigger,
  .header-menu .logout-form,
  .header-menu .logout-form .linkbtn {
    width: 100%;
  }
  .header-menu .login-pop-trigger {
    justify-content: center;
    min-height: 42px;
  }
  .header-menu .logout-form .linkbtn {
    min-height: 42px;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
  }
  .header-menu .login-pop-panel {
    position: static;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin-top: 10px;
    box-shadow: none;
  }
  .header-menu .pill-user {
    width: 100%;
    max-width: none;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.10);
    color: #fff;
  }
  .header-menu .pill-user-label,
  .header-menu .pill-user-credits,
  .header-menu .pill-user-sep {
    color: rgba(255, 255, 255, 0.72);
  }
  .header-menu .pill-user-credits strong,
  .header-menu .pill-user-topup {
    color: #fff;
  }
  .row { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .how-tiles { gap: 18px; }
  .how-tile-1,
  .how-tile-2,
  .how-tile-3 { grid-column: 1; }
  .stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { padding: 32px 0 16px; }
  .card { padding: 22px; }
}
@media (max-width: 500px) {
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-header { padding: 20px 16px 12px; }
  .container { padding: 8px 16px 80px; }
  .card { padding: 18px; }
  .card-table { padding: 0; }
}

/* ---------- header right-side (signed-in pill + sign-out) ---------- */
.header-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 6px;
}
.pill-user {
  /* Holds email + credits side-by-side. Flex layout so the email can
     ellipsis-truncate while the credits block stays fully visible. */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 460px;
  overflow: hidden;
  white-space: nowrap;
}
.pill-user .dot { flex: 0 0 auto; }
.pill-user-label {
  color: var(--muted);
  font-weight: 500;
  flex: 0 0 auto;
}
.pill-user-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
  flex: 0 1 auto;
}
.pill-user-sep {
  color: var(--muted);
  flex: 0 0 auto;
}
.pill-user-credits {
  color: var(--muted);
  font-weight: 500;
  flex: 0 0 auto;
}
.pill-user-credits strong {
  color: var(--fg);
  font-weight: 700;
}
.pill-user-topup {
  color: var(--fg);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(0, 0, 0, 0.25);
  flex: 0 0 auto;
  transition: color 100ms ease, text-decoration-color 100ms ease;
}
.pill-user-topup:hover {
  color: var(--fg);
  text-decoration-color: var(--fg);
}
.logout-form { margin: 0; padding: 0; display: inline; }
.linkbtn {
  background: none;
  border: none;
  padding: 4px 2px;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.linkbtn:hover { color: var(--fg); }

/* ---------- header login popover ----------
   Compact sign-in dropdown anchored to the top-right of the page header.
   Controlled open/close state (see <script> in base.html) - we do NOT
   use the native <details>/<summary> element because Brave Shields
   and a few common Chrome extensions were auto-closing it on input
   focus. Open state is mirrored on:
     - .login-pop.is-open         (for panel visibility)
     - .login-pop-trigger[aria-expanded="true"]  (for caret rotation) */
.login-pop { position: relative; margin-left: 2px; }
.login-pop-trigger {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--dark-surface);
  color: #fff;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-dark);
  transition: transform 120ms ease, background 120ms ease;
}
.login-pop-trigger:hover { transform: translateY(-1px); background: #272727; }
.login-pop-trigger:focus-visible {
  outline: none;
  box-shadow: var(--shadow-dark), 0 0 0 3px var(--ring);
}
.login-pop-trigger svg { transition: transform 140ms ease; }
.login-pop-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }

.login-pop-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 280px;
  max-width: 92vw;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  z-index: 40;
}
.login-pop.is-open .login-pop-panel {
  display: block;
  animation: lp-in 160ms ease-out both;
}
@keyframes lp-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* Compact form bits used only inside the popover. */
.lp-form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.lp-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lp-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font: inherit;
  color: var(--fg);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
.lp-input:focus {
  outline: none;
  background: #fff;
  border-color: var(--fg);
  box-shadow: 0 0 0 3px var(--ring);
}
.lp-hint { font-size: 12px; color: var(--muted); line-height: 1.4; }
.lp-actions { margin-top: 4px; }
.lp-msg {
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  line-height: 1.4;
  margin-bottom: 10px;
}
.lp-info  { background: #EFFBF3; border: 1px solid #BBE7CC; color: #0A5B2B; }
.lp-error { background: #FFF3F3; border: 1px solid #F4C3C3; color: var(--danger); font-weight: 500; }
.lp-secondary { margin: 8px 0 0; text-align: right; }

/* Smaller variant of the primary button for the popover. */
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ---------- login card ---------- */
/* Shares .card + .form with the scan form so it picks up the same width,
   padding, border radius, and shadow. The .form-login modifier just tweaks
   the inner layout: stacked center-aligned content with a single column
   field rather than the two-column scan form. */
.form-login {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.form-login .login-head { margin-bottom: 8px; }
.form-login .login-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.form-login .login-sub {
  margin: 0 auto;
  max-width: 380px;
  font-size: 14px;
  line-height: 1.5;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 20px;
  text-align: left;
}
.login-info {
  background: #EFFBF3;
  border: 1px solid #BBE7CC;
  color: #0A5B2B;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 13px;
  line-height: 1.4;
  margin-top: 16px;
  text-align: left;
}
.login-error {
  background: #FFF3F3;
  border: 1px solid #F4C3C3;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 13px;
  line-height: 1.4;
  margin-top: 16px;
  text-align: left;
  font-weight: 500;
}
.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
/* The 6-digit code input is centered, bigger, wide-letter-spaced so the
   digits look like an OTP field instead of a generic text box. */
#f-code {
  text-align: center;
  letter-spacing: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px;
  font-weight: 600;
}

/* ---------- pricing ---------- */
.pricing-section {
  max-width: 1320px;
  margin: 44px auto 0;
  padding: 18px 0 8px;
  text-align: center;
  scroll-margin-top: 92px;
}
.section-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 6px 12px;
  border: 1px solid rgba(28, 28, 28, 0.08);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.section-subtitle {
  max-width: 640px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
  text-align: left;
}
.pricing-card {
  position: relative;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(28, 28, 28, 0.08);
  border-radius: 28px;
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 18px 45px rgba(28, 28, 28, 0.05);
  backdrop-filter: blur(8px);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.pricing-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: 0 22px 55px rgba(28, 28, 28, 0.08);
}
.pricing-card-featured {
  border-color: var(--fg);
  box-shadow: 0 0 0 3px var(--ring), 0 22px 55px rgba(28, 28, 28, 0.08);
}
.pricing-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--fg);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.pricing-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.pricing-price .price-num {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.pricing-price .price-per {
  font-size: 13px;
  color: var(--muted);
}
.pricing-credits {
  font-size: 14px;
  color: var(--muted);
}
.pricing-credits strong {
  color: var(--fg);
  font-weight: 700;
  font-size: 16px;
}
.pricing-feat {
  list-style: none;
  margin: 4px 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
}
.pricing-feat li {
  position: relative;
  padding-left: 18px;
  color: var(--fg);
}
.pricing-feat li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 10px;
  height: 5px;
  border-left: 2px solid #16a34a;
  border-bottom: 2px solid #16a34a;
  transform: rotate(-45deg);
}
.pricing-card .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- FAQ accordion ---------- */
.faq-section {
  max-width: 1320px;
  margin: 56px auto 0;
  padding: 18px 0 8px;
  scroll-margin-top: 92px;
}
.faq-section .section-spacer {
  margin-bottom: 56px;
}
.faq-section .section-subtitle {
  text-align: center;
}
.faq-list {
  width: min(100%, 1040px);
  margin: 34px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.faq-item {
  border: 1px solid rgba(28, 28, 28, 0.08);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 45px rgba(28, 28, 28, 0.05);
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.faq-item[open] {
  border-color: rgba(28, 28, 28, 0.14);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 22px 55px rgba(28, 28, 28, 0.08);
}
.faq-item summary {
  min-height: 64px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  list-style: none;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary:focus-visible {
  outline: 3px solid rgba(113, 100, 53, 0.28);
  outline-offset: -6px;
}
.faq-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: var(--r-pill);
  background: var(--dark-surface);
  box-shadow: var(--shadow-dark);
}
.faq-toggle::before,
.faq-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transform: translate(-50%, -50%);
  transition: transform 180ms ease, opacity 180ms ease;
}
.faq-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}
.faq-item[open] .faq-toggle::after {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(0deg);
}
.faq-answer {
  padding: 0 24px 24px;
}
.faq-answer p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.7;
}
@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .faq-list {
    width: 100%;
  }
  .faq-item summary {
    padding: 18px 20px;
    font-size: 16px;
  }
  .faq-answer {
    padding: 0 20px 22px;
  }
}
