:root {
  color-scheme: light;
  --ink: #18202f;
  --muted: #647084;
  --line: #d9e0ea;
  --panel: #ffffff;
  --bg: #f5f7fb;
  --nav: #121926;
  --blue: #2563eb;
  --green: #14805e;
  --amber: #a16207;
  --red: #b42318;
  --soft-blue: #e8f0ff;
  --soft-green: #e8f7f0;
  --soft-amber: #fff6dc;
  --shadow: 0 18px 50px rgba(24, 32, 47, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  padding: 24px 18px;
  background: var(--nav);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #0f172a;
  background: #f5c542;
  font-weight: 800;
}

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

.brand span,
.metric-stack small {
  color: #aab6c8;
  font-size: 13px;
}

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

.nav a {
  color: #cbd5e1;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 8px;
}

.nav a.active,
.nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.metric-stack {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.metric-stack div {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.metric-stack span {
  display: block;
  font-size: 26px;
  font-weight: 800;
}

.shell {
  margin-left: 260px;
  padding: 30px;
}

.topbar,
.results-header,
.panel-heading,
.job-title-row,
.button-row,
.top-actions,
.filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  margin-bottom: 24px;
}

.topbar h1 {
  max-width: 820px;
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: 0;
}

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

.grid-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 20px;
  align-items: start;
}

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

.panel {
  padding: 20px;
}

.panel h2,
.results-header h2 {
  margin: 3px 0 0;
  font-size: 22px;
}

label {
  display: grid;
  gap: 7px;
  margin-top: 15px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 150px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  min-width: 238px;
  background: #f8fafc;
}

.segmented button {
  border: 0;
  padding: 9px 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.segmented button.active {
  background: var(--blue);
  color: #ffffff;
}

.primary-button,
.ghost-button,
.icon-button {
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  font-weight: 800;
}

.primary-button {
  background: var(--blue);
  color: #ffffff;
}

.ghost-button {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line);
}

.icon-button {
  width: 42px;
  padding: 0;
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
  font-size: 22px;
}

.hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.profile-block {
  margin-top: 16px;
  border-left: 4px solid var(--green);
  padding-left: 14px;
}

.profile-block p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.skill-cloud,
.target-list,
.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.skill-cloud {
  margin-top: 18px;
}

.target-list {
  margin-top: 16px;
}

.tag,
.company-chip,
.score-pill {
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.tag {
  background: #eef2f7;
  color: #334155;
}

.company-chip {
  background: var(--soft-amber);
  color: var(--amber);
}

.score-pill {
  background: var(--soft-green);
  color: var(--green);
}

.results-layout,
.saved-layout {
  margin-top: 26px;
}

.filters {
  align-items: end;
}

.filters label {
  width: 190px;
  margin: 0;
}

.job-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

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

.job-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
}

.company-line,
.reason {
  color: var(--muted);
}

.company-line {
  margin: 5px 0 0;
}

.reason {
  margin: 12px 0;
  line-height: 1.5;
}

.job-actions {
  display: grid;
  gap: 10px;
  min-width: 118px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 22px;
  color: var(--muted);
  background: #ffffff;
}

@media (max-width: 980px) {
  .sidebar {
    position: static;
    width: auto;
    padding: 16px;
  }

  .nav,
  .metric-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shell {
    margin-left: 0;
    padding: 18px;
  }

  .grid-layout,
  .two-col {
    grid-template-columns: 1fr;
  }

  .topbar,
  .results-header,
  .panel-heading,
  .job-card {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .filters,
  .top-actions,
  .button-row {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .nav,
  .metric-stack {
    grid-template-columns: 1fr;
  }

  .segmented {
    min-width: 0;
    width: 100%;
  }

  .filters {
    display: grid;
  }

  .filters label {
    width: 100%;
  }
}
