:root {
  --blue: #1f5fbf;
  --blue-dark: #174a96;
  --blue-tint: #eaf1fb;
  --ink: #1f1f1f;
  --muted: #595959;
  --line: #d4d2d0;
  --line-soft: #e8e6e4;
  --bg: #ffffff;
  --page: #f7f6f5;
  --green: #1a6b3c;
  --green-tint: #e5f4ea;
  --new: #b3261e;
  --new-tint: #fdecea;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 0 24px; min-height: 60px;
  border-bottom: 1px solid var(--line-soft);
}
.brand { font-size: 22px; font-weight: 700; letter-spacing: -.5px; color: var(--blue); text-decoration: none; }
.brand span { color: var(--ink); }
.tabs { display: flex; gap: 4px; align-self: stretch; }
.tab {
  background: none; border: 0; padding: 0 12px; font-weight: 600; color: var(--muted);
  border-bottom: 3px solid transparent; border-top: 3px solid transparent;
}
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); }
.count { font-weight: 400; }
.freshness { margin-left: auto; display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--muted); }
.link { background: none; border: 0; padding: 0; color: var(--blue); font-weight: 600; font-size: 13px; }
.link:hover { text-decoration: underline; }
.link:disabled { color: var(--muted); cursor: default; text-decoration: none; }

.search-area { padding: 20px 24px 14px; border-bottom: 1px solid var(--line-soft); }
.searchbar {
  display: flex; max-width: 900px; margin: 0 auto; padding: 6px;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}
.field { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 12px; min-width: 0; }
.field + .field { border-left: 1px solid var(--line-soft); }
.field-label { font-weight: 700; font-size: 14px; }
.field input { flex: 1; width: 100%; min-width: 0; min-height: 42px; border: 0; outline: 0; background: none; }
.field:focus-within { box-shadow: inset 0 -2px 0 var(--blue); }
.primary {
  background: var(--blue); color: #fff; border: 0; border-radius: 8px;
  padding: 10px 22px; font-weight: 700; white-space: nowrap; text-decoration: none; display: inline-block;
}
.primary:hover { background: var(--blue-dark); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; max-width: 900px; margin: 14px auto 0; }
.pill { position: relative; background: var(--page); border-radius: 8px; font-size: 14px; font-weight: 600; }
.pill select { border: 0; background: transparent; padding: 7px 8px; font-weight: 600; font-size: 14px; max-width: 200px; cursor: pointer; }
.pill.active { background: var(--blue-tint); color: var(--blue); }
.pill.check { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; cursor: pointer; }

.banner {
  display: flex; gap: 12px; justify-content: center; align-items: center;
  padding: 8px 16px; background: var(--blue-tint); font-size: 14px;
}

.layout {
  display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 24px;
  max-width: 1160px; margin: 0 auto; padding: 16px 24px 32px; align-items: start;
}
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 32px; margin-bottom: 8px; }
.results-head p { margin: 0; font-size: 14px; color: var(--muted); }
.sort { font-size: 13px; color: var(--muted); white-space: nowrap; }
.sort select { border: 0; background: none; font-weight: 700; color: var(--blue); font-size: 13px; cursor: pointer; }

.card {
  position: relative; padding: 14px 44px 14px 16px; margin-bottom: 12px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); cursor: pointer;
}
.card:hover { border-color: #8c8a88; }
.card.selected { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.card h2 { margin: 0 0 2px; font-size: 16px; line-height: 1.3; }
.card-title { all: unset; font-weight: 700; cursor: pointer; }
.card-title:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.card:hover .card-title { text-decoration: underline; }
.card .company { margin: 0; font-size: 14px; }
.card .place { margin: 0; font-size: 14px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.tags li { background: var(--page); border-radius: 5px; padding: 2px 8px; font-size: 13px; font-weight: 600; color: #424242; }
.tags .pay { background: var(--green-tint); color: var(--green); }
.badge-new { display: inline-block; margin-bottom: 4px; font-size: 12px; font-weight: 700; color: var(--new); background: var(--new-tint); border-radius: 5px; padding: 0 6px; }
.badge-applied { display: inline-block; margin-bottom: 4px; font-size: 12px; font-weight: 700; color: var(--green); background: var(--green-tint); border-radius: 5px; padding: 0 6px; }
.snippet { margin: 8px 0 0; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.age { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.bookmark {
  position: absolute; top: 8px; right: 8px; width: 34px; height: 34px;
  display: grid; place-items: center; background: none; border: 0; border-radius: 6px; color: var(--muted);
}
.bookmark:hover { background: var(--page); }
.bookmark svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.bookmark[aria-pressed="true"] { color: var(--blue); }
.bookmark[aria-pressed="true"] svg { fill: currentColor; }

.detail {
  position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
}
.detail:empty { display: none; }
.detail-head { position: sticky; top: 0; background: var(--bg); padding: 18px 20px 14px; border-bottom: 1px solid var(--line-soft); }
.detail-head h1 { margin: 0 0 4px; font-size: 22px; line-height: 1.25; }
.detail-head p { margin: 0; font-size: 14px; }
.detail-head .muted { color: var(--muted); }
.back { display: none; margin-bottom: 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.secondary { background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 9px 14px; font-weight: 600; }
.secondary:hover { background: var(--page); }
.secondary[aria-pressed="true"] { background: var(--blue-tint); border-color: var(--blue); color: var(--blue); }
.detail-body { padding: 16px 20px 24px; overflow-wrap: anywhere; }
.detail-body h3 { font-size: 16px; margin: 0 0 8px; }
.detail-body h4 { font-size: 15px; margin: 18px 0 6px; }
.detail-body h5 { font-size: 14px; margin: 14px 0 4px; }
.detail-body p { margin: 0 0 10px; }
.detail-body ul, .detail-body ol { margin: 0 0 10px; padding-left: 22px; }
.facts { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.detail-body .facts .tags { margin: 0; padding: 0; }
.also { font-size: 13px; color: var(--muted); margin: 8px 0 0; }

.empty { padding: 36px 16px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }
.skeleton { height: 128px; margin-bottom: 12px; border-radius: var(--radius); background: var(--page); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

.pager { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pager button { min-width: 38px; height: 38px; border: 0; border-radius: 8px; background: var(--page); font-weight: 600; }
.pager button:hover { background: var(--line-soft); }
.pager button[aria-current="page"] { background: var(--blue); color: #fff; }

.foot { max-width: 1160px; margin: 0 auto; padding: 14px 24px 28px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line-soft); }

@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; gap: 0 12px; padding: 8px 16px 0; }
  .freshness { margin-left: auto; }
  .tabs { order: 3; width: 100%; min-height: 40px; }
  .search-area { padding: 14px 16px 10px; }
  .searchbar { flex-direction: column; gap: 4px; }
  .field + .field { border-left: 0; border-top: 1px solid var(--line-soft); }
  .primary { width: 100%; text-align: center; }
  .filters { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 4px; }
  .pill { flex: none; }
  .layout { display: block; padding: 12px 16px 24px; }
  .detail { display: none; }
  body.detail-open { overflow: hidden; }
  body.detail-open .detail { display: block; position: fixed; inset: 0; z-index: 10; max-height: none; border: 0; border-radius: 0; }
  .back { display: inline-block; }
}
