:root {
  --hq-black: #09090B;
  --hq-panel: #18181B;
  --hq-panel-2: #27272A;
  --hq-lime: #A3E635;
  --hq-lime-soft: #BEF264;
  --hq-white: #FFFFFF;
  --hq-soft: #F5F5F4;
  --hq-grey: #E7E5E4;
  --hq-muted: #71717A;
  --hq-text: #111111;
  --hq-body: #52525B;
  --hq-line: #E5E5E5;
  --hq-error: #DC2626;
  --hq-font: "General Sans", Satoshi, Inter, system-ui, sans-serif;
  --hq-radius-lg: 34px;
  --hq-radius: 28px;
  --hq-radius-sm: 22px;
  --hq-radius-input: 14px;
  --hq-shadow: 0 24px 80px rgba(0, 0, 0, 0.12);
  --hq-gradient-hero: radial-gradient(circle at top right, rgba(163, 230, 53, 0.24), transparent 40%),
    linear-gradient(135deg, #09090B 0%, #18181B 100%);
  --hq-gradient-ui: radial-gradient(circle at bottom left, rgba(163, 230, 53, 0.28), transparent 40%),
    linear-gradient(135deg, #18181B 0%, #27272A 100%);
  --hq-gradient-campaign: linear-gradient(135deg, #09090B 0%, #18181B 60%, #A3E635 220%);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--hq-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--hq-text);
  background: var(--hq-grey);
  -webkit-font-smoothing: antialiased;
}

/* Logo: "Hunt" neutral, "IQ" always green. */
.hq-logo { font-weight: 950; letter-spacing: -0.045em; line-height: 0.9; color: inherit; text-decoration: none; }
.hq-iq { color: var(--hq-lime); }

/* App shell */
.hq-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 2rem;
  background: var(--hq-black);
  color: var(--hq-white);
}
.hq-header .hq-logo { font-size: 1.75rem; color: var(--hq-white); }
.hq-nav { display: flex; align-items: center; gap: 1rem; }
.hq-nav .hq-nav-button { padding: 0.55rem 1.1rem; font-size: 0.9375rem; }
.hq-nav-link { color: var(--hq-white); font-size: 0.9375rem; font-weight: 600; text-decoration: none; opacity: 0.8; }
.hq-nav-link:hover, .hq-nav-link[aria-current="page"] { color: var(--hq-lime); opacity: 1; }
.hq-shell { max-width: 72rem; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.hq-panel {
  background: var(--hq-white);
  border-radius: var(--hq-radius-lg);
  box-shadow: var(--hq-shadow);
  padding: 3rem;
}

/* Dark hero, for the home and sign-in pages */
.hq-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--hq-radius-lg);
  box-shadow: var(--hq-shadow);
  background: var(--hq-black);
  color: var(--hq-white);
  padding: 4.5rem;
}
.hq-hero::before, .hq-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(90px);
  pointer-events: none;
}
.hq-hero::before { top: -120px; right: -100px; width: 500px; height: 500px; background: var(--hq-lime); opacity: 0.15; }
.hq-hero::after { bottom: -100px; left: -80px; width: 420px; height: 420px; background: var(--hq-white); opacity: 0.06; }
.hq-hero > * { position: relative; z-index: 1; }
.hq-hero .hq-logo { font-size: clamp(3.5rem, 9vw, 6.875rem); }
.hq-hero h1 { color: var(--hq-white); font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 0.92; margin-top: 2.25rem; max-width: 56rem; }
.hq-hero .hq-sub { color: #D4D4D8; font-size: 1.25rem; max-width: 52rem; margin-top: 1.75rem; }
.hq-kicker {
  font-size: 0.8125rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--hq-lime);
  margin: 0 0 1.75rem;
}
.hq-auth { display: flex; justify-content: center; margin-top: 2.5rem; }

/* Typography: geometric, heavy, tight tracking */
h1, h2, h3 { margin: 0 0 1rem; color: var(--hq-text); }
h1 { font-size: clamp(2.25rem, 4vw, 3.625rem); line-height: 1; font-weight: 950; letter-spacing: -0.03em; }
h2 { font-size: 1.75rem; line-height: 1.1; font-weight: 900; letter-spacing: -0.04em; margin-top: 2.5rem; }
h3 { font-size: 1.375rem; font-weight: 900; letter-spacing: -0.04em; }
p { margin: 0 0 1rem; }
.hq-lead { font-size: 1.3125rem; color: var(--hq-body); max-width: 56rem; }
.hq-caption { font-size: 0.875rem; color: var(--hq-muted); }

a { color: var(--hq-text); font-weight: 700; text-decoration: underline; text-decoration-color: var(--hq-lime); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--hq-text); }
/* Pill buttons keep their own colours: IQ Green on black, or white on black. */
.hq-hero a:not(.hq-button) { color: var(--hq-white); }
:focus-visible { outline: 3px solid var(--hq-lime); outline-offset: 2px; }

/* Back link above a page title */
.hq-back { margin-bottom: 1.5rem; font-size: 0.875rem; }
.hq-back a { color: var(--hq-muted); text-decoration: none; font-weight: 800; letter-spacing: 0.02em; }
.hq-back a::before { content: "← "; }
.hq-back a:hover { color: var(--hq-text); }

/* Actions: pill buttons. Primary is IQ Green on black text. */
button, .hq-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.5rem;
  background: var(--hq-lime);
  color: var(--hq-black);
  font: inherit;
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}
button:hover, .hq-button:hover { background: var(--hq-lime-soft); }
button:active, .hq-button:active { transform: translateY(1px); }
.hq-button.hq-secondary, button.hq-secondary { background: var(--hq-black); color: var(--hq-white); }
.hq-button.hq-secondary:hover, button.hq-secondary:hover { background: var(--hq-panel-2); }
.hq-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 0 0 2rem; }

/* Cards and tiles */
.hq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.25rem; margin: 1rem 0 0; }
.hq-card {
  position: relative;
  background: #F4F4F5;
  border: 1px solid var(--hq-line);
  border-radius: var(--hq-radius);
  padding: 1.75rem;
  transition: border-color 150ms ease, transform 150ms ease;
}
.hq-card:hover { border-color: var(--hq-lime); transform: translateY(-2px); }
.hq-card h3 { margin: 0 0 0.5rem; font-size: 1.75rem; }
/* A card's title link covers the whole card. */
.hq-card h3 a { text-decoration: none; }
.hq-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.hq-card p { margin: 0; color: var(--hq-body); }

/* Two equal columns, e.g. an edit form beside related records. Stacks on
   narrow screens in source order, so put the form first. */
.hq-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; align-items: start; }
.hq-split > section > h2:first-child { margin-top: 0; }
.hq-split form.record { max-width: none; }

/* Status list (admin bindings) */
dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 1.5rem; margin: 0; }
dt { font-weight: 900; }
dd { margin: 0; color: var(--hq-body); }
.hq-ok { color: #3F6212; font-weight: 800; }
.hq-bad { color: var(--hq-error); font-weight: 800; }

/* Tables */
.hq-table-wrap { overflow-x: auto; border: 1px solid var(--hq-line); border-radius: var(--hq-radius-sm); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--hq-line); vertical-align: top; }
th {
  background: var(--hq-soft);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--hq-muted);
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #FAFAF9; }
/* Keeps a cell's main line, e.g. a person's name, on one line. */
.hq-nowrap { white-space: nowrap; }
/* Narrow icon columns, e.g. whether Firmable has an email or a phone. */
th.hq-flag, td.hq-flag { width: 1%; padding-left: 0.6rem; padding-right: 0.6rem; text-align: center; letter-spacing: 0; color: #3F6212; }
th.hq-flag { color: var(--hq-muted); }
.hq-flag svg { width: 1.1rem; height: 1.1rem; vertical-align: middle; }

/* Forms */
label { font-weight: 800; }
input, select, textarea {
  font: inherit;
  color: var(--hq-text);
  background: var(--hq-white);
  border: 1px solid #D4D4D8;
  border-radius: var(--hq-radius-input);
  padding: 0.7rem 0.9rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--hq-black); box-shadow: 0 0 0 3px rgba(163, 230, 53, 0.55); }
form.record { max-width: 44rem; }
form.record label { display: block; margin-top: 1.25rem; margin-bottom: 0.4rem; }
form.record input, form.record select, form.record textarea { display: block; width: 100%; }
form.record button { margin-top: 2rem; }
/* A checkbox and its words on one line, in a record form. */
form.record label.hq-check { display: flex; gap: 0.5rem; align-items: center; }
form.record label.hq-check input { display: inline; width: auto; }
form.record textarea[spellcheck="false"] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.875rem; }
.hq-raw { max-height: 28rem; overflow: auto; padding: 0.75rem; font-size: 0.8125rem; white-space: pre-wrap; word-break: break-word; background: rgba(0, 0, 0, 0.04); border-radius: 6px; }
/* A one-field form inside a table cell. */
form.hq-inline { display: flex; gap: 0.5rem; align-items: center; margin: 0; }
form.hq-inline button { padding-top: 0.5rem; padding-bottom: 0.5rem; white-space: nowrap; }
/* The role checkboxes on /admin/users, folded into a table cell. */
.hq-roles summary { cursor: pointer; font-weight: 700; }
.hq-roles form { display: grid; gap: 0.75rem; margin-top: 0.75rem; min-width: 14rem; }
.hq-roles fieldset { margin: 0; padding: 0.5rem 0.75rem; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 6px; }
.hq-roles legend { padding: 0 0.25rem; font-size: 0.8125rem; font-weight: 700; }
.hq-roles label { display: flex; gap: 0.5rem; align-items: center; font-weight: 400; white-space: nowrap; }
.hq-roles button { justify-self: start; padding-top: 0.5rem; padding-bottom: 0.5rem; }
/* The Hunts board: columns side by side, scrolling sideways when they don't fit. */
.hq-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(15rem, 1fr); gap: 1rem; overflow-x: auto; padding-bottom: 1rem; align-items: start; }
.hq-board-column { background: var(--hq-soft); border: 1px solid var(--hq-line); border-radius: 12px; padding: 0.75rem; }
.hq-board-column h2 { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; align-items: baseline; margin: 0 0 0.75rem; font-size: 1rem; }
.hq-board-column h2 .hq-caption { flex-basis: 100%; font-weight: 400; }
.hq-board-count { font-size: 0.8125rem; color: var(--hq-muted); }
.hq-board-column ul { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.hq-board-card { display: grid; gap: 0.2rem; background: #FFFFFF; border: 1px solid var(--hq-line); border-radius: 8px; padding: 0.6rem 0.75rem; overflow-wrap: anywhere; }
.hq-board-name { font-weight: 700; }
.hq-board-role { font-size: 0.875rem; }
.hq-board-card .hq-tag { justify-self: start; }
/* The client hunt tracker: funnel counts as bars, and the staff "view as client" banner. */
.hq-staff-banner { margin: 0 0 1.25rem; padding: 0.6rem 0.9rem; background: #FEF3C7; border: 1px solid #F59E0B; border-radius: 8px; color: #78350F; }
.hq-progress, .hq-milestones { display: grid; gap: 0.75rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.hq-progress li { display: grid; grid-template-columns: 9rem 3.5rem 1fr; gap: 0.25rem 0.75rem; align-items: center; }
.hq-progress .hq-caption { grid-column: 1 / -1; }
.hq-progress-label { font-weight: 700; }
.hq-progress-count { font-variant-numeric: tabular-nums; text-align: right; }
.hq-progress-bar { height: 0.75rem; background: var(--hq-soft); border: 1px solid var(--hq-line); border-radius: 999px; overflow: hidden; }
.hq-progress-bar > span { display: block; height: 100%; background: var(--hq-lime); }
.hq-milestones time { font-variant-numeric: tabular-nums; margin-right: 0.75rem; color: var(--hq-muted); }
/* The tracker's shortlist dashboard: one card per person, best fit first. Every bar and badge has its meaning in text beside it. */
.hq-shortlist-people { display: grid; gap: 1rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.hq-shortlist-person { display: grid; gap: 0.6rem; background: #FFFFFF; border: 1px solid var(--hq-line); border-radius: 8px; padding: 1rem 1.25rem; overflow-wrap: anywhere; }
.hq-shortlist-person h3 { margin: 0.25rem 0 0; font-size: 0.9375rem; }
.hq-shortlist-head { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: baseline; }
.hq-shortlist-rank { font-weight: 950; font-variant-numeric: tabular-nums; }
.hq-shortlist-fit { display: grid; grid-template-columns: minmax(12rem, auto) 1fr; gap: 0.75rem; align-items: center; }
.hq-shortlist-contact { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 0.75rem; margin: 0; }
.hq-shortlist-contact dt { font-weight: 700; }
.hq-shortlist-contact dd { margin: 0; }
.hq-dealbreakers { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.hq-dealbreaker { display: inline-flex; gap: 0.4rem; align-items: center; padding: 0.15rem 0.65rem; border-radius: 999px; border: 1px solid var(--hq-line); background: var(--hq-soft); font-size: 0.875rem; }
.hq-dealbreaker-icon { font-weight: 950; }
.hq-dealbreaker-met { background: #ECFCCB; border-color: #65A30D; }
.hq-dealbreaker-not_met { background: #FEE2E2; border-color: var(--hq-error); }
.hq-dealbreaker-unknown { border-style: dashed; }
.hq-bars.hq-skills { padding: 0; }
.hq-skills .hq-bar { grid-template-columns: minmax(0, 1fr) 8.5rem; }
form.hq-filter { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 0 0 1.5rem; }
/* List filter rows carry no visible labels (each control keeps a visually
   hidden one), so they fit on one line on a laptop. A long option, such as an
   organisation name, must not push the row onto a second line. */
form.hq-filter select { max-width: 15rem; }
form.hq-filter input[type="search"] { width: 14rem; max-width: 100%; }
/* The Conversations panel on the person page: one thread per channel, newest first. */
.hq-conversations { margin-top: 2.5rem; }
.hq-thread h3 { display: flex; gap: 0.75rem; align-items: baseline; margin: 1.5rem 0 0.75rem; }
.hq-thread h3 .hq-caption { font-weight: 400; letter-spacing: 0; }
.hq-thread-roles { margin: -0.25rem 0 0.75rem; }
.hq-messages { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.hq-message { background: #FFFFFF; border: 1px solid var(--hq-line); border-radius: 12px; padding: 0.75rem 1rem; overflow-wrap: anywhere; }
.hq-message[data-direction="outbound"] { border-left: 4px solid var(--hq-lime); }
.hq-message.hq-event { background: var(--hq-soft); border-style: dashed; }
.hq-message-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: center; font-size: 0.8125rem; color: var(--hq-muted); }
.hq-message-meta strong { color: var(--hq-text); }
.hq-message-body { margin: 0.4rem 0 0; white-space: pre-wrap; }
a.hq-tag { color: inherit; text-decoration: none; }
.hq-tag.hq-simulated { background: var(--hq-black); border-color: var(--hq-black); color: var(--hq-white); cursor: help; }
.hq-tag.hq-not-sent { background: #FEF3C7; border-color: #F59E0B; color: #78350F; cursor: help; }
.hq-message-subject { margin: 0.4rem 0 0; font-weight: 700; }
.hq-message-new { box-shadow: 0 0 0 2px var(--hq-lime); }
/* The New message form on the Conversations panel. The banner matches the SMS tester's simulation banner. */
.hq-compose-wrap { margin: 0.5rem 0 1.5rem; }
.hq-compose { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.4rem; margin-top: 1rem; padding: 0 1.25rem 1.25rem; border: 1px solid var(--hq-line); border-radius: 12px; background: #FFFFFF; }
.hq-compose[hidden], .hq-compose [hidden] { display: none !important; }
.hq-compose-banner { position: sticky; top: 0; z-index: 20; margin: 0 -1.25rem 0.75rem; padding: 0.7rem 1.1rem; border-radius: 12px 12px 0 0; background: var(--hq-black); color: var(--hq-white); font-weight: 800; display: flex; gap: 0.75rem; align-items: baseline; flex-wrap: wrap; }
.hq-compose-banner span { font-weight: 400; color: var(--hq-grey); font-size: 0.875rem; }
.hq-compose-preview { margin-top: 0.75rem; padding: 0.75rem 1rem; border-radius: 12px; background: var(--hq-soft); }
.hq-compose-preview h4 { margin: 0 0 0.25rem; }
.hq-compose-warn { margin: 0.5rem 0 0; padding: 0.5rem 0.75rem; border-radius: 8px; background: #FFFBEB; font-size: 0.875rem; }
.hq-compose-warn.hq-compose-bad { background: #FEF2F2; color: var(--hq-error); font-weight: 700; }
.hq-compose .hq-actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-top: 0.75rem; }
.hq-compose-link { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-top: 0.25rem; }
.hq-compose button:disabled { opacity: 0.4; cursor: not-allowed; }
.hq-compose select, .hq-compose input, .hq-compose textarea { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
/* The Call button and call entries on the Conversations panel. The form matches New message. */
.hq-call-wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin: 0.5rem 0 0.75rem; }
.hq-call-wrap > .hq-call, .hq-call-wrap > #call-status { flex: 1 1 100%; }
.hq-call-wrap #call-status:empty { display: none; }
.hq-call-wrap button:disabled { opacity: 0.5; cursor: not-allowed; }
.hq-call { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.4rem; padding: 1rem 1.25rem 1.25rem; border: 1px solid var(--hq-line); border-radius: 12px; background: #FFFFFF; }
.hq-call[hidden] { display: none !important; }
.hq-call select { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
.hq-call .hq-actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-top: 0.75rem; }
.hq-call-wrap + .hq-compose-wrap { margin-top: 0; }
.hq-channel-icon { width: 1rem; height: 1rem; flex: none; vertical-align: -0.15em; margin-right: 0.35rem; }
.hq-call-kind { display: inline-flex; align-items: center; }
.hq-call-audio { display: block; width: 100%; max-width: 28rem; margin-top: 0.6rem; }
.hq-transcript { margin-top: 0.5rem; }
.hq-transcript summary { cursor: pointer; font-weight: 700; font-size: 0.875rem; }
.hq-transcript-note { margin: 0.5rem 0 0; font-size: 0.875rem; }
button.hq-call-retry { background: transparent; color: var(--hq-text); padding: 0; font: inherit; font-weight: 700; text-decoration: underline; text-decoration-color: var(--hq-lime); }
button.hq-call-retry:hover { background: transparent; }
/* The Conversations page: one row per thread. */
.hq-channel { display: inline-flex; color: var(--hq-text); }
.hq-channel svg { width: 1.25rem; height: 1.25rem; }
a.hq-conversation-snippet { color: inherit; font-weight: 400; text-decoration: none; overflow-wrap: anywhere; }
a.hq-conversation-snippet:hover { text-decoration: underline; }
.hq-tag.hq-needs-reply { background: var(--hq-lime); border-color: var(--hq-lime); color: var(--hq-black); font-weight: 800; }
.hq-pager { display: flex; gap: 1.5rem; margin-top: 1.5rem; }
.error { color: var(--hq-error); font-weight: 700; }
form.record .error { display: block; margin-top: 0.35rem; font-size: 0.875rem; }

/* Talent Scan: the guided scan and its results (hero layout) */
/* overflow: clip, not hidden, so the sticky fee panel and action bar still stick. */
.hq-hero:has(.hq-sticky) { overflow: clip; }
.hq-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hq-hero h2, .hq-hero h3 { color: var(--hq-white); }
.hq-hero .hq-caption { color: #A1A1AA; }
.hq-hero label, .hq-hero legend { color: var(--hq-white); }
.hq-scan { margin-top: 3rem; max-width: 52rem; }
.hq-steps { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0 0 2rem; counter-reset: step; }
.hq-steps li {
  counter-increment: step;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--hq-panel-2);
  color: #A1A1AA;
  font-size: 0.875rem;
  font-weight: 800;
}
.hq-steps li::before { content: counter(step) ". "; }
.hq-steps li[aria-current="step"] { background: var(--hq-lime); border-color: var(--hq-lime); color: var(--hq-black); }
.hq-step { background: var(--hq-panel); border: 1px solid var(--hq-panel-2); border-radius: var(--hq-radius); padding: 2rem; }
.hq-step h2 { margin-top: 0; }
.hq-step h2:focus, .hq-understood h3:focus { outline: none; }
.hq-step h3 { font-size: 1.125rem; margin: 1.75rem 0 0.25rem; }
.hq-step label { display: block; margin-bottom: 0.4rem; }
.hq-step textarea { display: block; width: 100%; resize: vertical; }
.hq-step .hq-actions { margin: 1.5rem 0 0; }
.hq-step-actions { justify-content: flex-end; }
.hq-step-actions [data-back] { margin-right: auto; }
.hq-chips-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.75rem; }
.hq-chip, button.hq-link, .hq-icon { font-weight: 800; }
.hq-chip { padding: 0.4rem 0.9rem; background: transparent; color: var(--hq-white); border: 1px solid var(--hq-panel-2); }
.hq-chip:hover { background: var(--hq-panel-2); }
button.hq-link { background: transparent; color: #D4D4D8; text-decoration: underline; text-decoration-color: var(--hq-lime); padding: 0.85rem 0.5rem; }
button.hq-link:hover { background: transparent; color: var(--hq-white); }
/* A form button that reads as a plain link on a light panel, like a link above. */
button.hq-text-link { background: transparent; color: var(--hq-text); font-weight: 700; padding: 0; text-decoration: underline; text-decoration-color: var(--hq-lime); text-decoration-thickness: 2px; text-underline-offset: 3px; }
button.hq-text-link:hover { background: transparent; color: var(--hq-text); }
.hq-understood { margin-top: 1.75rem; padding: 1.5rem; border-radius: var(--hq-radius-sm); background: var(--hq-black); border: 1px solid var(--hq-lime); }
.hq-understood h3 { margin-top: 0; }
.hq-hero dt { color: var(--hq-white); }
.hq-hero dd { color: #D4D4D8; }
.hq-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0.75rem 0; }
.hq-chip-item { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.25rem 0.25rem 0.9rem; border-radius: 999px; background: var(--hq-white); color: var(--hq-black); font-weight: 800; }
.hq-icon { padding: 0.3rem 0.6rem; min-width: 2rem; background: var(--hq-panel-2); color: var(--hq-white); }
.hq-chip-item .hq-icon { background: var(--hq-soft); color: var(--hq-black); }
.hq-icon:hover { background: var(--hq-lime); color: var(--hq-black); }
.hq-icon:disabled { opacity: 0.35; cursor: default; }
.hq-ranked { list-style: none; padding: 0; margin: 0.75rem 0; display: grid; gap: 0.5rem; }
.hq-ranked-item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.75rem; border-radius: var(--hq-radius-input); background: var(--hq-black); border: 1px solid var(--hq-panel-2); cursor: grab;
}
.hq-ranked-item.hq-drop { border-color: var(--hq-lime); }
.hq-rank { width: 2rem; height: 2rem; border-radius: 999px; display: inline-grid; place-items: center; background: var(--hq-lime); color: var(--hq-black); font-weight: 900; }
.hq-trainable .hq-rank { background: var(--hq-panel-2); color: var(--hq-white); }
.hq-ranked-label { flex: 1 1 10rem; font-weight: 800; }
.hq-step label.hq-train { display: inline-flex; gap: 0.4rem; align-items: center; margin: 0 0.5rem 0 0; font-weight: 500; color: #D4D4D8; font-size: 0.875rem; }
.hq-warning { color: var(--hq-lime-soft) !important; }
.hq-add { display: flex; gap: 0.5rem; }
.hq-add input, .hq-add .hq-combo { flex: 1; }

/* Job title suggestions: a listbox drawn under the input, since a native
   datalist popup can't be styled. Solid white like the inputs, and stacked
   above whatever follows it in the step. */
.hq-combo { position: relative; }
.hq-combo input { display: block; width: 100%; }
.hq-suggest {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 16rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--hq-white);
  color: var(--hq-text);
  border: 1px solid #D4D4D8;
  border-radius: var(--hq-radius-input);
  box-shadow: var(--hq-shadow);
}
.hq-suggest[hidden] { display: none; }
.hq-suggest li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 1rem; padding: 0.55rem 0.75rem; border-radius: 10px; font-weight: 700; cursor: pointer; }
.hq-suggest li:hover { background: var(--hq-soft); }
.hq-suggest li[aria-selected="true"] { background: var(--hq-lime); color: var(--hq-black); }
.hq-suggest-family { color: var(--hq-muted); font-size: 0.875rem; font-weight: 500; }
.hq-suggest li[aria-selected="true"] .hq-suggest-family { color: var(--hq-black); }
.hq-add button { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.hq-follow-up { margin-top: 1rem; }
.hq-follow-up input { width: 100%; }
.hq-toggles { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 1rem; }
.hq-step label.hq-toggle { display: inline-flex; gap: 0.5rem; align-items: center; margin: 0; padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid var(--hq-panel-2); font-weight: 700; cursor: pointer; }
.hq-step label.hq-toggle:has(input:checked) { border-color: var(--hq-lime); background: rgba(163, 230, 53, 0.12); }
.hq-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.25rem; }
.hq-fields select, .hq-fields input { width: 100%; }
.hq-reach { border: 0; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.hq-reach legend { font-weight: 800; margin-bottom: 0.5rem; }
.hq-step .hq-reach label { display: inline-flex; gap: 0.5rem; align-items: center; margin: 0; }
.hq-hero .error { color: #FCA5A5; }
/* Start a hunt: the form beside the read-only scan summary. */
.hq-start .error { display: block; margin-top: 0.35rem; font-size: 0.875rem; }
.hq-start .hq-actions { margin-top: 1.75rem; }
.hq-hero .hq-fee h3 { margin: 1.25rem 0 0.25rem; color: var(--hq-text); }

.hq-funnel { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; padding: 0; margin: 2.5rem 0 0.75rem; max-width: 52rem; }
.hq-funnel li { padding: 1.25rem 1.5rem; border-radius: var(--hq-radius-sm); background: var(--hq-panel); border: 1px solid var(--hq-panel-2); color: #D4D4D8; font-weight: 700; }
.hq-funnel li:last-child { border-color: var(--hq-lime); }
.hq-funnel strong { display: block; color: var(--hq-white); font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 950; letter-spacing: -0.03em; line-height: 1.1; }
.hq-funnel li:last-child strong { color: var(--hq-lime); }
.hq-results { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 2rem; align-items: start; margin-top: 2rem; }
.hq-people { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.75rem; }
.hq-person details { background: var(--hq-white); color: var(--hq-text); border-radius: var(--hq-radius-sm); border: 1px solid transparent; }
.hq-person details[open] { border-color: var(--hq-lime); }
.hq-person summary { display: grid; gap: 0.35rem; padding: 1.25rem 1.5rem; cursor: pointer; list-style: none; }
.hq-person summary::-webkit-details-marker { display: none; }
/* A role card on the person portal: the same white card, always open. */
.hq-portal-role { display: grid; gap: 0.35rem; padding: 1.25rem 1.5rem; background: var(--hq-white); color: var(--hq-text); border-radius: var(--hq-radius-sm); }
.hq-portal-role .hq-actions { margin: 0.5rem 0 0; }
.hq-person-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.hq-person-label { font-weight: 950; font-size: 1.25rem; letter-spacing: -0.03em; }
.hq-match { font-weight: 950; font-size: 1.5rem; padding: 0.1rem 0.75rem; border-radius: 999px; background: var(--hq-lime); color: var(--hq-black); }
.hq-person-title { font-weight: 800; }
.hq-person-facts { color: var(--hq-body); font-size: 0.875rem; }
.hq-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.25rem; }
.hq-tag { padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--hq-soft); border: 1px solid var(--hq-line); font-size: 0.8125rem; font-weight: 700; }
.hq-more { font-size: 0.8125rem; font-weight: 800; color: var(--hq-muted); text-decoration: underline; text-decoration-color: var(--hq-lime); }
details[open] .hq-more { display: none; }
.hq-bars { list-style: none; margin: 0; padding: 0 1.5rem 1.25rem; display: grid; gap: 0.75rem; }
.hq-bar { display: grid; grid-template-columns: minmax(0, 1fr) 6rem; gap: 0.15rem 0.75rem; align-items: center; }
.hq-bar-label { font-weight: 800; }
.hq-bar-track { grid-column: 1; height: 0.5rem; border-radius: 999px; background: var(--hq-soft); overflow: hidden; }
.hq-bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--hq-lime); width: 0; }
.hq-bar-matched .hq-bar-fill { width: 100%; }
.hq-bar-partial .hq-bar-fill { width: 50%; background: var(--hq-lime-soft); }
.hq-bar-match { grid-column: 2; grid-row: 1 / span 2; font-size: 0.8125rem; font-weight: 900; text-align: right; }
.hq-bar-not_found .hq-bar-match { color: var(--hq-muted); }
.hq-bar-reason { grid-column: 1 / -1; font-size: 0.8125rem; color: var(--hq-body); }
.hq-fee { position: sticky; top: 1.5rem; padding: 1.75rem; border-radius: var(--hq-radius-sm); background: var(--hq-white); color: var(--hq-text); }
.hq-fee h2 { margin-top: 0; font-size: 1.5rem; color: var(--hq-text); }
.hq-fee dl { grid-template-columns: auto 1fr; gap: 0.5rem 1rem; margin: 0 0 1rem; }
.hq-fee dt { color: var(--hq-text); font-weight: 700; }
.hq-fee dd { color: var(--hq-body); text-align: right; }
.hq-fee a { color: var(--hq-text); }
.hq-fee .hq-caption { color: var(--hq-muted); }
.hq-sticky {
  position: sticky; bottom: 1rem; z-index: 2; display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
  margin-top: 2rem; padding: 0.9rem; border-radius: 999px; background: rgba(24, 24, 27, 0.92); border: 1px solid var(--hq-panel-2);
  backdrop-filter: blur(8px);
}

@media (max-width: 900px) {
  /* minmax(0, ...) so long content can't push the stacked column, or a
     details list inside it, wider than the screen. */
  .hq-split { grid-template-columns: minmax(0, 1fr); }
  .hq-split dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hq-split dd { overflow-wrap: anywhere; }
  .hq-results { grid-template-columns: 1fr; }
  .hq-fee { position: static; }
}
@media (max-width: 700px) {
  .hq-step { padding: 1.25rem; }
  .hq-funnel { grid-template-columns: 1fr; }
  .hq-sticky { border-radius: var(--hq-radius-sm); padding: 0.6rem; gap: 0.5rem; flex-wrap: nowrap; }
  .hq-sticky .hq-button { flex: 1; padding: 0.7rem 0.75rem; font-size: 0.875rem; text-align: center; }
}

.hq-footer { text-align: center; color: var(--hq-muted); font-size: 0.875rem; padding: 0 1.5rem 2.5rem; }

@media (max-width: 700px) {
  .hq-header { padding: 1rem 1.25rem; flex-wrap: wrap; }
  .hq-nav { flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem 0.85rem; }
  .hq-shell { padding: 1rem 0.75rem 3rem; }
  .hq-panel, .hq-hero { padding: 2rem 1.5rem; border-radius: var(--hq-radius); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
