:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #1f2937;
  --muted: #667085;
  --border: #dbe3ef;
  --border-strong: #c7d4e6;
  --accent: #0f172a;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(201, 214, 255, 0.45), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

a { color: inherit; }
button, input { font: inherit; }

.page-shell { min-height: 100vh; display: flex; flex-direction: column; }
.page-main { flex: 1; padding: 18px 0 36px; }
.page-container { width: min(1420px, calc(100% - 32px)); margin: 0 auto; display: grid; gap: 18px; }

.hero-card,
.metric-card,
.panel,
.job-item,
.professional-item,
.fit-card {
  position: relative;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(219, 227, 239, 0.95);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: visible;
}

.hero-card:has(.section-help[open]),
.metric-card:has(.section-help[open]),
.panel:has(.section-help[open]),
.job-item:has(.section-help[open]),
.professional-item:has(.section-help[open]),
.fit-card:has(.section-help[open]) {
  z-index: 120;
}

.hero-card {
  padding: 24px;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-eyebrow::before {
  display: none;
}

.hero-card__title,
.panel__title { margin: 0; color: #0f172a; }
.hero-card__title { font-size: 30px; line-height: 1.08; max-width: 760px; }
.hero-card__body,
.panel__subtitle,
.metric-card__hint,
.item-meta,
.item-body,
.fit-card__body,
.fit-card__list {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.hero-card__body { margin: 12px 0 0; max-width: 820px; }
.hero-card__actions,
.focus-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.button { background: var(--accent); color: #fff; }
.button-secondary {
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--accent);
}

.is-disabled {
  pointer-events: none;
  opacity: 0.5;
}

.metrics-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card { padding: 18px 20px; }
.metric-card__label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.metric-card__value {
  margin-top: 10px;
  color: #0f172a;
  font-size: 34px;
  font-weight: 800;
}
.metric-card__hint { margin-top: 8px; }

.workspace {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.2fr) minmax(300px, 1fr);
  gap: 16px;
}

.panel { padding: 20px; display: grid; gap: 16px; }
.panel__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.panel__header--focus { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.panel__subtitle { margin: 10px 0 0; }
.panel__body { display: grid; gap: 14px; min-width: 0; }

.search-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
}

.stack-list { display: grid; gap: 12px; }
.stack-list--grouped { gap: 16px; }

.item-group { display: grid; gap: 10px; }
.item-group__title {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.job-item,
.professional-item {
  padding: 16px;
  display: grid;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.job-item:hover,
.professional-item:hover,
.job-item.is-active,
.professional-item.is-active {
  border-color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.1);
}

.item-title-row,
.item-pill-row,
.fit-card__header,
.fit-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.item-title {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
}

.item-meta { margin: 0; }
.item-body { margin: 0; color: #475569; }

.panel__title--prominent {
  font-size: 34px;
  line-height: 1.04;
  letter-spacing: 0;
}

.section-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: none;
  z-index: 40;
}

.section-help > summary {
  list-style: none;
}

.section-help > summary::-webkit-details-marker {
  display: none;
}

.section-help__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(219, 227, 239, 0.95);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.section-help__trigger:hover {
  border-color: rgba(15, 23, 42, 0.2);
}

.section-help__popup {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: none;
  z-index: 80;
  width: min(380px, 82vw);
  padding: 13px 14px;
  border: 1px solid rgba(219, 227, 239, 0.95);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
  color: var(--muted);
}

.section-help__popup::before {
  content: "";
  position: absolute;
  right: 12px;
  top: -6px;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.98);
  border-left: 1px solid rgba(219, 227, 239, 0.95);
  border-top: 1px solid rgba(219, 227, 239, 0.95);
  transform: rotate(45deg);
}

.section-help[open] .section-help__popup {
  display: block;
}

.section-help__popup-title {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.section-help__popup-body {
  font-size: 13px;
  line-height: 1.6;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: #eff4fb;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.pill--direct {
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
}

.pill--platform {
  background: rgba(29, 78, 216, 0.12);
  color: #1d4ed8;
}

.fit-card { padding: 22px; min-height: 100%; }
.fit-card__empty {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.fit-card__title { margin: 0; font-size: 24px; line-height: 1.1; color: #0f172a; }
.fit-card__body { margin: 12px 0 0; }
.fit-card__list { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.fit-card__next {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: #334155;
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 1180px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .page-container { width: min(100%, calc(100% - 20px)); }
  .hero-card { flex-direction: column; }
  .metrics-grid { grid-template-columns: 1fr; }
  .panel__header--focus { flex-direction: column; }
  .panel__title-row { align-items: center; }
  .panel__title--prominent { font-size: 28px; }
}
