:root {
  color-scheme: dark;
  --bg: #101722;
  --panel: #17212e;
  --panel-raised: #1b2837;
  --line: #293747;
  --text: #f2f5f8;
  --muted: #95a4b4;
  --subtle: #718196;
  --accent: #b8f46a;
  --accent-ink: #14200a;
  --danger: #ff8d8d;
  font-family: "DM Sans", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: radial-gradient(ellipse at 50% -24%, #283c52 0, var(--bg) 57%); color: var(--text); min-height: 100vh; }
button, input, select { font: inherit; }
button, a, select, input[type="range"] { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.topbar { height: 74px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(28px, calc((100vw - 1220px) / 2)); border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(15,22,32,.7); }
.topbar-actions { display: flex; align-items: center; gap: 15px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font: 700 14px Manrope, sans-serif; letter-spacing: .035em; }
.brand-mark { width: 31px; height: 31px; display: grid; place-items: center; background: var(--accent); border-radius: 9px; color: var(--accent-ink); font: 800 19px Manrope, sans-serif; }
.brand-light { color: #c2cbd5; font-weight: 500; }
.privacy-note { display: inline-flex; align-items: center; gap: 8px; color: #bdc9d4; font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(184,244,106,.45); }
.page-shell { width: min(1220px, calc(100% - 48px)); margin: 0 auto; }
.auth-panel { max-width: 470px; margin: 95px auto; padding: 27px; }
.auth-panel h1 { margin-bottom: 9px; font-size: 27px; }
.auth-panel .intro-copy { margin: 0 0 22px; text-align: left; }
.login-form { display: grid; gap: 10px; }
.login-form label { color: var(--muted); font-size: 11px; }
.login-form input { height: 43px; padding: 0 12px; border: 1px solid #344354; border-radius: 6px; outline: none; background: #111a25; color: var(--text); }
.login-form input:focus { border-color: #8dc747; }
.login-form .button-primary { width: 100%; }
.auth-required main > :not(#auth-panel) { display: none; }
.auth-required #auth-panel { display: block; }
.intro { text-align: center; padding: 62px 16px 33px; }
.eyebrow { margin: 0 0 11px; color: var(--accent); font-size: 10px; line-height: 1.4; font-weight: 700; letter-spacing: .16em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 14px; font: 700 clamp(30px, 4vw, 43px)/1.13 Manrope, sans-serif; letter-spacing: -.045em; }
h1 span { color: var(--accent); }
.intro-copy { max-width: 620px; margin: 0 auto; color: var(--muted); font-size: 14px; line-height: 1.75; }
.panel { border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(135deg, rgba(26,38,52,.98), rgba(21,31,44,.98)); box-shadow: 0 16px 40px rgba(0,0,0,.11); }
.search-panel { padding: 24px; }
.panel-heading, .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.panel-heading h2, .section-heading h2 { margin-bottom: 4px; font: 700 17px Manrope, sans-serif; letter-spacing: -.02em; }
.panel-heading p { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.safe-label { padding: 7px 10px; border: 1px solid rgba(184,244,106,.18); border-radius: 99px; color: #cae9a6; background: rgba(184,244,106,.06); font-size: 10px; }
.search-form { display: flex; gap: 11px; margin-top: 19px; }
.search-input-wrap { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; height: 47px; padding: 0 14px; border: 1px solid #344354; border-radius: 7px; background: #111a25; color: var(--subtle); }
.search-input-wrap:focus-within { border-color: #8dc747; box-shadow: 0 0 0 3px rgba(184,244,106,.08); }
.search-input-wrap > span { font-size: 17px; }
.search-input-wrap input { width: 100%; height: 100%; padding: 0; border: 0; outline: none; background: transparent; color: var(--text); font-size: 13px; }
.search-input-wrap input::placeholder { color: #788798; }
.button { min-height: 39px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid transparent; border-radius: 6px; text-decoration: none; white-space: nowrap; font-size: 11px; font-weight: 700; cursor: pointer; transition: transform .15s, background .15s, border-color .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { min-width: 164px; height: 47px; padding: 0 16px; background: var(--accent); color: var(--accent-ink); font-size: 12px; }
.button-primary:hover { background: #cdfc8e; }
.button-primary:disabled { cursor: wait; opacity: .75; transform: none; }
.button-icon { font-size: 18px; line-height: 1; }
.button-secondary { background: #202d3b; border-color: #354454; color: #dbe3eb; }
.button-secondary:hover { background: #273748; border-color: #506278; }
.button-quiet { background: transparent; border-color: var(--line); color: var(--muted); }
.button-danger:hover { color: var(--danger); border-color: rgba(255,141,141,.45); }
.disclaimer { margin: 13px 0 0; color: var(--subtle); font-size: 10px; line-height: 1.5; }
.progress { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: #d3dfa9; font-size: 12px; }
.spinner { width: 15px; height: 15px; border: 2px solid rgba(184,244,106,.25); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-message { margin: 13px 0 0; color: #ffabab; font-size: 12px; }
.latest-section, .results-section { margin-top: 44px; }
.section-heading { margin-bottom: 15px; }
.section-heading .eyebrow { margin-bottom: 6px; }
.section-heading h2 { margin: 0; font-size: 19px; }
.lead-card { padding: 20px; display: grid; grid-template-columns: minmax(0,1.5fr) repeat(4,minmax(100px,1fr)) minmax(90px,.8fr); gap: 16px; align-items: center; }
.lead-identity { min-width: 0; }
.lead-identity h3 { overflow: hidden; margin: 0 0 4px; text-overflow: ellipsis; font: 700 17px Manrope, sans-serif; }
.lead-identity a, .lead-identity p { color: var(--muted); font-size: 11px; text-decoration: none; }
.lead-identity p { margin: 8px 0 0; line-height: 1.5; }
.lead-field { min-width: 0; }
.field-label { display: block; margin-bottom: 7px; color: var(--subtle); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.field-value { overflow-wrap: anywhere; color: #e5ebf0; font-size: 12px; line-height: 1.5; }
.field-value a { color: #c9e6a7; text-decoration: none; }
.field-value a:hover { text-decoration: underline; }
.score-box { text-align: center; }
.score-number { color: var(--accent); font: 800 27px Manrope, sans-serif; }
.score-number small { font-size: 12px; }
.score-caption { margin-top: 3px; color: var(--subtle); font-size: 9px; }
.category-pill { display: inline-block; padding: 5px 8px; border-radius: 4px; background: rgba(184,244,106,.1); color: #d7f4b4; font-size: 10px; }
.warnings { margin-top: 9px; padding: 11px 13px; border: 1px solid #5a4829; border-radius: 7px; background: #2d271e; color: #e7c98e; font-size: 11px; line-height: 1.6; }
.results-heading { align-items: flex-end; }
.count-badge { margin-left: 5px; padding: 3px 7px; border-radius: 99px; background: #253441; color: #bdc9d4; font: 600 10px "DM Sans", sans-serif; vertical-align: 2px; }
.export-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.filters { display: flex; flex-wrap: wrap; gap: 9px; padding: 12px; margin-bottom: 10px; }
.filters input, .filters select { height: 35px; min-width: 135px; padding: 0 10px; border: 1px solid #344354; border-radius: 5px; outline: none; background: #111a25; color: #dce4eb; font-size: 10px; }
.filters input:focus, .filters select:focus { border-color: #8dc747; }
.filters .filter-search { flex: 1; min-width: 170px; }
.filter-search input { width: 100%; }
.score-filter { display: flex; min-width: 175px; flex-direction: column; gap: 3px; color: var(--muted); font-size: 9px; }
.score-filter output { color: var(--accent); }
.score-filter input { width: 100%; height: 11px; min-width: 0; padding: 0; accent-color: var(--accent); }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { padding: 0; border-bottom: 1px solid var(--line); color: var(--subtle); text-align: left; font-size: 9px; font-weight: 600; }
th button { width: 100%; padding: 13px 12px; border: 0; background: transparent; color: inherit; text-align: left; font-size: inherit; font-weight: inherit; cursor: pointer; }
th button:hover { color: var(--accent); }
th button span { margin-left: 3px; color: #65768a; }
td { max-width: 190px; overflow: hidden; padding: 12px; border-bottom: 1px solid rgba(41,55,71,.65); color: #cbd5de; text-overflow: ellipsis; font-size: 10px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255,255,255,.018); }
td a { color: #c2e49c; text-decoration: none; }
td a:hover { text-decoration: underline; }
.table-score { color: var(--accent); font-weight: 700; }
.delete-row { padding: 5px 7px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #8392a2; cursor: pointer; font-size: 10px; }
.delete-row:hover { border-color: rgba(255,141,141,.3); color: var(--danger); }
.empty-state { max-width: none; padding: 34px 15px; color: var(--subtle); text-align: center; }
.table-status { min-height: 15px; margin: 8px 0 0; color: var(--subtle); font-size: 10px; }
.table-status.is-error { color: #ffabab; }
.page-footer { padding: 37px 0 30px; color: #708093; text-align: center; font-size: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 900px) {
  .lead-card { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .lead-identity { grid-column: span 3; }
  .score-box { text-align: left; }
}
@media (max-width: 620px) {
  .topbar { height: 62px; padding: 0 17px; }
  .brand { font-size: 11px; gap: 8px; }
  .brand-mark { width: 27px; height: 27px; font-size: 16px; }
  .privacy-note { font-size: 0; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .button { min-height: 32px; padding: 0 7px; font-size: 9px; }
  .page-shell { width: min(100% - 30px, 520px); }
  .intro { padding: 47px 5px 26px; }
  .intro-copy { font-size: 12px; }
  .search-panel { padding: 17px; }
  .safe-label { display: none; }
  .search-form { flex-direction: column; }
  .button-primary { width: 100%; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .results-heading { align-items: flex-start; }
  .lead-card { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 16px; gap: 15px 10px; }
  .lead-identity { grid-column: span 2; }
  .filters > label { flex: 1; }
  .filters input, .filters select { width: 100%; min-width: 0; }
  .filters .filter-search { flex-basis: 100%; }
  .score-filter { min-width: 120px; }
  .export-actions { width: 100%; }
  .export-actions .button { flex: 1; padding: 0 8px; font-size: 10px; }
}
