:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-soft: #eef3fb;
  --ink: #1b2430;
  --muted: #657186;
  --line: #dce3ef;
  --blue: #0b5bd3;
  --blue-strong: #0646a8;
  --cyan: #0d9ec8;
  --green: #1f9d65;
  --orange: #f28c28;
  --red: #cc4a4a;
  --shadow: 0 8px 24px rgba(25, 47, 84, 0.08);
  --container: 1180px;
  --radius: 8px;
  --font: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
}

html[data-theme="contrast"] {
  --bg: #eef0f5;
  --surface: #ffffff;
  --surface-soft: #e7edf7;
  --ink: #101722;
  --muted: #3e4858;
  --line: #c8d2e2;
  --blue: #0048b8;
  --blue-strong: #003a95;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.topbar__inner {
  width: min(var(--container), calc(100vw - 40px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 184px;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  line-height: 1.05;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.topnav a {
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 650;
}

.topnav a:hover,
.topnav a:focus-visible {
  color: var(--blue);
  background: var(--surface-soft);
  outline: none;
}

.icon-button,
.save-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--blue);
  cursor: pointer;
}

.icon-button:hover,
.save-button:hover,
.icon-button:focus-visible,
.save-button:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 91, 211, 0.12);
  outline: none;
}

.search-band {
  background:
    linear-gradient(180deg, rgba(11, 91, 211, 0.08), rgba(255, 255, 255, 0)),
    var(--surface);
  border-bottom: 1px solid var(--line);
}

.search-band__inner {
  width: min(var(--container), calc(100vw - 40px));
  margin: 0 auto;
  padding: 34px 0 28px;
}

.headline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 2.4vw, 42px);
  line-height: 1.1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 9px;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: 0;
}

.searchbox {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 260px 142px;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.searchbox__field,
.sort-select {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.searchbox input,
.searchbox select,
.sort-select select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 13px;
}

.searchbox input:focus,
.searchbox select:focus,
.sort-select select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 91, 211, 0.12);
  outline: none;
}

.primary-button,
.outline-button,
.text-button {
  min-height: 42px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
}

.primary-button:hover,
.primary-button:focus-visible {
  border-color: var(--blue-strong);
  background: var(--blue-strong);
  outline: none;
}

.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--blue);
  background: var(--surface);
  color: var(--blue);
  padding: 0 14px;
}

.outline-button:hover,
.outline-button:focus-visible {
  background: var(--blue);
  color: #fff;
  outline: none;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
}

.content-shell {
  width: min(var(--container), calc(100vw - 40px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.filters {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
}

.filter-card,
.job-card,
.source-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.filter-card {
  padding: 18px;
}

.filter-card--quiet {
  background: var(--surface-soft);
  box-shadow: none;
}

.filter-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

fieldset {
  margin: 16px 0 0;
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 11px;
}

legend {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

label {
  cursor: pointer;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0 8px 0 0;
  vertical-align: -3px;
}

input[type="range"] {
  accent-color: var(--blue);
}

.range-row {
  display: grid;
  gap: 8px;
}

.system-list {
  margin: 0;
  display: grid;
  gap: 14px;
}

.system-list div {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.system-list dt {
  color: var(--ink);
  font-weight: 800;
}

.system-list dd {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.results-pane {
  min-width: 0;
}

.results-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 14px;
}

.muted {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.chip,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.chip {
  background: var(--surface-soft);
  color: var(--muted);
  padding: 0 10px;
}

.badge {
  padding: 0 9px;
}

.badge--source {
  background: rgba(11, 91, 211, 0.1);
  color: var(--blue);
}

.badge--category {
  background: rgba(13, 158, 200, 0.1);
  color: #087c9c;
}

.badge--status {
  background: rgba(31, 157, 101, 0.1);
  color: var(--green);
}

.results {
  display: grid;
  gap: 12px;
}

.job-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 18px;
  padding: 18px;
}

.job-card:hover {
  border-color: rgba(11, 91, 211, 0.45);
  box-shadow: 0 10px 30px rgba(25, 47, 84, 0.12);
}

.job-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.job-card__snippet {
  color: var(--muted);
  margin-bottom: 14px;
}

.job-card__details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 13px;
}

.job-card__details span strong {
  color: var(--ink);
}

.job-card__side {
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 12px;
}

.save-button {
  color: var(--orange);
  font-size: 22px;
}

.save-button.is-saved {
  background: rgba(242, 140, 40, 0.12);
  border-color: rgba(242, 140, 40, 0.42);
}

.score-ring {
  --score: 0;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--surface) 0 55%, transparent 56%),
    conic-gradient(var(--blue) calc(var(--score) * 1%), #dbe3ef 0);
  color: var(--blue);
  font-weight: 900;
}

.score-ring span {
  font-size: 18px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 34px;
  text-align: center;
}

.sources-section {
  width: min(var(--container), calc(100vw - 40px));
  margin: 42px auto 60px;
}

.section-head {
  margin-bottom: 16px;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.source-card {
  padding: 16px;
}

.source-card__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.source-card__platform {
  color: var(--blue);
  font-weight: 900;
}

.source-card__members {
  color: var(--muted);
  font-size: 12px;
}

.source-card h3 {
  font-size: 16px;
}

.source-card p {
  color: var(--muted);
  font-size: 13px;
}

.source-card a {
  color: var(--blue);
  font-weight: 850;
}

@media (max-width: 980px) {
  .topbar__inner {
    width: min(100% - 28px, var(--container));
  }

  .topnav {
    display: none;
  }

  .search-band__inner,
  .content-shell,
  .sources-section {
    width: min(100% - 28px, var(--container));
  }

  .searchbox {
    grid-template-columns: 1fr;
  }

  .content-shell {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }

  .filter-card:first-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
  }

  .filter-card__head {
    grid-column: 1 / -1;
  }

  fieldset {
    margin-top: 0;
  }

  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .topbar__inner {
    min-height: 62px;
    gap: 12px;
  }

  .brand {
    min-width: 0;
  }

  .search-band__inner {
    padding-top: 24px;
  }

  .headline,
  .results-toolbar {
    display: block;
  }

  .sort-select {
    margin-top: 12px;
  }

  .filter-card:first-child {
    grid-template-columns: 1fr;
  }

  .job-card {
    grid-template-columns: 1fr;
  }

  .job-card__side {
    grid-template-columns: auto auto 1fr;
    align-items: center;
    justify-items: start;
  }

  .job-card__side .outline-button {
    justify-self: stretch;
  }

  .score-ring {
    width: 58px;
    height: 58px;
  }

  .source-grid {
    grid-template-columns: 1fr;
  }
}
