/* Mobile first. One column, large tap targets, system fonts. */
:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #16181d;
  --muted: #6b7280;
  --line: #e4e7eb;
  --accent: #1f6feb;
  --accent-ink: #ffffff;
  --good: #0f7b48;
  --good-bg: #e7f6ee;
  --warn: #8a5a00;
  --warn-bg: #fdf3e2;
  --bad: #a4262c;
  --bad-bg: #fdeded;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216; --card: #181b21; --ink: #e9ecf1; --muted: #9aa3b2;
    --line: #272b33; --accent: #4c8dff; --good: #6ee7a8; --good-bg: #10281c;
    --warn: #f0c070; --warn-bg: #2a2110; --bad: #ff9b9b; --bad-bg: #2b1515;
    --shadow: none;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding-bottom: 86px;
  overscroll-behavior-y: none;
}
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.25; }
h1 { font-size: 1.4rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; }
h3 { font-size: .95rem; }
a { color: var(--accent); }
.wrap { max-width: 720px; margin: 0 auto; padding: 16px; }

/* header */
header.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
header.top .wrap { padding: 12px 16px; display: flex; align-items: center; gap: 10px; }
header.top h1 { margin: 0; font-size: 1.15rem; flex: 1; }
.badge {
  font-size: .72rem; font-weight: 600; padding: 3px 8px; border-radius: 999px;
  background: var(--warn-bg); color: var(--warn); white-space: nowrap;
}

/* cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px;
}
.card.tight { padding: 12px 14px; }
.job { display: block; text-decoration: none; color: inherit; }
.job:active { transform: scale(.995); }
.job .row1 { display: flex; align-items: baseline; gap: 8px; }
.job .score {
  font-weight: 700; font-size: .95rem; color: var(--good);
  background: var(--good-bg); border-radius: 8px; padding: 2px 7px; flex: none;
}
.job .score.mid { color: var(--warn); background: var(--warn-bg); }
.job h3 { margin: 0; flex: 1; font-size: 1.02rem; }
.job .meta { color: var(--muted); font-size: .86rem; margin-top: 3px; }
.why { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.why span {
  font-size: .76rem; padding: 3px 8px; border-radius: 999px;
  background: var(--good-bg); color: var(--good);
}
.why span.bad { background: var(--bad-bg); color: var(--bad); }

/* forms */
label { display: block; font-weight: 600; font-size: .86rem; margin: 14px 0 5px; }
label .hint { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: 2px; }
input[type=text], input[type=email], input[type=tel], input[type=number], textarea, select {
  width: 100%; padding: 11px 12px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.checks { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
/* These labels are pills in a wrapping row, so the block layout and vertical
   margins the global `label` rule gives form labels must not apply. */
.chk { position: relative; display: inline-block; margin: 0; font-weight: 400; }
.chk input { position: absolute; opacity: 0; width: 0; height: 0; }
.chk span {
  display: inline-block; padding: 8px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); font-size: .82rem;
  line-height: 1.2; user-select: none; white-space: nowrap;
}
.chk input:checked + span {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600;
}
.chk input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* tag input */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: .84rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 5px 7px 5px 11px;
}
.tag button {
  border: 0; background: none; color: var(--muted); font-size: 1.05rem; line-height: 1;
  cursor: pointer; padding: 0 3px;
}

/* buttons */
button.btn, a.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 18px; font: inherit; font-weight: 600; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  cursor: pointer; text-decoration: none; min-height: 48px;
}
button.btn.primary, a.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.btn.wide, a.btn.wide { width: 100%; }
button.btn:disabled { opacity: .55; cursor: default; }
button.btn.danger { color: var(--bad); }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btnrow > * { flex: 1 1 140px; }

/* nav */
nav.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: flex; background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
nav.tabs button {
  flex: 1; border: 0; background: none; color: var(--muted); cursor: pointer;
  padding: 10px 4px 12px; font: inherit; font-size: .74rem; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
nav.tabs button.on { color: var(--accent); }
nav.tabs .dot { font-size: 1.25rem; line-height: 1; }
nav.tabs .n {
  position: absolute; transform: translate(14px, -4px); background: var(--bad);
  color: #fff; font-size: .62rem; border-radius: 999px; padding: 1px 5px;
}

/* misc */
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.empty { text-align: center; color: var(--muted); padding: 44px 18px; }
.empty .big { font-size: 2.2rem; margin-bottom: 8px; }
.note { border-radius: 10px; padding: 11px 13px; font-size: .87rem; margin: 10px 0; }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.note.bad { background: var(--bad-bg); color: var(--bad); }
.note.good { background: var(--good-bg); color: var(--good); }
.spin { display: inline-block; width: 15px; height: 15px; border: 2px solid currentColor;
        border-right-color: transparent; border-radius: 50%; animation: s .7s linear infinite; }
@keyframes s { to { transform: rotate(360deg); } }
.desc { white-space: pre-wrap; font-size: .9rem; max-height: 320px; overflow-y: auto;
        border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--bg); }
.pill { display: inline-block; font-size: .74rem; font-weight: 600; padding: 3px 9px;
        border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.pill.sent { background: var(--good-bg); color: var(--good); border-color: transparent; }
.pill.draft { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.seg { display: flex; gap: 4px; background: var(--bg); border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: none; font: inherit; font-size: .85rem; font-weight: 600;
              color: var(--muted); padding: 9px 4px; border-radius: 8px; cursor: pointer; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
dialog {
  border: 0; border-radius: 16px 16px 0 0; padding: 0; width: 100%; max-width: 720px;
  margin: auto auto 0; background: var(--card); color: var(--ink);
  max-height: 92vh; box-shadow: 0 -8px 40px rgba(0,0,0,.25);
}
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog .sheet { padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; max-height: 92vh; }
.grab { width: 38px; height: 4px; background: var(--line); border-radius: 2px; margin: 9px auto 4px; }
@media (min-width: 640px) {
  dialog { border-radius: 16px; margin: auto; }
}
