:root {
  --bg: #f4f5f6;
  --panel: #fff;
  --ink: #1d252d;
  --muted: #6d7881;
  --line: #dfe3e6;
  --purple: #7569db;
  --purple-soft: rgba(117, 105, 219, .10);
  --purple-line: rgba(117, 105, 219, .34);
  --green: #4d8a70;
  --amber: #a87943;
  --shadow: 0 12px 40px rgba(29, 37, 45, .045);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar { height: 72px; padding: 0 42px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .92); display: flex; align-items: center; gap: 34px; position: sticky; top: 0; z-index: 2; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 260px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--purple); color: white; display: grid; place-items: center; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 13px; }
.brand small { font-size: 11px; color: var(--muted); margin-top: 2px; }
.topbar nav { display: flex; gap: 22px; flex: 1; }
.topbar nav a { color: var(--muted); text-decoration: none; font-size: 13px; }
.topbar nav a.active, .topbar nav .nav-button.active { color: var(--ink); font-weight: 700; }
.mode-pill { border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; color: var(--muted); font-size: 11px; display: flex; align-items: center; gap: 7px; }
.mode-pill span, .source-dot { width: 7px; height: 7px; border-radius: 50%; background: #aab2b7; display: inline-block; }
.mode-pill.live span, .source-dot.live { background: var(--green); }
.mode-pill.shadow span, .source-dot.shadow { background: var(--amber); }
.shell { max-width: 1240px; margin: 0 auto; padding: 48px 34px 80px; }
.intro { display: flex; justify-content: space-between; gap: 40px; align-items: flex-end; }
.eyebrow, .section-label { font-size: 10px; letter-spacing: .16em; font-weight: 800; color: #8a949b; margin: 0 0 11px; }
.intro h1 { font-size: 42px; line-height: 1.06; letter-spacing: -.045em; max-width: 620px; margin: 0; }
.intro-copy { max-width: 590px; color: var(--muted); font-size: 16px; margin: 16px 0 0; }
.intro-note { align-self: flex-end; max-width: 230px; color: var(--muted); font-size: 12px; }
.intro-note .section-label { margin-bottom: 8px; }
.intro-note strong { display: block; color: var(--ink); font-size: 12px; line-height: 1.4; }
.source-card { min-width: 310px; padding: 16px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; display: grid; grid-template-columns: 10px 1fr auto; gap: 11px; align-items: start; box-shadow: var(--shadow); }
.source-card strong { font-size: 12px; }
.source-card p { font-size: 11px; color: var(--muted); margin: 3px 0 0; }
.source-card button, .primary { border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); padding: 7px 10px; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.source-card button:hover, .primary:hover { border-color: #c4bbff; color: var(--purple); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 38px 0 20px; }
.metrics article { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 17px 18px; }
.metrics span, .metrics small { display: block; color: var(--muted); font-size: 11px; }
.metrics strong { display: block; font-size: 28px; letter-spacing: -.04em; margin: 6px 0 2px; }
.workspace { display: grid; grid-template-columns: 270px 1fr; gap: 16px; }
.filters, .results, .sources { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.filters { padding: 21px; }
.filters h2, .results h2, .sources h2 { font-size: 18px; letter-spacing: -.025em; margin: 0 0 20px; }
.filters label { display: block; color: var(--muted); font-size: 11px; font-weight: 700; margin: 17px 0 6px; }
.filters select { display: block; width: 100%; height: 40px; padding: 0 34px 0 10px; border: 1px solid var(--line); background-color: #fff; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 24px) 17px, calc(100% - 18px) 17px; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; border-radius: 7px; color: var(--ink); font: inherit; font-size: 12px; appearance: none; }
.primary { display: block; width: 100%; height: 40px; margin-top: 20px; background: var(--ink); color: #fff; border-color: var(--ink); padding: 0 10px; }
.filter-note { font-size: 10px; color: var(--muted); margin: 16px 0 0; }
.setup-note { background: #fff7eb; border: 1px solid #ead8bf; border-radius: 8px; padding: 11px; margin-top: 16px; color: #7b5a37; font-size: 10px; }
.setup-note p { margin: 5px 0 0; }
.setup-note code { font-family: ui-monospace, monospace; }
.results { padding: 21px; }
.results-head { display: flex; justify-content: space-between; align-items: flex-start; }
.results-status { font-size: 10px; color: var(--muted); border: 1px solid var(--line); padding: 5px 8px; border-radius: 999px; }
.result-list { display: grid; gap: 9px; }
.opportunity { border: 1px solid var(--line); border-radius: 9px; padding: 15px 16px; display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.opportunity:hover { border-color: var(--purple-line); }
.opportunity-top { display: flex; gap: 8px; align-items: center; margin-bottom: 5px; }
.opportunity-title { font-size: 14px; font-weight: 800; }
.tag { font-size: 9px; font-weight: 800; letter-spacing: .08em; color: var(--purple); background: var(--purple-soft); padding: 4px 6px; border-radius: 5px; }
.tag.hold { color: var(--amber); background: #fff5e7; }
.opportunity-meta, .opportunity-reason { font-size: 11px; color: var(--muted); }
.opportunity-reason { margin-top: 9px; }
.opportunity-source { margin-top: 11px; color: #8a949b; font-size: 10px; }
.opportunity-source a { color: var(--purple); font-weight: 800; text-decoration: none; margin-left: 4px; }
.opportunity-side { text-align: right; min-width: 120px; }
.score { font-size: 21px; font-weight: 800; letter-spacing: -.04em; }
.score-label { font-size: 9px; color: var(--muted); display: block; }
.opportunity-side a { display: inline-block; color: var(--purple); font-size: 10px; font-weight: 800; text-decoration: none; margin-top: 13px; }
.opportunity-side button { display: inline-block; color: var(--purple); font-size: 10px; font-weight: 800; font-family: inherit; cursor: pointer; margin-top: 13px; }
.source-action { border: 1px solid var(--purple-line); background: var(--purple-soft); border-radius: 6px; padding: 7px 8px; }
.opportunity-side button.source-action { margin-top: 13px; }
.source-action:hover { background: rgba(117, 105, 219, .16); border-color: var(--purple); }
.opportunity-status { color: var(--muted); font-size: 9px; letter-spacing: .04em; }
.loading, .empty { border: 1px dashed var(--line); border-radius: 8px; padding: 28px; color: var(--muted); text-align: center; font-size: 12px; }
.sources { margin-top: 16px; padding: 24px; }
.sources-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.sources h2 { margin-bottom: 9px; }
.sources p { color: var(--muted); font-size: 12px; line-height: 1.5; max-width: 560px; margin: 0; }
.source-row { padding: 19px 0 3px; display: grid; grid-template-columns: minmax(180px, 1fr) 145px minmax(210px, 240px); align-items: center; gap: 24px; }
.source-list { display: grid; gap: 10px; }
.source-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.source-connection { border-left: 1px solid var(--line); padding-left: 20px; }
.source-connection small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.source-account { border-left: 1px solid var(--line); padding-left: 20px; }
.source-account-label { display: block; color: var(--muted); font-size: 10px; font-weight: 700; margin-bottom: 6px; }
.source-account-status { display: block; color: var(--ink); font-size: 12px; line-height: 1.25; }
.source-account small { display: block; color: var(--muted); font-size: 10px; line-height: 1.4; margin-top: 7px; }
.source-account-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 10px; }
.source-account-actions a, .source-account-actions button { color: var(--purple); font: inherit; font-size: 10px; font-weight: 800; text-decoration: none; }
.source-account-actions a:hover { text-decoration: underline; }
.source-account-actions button { border: 0; border-bottom: 1px solid var(--purple-line); background: transparent; padding: 0 0 2px; cursor: pointer; }
.source-account-actions span { width: 100%; color: var(--muted); font-size: 10px; line-height: 1.35; }
.source-icon { width: 30px; height: 30px; background: var(--purple-soft); color: var(--purple); display: grid; place-items: center; border-radius: 8px; }
.source-row strong, .source-row small { display: block; }
.source-row strong { font-size: 12px; }
.source-row small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.source-state { font-size: 9px; font-weight: 800; color: var(--green); letter-spacing: .12em; }
.source-refresh { height: 32px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); padding: 0 9px; font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; }
.source-refresh:hover { border-color: var(--purple-line); color: var(--purple); }
.runs { margin-top: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 24px; }
.runs-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.runs h2 { margin-bottom: 9px; }
.runs p { color: var(--muted); font-size: 12px; line-height: 1.5; max-width: 560px; margin: 0; }
.runs-count { color: var(--muted); font-size: 11px; white-space: nowrap; }
.saved-run-list { display: grid; gap: 10px; padding-top: 16px; }
.saved-run { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; border: 1px solid var(--line); border-radius: 9px; padding: 15px 16px; }
.saved-run:hover { border-color: var(--purple-line); }
.saved-run-top { display: flex; align-items: center; gap: 8px; }
.saved-run-top strong { font-size: 13px; }
.saved-run p { margin-top: 5px; font-size: 11px; }
.saved-run small { display: block; color: var(--muted); font-size: 10px; margin-top: 8px; }
.run-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--purple); display: inline-block; }
.saved-run-actions { display: flex; align-items: center; gap: 10px; }
.run-action, .run-remove { border: 1px solid var(--purple-line); border-radius: 6px; background: var(--purple-soft); color: var(--purple); padding: 8px 10px; font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; }
.run-remove { border-color: transparent; background: transparent; color: var(--muted); font-weight: 600; }
.run-action:hover { border-color: var(--purple); }
.run-remove:hover { color: var(--ink); }
.opportunity-detail { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 24px; }
.detail-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; }
.back-button { border: 0; background: transparent; color: var(--muted); padding: 0; font: inherit; font-size: 12px; cursor: pointer; }
.back-button:hover { color: var(--purple); }
.detail-context { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 46px; }
.detail-main { min-width: 0; }
.detail-main h1 { max-width: 780px; margin: 10px 0 8px; font-size: clamp(28px, 4vw, 44px); line-height: 1.05; letter-spacing: -.05em; }
.detail-subtitle { color: var(--muted); margin: 0; font-size: 13px; }
.detail-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin: 28px 0 32px; }
.detail-metrics div { border-top: 1px solid var(--line); padding-top: 11px; }
.detail-metrics span { display: block; color: var(--muted); font-size: 10px; }
.detail-metrics strong { display: block; margin-top: 5px; font-size: 14px; }
.detail-metrics select { width: 100%; margin-top: 5px; border: 1px solid var(--line); border-radius: 5px; background-color: #fff; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 24px) 12px, calc(100% - 18px) 12px; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; color: var(--ink); padding: 4px 34px 4px 8px; font: inherit; font-size: 11px; appearance: none; }
.detail-section { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 22px; }
.detail-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.detail-summary-mode { color: var(--purple); font-size: 10px; letter-spacing: .04em; }
.detail-section p { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 8px 0 0; }
.detail-summary-note, .detail-official-note { color: var(--muted); font-size: 11px; line-height: 1.5; margin-top: 10px; }
.detail-review-flags { margin-top: 14px; padding: 12px; border: 1px solid #ead8bf; border-radius: 8px; color: #7b5a37; background: #fff7eb; font-size: 11px; }
.detail-checks { display: grid; gap: 8px; margin-top: 10px; }
.detail-check { display: flex; align-items: flex-start; gap: 9px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; }
.detail-check-mark { color: var(--green); font-weight: 800; }
.detail-check strong, .detail-check small { display: block; }
.detail-check strong { font-size: 11px; }
.detail-check small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.detail-side { align-self: start; border-left: 1px solid var(--line); padding-left: 24px; }
.detail-side h2 { margin: 7px 0 9px; font-size: 18px; letter-spacing: -.025em; }
.detail-side p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0 0 18px; }
.detail-official-link { display: block; border: 1px solid var(--purple-line); border-radius: 7px; background: var(--purple-soft); color: var(--purple); padding: 11px 12px; font-size: 11px; font-weight: 800; text-decoration: none; text-align: center; }
.detail-official-link:hover { border-color: var(--purple); background: rgba(117, 105, 219, .16); }
.detail-side .secondary { margin-top: 9px; }
.detail-side .primary { margin: 0 0 9px; }
.wizard-modal[hidden] { display: none; }
.wizard-modal { position: fixed; inset: 0; z-index: 12; display: grid; justify-items: end; }
.wizard-panel { position: relative; width: min(680px, 100%); height: 100%; overflow: auto; padding: 34px 34px 44px; background: #fff; border-left: 1px solid var(--line); box-shadow: -18px 0 50px rgba(29, 37, 45, .10); }
.wizard-progress { display: flex; align-items: center; gap: 8px; margin: 4px 0 30px; }
.wizard-progress span { width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; color: var(--muted); font-size: 10px; }
.wizard-progress span.active { border-color: var(--purple); background: var(--purple-soft); color: var(--purple); font-weight: 800; }
.wizard-progress i { width: 34px; height: 1px; background: var(--line); }
.wizard-step h3 { margin: 0 0 8px; font-size: 23px; letter-spacing: -.035em; }
.wizard-copy { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0 0 22px; }
.wizard-step label { display: block; color: var(--ink); font-size: 11px; font-weight: 750; margin: 0 0 17px; }
.wizard-step label span { display: block; color: var(--muted); font-size: 10px; font-weight: 400; margin: 3px 0 7px; }
.wizard-step select, .wizard-step textarea { display: block; width: 100%; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); padding: 10px; font: inherit; font-size: 12px; }
.wizard-step select { min-height: 40px; background-color: #fff; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 24px) 17px, calc(100% - 18px) 17px; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 34px; appearance: none; }
.wizard-step textarea { resize: vertical; line-height: 1.45; }
.wizard-check { display: flex !important; align-items: flex-start; gap: 8px; font-weight: 500 !important; }
.wizard-check input { margin-top: 2px; accent-color: var(--purple); }
.wizard-notice { border: 1px solid #e5e7ea; border-radius: 8px; background: #fafbfb; color: var(--muted); padding: 11px 12px; font-size: 11px; line-height: 1.5; margin: 16px 0; }
.wizard-actions, .wizard-result-actions { display: flex; justify-content: space-between; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 24px; }
.wizard-actions .primary, .wizard-actions .secondary { width: auto; min-width: 120px; margin: 0; }
.wizard-loading { border: 1px dashed var(--line); border-radius: 8px; padding: 24px; color: var(--muted); font-size: 12px; text-align: center; }
.wizard-result-block { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 18px; }
.wizard-result-block ul { color: var(--muted); font-size: 12px; line-height: 1.6; padding-left: 18px; margin: 8px 0 0; }
.wizard-result-block pre { white-space: pre-wrap; font: 12px/1.6 inherit; color: var(--muted); margin: 8px 0 0; }
.wizard-result-actions { justify-content: flex-start; flex-wrap: wrap; }
.wizard-result-actions .detail-official-link { flex: 1 1 240px; }
.wizard-result-actions .secondary { width: auto; margin: 0; }
.submission-approval { flex: 1 1 100%; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; }
.submission-approval label { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.45; }
.submission-approval input { margin-top: 2px; accent-color: var(--purple); }
.submission-approval .primary { width: auto; margin-top: 12px; }
.submission-approval .primary:disabled { cursor: not-allowed; opacity: .45; }
.nav-button { border: 0; padding: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.nav-button:hover { color: var(--ink); }
.profile-state { display: grid; gap: 3px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfb; }
.profile-state strong { font-size: 11px; }
.profile-state span { color: var(--muted); font-size: 10px; }
.secondary { display: block; width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); padding: 0 10px; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.secondary:hover { border-color: var(--purple-line); color: var(--purple); }
.profile-open { margin: 10px 0 3px; }
.profile-modal[hidden] { display: none; }
.profile-modal { position: fixed; inset: 0; z-index: 10; display: grid; justify-items: end; }
.profile-backdrop { position: absolute; inset: 0; background: rgba(29, 37, 45, .20); }
.profile-panel { position: relative; width: min(680px, 100%); height: 100%; overflow: auto; padding: 34px 34px 44px; background: #fff; border-left: 1px solid var(--line); box-shadow: -18px 0 50px rgba(29, 37, 45, .10); }
.profile-panel-head { display: flex; justify-content: space-between; gap: 22px; align-items: flex-start; margin-bottom: 28px; }
.profile-panel h2 { max-width: 500px; margin: 0; font-size: 28px; line-height: 1.1; letter-spacing: -.04em; }
.profile-panel-head p { max-width: 540px; color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.icon-button { width: 32px; height: 32px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.profile-panel label, .profile-panel legend { display: block; color: var(--ink); font-size: 11px; font-weight: 750; margin: 0 0 16px; }
.profile-panel label span { display: block; color: var(--muted); font-size: 10px; font-weight: 400; margin: 3px 0 7px; }
.profile-panel input[type="url"], .profile-panel input[type="text"], .profile-panel input[type="file"], .profile-panel select, .profile-panel textarea { display: block; width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 7px; background-color: #fff; color: var(--ink); padding: 10px; font: inherit; font-size: 12px; }
.profile-panel select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 24px) 17px, calc(100% - 18px) 17px; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 34px; appearance: none; }
.profile-panel input[type="file"] { padding: 8px; }
.profile-panel textarea { resize: vertical; line-height: 1.45; }
.profile-panel input:focus, .profile-panel select:focus, .profile-panel textarea:focus { outline: 2px solid var(--purple-line); outline-offset: 1px; }
.profile-source-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.profile-panel small { display: block; color: var(--muted); font-size: 10px; font-weight: 400; margin-top: 6px; }
.profile-scan-status { min-height: 15px; transition: color .2s ease; }
.profile-scan-status.scanning { color: var(--purple); }
.profile-scan-status.complete { color: var(--green); }
.profile-scan-status.error { color: var(--amber); }
.profile-question-heading { border-top: 1px solid var(--line); padding-top: 22px; margin: 8px 0 18px; }
.profile-question-heading p { color: var(--muted); font-size: 12px; margin: -4px 0 0; }
.profile-panel fieldset { border: 0; padding: 0; margin: 2px 0 17px; }
.service-help { color: var(--muted); font-size: 11px; margin: -8px 0 10px; }
.service-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--line); }
.service-group { background: #fff; padding: 12px; }
.service-group strong { display: block; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 7px; }
.service-checks label { display: flex; gap: 8px; align-items: center; padding: 7px 0; margin: 0; color: var(--ink); font-size: 11px; font-weight: 500; }
.service-checks input { accent-color: var(--purple); }
.profile-actions { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding-top: 4px; }
.profile-actions .secondary, .profile-actions .primary { margin: 0; }
.profile-output { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 24px; }
.profile-output-head, .variation-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.profile-output h3, .variation-head h3 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.profile-output-head p { color: var(--muted); font-size: 11px; margin: 5px 0 0; }
.profile-source-count, .variation-head > span { color: var(--muted); font-size: 10px; text-align: right; }
.profile-detected { display: flex; flex-wrap: wrap; gap: 7px; margin: 17px 0 20px; }
.profile-detected span { color: var(--purple); background: var(--purple-soft); border: 1px solid var(--purple-line); border-radius: 5px; padding: 5px 7px; font-size: 10px; }
.profile-gap { border: 1px solid #ead8bf; border-radius: 8px; background: #fffaf3; color: #7b5a37; padding: 11px 12px; margin-bottom: 22px; font-size: 11px; }
.profile-gap strong { display: block; margin-bottom: 4px; }
.profile-gap ul { margin: 0; padding-left: 16px; }
.variation-head { border-top: 1px solid var(--line); padding-top: 21px; margin-bottom: 11px; }
.variation-list { display: grid; gap: 8px; }
.variation { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.variation strong, .variation small { display: block; }
.variation strong { font-size: 12px; }
.variation small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.variation-actions { display: flex; align-items: center; gap: 8px; }
.variation button { min-width: 88px; height: 34px; border: 1px solid var(--purple-line); border-radius: 6px; background: var(--purple-soft); color: var(--purple); font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; }
.variation button.variation-save { background: #fff; color: var(--muted); border-color: var(--line); }
.variation button.variation-save.saved { color: var(--green); border-color: rgba(63, 139, 106, .28); }
.variation button:disabled { cursor: default; opacity: 1; }
.variation button:hover { background: rgba(117, 105, 219, .16); }

@media (max-width: 850px) {
  .topbar { padding: 0 18px; gap: 14px; }
  .brand { min-width: auto; }
  .topbar nav { display: none; }
  .shell { padding: 30px 16px 60px; }
  .intro { display: block; }
  .source-card { margin-top: 24px; }
  .workspace { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .sources-head { display: block; }
  .sources-head .source-refresh { margin-top: 16px; }
  .saved-run { display: block; }
  .saved-run-actions { margin-top: 14px; }
  .detail-layout { grid-template-columns: 1fr; gap: 26px; }
  .detail-metrics { grid-template-columns: repeat(2, 1fr); }
  .detail-side { border-left: 0; border-top: 1px solid var(--line); padding: 22px 0 0; }
  .intro h1 { font-size: 34px; }
  .opportunity { display: block; }
  .opportunity-side { text-align: left; margin-top: 12px; }
  .profile-panel { padding: 26px 18px 34px; }
  .wizard-panel { padding: 26px 18px 34px; }
  .profile-source-grid, .service-checks { grid-template-columns: 1fr; }
  .source-row { grid-template-columns: 1fr; gap: 16px; }
  .source-connection, .source-account { border-left: 0; border-top: 1px solid var(--line); padding: 14px 0 0; }
}
