:root {
  --bg: #F6F5F1; --card: #FFFFFF; --ink: #16181D; --ink2: #3A3E46; --muted: #6C7079; --line: #E5E2DA; --line2: #EFEDE7;
  --lime: #C8F169; --open: #0E7A4E; --open-bg: #E4F4EC; --check: #9A6408; --check-bg: #FBF0D9;
  --closed: #6C7079; --closed-bg: #EEEDE9; --flag: #B4232C; --flag-bg: #FBE6E7;
  --r: 14px; --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 'Geist', system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
.mono { font-family: var(--mono); }
.dim { color: var(--muted); font-weight: 400; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; font-size: 17px; letter-spacing: -0.01em; }
.top-actions { display: flex; gap: 8px; }
.icon-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-size: 13.5px; font-weight: 500; }
.icon-btn:hover { border-color: #CFCBC1; }
.icon-btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.icon-btn.spin svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; padding-top: 32px; padding-bottom: 80px; }
.masthead h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.05; letter-spacing: -0.035em; margin: 6px 0 10px; font-weight: 650; }
.masthead h1 mark { background: linear-gradient(transparent 58%, var(--lime) 58% 92%, transparent 92%); color: inherit; padding: 0 2px; }
.kicker { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.sub { color: var(--ink2); margin: 0; max-width: 60ch; }

.controls { margin: 26px 0 14px; display: grid; gap: 14px; }
.seg { display: inline-flex; background: var(--line2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; width: max-content; max-width: 100%; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; font-weight: 550; font-size: 14px; color: var(--ink2); white-space: nowrap; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 0 0 1px var(--line); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; padding: 9px 12px 11px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: 14px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.tabs b { font: 500 11.5px var(--mono); background: var(--line2); padding: 1px 6px; border-radius: 6px; margin-left: 4px; color: var(--ink2); }
.tabs b:empty { display: none; }
.tabs button.on b { background: var(--lime); color: var(--ink); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search { flex: 1 1 240px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; background: var(--card); border: 1px solid var(--line); border-radius: 11px; color: var(--muted); }
.search:focus-within { border-color: var(--ink); }
.search input { border: 0; outline: 0; background: none; flex: 1; font: inherit; color: var(--ink); min-width: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 13px; font-weight: 500; color: var(--ink2); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.job { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; transition: border-color .15s, transform .15s; }
.job:hover { border-color: #D4D0C6; }
.job.leaving { opacity: 0; transform: translateX(12px); transition: opacity .2s, transform .2s; }
.mark { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font: 600 15px var(--mono); color: var(--ink); background: var(--line2); border: 1px solid var(--line); overflow: hidden; }
.mark { position: relative; }
.mark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.mark.arch { background: #E9EEFB; border-color: #D8E0F6; color: #2C47A8; }
.mark.data { background: #F2EEFB; border-color: #E4DCF6; color: #5B3BA8; }
.job h3 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.job h3 a { text-decoration: none; }
.job h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.co { color: var(--ink2); font-size: 14px; margin-top: 2px; }
.co .sep { color: #B8B4AA; margin: 0 6px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 23px; padding: 0 8px; border-radius: 7px; font-size: 12.5px; font-weight: 550; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.open { color: var(--open); background: var(--open-bg); }
.badge.check { color: var(--check); background: var(--check-bg); }
.badge.closed { color: var(--closed); background: var(--closed-bg); }
.badge.flag { color: var(--flag); background: var(--flag-bg); }
.pill { height: 23px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line); font-size: 12.5px; color: var(--ink2); white-space: nowrap; }
.pill.money { font-family: var(--mono); font-size: 12px; }
.src { font: 12px var(--mono); color: var(--muted); }
.flags { margin: 8px 0 0; color: var(--flag); font-size: 13px; }
details.more { margin-top: 8px; }
details.more summary { font-size: 13px; color: var(--muted); cursor: pointer; list-style: none; width: max-content; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: ' ↓'; }
details.more[open] summary::after { content: ' ↑'; }
details.more p { white-space: pre-line; font-size: 14px; color: var(--ink2); max-height: 280px; overflow: auto; margin: 8px 0 0; padding: 12px; background: var(--bg); border-radius: 10px; }
.acts { display: flex; flex-direction: column; gap: 6px; }
.act { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; color: var(--muted); }
.act:hover { color: var(--ink); border-color: #CFCBC1; }
.act.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.act.apply { background: var(--lime); border-color: #B5DD55; color: var(--ink); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); }
.empty strong { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }
.skel { height: 104px; border-radius: var(--r); background: linear-gradient(90deg, var(--line2), #fff, var(--line2)); background-size: 200% 100%; animation: sh 1.2s infinite; }
@keyframes sh { to { background-position: -200% 0; } }

.side { display: grid; gap: 14px; align-content: start; position: sticky; top: 78px; max-height: calc(100vh - 96px); overflow: auto; scrollbar-width: thin; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.panel h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 10px; font-weight: 600; }
.panel h3 { font-size: 13px; margin: 12px 0 6px; font-weight: 600; }
.fine { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 13px; color: var(--ink2); }
.legend .badge { margin-right: 4px; }
.sources, .links { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.sources li { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 5px 0; border-bottom: 1px solid var(--line2); }
.sources li:last-child { border: 0; }
.sources a { text-decoration: none; }
.sources .n { font: 12px var(--mono); color: var(--muted); white-space: nowrap; }
.sources .err { color: var(--flag); }
.sources .off { color: #A9A59B; }
.links a { display: flex; justify-content: space-between; font-size: 13.5px; padding: 6px 0; text-decoration: none; border-bottom: 1px solid var(--line2); }
.links a::after { content: '↗'; color: var(--muted); }
.links li:last-child a { border: 0; }
.kw .tags { display: flex; flex-wrap: wrap; gap: 5px; }
.kw .tag { font-size: 12px; padding: 2px 4px 2px 8px; border-radius: 6px; background: var(--line2); display: inline-flex; gap: 4px; align-items: center; }
.kw .tag button { border: 0; background: none; color: var(--muted); padding: 0 3px; font-size: 13px; line-height: 1; }
.kw input { margin-top: 8px; width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; font: inherit; font-size: 13px; background: var(--bg); }

dialog { border: 1px solid var(--line); border-radius: 18px; padding: 22px; width: min(400px, calc(100vw - 32px)); background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgb(22 24 29 / .35); }
dialog h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
dialog input { width: 100%; height: 44px; margin-top: 14px; border: 1px solid var(--line); border-radius: 11px; padding: 0 12px; font: inherit; font-size: 16px; }
.err { color: var(--flag); font-size: 13px; margin: 8px 0 0; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.primary, .ghost { height: 40px; padding: 0 16px; border-radius: 11px; font-weight: 600; border: 1px solid var(--ink); }
.primary { background: var(--ink); color: #fff; }
.ghost { background: none; border-color: var(--line); }
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; z-index: 50; box-shadow: 0 8px 30px rgb(0 0 0 / .18); max-width: calc(100vw - 32px); }

@media (max-width: 920px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 22px; }
  .side { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .btn-label { display: none; }
  .icon-btn { padding: 0 10px; }
  .job { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px; }
  .mark { display: none; }
  .acts { flex-direction: row; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 7px 6px; }
}
