:root {
  --bg: #f6f7f9; --card: #fff; --text: #1c2430; --muted: #5d6877; --line: #e3e7ed;
  --accent: #0b6e4f; --accent-ink: #fff; --warn: #8a5a00; --bad: #a02525; --chip: #e9edf2;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #11151a; --card: #1a2028; --text: #e8ecf1; --muted: #9aa6b4; --line: #2a323d;
          --accent: #3fb68b; --accent-ink: #08130f; --warn: #e0b04a; --bad: #ff8a8a; --chip: #262e38; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 17px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
       padding: 0 max(16px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(16px, env(safe-area-inset-left)); }
a { color: inherit; }
.bar { display: flex; justify-content: space-between; align-items: center; min-height: 52px;
       padding-top: env(safe-area-inset-top); position: sticky; top: 0; background: var(--bg); z-index: 2; }
.brand { font-weight: 700; text-decoration: none; font-size: 19px; }
.bar-link { text-decoration: none; color: var(--muted); padding: 12px 0 12px 16px; }
main { max-width: 720px; margin: 0 auto; padding-bottom: 32px; }
.filters { display: grid; gap: 12px; margin: 4px 0 14px; }
.sc { display: flex; gap: 2px; margin: 0; padding: 3px; border: 0; border-radius: 12px; background: var(--chip); min-width: 0; }
.sc-item { flex: 1; position: relative; display: block; }
.sc-item input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sc-item span { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 10px;
                font-size: 15px; white-space: nowrap; }
.sc-item input:checked + span { background: var(--accent); color: var(--accent-ink); font-weight: 500; }
.sc-item input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.field label { display: block; margin: 0 0 4px 2px; font-size: 13px; color: var(--muted); }
.field select { width: 100%; min-height: 48px; padding: 0 36px 0 12px; border: 1px solid var(--line); border-radius: 12px;
                background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238a94a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
                color: var(--text); font: inherit; font-size: 16px; appearance: none; -webkit-appearance: none; }
.fmeta { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 0 2px;
         font-size: 15px; color: var(--muted); }
.tog { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; position: relative; cursor: pointer; }
.tog input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sw { position: relative; flex: none; width: 46px; height: 28px; border-radius: 14px; background: var(--line); }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; }
.tog input:checked + .sw { background: var(--accent); }
.tog input:checked + .sw::after { left: 21px; }
.tog input:focus-visible + .sw { outline: 2px solid var(--text); outline-offset: 2px; }
.jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.card.dim { opacity: .6; }
.card-link { display: block; padding: 14px 16px; text-decoration: none; min-height: 44px; }
.sourcecard { padding: 14px 16px; }
.card h2 { font-size: 18px; line-height: 1.25; margin: 0 0 4px; overflow-wrap: anywhere; }
.meta { color: var(--muted); margin: 0 0 8px; font-size: 15px; overflow-wrap: anywhere; }
.found { margin: -4px 0 8px; font-size: 13px; color: var(--muted); }
.sourcecard .facts { margin: 8px 0 0; font-size: 15px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.badge { background: var(--chip); border-radius: 8px; padding: 3px 9px; font-size: 14px; }
.badge.new { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.badge.flag { color: var(--warn); }
.badge.ok { color: var(--accent); }
.badge.bad { color: var(--bad); }
.why { margin: 8px 0 0; font-size: 14px; color: var(--warn); }
.why.no { color: var(--bad); }
.empty { color: var(--muted); text-align: center; padding: 32px 0; }
.detail h1, main > h1 { font-size: 22px; line-height: 1.25; margin: 8px 0; overflow-wrap: anywhere; }
.back { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--accent); }
.snippet { margin: 12px 0; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 12px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.links { list-style: none; padding: 0; display: grid; gap: 10px; }
.button { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 12px;
          background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600;
          padding: 0 16px; text-align: center; }
.badge.good { background: color-mix(in srgb, var(--accent) 18%, var(--chip)); color: var(--accent); font-weight: 600; }
.badge.state { font-weight: 600; }
.badge.state.applied, .badge.state.interview { background: var(--accent); color: var(--accent-ink); }
.badge.state.rejected { color: var(--bad); }
.note-preview { margin: 8px 0 0; font-size: 14px; color: var(--muted); border-left: 3px solid var(--line);
                padding-left: 10px; overflow-wrap: anywhere; white-space: pre-line;
                display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
h2 { font-size: 17px; margin: 20px 0 8px; }
.status-form { display: flex; flex-wrap: wrap; gap: 8px; }
.seg { flex: 1 1 calc(50% - 8px); min-height: 48px; border-radius: 12px; border: 1px solid var(--line);
       background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
.seg.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.seg.rejected.on { background: var(--bad); border-color: var(--bad); color: #fff; }
.notes-form { display: grid; gap: 10px; }
textarea { width: 100%; min-height: 110px; border-radius: 12px; border: 1px solid var(--line); padding: 12px;
           background: var(--card); color: var(--text); font: inherit; font-size: 16px; resize: vertical; }
.button.save { border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.saved { margin: 0; color: var(--accent); }
.bar-actions { display: flex; align-items: center; }
.bar-actions form { margin: 0; }
button.bar-link { background: none; border: 0; font: inherit; cursor: pointer; min-height: 44px; }
.login { display: grid; gap: 12px; max-width: 360px; margin: 32px auto 0; }
.login h1 { margin: 0 0 4px; }
.login input[type=password] { min-height: 48px; border-radius: 12px; border: 1px solid var(--line); padding: 0 14px;
                              background: var(--card); color: var(--text); font: inherit; font-size: 16px; }
.login .button { border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
