/* Website Finder — Axiom modernist system (tokens mirror the Axiom Solutions site). */
:root {
  --color-bg: #f3f2f2;
  --color-surface: #eae9e9;
  --color-text: #201e1d;
  --color-muted: color-mix(in srgb, #201e1d 68%, transparent);
  --color-accent: #ec3013;
  --color-accent-600: #dd2b0f;
  --color-accent-700: #ae1800;
  --color-accent-100: #fff2ef;
  --color-divider: color-mix(in srgb, #201e1d 40%, transparent);
  --color-rule: color-mix(in srgb, #201e1d 14%, transparent);
  --color-hover: color-mix(in srgb, #201e1d 6%, transparent);
  --heat-hot: #dfeadf;
  --heat-warm: #f4ecd2;
  --heat-won: #f1dfae;
  --font: "Archivo", system-ui, sans-serif;
  --bar: 54px;
  --rail: 300px;
  --inspector: 380px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; scrollbar-color: var(--color-divider) transparent; scrollbar-width: thin; }
body {
  margin: 0; background: var(--color-bg); color: var(--color-text);
  font: 400 15px/1.5 var(--font); text-wrap: pretty; caret-color: var(--color-accent);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: 26px; }
h2 { font-size: 22px; }
h3 { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-muted); margin: 28px 0 8px; }
p { margin: 0; }
a { color: var(--color-accent-700); text-underline-offset: 3px; }
a:hover { color: var(--color-accent); }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num, .col-score, .col-rating, .col-price { font-variant-numeric: tabular-nums; }

/* — controls (Axiom vocabulary) — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none;
  font: 800 14px/1.2 var(--font); color: var(--color-text); background: transparent; border: 1px solid transparent;
  padding: 9px 14px; border-radius: 0; transition: background-color 150ms, color 150ms;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-text); }
.btn-primary:hover:not(:disabled) { background: var(--color-accent-600); border-color: var(--color-accent-600); color: var(--color-text); }
.btn-primary:active:not(:disabled) { background: var(--color-accent-700); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: var(--color-hover); color: var(--color-text); }
.btn-ghost { color: var(--color-accent-700); padding-inline: 6px; }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); color: var(--color-accent); }
.field { display: grid; gap: 5px; }
.field > span { font-size: 12px; color: var(--color-muted); }
.input {
  width: 100%; min-height: 38px; padding: 7px 10px; font: inherit; font-size: 14px; color: var(--color-text);
  background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: 0; transition: border-color 150ms;
}
.input::placeholder { color: var(--color-muted); }
.input:hover { border-color: color-mix(in srgb, var(--color-text) 60%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { resize: vertical; line-height: 1.45; }
select.input { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23201e1d' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 14px; }
.combo { position: relative; }
.combo .input { padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23201e1d' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 14px; cursor: pointer; }
.combo__list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20; max-height: 240px; overflow: auto;
  margin: 0; padding: 4px 0; list-style: none; background: var(--color-bg); border: 1px solid var(--color-divider);
  box-shadow: 0 8px 20px color-mix(in srgb, #201e1d 18%, transparent);
}
.combo__list li { padding: 8px 10px; font-size: 14px; cursor: pointer; }
.combo__list li:hover, .combo__list li[aria-selected="true"] { background: var(--color-hover); }
.combo__list li.is-active { background: var(--color-accent-100); color: var(--color-accent-700); }
.seg { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--color-divider); border: 1px solid var(--color-divider); }
.seg button { min-width: 0; font: 600 12px/1.2 var(--font); padding: 10px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 0; background: var(--color-bg); color: var(--color-text); cursor: pointer; transition: background-color 150ms, color 150ms; }
.seg button:hover { background: var(--color-hover); }
.seg button[aria-pressed="true"] { background: var(--color-accent); color: var(--color-text); }
.seg button:focus-visible { outline-offset: -3px; position: relative; z-index: 1; }

/* — top bar — */
.bar {
  position: sticky; top: 0; z-index: 10; height: var(--bar); display: flex; align-items: center; gap: 20px;
  padding: 0 20px; background: var(--color-bg); border-bottom: 2px solid var(--color-divider);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 800; font-size: 18px; margin-right: auto; }
.brand:hover { color: inherit; }
.brand__mark { width: 10px; height: 10px; background: var(--color-accent); display: block; }
.brand__app { font-weight: 400; font-size: 15px; color: var(--color-muted); margin-left: 4px; padding-left: 14px; border-left: 1px solid var(--color-divider); }
.bar__quota { font-size: 13px; color: var(--color-muted); }

/* — login — */
.login { min-height: calc(100dvh - var(--bar)); display: grid; place-items: center; padding: 24px; }
.login__form { width: min(380px, 100%); display: grid; gap: 16px; padding-top: 20px; border-top: 2px solid var(--color-text); }
.login__form h1 { font-size: 32px; }
.login__form p { color: var(--color-muted); }
.login__form .btn { justify-self: start; }
.form-error { color: var(--color-accent-700); font-size: 14px; min-height: 1.4em; }

/* — app frame — */
.app { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr) var(--inspector); height: calc(100dvh - var(--bar)); }
.rail, .list, .inspector { min-height: 0; overflow: auto; }
.rail { border-right: 2px solid var(--color-divider); padding: 20px; }
.inspector { border-left: 2px solid var(--color-divider); padding: 24px; background: var(--color-bg); }

/* — rail — */
.rail__search summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font: 800 12px/1.2 var(--font); letter-spacing: .08em; text-transform: uppercase; padding: 6px 0 12px; border-bottom: 2px solid var(--color-text); }
.rail__search summary::-webkit-details-marker { display: none; }
.rail__search .chev { transition: transform 200ms var(--ease); }
.rail__search[open] .chev { transform: rotate(180deg); }
.search { display: grid; gap: 14px; padding-top: 16px; }
.search .btn { justify-self: start; }
.search__status { font-size: 13px; color: var(--color-muted); min-height: 1.4em; }
.search__status.is-error { color: var(--color-accent-700); }
.searches { margin-top: 28px; }
.searches h2 { font: 800 12px/1.2 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--color-muted); padding-bottom: 8px; }
.searches ul { list-style: none; margin: 0; padding: 0; display: grid; }
.searches button {
  width: 100%; display: flex; align-items: baseline; gap: 10px; text-align: left; cursor: pointer;
  font: 400 14px/1.35 var(--font); color: var(--color-text); background: transparent; border: 0; border-bottom: 1px solid var(--color-rule);
  padding: 10px 6px; transition: background-color 150ms;
}
.searches button:hover { background: var(--color-hover); }
.searches button[aria-current="true"] { font-weight: 600; color: var(--color-accent-700); background: var(--color-accent-100); }
.searches .count { margin-left: auto; font-size: 12px; color: var(--color-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.searches .hot { font-size: 12px; font-weight: 600; color: var(--color-text); white-space: nowrap; }

/* — list — */
.list__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; padding: 22px 24px 14px; border-bottom: 2px solid var(--color-text); position: sticky; top: 0; background: var(--color-bg); z-index: 2; }
.list__meta { margin-top: 4px; font-size: 13px; color: var(--color-muted); }
#exit-browse { margin: 0 0 6px -6px; padding: 4px 8px; font-size: 12px; }
#exit-browse svg { width: 14px; height: 14px; }
.list__tools { display: flex; gap: 8px; align-items: center; }
.list__tools #filter { width: 220px; }
.list__tools #stage-filter { width: auto; }
.table-wrap { padding: 0 24px 40px; }
.leads { width: 100%; border-collapse: collapse; }
.leads th { text-align: left; padding: 12px 10px 8px; font: 600 12px/1.2 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--color-muted); border-bottom: 1px solid var(--color-divider); white-space: nowrap; }
.leads th button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.leads th button:hover { color: var(--color-text); }
.leads th button .sort { width: 12px; height: 12px; opacity: 0; transition: opacity 150ms, transform 150ms; }
.leads th[aria-sort] button { color: var(--color-text); }
.leads th[aria-sort] button .sort { opacity: 1; }
.leads th[aria-sort="ascending"] button .sort { transform: rotate(180deg); }
.leads .col-rating { min-width: 104px; }
.leads .col-rating .sub, .leads .col-price .sub { white-space: nowrap; }
.leads td { padding: 12px 10px; border-bottom: 1px solid var(--color-rule); vertical-align: top; }
.leads tbody tr { cursor: pointer; transition: background-color 150ms; }
.leads tbody tr:hover { background: var(--color-hover); }
.leads tbody tr[aria-current="true"] { outline: 2px solid var(--color-accent); outline-offset: -2px; }
.leads tbody tr[aria-current="true"] .score { color: var(--color-accent-700); }
.leads tr.heat-hot td { background: var(--heat-hot); }
.leads tr.heat-warm td { background: var(--heat-warm); }
.leads tr.stage-won td { background: var(--heat-won); }
.leads tr.stage-lost td { color: var(--color-muted); }
.leads tr.stage-lost .score { color: var(--color-muted); }
.leads .score { font-size: 22px; font-weight: 800; line-height: 1.1; }
.leads .name { display: block; font-weight: 600; }
.leads .sub { display: block; font-size: 13px; color: var(--color-muted); margin-top: 2px; }
.leads td a { color: inherit; white-space: nowrap; }
.leads td a:hover { color: var(--color-accent); }
.leads .col-score { width: 72px; }
.stage-tag { display: inline-block; font-size: 11px; letter-spacing: .02em; padding: 3px 10px; background: color-mix(in srgb, var(--color-text) 8%, transparent); white-space: nowrap; }
.stage-tag.is-won { background: var(--color-text); color: var(--color-bg); }
.stage-tag.is-quoted, .stage-tag.is-contacted { background: var(--color-accent-100); color: var(--color-accent-700); }
.stage-tag.is-saved { background: var(--color-accent-100); color: var(--color-accent-700); }
.btn-save { padding: 6px 14px; font-size: 12px; }
.stage-cell { display: flex; align-items: center; gap: 6px; }
.btn-delete {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; color: var(--color-muted); font-size: 16px; line-height: 1;
  transition: background-color 150ms, color 150ms;
}
.btn-delete:hover { background: var(--color-accent-100); color: var(--color-accent-700); }
.btn-delete:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.leads tr.skel td span { display: block; height: 14px; width: 60%; background: color-mix(in srgb, var(--color-text) 9%, transparent); animation: pulse 1.2s ease-in-out infinite; }
.leads tr.skel td:first-child span { width: 40px; height: 22px; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.empty { padding: 48px 8px; color: var(--color-muted); max-width: 52ch; }

/* — inspector — */
.inspector__empty { color: var(--color-muted); max-width: 30ch; }
.lead { display: block; }
.lead__back { display: none; margin: -8px 0 16px -6px; }
.lead__score { display: flex; align-items: baseline; gap: 6px; font-size: 13px; color: var(--color-muted); margin-bottom: 6px; }
.lead__score b { font-size: 34px; font-weight: 800; line-height: 1; color: var(--color-text); letter-spacing: -0.02em; }
.heat { margin-left: 10px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; }
.heat.is-hot { background: var(--heat-hot); color: #1f4a24; }
.heat.is-warm { background: var(--heat-warm); color: #5b4300; }
.heat:empty { display: none; }
.lead h2 { margin-bottom: 4px; }
.lead__meta { font-size: 13px; color: var(--color-muted); }
.lead__why { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--color-rule); font-size: 14px; }
.lead__save { display: flex; margin-top: 18px; }
.lead__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.lead__saved { font-size: 12px; color: var(--color-muted); min-height: 1.2em; margin-top: 4px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 0; }
.facts .wide { grid-column: 1 / -1; }
.facts dt { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--color-muted); }
.facts dd { margin: 2px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.lead__delete { margin-top: 32px; margin-left: -6px; }
.lead__purge { display: block; margin-top: 4px; margin-left: -6px; font-size: 12px; padding: 6px; color: var(--color-muted); }
.lead__purge:hover { color: var(--color-accent-700); background: color-mix(in srgb, var(--color-accent) 8%, transparent); }

/* — two-pane: rail + list; inspector slides in from the right — */
@media (max-width: 1199px) {
  :root { --rail: 260px; }
  .app { grid-template-columns: var(--rail) minmax(0, 1fr); }
  .inspector {
    position: fixed; top: var(--bar); right: 0; bottom: 0; width: min(440px, 100%); z-index: 8;
    transform: translateX(100%); transition: transform 220ms var(--ease); box-shadow: -12px 0 32px color-mix(in srgb, #2d2b2b 16%, transparent);
  }
  .app.has-selection .inspector { transform: none; }
  .lead__back { display: inline-flex; }
}

/* — phone: everything stacks; searches become a chip row — */
@media (max-width: 819px) {
  .app { display: block; height: auto; }
  .rail, .list { overflow: visible; height: auto; }
  .rail { border-right: 0; border-bottom: 2px solid var(--color-divider); padding: 14px 16px 0; }
  .searches { margin-top: 14px; }
  .searches ul { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 12px 0; scrollbar-width: none; mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  .searches li { flex: none; }
  .searches button { width: auto; border: 1px solid var(--color-divider); padding: 7px 10px; font-size: 13px; }
  .searches .count { margin-left: 2px; }
  .list__head { position: static; padding: 18px 16px 12px; }
  .list__tools { width: 100%; }
  .list__tools #filter { flex: 1; width: auto; min-width: 0; }
  .table-wrap { padding: 0 8px 40px; }
  .leads td, .leads th { padding-inline: 8px; }
  .col-rating, .col-price { display: none; }
  .inspector { width: 100%; box-shadow: none; padding: 16px; }
  .brand__app { display: none; }
  .bar { padding: 0 16px; gap: 12px; }
}
@media (max-width: 479px) {
  .col-stage { display: none; }
  .leads .score { font-size: 20px; }
  .bar__quota { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .inspector, .rail__search .chev, .btn, .leads tbody tr, .searches button { transition: none; }
  .leads tr.skel td span { animation: none; }
}

/* — one authored moment: the accent wipe from the Axiom site, run once on successful login — */
.wipe::after { content: ""; position: fixed; inset: 0; z-index: 20; background: var(--color-accent); pointer-events: none; animation: wipe 900ms cubic-bezier(.77, 0, .18, 1) forwards; }
@keyframes wipe { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (prefers-reduced-motion: reduce) { .wipe::after { display: none; } }
