:root {
  --bg: #080a0f;
  --panel: #0e121a;
  --panel-2: #121722;
  --raised: #151b27;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #e9edf6;
  --muted: #9aa4b8;
  --dim: #6d7789;
  --accent: #93a6ff;
  --accent-bright: #aab9ff;
  --mint: #7ee2b8;
  --strong: #57e39b;
  --good: #ffc861;
  --fair: #8fb6ff;
  --low: #7c8698;
  --r: 16px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 18px 40px -24px rgba(0, 0, 0, 0.8);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}

.aurora {
  position: fixed;
  inset: -30% -15% auto -15%;
  height: 620px;
  background:
    radial-gradient(52% 55% at 22% 0%, rgba(147, 166, 255, 0.16), transparent 68%),
    radial-gradient(46% 50% at 78% 4%, rgba(126, 226, 184, 0.09), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 22px calc(56px + env(safe-area-inset-bottom));
}

/* ---------- hero ---------- */

.hero {
  padding: 6px 0 26px;
  border-bottom: 1px solid var(--line);
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: linear-gradient(155deg, #2a3354, #12161f);
  color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.mark svg {
  width: 16px;
  height: 16px;
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.stamps {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.stamp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  font-size: 12px;
  color: var(--muted);
}

.stamp.quiet {
  color: var(--dim);
}

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--strong);
  box-shadow: 0 0 0 0 rgba(87, 227, 155, 0.5);
  animation: pulse 2.6s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(87, 227, 155, 0.45);
  }
  70%,
  100% {
    box-shadow: 0 0 0 7px rgba(87, 227, 155, 0);
  }
}

.hero h1 {
  margin: 22px 0 0;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  font-size: clamp(40px, 6.2vw, 60px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

#heroStrong {
  font-variant-numeric: tabular-nums;
  background: linear-gradient(175deg, #ffffff 10%, #b9c4e6 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-unit {
  font-size: clamp(15px, 2vw, 19px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--muted);
}

.hero-sub {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--dim);
}

.hero-sub b {
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- layout ---------- */

.layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: 26px;
}

/* ---------- rail ---------- */

.rail {
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(14, 18, 26, 0.78);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.search {
  position: relative;
  display: flex;
  align-items: center;
}

.search svg {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--dim);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 42px;
  padding: 0 12px 0 36px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 15px; /* 15px+ keeps iOS from zooming on focus */
}

.search input::placeholder {
  color: var(--dim);
}

.rail-group {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.rail-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.rail-label {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--dim);
}

.rail-row output {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.chips {
  display: grid;
  gap: 6px;
}

.chip {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip:has(input:checked) {
  color: var(--text);
  border-color: rgba(147, 166, 255, 0.34);
  background: linear-gradient(180deg, rgba(147, 166, 255, 0.12), rgba(147, 166, 255, 0.05));
}

.chip::before {
  content: "";
  width: 13px;
  height: 13px;
  margin-right: 9px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, 0.2);
  flex: none;
  transition: background 0.15s, border-color 0.15s;
}

.chip:has(input:checked)::before {
  background: var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23090c12' stroke-width='2'%3E%3Cpath d='M2.4 6.2 4.8 8.6 9.6 3.6'/%3E%3C/svg%3E")
    center / 10px no-repeat;
  border-color: var(--accent);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--fill, 0%),
    #232a38 var(--fill, 0%),
    #232a38 100%
  );
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: #0b0e14;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(147, 166, 255, 0.14);
}

input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: #232a38;
}

input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
}

input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #0b0e14;
  border: 2px solid var(--accent);
}

select {
  width: 100%;
  height: 40px;
  padding: 0 32px 0 11px;
  appearance: none;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%239aa4b8' stroke-width='1.6'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E")
    no-repeat right 11px center / 12px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.reset {
  width: 100%;
  height: 38px;
  border-radius: 10px;
  border: 1px dashed var(--line-2);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}

.reset:hover {
  color: var(--text);
  border-color: rgba(147, 166, 255, 0.45);
}

.rail-note {
  display: flex;
  gap: 8px;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--dim);
}

.rail-note svg {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 1px;
  color: var(--dim);
}

/* ---------- focus ---------- */

.search input:focus,
.chip:focus-within,
select:focus-visible,
.reset:focus-visible,
.link:focus-visible,
button:focus-visible,
.apply:focus-visible,
summary:focus-visible {
  outline: 2px solid rgba(147, 166, 255, 0.65);
  outline-offset: 2px;
}

/* ---------- results ---------- */

.results {
  min-width: 0;
}

.result-line {
  margin: 2px 0 4px;
  min-height: 18px;
  font-size: 12.5px;
  color: var(--dim);
}

.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tier {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 4px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}

.tier:first-child {
  margin-top: 8px;
}

.tier::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.tier b {
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.job {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 15px 17px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #10151f, #0d1119);
  box-shadow: var(--shadow);
  transition: border-color 0.16s, transform 0.16s, background 0.16s;
}

.job:hover {
  border-color: var(--line-2);
  background: linear-gradient(180deg, #121824, #0e121a);
  transform: translateY(-1px);
}

.job.is-applied {
  border-left: 3px solid #5b8def;
}

.job.is-interview {
  border-left: 3px solid var(--strong);
}

.job.is-offer {
  border-left: 3px solid var(--mint);
}

.job.is-rejected {
  opacity: 0.55;
}

.list.animate .job {
  animation: rise 0.4s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 16ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tile {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #090c12;
  background: linear-gradient(
    150deg,
    hsl(var(--h, 220) 70% 70%),
    hsl(calc(var(--h, 220) + 36) 66% 56%)
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.job-body {
  min-width: 0;
}

.job-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.job-head h2 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.012em;
  overflow-wrap: anywhere;
}

.new {
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(126, 226, 184, 0.14);
  color: var(--mint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.meta .co {
  color: #ccd4e6;
  font-weight: 550;
}

.meta .sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--dim);
}

.meta .remote {
  color: var(--mint);
}

.tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.tag {
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  color: var(--muted);
  max-width: 100%;
  overflow-wrap: anywhere;
}

.why {
  font-size: 12px;
  color: var(--dim);
}

.why summary {
  list-style: none;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px dashed var(--line-2);
  cursor: pointer;
  color: var(--dim);
}

.why summary::-webkit-details-marker {
  display: none;
}

.why summary:hover {
  color: var(--muted);
}

.why[open] summary {
  color: var(--accent);
  border-color: rgba(147, 166, 255, 0.4);
}

.why-body {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
  flex-basis: 100%;
}

.job-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}

.match {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}

.match::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.match.top {
  color: var(--mint);
  background: rgba(126, 226, 184, 0.09);
  border-color: rgba(126, 226, 184, 0.28);
}

.match.strong {
  color: var(--strong);
  background: rgba(87, 227, 155, 0.08);
  border-color: rgba(87, 227, 155, 0.24);
}

.match.fair {
  color: var(--fair);
  background: rgba(143, 182, 255, 0.07);
  border-color: rgba(143, 182, 255, 0.22);
}

.match.low {
  color: var(--low);
  border-color: var(--line);
}

.actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.status-select {
  width: auto;
  height: 34px;
  padding: 0 26px 0 10px;
  border-radius: 9px;
  background-color: transparent;
  background-position: right 9px center;
  background-size: 11px;
  font-size: 11.5px;
  color: var(--muted);
}

.status-select:hover {
  color: var(--text);
  border-color: var(--line-2);
}

.apply {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: #0a0d14;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 18px -10px rgba(147, 166, 255, 0.9);
}

.apply:hover {
  filter: brightness(1.06);
}

.apply svg {
  width: 11px;
  height: 11px;
}

/* ---------- states ---------- */

.skeleton .skel {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 16px;
  align-items: center;
  padding: 17px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--panel);
}

.skel-tile {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: #171d29;
}

.skel-lines {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.skel-lines i {
  display: block;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #161c27 25%, #1e2534 37%, #161c27 63%);
  background-size: 300% 100%;
  animation: shimmer 1.5s linear infinite;
}

.skel-lines i:nth-child(2) {
  width: 46%;
  height: 8px;
}

.skel-lines i:nth-child(3) {
  width: 28%;
  height: 8px;
}

@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: 0 0;
  }
}

.empty {
  margin-top: 10px;
  padding: 54px 20px;
  text-align: center;
  border-radius: var(--r);
  border: 1px dashed var(--line-2);
}

.empty-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--dim);
  margin-bottom: 14px;
}

.empty-icon svg {
  width: 20px;
  height: 20px;
}

.empty-title {
  margin: 0 0 5px;
  font-weight: 600;
}

.empty-text {
  margin: 0;
  font-size: 13px;
  color: var(--dim);
}

/* ---------- footer ---------- */

.foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--dim);
}

.foot p {
  margin: 0;
  max-width: 62ch;
}

.foot b {
  color: var(--muted);
  font-weight: 600;
}

.foot-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.2);
  text-underline-offset: 3px;
  cursor: pointer;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
}

#minScore {
  min-height: 24px;
}

.link:hover {
  color: var(--accent);
}

/* ---------- intro ---------- */

.intro {
  position: relative;
  width: min(560px, calc(100vw - 28px));
  padding: 24px 26px 22px;
  border-radius: 22px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #12171f, #0c1016);
  color: var(--text);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.9);
}

.intro::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(147, 166, 255, 0.55), transparent);
}

.intro::backdrop {
  background: rgba(4, 6, 10, 0.74);
  backdrop-filter: blur(5px);
}

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

.intro-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

.intro-eyebrow::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
}

.intro h2 {
  margin: 12px 0 0;
  font-size: 25px;
  font-weight: 660;
  letter-spacing: -0.03em;
}

.intro-lead {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
}

.intro-list {
  display: grid;
  gap: 14px;
  margin: 20px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.intro-list li {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #b9c2d6;
}

.intro-key {
  padding-top: 1px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}

.intro-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}

.intro-close {
  padding: 2px 7px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--dim);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.intro-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.primary {
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: #0a0d14;
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
}

.primary:hover {
  filter: brightness(1.06);
}

.ghost {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  font-size: 12.5px;
  text-decoration: none;
}

.ghost:hover {
  color: var(--text);
}

/* ---------- responsive ---------- */

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

  .rail {
    position: static;
    gap: 16px;
  }

  .chips {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  .chip {
    font-size: 12.5px;
  }
}

@media (max-width: 680px) {
  .shell {
    padding: 18px 14px calc(48px + env(safe-area-inset-bottom));
  }

  .hero {
    padding-bottom: 20px;
  }

  .hero h1 {
    margin-top: 20px;
    gap: 10px;
  }

  .stamps {
    width: 100%;
  }

  .job {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .tile {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    font-size: 12.5px;
  }

  .job-side {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .job-side {
    flex-wrap: wrap;
  }

  .actions {
    flex: 1;
    min-width: 0;
    justify-content: flex-end;
  }

  .status-select {
    flex: 1;
    max-width: 140px;
    height: 38px;
  }

  .apply {
    height: 38px;
  }

  .intro {
    padding: 20px 18px 18px;
  }

  .intro-list li {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .foot-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* Touch screens: every control gets a 44px hit area without changing the desktop look. */
@media (pointer: coarse) {
  .link,
  .rail button,
  .chip {
    min-height: 44px;
  }

  .link {
    padding: 0 4px;
  }

  #minScore {
    min-height: 44px;
  }

  .status-select,
  .apply {
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
