:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --text: #27324b;
  --muted: #657188;
  --line: #e3e8f2;
  --brand: #e6007e;
  --navy: #10265f;
  --navy-soft: #24428d;
  --banner: #223746;
  --shadow-soft: 0 12px 26px rgba(14, 31, 76, 0.06);
  --shadow-strong: 0 24px 54px rgba(14, 31, 76, 0.18);
  --radius-card: 22px;
  --radius-field: 14px;
  --radius-pill: 999px;
  --max-width: 1700px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.container {
  width: min(calc(100% - 56px), var(--max-width));
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.header-shell {
  position: relative;
  z-index: 10;
  background: #fff;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0 10px;
  color: var(--text);
}

.brand-row,
.site-nav,
.top-nav__actions {
  display: flex;
  align-items: center;
}

.brand-row {
  gap: 28px;
}

.site-nav {
  gap: 30px;
  flex-wrap: wrap;
}

.site-nav__link,
.employer-link {
  color: #5e6980;
  text-decoration: none;
  font-size: 1rem;
}

.site-nav__link--active {
  color: var(--text);
  font-weight: 600;
  border-bottom: 3px solid var(--text);
  padding-bottom: 10px;
}

.top-nav__actions {
  gap: 24px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid #d8e1f1;
  background: #fff;
  color: #111;
  font-size: 1rem;
  font-weight: 800;
  text-transform: lowercase;
}

.button {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.button:focus-visible,
.chip:focus-visible,
.icon-button:focus-visible,
.compare-toggle:focus-visible,
.pagination__button:focus-visible,
.sort-chip select:focus-visible,
.compare-tray__remove:focus-visible,
.focus-card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.focus-card:focus {
  outline: none;
}

.focus-card:focus-visible {
  outline: 2px solid var(--brand);
}

.button--nav {
  min-height: 42px;
  border: 2px solid #cdd9f2;
  background: #fff;
  color: var(--navy-soft);
  font-weight: 700;
}

.button--primary {
  min-width: 102px;
  min-height: 56px;
  padding: 0 18px;
  border-radius: var(--radius-field);
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  align-self: end;
}

.button--secondary {
  background: #edf3ff;
  color: var(--navy-soft);
  font-weight: 700;
}

.button--apply {
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

.button--link {
  min-height: auto;
  padding: 0;
  background: none;
  color: var(--brand);
  border-radius: 0;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.search-shell {
  background: var(--navy);
  color: #fff;
}

.search-panel {
  padding: 16px 0 16px;
}

.search-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr auto;
  gap: 18px;
  align-items: end;
}

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

.field__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.94);
}

.field input {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid #d8deeb;
  border-radius: var(--radius-field);
  background: #fff;
  color: var(--text);
  outline: none;
}

.field input:focus {
  border-color: rgba(230, 0, 126, 0.42);
  box-shadow: 0 0 0 4px rgba(230, 0, 126, 0.12);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

.chip {
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: transparent;
  color: #fff;
}

.results-inline {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-right: 10px;
}

.results-count {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.82);
}

.sort-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  margin-left: auto;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.sort-chip__label {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.76);
}

.sort-chip select {
  min-height: 28px;
  border: 0;
  background: transparent;
  color: #fff;
  outline: none;
  padding-right: 18px;
}

.results-shell {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.results-column {
  height: 100%;
  min-height: 0;
}

.jobs-stage {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0 28px;
  scrollbar-gutter: stable;
}

.jobs-stage.is-focused {
  overflow: hidden;
}

.jobs-list {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
  padding-bottom: 18px;
}

.jobs-dimmer {
  position: absolute;
  inset: 0;
  background: rgba(24, 33, 56, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
  z-index: 1;
}

.jobs-stage.is-focused .jobs-dimmer {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

.job-card {
  min-width: 0;
  position: relative;
  z-index: 0;
}

.jobs-stage.is-focused .job-card {
  opacity: 0.34;
  transition: opacity 240ms ease;
}

.jobs-stage.is-focused .job-card.is-origin {
  opacity: 0;
}

.job-card__shell {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  padding: 14px 18px 16px;
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.job-card__shell {
  cursor: pointer;
}

.job-card__shell:hover,
.job-card__shell:focus-visible {
  border-color: #d8dff0;
}

.job-card__shell:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.job-card__star {
  color: #a557e5;
  line-height: 1;
}

.job-card__star svg,
.focus-card__star svg {
  display: block;
}

.job-card__logo,
.focus-card__logo {
  width: 76px;
  height: 42px;
  background:
    radial-gradient(circle at 14px 21px, #46c248 0 5px, transparent 6px),
    radial-gradient(circle at 30px 21px, #2c3e4f 0 5px, transparent 6px),
    radial-gradient(circle at 46px 21px, #46c248 0 5px, transparent 6px);
}

.job-card__content {
  display: grid;
  gap: 8px;
}

.job-card__title,
.focus-card__summary-title,
.focus-card__title {
  margin: 0;
  font-weight: 500;
}

.job-card__title {
  font-size: 1rem;
  line-height: 1.45;
}

.job-card__company,
.focus-card__summary-company {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.job-card__meta,
.focus-card__summary-meta {
  display: grid;
  gap: 6px;
  color: #3b4861;
  font-size: 0.95rem;
  line-height: 1.45;
}

.job-card__footer,
.focus-card__summary-footer,
.focus-card__company-row,
.focus-card__actions-row,
.focus-card__actions,
.pagination,
.pagination__status {
  display: flex;
}

.job-card__footer {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.job-card__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.job-card__toggle-icon,
.focus-card__hide-icon {
  width: 12px;
  height: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.focus-card__hide-icon {
  transform: rotate(-135deg);
}

.icon-button {
  color: #66748f;
  border: 0;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 10px;
  transition: color 160ms ease, background 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  color: var(--navy-soft);
  background: #eef3ff;
}

.icon-button--save.is-saved {
  color: var(--brand);
}

.icon-button--save.is-saved svg {
  fill: currentColor;
}

.job-card__footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.compare-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d9e1ef;
  background: #fff;
  border-radius: var(--radius-pill);
  padding: 4px 10px 4px 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #52607a;
}

.compare-toggle__box {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1.5px solid #ccd6ea;
  background: #fff;
}

.compare-toggle.is-active {
  border-color: var(--navy-soft);
  color: var(--navy-soft);
  background: #eef3ff;
}

.compare-toggle.is-active .compare-toggle__box {
  background: var(--navy-soft);
  border-color: var(--navy-soft);
}

.compare-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.focus-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.focus-layer.is-active .focus-card {
  pointer-events: auto;
}

.focus-card {
  position: absolute;
  width: min(1080px, calc(100% - 140px));
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, 33%) minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid #d5dbe9;
  border-radius: 24px;
  box-shadow: var(--shadow-strong);
  overflow: hidden;
}

.focus-card__summary {
  display: flex;
  flex-direction: column;
  padding: 10px 16px 12px;
}

.focus-card__star {
  color: #a557e5;
  line-height: 1;
}

.focus-card__summary-content {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.focus-card__summary-title {
  font-size: 0.96rem;
  line-height: 1.32;
}

.focus-card__summary-meta {
  margin-top: 8px;
}

.focus-card__summary-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
}

.focus-card__details {
  border-left: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.focus-card__banner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 68px;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--banner) 0%, #2e4455 100%);
}

.focus-card__banner-mark {
  width: 150px;
  height: 68px;
  margin-right: auto;
  background:
    radial-gradient(circle at 36px 44px, rgba(255, 255, 255, 0.06) 0 40px, transparent 41px),
    radial-gradient(circle at 120px 12px, rgba(255, 255, 255, 0.04) 0 70px, transparent 71px);
}

.focus-card__banner-text {
  margin: 0;
  max-width: 190px;
  text-align: right;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.focus-card__body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px 18px 12px;
  min-height: 0;
  flex: 1;
}

.focus-card__title,
.focus-card__company-row,
.focus-card__detail-meta,
.focus-card__actions-row {
  flex-shrink: 0;
}

.focus-card__hide {
  color: #d1197a;
  font-size: 0.94rem;
  font-weight: 600;
}

.focus-card__hide:hover,
.focus-card__hide:focus-visible {
  color: var(--brand);
}

.focus-card__title {
  font-size: 1.34rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.focus-card__company-row {
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: #3c4962;
}

.focus-card__link {
  text-decoration: underline;
}

.focus-card__detail-meta {
  display: grid;
  gap: 7px;
  color: #4e5b74;
}

.focus-card__detail-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.focus-card__detail-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  color: #66748f;
}

.focus-card__detail-scroll {
  display: grid;
  gap: 9px;
  flex: 1;
  min-height: 0;
  padding-right: 4px;
  overflow-y: auto;
}

.focus-card__summary-text {
  margin: 0;
  color: #52607a;
  line-height: 1.45;
}

.focus-card__highlights {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.focus-card__highlights li {
  position: relative;
  padding-left: 18px;
  color: #52607a;
  line-height: 1.42;
}

.focus-card__highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}

.focus-card__actions-row {
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 0;
}

.focus-card__posted {
  color: #67748d;
}

.focus-card__actions {
  gap: 14px;
  flex-wrap: wrap;
}

.pagination {
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 10px 0 4px;
}

.pagination__button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #d9e1ef;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pagination__button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination__status {
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.pagination__current {
  min-width: 42px;
  min-height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--brand);
  border: 1px solid #f2c3dd;
  font-weight: 700;
}

.focus-card--inline {
  position: static;
  width: 100%;
  max-height: none;
  grid-template-columns: 1fr;
  border-radius: 16px;
  box-shadow: none;
  border: 1px solid var(--line);
  margin-top: 14px;
}

.focus-card--inline .focus-card__summary {
  display: none;
}

.focus-card--inline .focus-card__details {
  border-left: 0;
}

.focus-card--inline .focus-card__body,
.focus-card--inline .focus-card__detail-scroll {
  flex: initial;
  overflow: visible;
}

@keyframes focus-card-inline-reveal {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.focus-card--inline {
  animation: focus-card-inline-reveal 260ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .focus-card--inline {
    animation: none;
  }
}

.compare-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 20;
  padding: 10px 12px 10px 22px;
  border-radius: var(--radius-pill);
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow-strong);
}

.compare-bar[hidden] {
  display: none;
}

.compare-bar__label {
  margin: 0;
  font-size: 0.92rem;
  white-space: nowrap;
}

.compare-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compare-bar .button--link {
  color: rgba(255, 255, 255, 0.78);
}

.compare-bar .button--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.compare-tray {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 30;
  padding: 24px;
}

.compare-tray[hidden] {
  display: none;
}

.compare-tray__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 38, 95, 0.45);
}

.compare-tray__panel {
  position: relative;
  width: min(960px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-strong);
  padding: 24px;
}

.compare-tray__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.compare-tray__header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.compare-tray__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.compare-tray__column {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 16px 16px;
}

.compare-tray__remove {
  position: absolute;
  top: 6px;
  right: 6px;
  border: 0;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  border-radius: 10px;
  color: #66718a;
  font-size: 0.9rem;
  transition: color 160ms ease, background 160ms ease;
}

.compare-tray__remove:hover,
.compare-tray__remove:focus-visible {
  color: var(--text);
  background: #eef3ff;
}

.compare-tray__job-title {
  margin: 0 22px 4px 0;
  font-size: 1rem;
  line-height: 1.3;
}

.compare-tray__company {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.85rem;
}

.compare-tray__facts {
  margin: 0;
  display: grid;
  gap: 8px;
}

.compare-tray__fact {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}

.compare-tray__fact dt {
  color: var(--muted);
}

.compare-tray__fact dd {
  margin: 0;
  text-align: right;
  color: #2a3550;
  font-weight: 500;
}

@media (max-width: 1280px) {
  .container {
    width: min(calc(100% - 36px), var(--max-width));
  }

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

  .focus-card {
    width: min(980px, calc(100% - 72px));
  }
}

@media (max-width: 940px) {
  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    display: block;
  }

  .results-column {
    height: auto;
    display: block;
  }

  .results-shell {
    overflow: visible;
  }

  .jobs-stage {
    overflow: visible;
    min-height: auto;
  }

  .top-nav,
  .brand-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-nav {
    padding: 14px 0 8px;
  }

  .search-panel {
    padding: 12px 0;
  }

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

  .filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
  }

  .filter-row::-webkit-scrollbar {
    display: none;
  }

  .results-inline,
  .chip,
  .sort-chip {
    flex: none;
  }

  .sort-chip {
    margin-left: 0;
  }

  .compare-bar {
    left: 16px;
    right: 16px;
    bottom: 16px;
    transform: none;
    justify-content: space-between;
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .compare-bar__label {
    white-space: normal;
    flex: 1 1 100%;
  }

  .compare-bar__actions {
    flex: 1 1 100%;
    justify-content: flex-end;
  }

  .compare-tray__panel {
    padding: 18px;
  }

  .button--primary {
    width: 100%;
  }

  .jobs-list {
    grid-template-columns: 1fr;
  }

  .focus-card {
    width: calc(100% - 24px);
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .focus-card__details {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 420px) {
  .job-card__footer {
    flex-wrap: wrap;
    row-gap: 10px;
  }
}
