:root {
  --bg: #f5f7fb;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: #ffffff;
  --surface-dark: #05070b;
  --text: #090b0f;
  --muted: #5b6472;
  --line: rgba(5, 7, 11, 0.08);
  --brand: #2457ff;
  --brand-deep: #163fd6;
  --accent: #7ea2ff;
  --accent-soft: rgba(36, 87, 255, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--text);
  font-size: 15px;
  background: #f6f8fc;
}

.page-shell {
  width: min(1180px, calc(100% - 20px));
  margin: 0 auto;
  padding: 12px 0 20px;
}

.app-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 24px);
  overflow: auto;
  scrollbar-width: thin;
}

.sidebar {
  padding-right: 8px;
}

.sidebar__brand {
  display: grid;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.hero__eyebrow {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.3rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero__subtitle {
  max-width: none;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.sidebar__section {
  display: grid;
  gap: 10px;
}

.sidebar-switcher {
  gap: 10px;
}

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

.sidebar-switcher__tab {
  min-height: 32px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #233149;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
}

.sidebar-switcher__tab.is-active {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  border-color: transparent;
  color: #ffffff;
}

.sidebar-panel {
  display: none;
}

.sidebar-panel.is-active {
  display: block;
}

.sidebar__section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sidebar__section-title {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar__status {
  padding: 2px 0 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.last-updated-label,
.last-updated-value {
  margin: 0;
}

.last-updated-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.last-updated-value {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
}

.trusted-employers {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.main-content {
  min-width: 0;
}

.link-group {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.link-group--compact {
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.company-groups {
  display: grid;
  gap: 0;
}

.link-group__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.link-group__title {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trusted-employers__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.employer-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f6f8fc;
  padding-top: 8px;
}

.controls--sidebar {
  grid-template-columns: 1fr;
  position: static;
  background: transparent;
  padding-top: 0;
  margin-bottom: 0;
}

.controls--sidebar .filter-group {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.search__label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.84rem;
  font-weight: 700;
}

.search input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  font: inherit;
}

.search input:focus {
  outline: 2px solid rgba(36, 87, 255, 0.12);
  border-color: rgba(36, 87, 255, 0.32);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.filter-button:hover,
.filter-button:focus-visible {
  transform: translateY(-1px);
}

.filter-button.is-active {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #ffffff;
}

.results-bar {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

.area-filter-bar,
.tag-filter-bar {
  display: grid;
  gap: 10px;
  padding: 2px 0 0;
}

.area-filter-bar__header,
.tag-filter-bar__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.area-filter-bar__title,
.tag-filter-bar__title {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tag-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-filter-list--stacked {
  flex-direction: column;
  align-items: stretch;
}

.tag-filter-chip,
.tag-reset-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.tag-filter-chip {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: #233149;
  font-size: 0.84rem;
  font-weight: 700;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.tag-filter-list--stacked .tag-filter-chip {
  display: flex;
  justify-content: space-between;
  width: 100%;
  text-align: left;
}

.tag-filter-chip__label,
.tag-filter-chip__count {
  display: inline-flex;
  align-items: center;
}

.tag-filter-chip__count {
  min-width: 24px;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef2f8;
  color: #31415c;
  font-size: 0.72rem;
  font-weight: 800;
}

.tag-filter-chip:hover,
.tag-filter-chip:focus-visible {
  transform: translateY(-1px);
}

.tag-filter-chip.is-active {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  border-color: transparent;
  color: #ffffff;
}

.tag-filter-chip.is-active .tag-filter-chip__count {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.tag-reset-button {
  padding: 6px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--brand-deep);
  font-size: 0.84rem;
  font-weight: 800;
}

.area-sections {
  display: grid;
  gap: 12px;
}

.area-section {
  padding: 14px 0 8px;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.area-section__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 10px;
}

.area-section__title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
}

.area-section__count {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.job-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  min-height: 200px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.job-card__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.job-card__company,
.job-card__date,
.job-card__source-label,
.job-card__source {
  margin: 0;
}

.job-card__company {
  color: var(--brand);
  font-size: 0.88rem;
  font-weight: 800;
}

.job-card__title {
  margin: 6px 0 0;
  font-size: 1.02rem;
  line-height: 1.25;
}

.job-card__date {
  color: var(--muted);
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 700;
}

.job-card__meta,
.job-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.meta-pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.meta-pill {
  background: #f3f5f8;
  color: #273142;
}

.meta-pill--area {
  background: #eef3ff;
  color: var(--brand-deep);
}

.meta-pill--workplace {
  background: #f3f5f8;
  color: #111827;
}

.tag-pill {
  background: #eef3ff;
  color: var(--brand-deep);
}

.job-card__footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-top: auto;
}

.job-card__source-wrap {
  display: grid;
  gap: 4px;
}

.job-card__source-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.job-card__source {
  font-size: 0.88rem;
  font-weight: 700;
}

.source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--text);
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 800;
}

.source-link:hover,
.source-link:focus-visible {
  filter: brightness(1.04);
}

.empty-state {
  padding: 18px;
  border: 1px dashed rgba(5, 7, 11, 0.14);
  border-radius: 14px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.site-footer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

@media (max-width: 1100px) {
  .app-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }
}

@media (max-width: 920px) {
  .app-layout,
  .controls {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    padding-right: 0;
    max-height: none;
    overflow: visible;
  }

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

  .tag-filter-list--stacked {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .controls {
    position: static;
    padding-top: 0;
  }

  .controls--sidebar .filter-group {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sidebar-switcher__tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .page-shell {
    width: min(100% - 12px, 1180px);
    padding-top: 8px;
  }

  .app-layout {
    gap: 12px;
  }

  .sidebar {
    gap: 10px;
  }

  .controls--sidebar .filter-group {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .area-section,
  .job-card {
    padding: 12px;
  }

  .area-section__header,
  .job-card__header,
  .job-card__footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-button {
    flex: 1 1 72px;
  }

  .filter-group {
    width: 100%;
  }

  .tag-filter-chip,
  .employer-link,
  .source-link {
    min-height: 32px;
  }

  .source-link {
    width: 100%;
  }
}
