:root {
  color-scheme: light dark;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --border: #e0e4ec;
  --text: #0c1a30;
  --muted: #5f6b7c;
  --primary: #0f62fe;
  --primary-dark: #0043ce;
  --accent: #14b8a6;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  line-height: 1.6;
}

.hero {
  background: linear-gradient(135deg, #081229, #122047);
  color: #f9fbff;
  padding: 4rem 1.5rem 3rem;
}

.hero--compact {
  padding-bottom: 2.5rem;
}

.hero__content {
  max-width: 960px;
  margin: 0 auto;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
}

.site-logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: #f9fbff;
}

.site-nav__links {
  display: flex;
  gap: 1.25rem;
}

.site-nav__links a {
  color: rgba(249, 251, 255, 0.8);
  text-decoration: none;
  font-weight: 600;
}

.site-nav__links a:hover {
  color: #ffffff;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin: 0.25rem 0 0.75rem;
}

.lede {
  margin-bottom: 1.5rem;
  max-width: 640px;
  color: rgba(249, 251, 255, 0.86);
}

.hero__meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.meta-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(249, 251, 255, 0.7);
  margin-bottom: 0.25rem;
}

.meta-value {
  font-size: 1.5rem;
  font-weight: 600;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

.layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: -4rem auto 0;
  padding: 0 1.5rem 4rem;
}

.filters {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 20px 60px rgba(15, 30, 70, 0.08);
  position: sticky;
  top: 1rem;
  align-self: start;
}

.filters__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.filters h2 {
  margin: 0;
  font-size: 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.field input,
.field select {
  border-radius: 0.6rem;
  border: 1px solid var(--border);
  padding: 0.65rem 0.85rem;
  font-size: 1rem;
  font-family: inherit;
}

.field input[type="range"] {
  padding: 0;
}

.slider-value {
  font-size: 0.9rem;
  color: var(--muted);
}

.filters__actions {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 1rem;
}

.primary-button {
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.8rem 1.75rem;
  cursor: pointer;
  transition: background 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.primary-button:hover {
  background: var(--primary-dark);
}

.primary-button.is-loading {
  cursor: progress;
}

.primary-button__ellipsis {
  display: inline-block;
  letter-spacing: 0.1em;
  animation: pulseDots 1s steps(4, end) infinite;
}

@keyframes pulseDots {
  0% {
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.2;
  }
}

.hint {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

.results__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
}

.results h2 {
  margin: 0;
}

#cards {
  display: grid;
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 15px 40px rgba(12, 26, 48, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card__top {
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
}

.card__company {
  font-weight: 600;
  margin: 0.35rem 0 0.65rem;
}

.card__desc {
  margin: 0;
  color: var(--muted);
}

.card__deadline {
  text-align: right;
}

.deadline {
  font-size: 1.25rem;
  font-weight: 600;
}

.card__details {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.card__details li {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: #f2f4f8;
}

.detail-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}

.card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.card__actions a,
.card__actions button {
  border-radius: 999px;
  padding: 0.65rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.card__actions .primary {
  background: var(--primary);
  color: white;
  text-decoration: none;
}

.card__actions .primary:hover {
  background: var(--primary-dark);
}

.card__actions .secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.card__extra {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  color: var(--muted);
}

.text-button {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.doc-wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.doc-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 15px 40px rgba(12, 26, 48, 0.06);
}

.doc-section + .doc-section {
  margin-top: 1.25rem;
}

.doc-section h2 {
  margin-top: 0;
}

.doc-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  color: var(--text);
}

.doc-list li {
  margin-bottom: 0.4rem;
}

.doc-section code {
  background: #eef2ff;
  color: #1d305c;
  padding: 0.15rem 0.35rem;
  border-radius: 0.3rem;
  font-size: 0.9rem;
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
    margin-top: -2rem;
  }

  .filters {
    position: static;
  }

  .card__top {
    flex-direction: column;
  }

  .card__deadline {
    text-align: left;
  }

  .site-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav__links {
    flex-wrap: wrap;
  }
}
