/* ArcScout — opportunity finder. Uses style.css design tokens.
   Hero + step timeline reuse ArcPrice's shared chrome (tool-hero / steps-timeline
   in arcprice.css) so the free tools look identical. */
.scout-wrap { max-width: 820px; margin-inline: auto; padding: clamp(28px,5vw,52px) var(--gutter) 80px; }
/* The shared step timeline defaults to 980px — wider than ArcScout's 820px content
   column, so it overhangs the cards on the left/right. Constrain it (and the hero)
   to the content width so the steps sit flush above the cards, one centered column. */
.steps-timeline-inner { max-width: 820px; }
/* Match the hero content to the same inset column (steps + cards inset by --gutter;
   the hero-inner has no padding of its own, so add it to line the left edges up). */
.tool-hero-inner { max-width: 820px; padding-inline: var(--gutter); box-sizing: border-box; }

/* Sticky nav (66px) + sticky steps-timeline (~68px) overlap the top of the page.
   Land each step's card visibly below them when navigating between steps. */
#scout-step-url, #scout-step-profile, #scout-step-results, #scout-step-digest { scroll-margin-top: 150px; }
@media (max-width: 768px) {
  #scout-step-url, #scout-step-profile, #scout-step-results, #scout-step-digest { scroll-margin-top: 128px; }
}

/* Full-screen loading overlay (modal) — built to match ArcPrice's #ai-overlay:
   dimmed/blurred backdrop, a slide-in white card, spinner + bold title + a gray
   sub-line (the expected wait) + a rotating italic "thoughts" ticker. */
#scout-overlay { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(17,19,24,.6); backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s; }
#scout-overlay.visible { display: flex; opacity: 1; }
.scout-overlay-box { background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.14); width: 420px; max-width: calc(100vw - 40px); height: 300px; padding: 32px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; transform: translateY(20px); transition: transform .25s; }
#scout-overlay.visible .scout-overlay-box { transform: translateY(0); }
#scout-overlay-msg { font-weight: 600; font-size: 16px; color: var(--charcoal); }
#scout-overlay-sub { font-size: 13px; color: var(--gray-500); margin-top: 8px; line-height: 1.5; }
.scout-think { font-size: 12.5px; color: var(--gray-400); font-style: italic; margin-top: 12px; height: 36px; line-height: 18px; opacity: 0; transition: opacity .25s; overflow: hidden; }

.scout-card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg,14px); padding: 26px 28px; margin-bottom: 18px; box-shadow: 0 2px 14px rgba(0,0,0,.04); }
.scout-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--gray-500); margin-bottom: 10px; }
.scout-url-row { display: flex; gap: 10px; flex-wrap: wrap; }
.scout-url-row input { flex: 1; min-width: 220px; font: 15px var(--font-body); border: 1.5px solid var(--gray-300); border-radius: 9px; padding: 11px 14px; outline: none; }
.scout-url-row input:focus { border-color: var(--red); }
.scout-url-row .btn { white-space: nowrap; }
.scout-hint { font-size: 12.5px; color: var(--gray-400); margin: 12px 0 0; line-height: 1.55; }
.scout-err { font-size: 13px; color: var(--red); margin-top: 8px; min-height: 16px; }

.scout-profile-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.scout-profile-head h2 { font-family: var(--font-display); font-size: clamp(20px,2.6vw,26px); color: var(--charcoal); margin: 0; }
.scout-quality { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-400); }
.scout-summary { font-size: 15px; color: var(--gray-600); line-height: 1.6; margin: 0 0 20px; }
.scout-field { margin-bottom: 18px; }
.scout-field-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gray-500); margin-bottom: 9px; }
.scout-field-label span { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--gray-400); }
.scout-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.scout-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--gray-50,#f6f7f9); border: 1px solid var(--gray-200); border-radius: 999px; padding: 5px 8px 5px 13px; font-size: 13px; font-weight: 600; color: var(--charcoal); }
.scout-chip .lbl { font-weight: 500; color: var(--gray-500); font-size: 12px; }
.scout-chip .x { cursor: pointer; border: none; background: none; color: var(--gray-400); font-size: 16px; line-height: 1; padding: 0 2px; }
.scout-chip .x:hover { color: var(--red); }
.scout-add { width: 100%; max-width: 320px; font: 13px var(--font-body); border: 1px dashed var(--gray-300); border-radius: 8px; padding: 8px 12px; outline: none; }
.scout-add:focus { border-color: var(--red); border-style: solid; }
.scout-setasides { display: flex; flex-wrap: wrap; gap: 8px; }
.scout-sa { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--gray-300); border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 600; color: var(--gray-600); cursor: pointer; user-select: none; }
.scout-sa.on { border-color: var(--red); background: var(--red); color: #fff; }
.scout-profile-actions { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.scout-linkbtn { background: none; border: none; color: var(--gray-500); font: 600 13px var(--font-body); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.scout-linkbtn:hover { color: var(--red); }

.scout-spinner { width: 40px; height: 40px; border: 3px solid var(--gray-100); border-top-color: var(--red); border-radius: 50%; margin: 0 auto 16px; animation: scout-spin .7s linear infinite; }
@keyframes scout-spin { to { transform: rotate(360deg); } }

.scout-results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 16px; }
.scout-results-head h2 { font-family: var(--font-display); font-size: clamp(21px,2.8vw,28px); color: var(--charcoal); margin: 0; }
.scout-note { background: var(--gray-50,#f6f7f9); border: 1px solid var(--gray-200); border-radius: 10px; padding: 14px 18px; font-size: 14px; color: var(--gray-600); margin-bottom: 16px; }

/* Sources Sought / RFI: inline tag on the title + filter control above the list. */
.scout-type-tag { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #6d28d9; background: #ede9fe; border-radius: 5px; padding: 2px 7px; margin-right: 6px; vertical-align: middle; }
.scout-rfi-filter { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--gray-600); margin: 0 0 14px; cursor: pointer; }
.scout-rfi-filter input { margin: 0; flex-shrink: 0; accent-color: var(--red); position: relative; top: 2px; }
.scout-rfi-hint { color: var(--gray-400); font-weight: 400; }
.scout-hide-rfi .scout-match.scout-rfi { display: none; }

.scout-match { border: 1px solid var(--gray-200); border-radius: 12px; padding: 18px 20px; margin-bottom: 12px; background: #fff; }
.scout-match-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.scout-match-title { font-size: 16px; font-weight: 700; color: var(--charcoal); line-height: 1.35; }
.scout-bucket { flex-shrink: 0; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.scout-bucket.strong { background: #dcfce7; color: #15803d; }
.scout-bucket.possible { background: #fef9c3; color: #a16207; }
.scout-bucket.stretch { background: #f3f4f6; color: #6b7280; }
.scout-bucket.rejected { background: #fee2e2; color: #b91c1c; }
.scout-match-meta { font-size: 12.5px; color: var(--gray-500); margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.scout-match-meta b { color: var(--gray-700); font-weight: 600; }
.scout-match-reason { font-size: 14.5px; color: var(--gray-700); line-height: 1.65; margin-bottom: 8px; }
.scout-match-history { font-size: 12.5px; color: var(--gray-500); font-style: italic; margin-bottom: 12px; }
.scout-match-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.scout-match-actions .btn-sm { font: 600 13px var(--font-body); padding: 7px 14px; border-radius: 8px; text-decoration: none; }
.scout-view-sam { color: var(--red); font: 600 13px var(--font-body); text-decoration: none; }
.scout-view-sam:hover { text-decoration: underline; }

.scout-digest { background: var(--charcoal); border-radius: var(--radius-lg,14px); padding: 26px 28px; margin: 22px 0; color: #fff; }
.scout-digest h3 { font-family: var(--font-display); font-size: 20px; margin: 0 0 6px; color: #fff; }
.scout-digest p { font-size: 13.5px; color: rgba(255,255,255,.66); margin: 0 0 16px; line-height: 1.55; }
.scout-digest .scout-url-row input { background: #fff; }
.scout-digest .scout-err { color: #fca5a5; }

.scout-filtered { margin-top: 8px; }
.scout-filtered-toggle { background: none; border: none; color: var(--gray-500); font: 600 13px var(--font-body); cursor: pointer; padding: 8px 0; }
.scout-filtered-toggle:hover { color: var(--red); }
#scout-rejected .scout-match { opacity: .85; background: var(--gray-50,#fafafa); }

/* Reach & teaming (Stretch) — its own labeled tier under the direct matches. */
.scout-reach { margin-top: 8px; }
.scout-reach-head { margin: 28px 0 10px; padding-top: 20px; border-top: 1px dashed var(--gray-300); }
.scout-reach-head h3 { font-family: var(--font-display); font-size: clamp(18px,2.4vw,23px); color: var(--charcoal); margin: 0 0 4px; }
.scout-reach-head p { font-size: 13px; color: var(--gray-500); margin: 0; line-height: 1.5; max-width: 640px; }
#scout-reach .scout-match { background: var(--gray-50,#fafafa); }

.scout-disclaimer { font-size: 11px; line-height: 1.6; color: var(--gray-400); max-width: 800px; margin: 40px auto 0; padding-top: 22px; border-top: 1px solid var(--gray-200); }

@media (max-width: 560px) {
  .scout-match-top { flex-direction: column-reverse; align-items: flex-start; }
  .scout-profile-actions { flex-direction: column; align-items: stretch; }
}

/* --- loading ticker --- */
.scout-tick-check { color: #15803d; font-weight: 700; margin-right: 4px; }
/* Fixed-width so the growing dots never shift the surrounding text. */
.scout-dots { display: inline-block; width: 1.4em; text-align: left; }
.scout-dots::after { content: ''; animation: scout-dots 1.4s steps(4,end) infinite; }
@keyframes scout-dots { 0%{content:'';} 25%{content:'.';} 50%{content:'..';} 75%{content:'...';} 100%{content:'';} }

/* --- NAICS primary legend --- */

/* --- profile subhead + results-actions + closest tag --- */
.scout-subhead { font-size: 13px; color: var(--gray-500); margin: 0 0 14px; }
.scout-results-actions { display: flex; gap: 16px; align-items: center; }
.scout-closest-tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #a16207; background: #fef9c3; border-radius: 6px; padding: 3px 9px; margin-bottom: 8px; }

/* --- recent companies list (landing) + cached indicator --- */
.scout-recents { margin: 0 0 20px; }
.scout-recents-label { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--gray-500); margin-bottom: 8px; }
#scout-recents-list { display: flex; flex-direction: column; gap: 6px; }
.scout-recent { display: flex; align-items: stretch; gap: 6px; }
.scout-recent-open { flex: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; text-align: left; background: var(--gray-50,#f6f7f9); border: 1px solid var(--gray-200); border-radius: 9px; padding: 10px 14px; font: 500 14px var(--font-body); color: var(--charcoal); cursor: pointer; }
.scout-recent-open:hover { border-color: var(--red); background: #fff5f5; }
.scout-recent-host { font-weight: 600; }
.scout-recent-meta { font-size: 12px; color: var(--gray-500); white-space: nowrap; }
.scout-recent-x { flex: 0 0 auto; width: 38px; border: 1px solid var(--gray-200); border-radius: 9px; background: #fff; color: var(--gray-400); font-size: 18px; line-height: 1; cursor: pointer; }
.scout-recent-x:hover { color: var(--red); border-color: var(--red); }
#scout-cached-note { color: #15803d; font-weight: 600; }
#scout-rescan-site { margin-left: 4px; }

/* --- step progress bar (mirrors arcprice/arcclause) --- */
/* Step timeline is the shared .steps-timeline from arcprice.css — no scout-specific
   overrides needed; the stepper markup uses .step-item / .step-number / .step-text. */

/* --- input mode tabs --- */
.scout-modes { display: flex; gap: 4px; margin: 0 0 20px; border-bottom: 1px solid var(--gray-200); }
.scout-mode { background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 9px 14px; font: 600 14px var(--font-body); color: var(--gray-500); cursor: pointer; white-space: nowrap; }
.scout-mode:hover { color: var(--gray-700); }
.scout-mode.on { color: var(--red); border-bottom-color: var(--red); }
@media (max-width: 560px) { .scout-mode { padding: 8px 9px; font-size: 12.5px; } }

/* --- describe textarea + manual lead --- */
.scout-textarea { width: 100%; box-sizing: border-box; font: 15px var(--font-body); border: 1.5px solid var(--gray-300); border-radius: 10px; padding: 12px 14px; outline: none; resize: vertical; min-height: 120px; margin-bottom: 12px; line-height: 1.55; }
.scout-textarea:focus { border-color: var(--red); }
.scout-manual-lead { font-size: 15px; color: var(--gray-600); line-height: 1.6; margin: 0 0 16px; max-width: 560px; }

/* --- honest coverage line on results --- */
.scout-assessed-note { font-size: 12.5px; color: var(--gray-500); margin: 0 0 14px; }

/* --- recall: matches under codes you didn't list --- */
.scout-adjacent-head { margin: 28px 0 12px; padding-top: 20px; border-top: 1px dashed var(--gray-300); }
.scout-adjacent-head h3 { font-family: var(--font-display); font-size: clamp(18px,2.4vw,23px); color: var(--charcoal); margin: 0 0 4px; }
.scout-adjacent-head p { font-size: 13px; color: var(--gray-500); margin: 0; line-height: 1.5; }
.scout-adjacent-tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #1d4ed8; background: #dbeafe; border-radius: 6px; padding: 3px 9px; margin-bottom: 8px; }

/* --- source more (opt-in cross-NAICS recall) --- */
/* These are IDs in the markup, not classes — target them correctly (the old
   .scout-sourcemore-wrap class selector never matched, so the two stacked
   buttons had no gap). Give the "Source more" button clear space below "Keep searching". */
#scout-sourcemore-wrap { margin: 24px 0 8px; }
#scout-scoremore-wrap { margin: 18px 0 0; }
.scout-sourcemore-btn { background: #fff; border: 1.5px dashed var(--gray-300); border-radius: 10px; padding: 12px 18px; width: 100%; font: 600 14px var(--font-body); color: var(--gray-600); cursor: pointer; }
.scout-sourcemore-btn:hover:not(:disabled) { border-color: var(--red); color: var(--red); border-style: solid; }
.scout-sourcemore-btn:disabled { opacity: .6; cursor: default; }
.scout-sourcemore-msg { font-size: 13px; color: var(--gray-500); padding: 6px 2px; }

/* --- auto-advance "scanning deeper" live indicator --- */
.scout-scanning { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--gray-600); padding: 12px 4px; }
.scout-scanning::before { content: ''; width: 15px; height: 15px; border: 2px solid var(--gray-300); border-top-color: var(--red); border-radius: 50%; animation: scout-spin .8s linear infinite; flex-shrink: 0; }
