:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #14181f;
  --muted: #626b78;
  --line: #e4e7ec;
  --accent: #3b5bfd;
  --accent-soft: #eef1ff;
  --hi: #1f9d55;
  --mid: #b7791f;
  --lo: #98a2b3;
  --chip: #f0f2f5;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 16px rgba(16,24,40,.06);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1017; --panel: #151a23; --ink: #e8ecf3; --muted: #94a0b1;
    --line: #232a36; --accent: #7d92ff; --accent-soft: #1a2138;
    --chip: #1c2230; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

.topbar { border-bottom: 1px solid var(--line); background: var(--panel); }
.topbar-inner { display: flex; align-items: center; gap: 24px; padding: 14px 20px; }
.brand { font-weight: 700; font-size: 18px; letter-spacing: -.2px; }
.logo { color: var(--accent); }
.tagline { color: var(--muted); font-size: 13px; }

.tabs { display: flex; gap: 4px; }
.sysbar { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.sysstatus { display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: .09em; white-space: nowrap;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--chip); color: var(--muted); }
.sysstop { font: inherit; font-size: 11px; font-weight: 800; letter-spacing: .06em;
  cursor: pointer; padding: 5px 12px; border-radius: 999px; color: #fff;
  border: 1px solid #b91c1c; background: #dc2626; }
.sysstop:hover { background: #b91c1c; }
.sysstop:disabled { cursor: default; opacity: .6; }
.sysstatus .sysdot { width: 8px; height: 8px; border-radius: 50%; background: #9aa5b3; }
.sysstatus.busy { background: #f59e0b; border-color: #f59e0b; color: #241a00; font-weight: 800;
  box-shadow: 0 0 10px rgba(245,158,11,.6); animation: sysglow 1.3s ease-in-out infinite; }
.sysstatus.busy .sysdot { background: #241a00; animation: syspulse .9s ease-in-out infinite; }
@keyframes syspulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .2; transform: scale(.7); } }
@keyframes sysglow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,.55), 0 0 8px rgba(245,158,11,.5); }
  50%      { box-shadow: 0 0 0 7px rgba(245,158,11,0), 0 0 14px rgba(245,158,11,.75); }
}
@media (prefers-reduced-motion: reduce) {
  .sysstatus.busy { animation: none; box-shadow: 0 0 10px rgba(245,158,11,.6); }
  .sysstatus.busy .sysdot { animation: none; }
}
.tab { padding: 8px 16px; border-radius: 9px; font-size: 14px; font-weight: 600;
  color: var(--muted); text-decoration: none; }
.tab:hover { background: var(--chip); text-decoration: none; }
.tab.active { background: var(--accent); color: #fff; }

.tab-note { font-size: 13px; color: var(--muted); margin: 20px 0 4px;
  padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.tab-note.demo { border-left: 3px solid var(--lo); }
.tab-note.live { border-left: 3px solid var(--hi); }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); margin: 24px 0; padding: 18px;
}
.orbit-form { display: grid; grid-template-columns: 1.4fr 1.4fr 1.2fr .8fr auto; gap: 12px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.field input, .field select {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink); font-size: 14px;
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.go {
  padding: 11px 18px; border: 0; border-radius: 10px; background: var(--accent);
  color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.go:hover { filter: brightness(1.05); }
@media (max-width: 760px) { .orbit-form { grid-template-columns: 1fr 1fr; } .go { grid-column: 1 / -1; } }

.hero { padding: 40px 4px 12px; }
.hero h1 { font-size: 30px; line-height: 1.2; letter-spacing: -.5px; margin: 0 0 12px; max-width: 640px; }
.hero p { color: var(--muted); max-width: 620px; font-size: 16px; }
.hero-signals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 26px; }
.hero-signals > div {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow);
}
.hero-signals span { color: var(--muted); font-size: 13px; }
@media (max-width: 760px) { .hero-signals { grid-template-columns: 1fr 1fr; } }

.brief-head h1 { font-size: 22px; letter-spacing: -.3px; margin: 8px 0 8px; }
.meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13px; align-items: center; }
.pill { text-transform: uppercase; font-size: 11px; font-weight: 700; letter-spacing: .05em;
  padding: 3px 8px; border-radius: 999px; }
.pill.demo { background: var(--chip); color: var(--muted); }
.pill.live { background: var(--hi); color: #fff; }

.notes { margin: 14px 0; display: flex; flex-direction: column; gap: 8px; }
.note { background: var(--accent-soft); border: 1px solid var(--line); color: var(--ink);
  padding: 9px 12px; border-radius: 10px; font-size: 13px; }

.orbit-list { margin: 18px 0; }
.orbit-list summary { cursor: pointer; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.orbit-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--chip);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px 5px 6px; font-size: 13px; }
.chip .rank { background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  width: 20px; height: 20px; display: grid; place-items: center; font-size: 11px; color: var(--muted); }
.chip .score { color: var(--accent); font-weight: 600; font-size: 12px; }
.chip .gd-chip { color: var(--hi); font-weight: 700; font-size: 12px; }

.groups { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
@media (max-width: 760px) { .groups { grid-template-columns: 1fr; } }
.group { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; }
.group-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.gicon { font-size: 20px; line-height: 1.2; color: var(--accent); }
.group-head h2 { font-size: 16px; margin: 0; display: flex; align-items: center; gap: 8px; }
.count { background: var(--chip); color: var(--muted); border-radius: 999px; font-size: 12px;
  padding: 1px 8px; font-weight: 600; }
.blurb { color: var(--muted); font-size: 12.5px; margin: 2px 0 0; }

.items { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.item { display: flex; gap: 12px; align-items: flex-start; padding: 11px 8px; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.headline { font-weight: 600; font-size: 14px; }
.detail { color: var(--muted); font-size: 13px; margin-top: 3px; }
.item-meta { color: var(--muted); font-size: 12px; margin-top: 5px; display: flex; flex-wrap: wrap; gap: 5px; }
.item-meta .co { color: var(--ink); font-weight: 600; }
.item-meta .src { font-style: italic; }
.item-main { flex: 1; min-width: 0; }
.rel { font-size: 12px; font-weight: 700; color: var(--muted); min-width: 26px; text-align: right; }
.rel-hi { border-left: 3px solid var(--hi); }
.rel-mid { border-left: 3px solid var(--mid); }
.rel-lo { border-left: 3px solid transparent; }
.rel-hi .rel { color: var(--hi); }
.empty { color: var(--muted); font-size: 13px; font-style: italic; margin: 12px 0 0; }

.sal-rows { display: flex; flex-direction: column; margin-top: 10px; }
.sal-row { display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 4px; border-top: 1px solid var(--line); }
.sal-row:first-child { border-top: 0; }
.sal-label { color: var(--muted); font-size: 13px; }
.sal-range { font-weight: 700; font-size: 15px; }

.foot { color: var(--muted); font-size: 12px; padding: 30px 20px 40px; }

/* --- Jobs test page --- */
.navlink { margin-left: auto; font-size: 13px; }
.single-form { display: flex; gap: 12px; align-items: end; }
.single-form .field { flex: 1; }
.detect { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px; margin: 20px 0 6px; }
.detect .big { font-size: 20px; font-weight: 700; }
.badge { text-transform: uppercase; font-size: 11px; font-weight: 700; letter-spacing: .05em;
  padding: 3px 9px; border-radius: 999px; background: var(--accent); color: #fff; }
.badge.ashby { background: #7c5cff; }
.badge.lever { background: #8a5a2b; }
.badge.workday { background: #0875c4; }
.badge.serper { background: #1a8f5e; }
.badge.theirstack { background: #c0392b; }
.badge.smartrecruiters { background: #2d7d54; }
.badge.emirates { background: #d71921; }

/* Glassdoor feedback card */
.gd-card { display: flex; align-items: center; gap: 16px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 18px; margin: 20px 0 6px; }
.gd-score { font-size: 30px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.gd-score span { font-size: 14px; font-weight: 600; color: var(--muted); }
.gd-body { flex: 1; min-width: 0; }
.gd-title { font-size: 14px; margin-bottom: 6px; }
.gd-bar { height: 7px; border-radius: 999px; background: var(--chip); overflow: hidden; max-width: 260px; }
.gd-fill { height: 100%; background: linear-gradient(90deg, #d98324, #1a8f5e); }
.gd-sub { color: var(--muted); font-size: 12.5px; margin-top: 6px; }

/* Coverage confidence badges */
.conf { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; white-space: nowrap; }
.conf.exact { background: #1f9d55; color: #fff; }
.conf.approximate { background: #d98324; color: #fff; }
.conf.blocked { background: #b45309; color: #fff; opacity: .82; }
.conf.fetching { background: #2b6cb0; color: #fff; }
.conf.cancelled { background: #6b7280; color: #fff; }
.conf.error { background: #b91c1c; color: #fff; }
.conf.queued { background: var(--chip); color: var(--muted); border: 1px solid var(--line); }
.rolecaret { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 10px;
  padding: 0 8px 0 0; line-height: 1; }
.rolecaret:hover { color: var(--ink); }
tr.roles-detail td { background: var(--chip); padding: 10px 16px 12px; }
.role-list { display: flex; flex-direction: column; max-height: 360px; overflow-y: auto; }
.role-item { display: flex; align-items: baseline; gap: 12px; padding: 5px 0;
  border-bottom: 1px dashed var(--line); }
.role-item:last-child { border-bottom: none; }
.role-item .role-t { flex: 1 1 auto; }
.rtag { font-size: 10px; font-weight: 700; letter-spacing: .04em; white-space: nowrap;
  padding: 2px 7px; border-radius: 999px; background: var(--chip); color: var(--muted);
  border: 1px solid var(--line); }
.subroles { width: 100%; border-collapse: collapse; }
.subroles th { text-align: left; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); padding: 4px 10px 6px; border-bottom: 1px solid var(--line); }
.subroles td { padding: 6px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.subroles td.role-t { font-weight: 600; color: var(--ink); }
.subroles a { text-decoration: none; font-size: 15px; color: #2b6cb0; }
.subroles a:hover { color: #1f9d55; }
/* source confidence tag on the Management/IC verdict */
.src { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 1px 5px; border-radius: 4px; vertical-align: middle; }
.src-jd { background: #dcfce7; color: #166534; }        /* JD-verified — confident */
.src-title { background: var(--chip); color: var(--muted); border: 1px solid var(--line); }
.csvbtn { display: inline-block; text-decoration: none; font-size: 12px; padding: 6px 14px; }
/* saved searches */
.savedrow { display: flex; flex-wrap: wrap; gap: 8px; }
.savedchip { display: inline-flex; align-items: stretch; border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden; background: var(--chip); }
.savedgo { font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; border: none;
  background: none; color: var(--ink); padding: 6px 6px 6px 14px; }
.savedgo:hover { color: #2b6cb0; }
.saveddel { font: inherit; font-size: 14px; line-height: 1; cursor: pointer; border: none;
  background: none; color: var(--muted); padding: 6px 12px 6px 6px; }
.saveddel:hover { color: #b91c1c; }
.role-item a { margin-left: auto; text-decoration: none; font-size: 16px; color: #2b6cb0; }
.role-item a:hover { color: #1f9d55; }
.conf.none { background: var(--chip); color: var(--muted); border: 1px solid var(--line); }
.cov-summary { display: flex; gap: 10px; margin: 20px 0 6px; }
.fnchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.fnchip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--chip); cursor: pointer; user-select: none; }
.fnchip input { margin: 0; }
.fnchip:has(input:checked) { background: rgba(58,91,217,.16); border-color: #3a5bd9;
  color: var(--ink); font-weight: 600; }
.newbadge { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .06em;
  color: #fff; background: #b45309; padding: 2px 6px; border-radius: 5px; vertical-align: middle; }

.mon-co { background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 12px 16px; margin: 10px 0; }
.mon-co-head { display: flex; align-items: center; gap: 10px; }
.gd-card-lg .gd-score { font-size: 40px; }
.gd-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0; }
.gd-stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 16px; text-align: center; }
.gd-stat .v { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.gd-stat .k { color: var(--muted); font-size: 12px; margin-top: 4px;
  text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 620px) { .gd-stats { grid-template-columns: 1fr; } }
.kv { color: var(--muted); font-size: 13px; }
.kv b { color: var(--ink); font-weight: 600; }
.method { font-size: 11px; color: var(--muted); border: 1px dashed var(--line);
  padding: 2px 8px; border-radius: 999px; }
.roles { width: 100%; border-collapse: collapse; margin-top: 8px; }
.roles th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.roles td { padding: 10px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
.roles tr:hover td { background: var(--accent-soft); }
.roles .rtitle { font-weight: 600; }
.roles .rmeta { color: var(--muted); font-size: 13px; }
.err { background: #fdecec; border: 1px solid #f3b9b9; color: #8a1c1c; padding: 14px 16px;
  border-radius: var(--radius); margin: 20px 0; }
@media (prefers-color-scheme: dark) { .err { background: #2a1414; border-color: #5b2626; color: #f3b4b4; } }
