:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #f0eee8;
  --ink: #17181a;
  --ink-2: #4a4d52;
  --ink-3: #676b72;
  --line: #e2dfd7;
  --accent: #127a4b;
  --accent-ink: #ffffff;
  --accent-soft: #e3f2ea;
  --warn: #a2441c;
  --warn-soft: #fbe9df;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 20, 20, .04), 0 4px 16px rgba(20, 20, 20, .04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111213;
    --surface: #18191b;
    --surface-2: #202124;
    --ink: #ecebe7;
    --ink-2: #b5b5b0;
    --ink-3: #8a8b88;
    --line: #2c2d30;
    --accent: #3fbf84;
    --accent-ink: #0b1a12;
    --accent-soft: #15291f;
    --warn: #f08a5d;
    --warn-soft: #2e1c14;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-3); }
.hidden { display: none !important; }

/* nav */
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); position: relative; }
.brand-mark::after { content: ""; position: absolute; left: 6px; top: 4px; width: 6px; height: 10px; border: solid var(--accent-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; text-decoration: none; font-weight: 500; letter-spacing: .02em; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { opacity: .9; border-color: var(--ink); }
.btn-small { height: 34px; padding: 0 12px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: default; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }

/* forms */
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.input {
  height: 42px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); width: 100%;
}
.input:focus, .chips:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.error { color: var(--warn); font-size: 14px; min-height: 1.2em; }

/* landing */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; padding: 56px 0 72px; align-items: start; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 500; letter-spacing: .01em; color: var(--ink-2); background: var(--surface-2); padding: 4px 10px; border-radius: 99px; }
h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.04; letter-spacing: -.03em; margin: 18px 0 18px; font-weight: 600; }
.lede { font-size: 19px; color: var(--ink-2); max-width: 34em; margin: 0; }
.stat { margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat > div { padding: 16px 18px; }
.stat > div + div { border-left: 1px solid var(--line); }
.stat b { display: block; font-size: 28px; letter-spacing: -.02em; }
.stat span { font-size: 13px; color: var(--ink-3); }
.stat .bad b { color: var(--warn); }
.stat .good b { color: var(--accent); }
.stat-note { font-size: 13px; color: var(--ink-3); margin-top: 8px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.signup { padding: 26px; display: grid; gap: 16px; position: sticky; top: 20px; }
.signup h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.fine { font-size: 13px; color: var(--ink-3); margin: 0; }

.section { padding: 64px 0; border-top: 1px solid var(--line); }
.section h2 { font-size: 30px; letter-spacing: -.025em; margin: 0 0 28px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.steps > div { padding: 22px; }
.steps > div::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 99px; background: var(--surface-2); font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.steps h3 { margin: 0 0 6px; font-size: 17px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 15px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.footer { padding: 32px 0 48px; color: var(--ink-3); font-size: 14px; border-top: 1px solid var(--line); }

/* job card */
.job { padding: 18px 20px; display: grid; gap: 10px; }
.job-top { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.job h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; line-height: 1.3; }
.job-meta { font-size: 14px; color: var(--ink-3); }
.score { flex: none; font-weight: 600; font-size: 14px; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); }
.score.high { background: var(--accent-soft); color: var(--accent); }
.proof { font-size: 14px; color: var(--ink-2); border-left: 2px solid var(--accent); padding: 2px 0 2px 12px; }
.proof b { color: var(--ink); font-weight: 600; }
.proof.bad { border-left-color: var(--warn); }
.proof.bad b { color: var(--warn); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12.5px; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); }
.tag.hit { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }
.tag.hit::before { content: "\2713\00a0"; }
.job-why { font-size: 14px; color: var(--ink-2); }
.job-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* app layout */
.app { display: grid; grid-template-columns: minmax(340px, 380px) minmax(0, 1fr); gap: 28px; padding: 8px 0 64px; align-items: start; }
.panel { padding: 20px; display: grid; gap: 16px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.panel h2 { margin: 0; font-size: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.panel-body { display: grid; gap: 16px; }
.panel-toggle { display: none; }
.proof mark { background: var(--accent-soft); color: var(--accent); font-weight: 600; padding: 0 2px; border-radius: 3px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { flex: 1 1 220px; width: auto; }
.toolbar select.input { flex: 0 0 auto; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab { background: none; border: 0; padding: 10px 14px; cursor: pointer; color: var(--ink-3); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.list { display: grid; gap: 12px; }
.status-line { font-size: 14px; color: var(--ink-3); margin: 0 0 12px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.empty { padding: 40px 24px; text-align: center; color: var(--ink-2); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-height: 42px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; padding: 3px 4px 3px 9px; border-radius: 6px; background: var(--surface-2); }
.chip button { border: 0; background: none; cursor: pointer; color: var(--ink-3); padding: 0; min-width: 24px; min-height: 24px; font-size: 15px; line-height: 1; }
.chips input { border: 0; outline: 0; background: none; flex: 1 1 90px; min-width: 90px; font-size: 14px; padding: 2px 4px; }

.drop {
  border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 44px 24px; text-align: center; cursor: pointer; background: var(--surface);
  display: grid; gap: 8px; justify-items: center;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop strong { font-size: 18px; }
.onboard { max-width: 620px; margin: 40px auto 80px; display: grid; gap: 18px; }
.onboard h1 { font-size: 36px; margin: 0; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 10; max-width: calc(100vw - 32px); }
.spinner { width: 18px; height: 18px; border-radius: 99px; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* admin */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink-3); font-weight: 500; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0 28px; }
.kpis .card { padding: 16px; }
.kpis b { font-size: 28px; display: block; }
.scroll-x { overflow-x: auto; }

@media (max-width: 860px) {
  .hero, .app, .compare { grid-template-columns: 1fr; }
  .hero { gap: 32px; padding-top: 28px; }
  .signup, .panel { position: static; max-height: none; }
  .panel-toggle { display: inline-flex; }
  .panel:not(.open) .panel-body { display: none; }
  .panel:not(.open) #engine-note { display: none; }
  .steps { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .stat { grid-template-columns: 1fr; }
  .stat > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .job-top { flex-direction: column; gap: 8px; }
}

/* v2 */
.navlinks { display: flex; gap: 18px; align-items: center; font-size: 14px; }
.navlinks a:not(.btn) { color: var(--ink-2); text-decoration: none; }
.navlinks a:not(.btn):hover { color: var(--ink); }
.page { padding: 24px 20px 64px; }
.badge { font-size: 12.5px; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); font-weight: 500; }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.good { color: var(--ink); }
.tag.miss { background: var(--warn-soft); color: var(--warn); }
.toggles { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); margin: -4px 0 12px; }
.toggles input { accent-color: var(--accent); }
.input-small { height: 34px; width: auto; font-size: 14px; padding: 0 8px; }
.link-btn.small { font-size: 13px; padding: 4px 0; min-height: 24px; }
.muted-link { color: var(--ink-3); }
.job h3 a { text-decoration: none; }
.job h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.explain { background: var(--surface-2); border-radius: 8px; padding: 12px 14px; font-size: 14.5px; }
.explain p { margin: 6px 0 0; }
.verdict.apply { color: var(--accent); }
.verdict.skip { color: var(--warn); }
.menu { position: relative; }
.menu summary { cursor: pointer; list-style: none; color: var(--ink-2); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: " ▾"; font-size: 11px; }
.menu-body { position: absolute; right: 0; top: 30px; padding: 12px 14px; display: grid; gap: 10px; min-width: 230px; z-index: 5; text-align: left; }
.danger { color: var(--warn); }
.danger-btn { background: var(--warn); color: #fff; border-color: var(--warn); }
dialog.card { padding: 22px; max-width: min(460px, calc(100vw - 32px)); color: var(--ink); }
dialog::backdrop { background: rgba(0, 0, 0, .35); }
.reason-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.tracker-row { padding: 14px 18px; display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.group-head { font-size: 15px; margin: 20px 0 10px; }
.group-head:first-child { margin-top: 0; }
.cta { padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 24px; }
.role { padding: 16px 18px; display: grid; gap: 4px; text-decoration: none; }
.role:hover { border-color: var(--ink-3); }
.consent { display: flex; gap: 10px; align-items: start; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.consent input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.prose { max-width: 720px; }
.prose h2 { font-size: 22px; margin: 32px 0 8px; }
.prose p, .prose li { color: var(--ink-2); max-width: 65ch; }
@media (max-width: 640px) { .hide-sm { display: none; } .navlinks { gap: 12px; } }
.nudge { font-size: 13px; color: var(--warn); margin-top: 6px; }
.menu-toggle { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-2); }
.saved-searches { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.add-job { padding: 12px 16px; margin-bottom: 8px; }
.add-job summary { cursor: pointer; font-weight: 600; }
.add-job-form { display: grid; grid-template-columns: 2fr 1.4fr 1fr auto auto; gap: 8px; margin-top: 10px; }
@media (max-width: 860px) { .add-job-form { grid-template-columns: 1fr; } }
.interview-date { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); margin-top: 6px; }
/* Long chips wrap inside the panel instead of running off its edge. */
.panel { overflow-x: hidden; }
.chips { min-width: 0; }
.chip { max-width: 100%; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.chip button { flex: none; align-self: flex-start; }
.stale { color: var(--warn); }

/* Small text gets slight positive tracking; caps get the 0.06em floor. */
.fine, .tag, .badge, .stat span, .stat-note, .job-meta, .consent, .toast, .score { letter-spacing: .01em; }
.toast { cursor: default; }
.field-label { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.boot { padding: 48px 20px; display: flex; gap: 12px; align-items: center; justify-content: center; color: var(--ink-2); }
/* Sign-in prompt for signed-out visitors. */
dialog.gate { border: 1px solid var(--line); border-radius: 16px; padding: 24px; width: min(400px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); }
dialog.gate::backdrop { background: rgba(0, 0, 0, .45); }
dialog.gate h3 { margin: 0 0 6px; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.gate-actions { display: grid; gap: 10px; margin-top: 18px; }
.gate-actions .link-btn { justify-self: center; font-size: 14px; padding: 6px 0; }

/* ---------- Phones ---------- */
#filters-toggle { display: none; }
.job-more { display: contents; }
@media (max-width: 640px) {
  /* 16px text in fields stops iPhones zooming in on tap. */
  .input, select.input, textarea.input, .chips input { font-size: 16px; }
  input[type="checkbox"] { width: 20px; height: 20px; flex: none; }
  .toggles label, .consent, .menu-toggle { min-height: 36px; align-items: center; display: inline-flex; gap: 8px; }
  .link-btn.small { min-height: 36px; display: inline-flex; align-items: center; }

  /* Header: the mark is enough of a logo; the buttons need the room. */
  .nav { height: 58px; }
  .nav .brand { font-size: 0; gap: 0; }
  .nav .brand .brand-mark { width: 28px; height: 28px; }
  .nav .brand .brand-mark::after { left: 9px; top: 6px; width: 7px; height: 12px; }
  .navlinks { gap: 10px; }
  #anon-nav { display: none; }

  /* Account menu: full-width rows that are easy to hit. */
  .menu summary { min-height: 40px; display: inline-flex; align-items: center; }
  .menu-body { right: -4px; min-width: 0; width: min(280px, calc(100vw - 24px)); padding: 6px; gap: 0; }
  .menu-body > * { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 10px; text-align: left; justify-content: flex-start; text-decoration: none; border-radius: 8px; }
  .menu-body > *:hover { background: var(--surface-2); }

  /* Tabs stay on one line and scroll sideways if they must. */
  .tabs { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; padding: 10px 12px; font-size: 15px; flex: none; }

  /* Filters fold away: search + one button until opened. */
  #filters-toggle { display: inline-flex; height: 42px; flex: none; }
  .toolbar { gap: 8px; }
  .toolbar #q { flex: 1 1 auto; min-width: 0; }
  .app:not(.filters-open) .toolbar > :not(#q):not(#filters-toggle) { display: none; }
  .app:not(.filters-open) #toggles { display: none; }
  .app.filters-open .toolbar select.input { flex: 1 1 45%; }
  .app.filters-open #toggles { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 0 0 14px; }

  /* Job cards: two even columns of buttons, then one line of small links. */
  .job { padding: 16px; }
  .job .job-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .job .job-actions > .btn, .job .job-actions > select { width: 100%; justify-content: center; }
  .job .job-actions > .btn-primary:only-of-type { grid-column: 1 / -1; }
  .job .job-actions > .not-for-me, .job-more { grid-column: 1 / -1; }
  .job-more { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
  .job h3 a { display: inline-block; padding: 2px 0; }

  .panel { padding: 16px; }
  .signup { padding: 20px; }
  .fact span { font-size: 12px; }
}
@media (max-width: 640px) { .job .job-actions > select { grid-column: 1 / -1; } }
@media (max-width: 640px) {
  .navlinks > a:not(.hide-sm), .signup > .link-btn, .reel.note .link-btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
}
/* The single column must be allowed to shrink below its content's width, or
   the one-line tabs row stretches the whole page past the screen. */
@media (max-width: 860px) { .app { grid-template-columns: minmax(0, 1fr); } .app > * { min-width: 0; } }
@media (max-width: 640px) { .tab[data-tab="matches"] { text-transform: capitalize; } }
