:root {
  --bg: #f3f2ef;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --ink: #1f2328;
  --muted: #667085;
  --line: #d9dee7;
  --nav: #ffffff;
  --nav-2: #eef4fb;
  --blue: #0a66c2;
  --blue-dark: #004182;
  --teal: #167e76;
  --green: #247253;
  --gold: #b7791f;
  --red: #b43a42;
  --violet: #6655a3;
  --shadow: 0 10px 24px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

button,
select,
textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 22px;
  padding: 22px;
  max-width: 1480px;
  margin: 0 auto;
}

.sidebar {
  padding: 18px;
  background: var(--nav);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  align-self: start;
  position: sticky;
  top: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
  border: 1px solid var(--blue);
  border-radius: 8px;
}

.brand h1 {
  margin: 0;
  font-size: 1.35rem;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.nav-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 4px;
  margin-bottom: 18px;
  background: #edf3f8;
  border: 1px solid #d7e4ef;
  border-radius: 8px;
}

.nav-tab,
.primary-button,
.secondary-button {
  min-height: 42px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
}

.nav-tab {
  background: var(--nav-2);
  color: #334155;
  border-color: transparent;
  border-radius: 6px;
  min-width: 0;
  padding: 0 8px;
  font-size: 0.88rem;
}

.nav-tab.active {
  background: var(--blue);
  color: #fff;
}

.control-panel {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

label {
  color: #344054;
  font-size: 0.86rem;
  font-weight: 800;
}

select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
}

select {
  height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 250px;
  padding: 12px;
  resize: vertical;
  line-height: 1.5;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.primary-button {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  border-radius: 6px;
}

.primary-button:hover {
  background: var(--blue-dark);
  color: #fff;
}

.secondary-button {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
  border-radius: 6px;
}

.workspace {
  padding: 0;
  min-width: 0;
  background: transparent;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.workspace-header h2 {
  color: #182230;
}

.header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

h2,
h3,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0;
}

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

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

.metric-card {
  min-height: 104px;
  min-width: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--blue);
}

.metric-card:nth-child(2)::before {
  background: var(--teal);
}

.metric-card:nth-child(3)::before {
  background: var(--violet);
}

.metric-card:nth-child(4)::before {
  background: var(--gold);
}

.metric-card:nth-child(5)::before {
  background: var(--green);
}

.metric-card span,
.panel-heading span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.metric-card strong {
  display: block;
  font-size: clamp(1.08rem, 1.45vw, 1.45rem);
  line-height: 1.08;
  overflow-wrap: normal;
  word-break: normal;
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 18px;
}

.two-column,
.resume-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.panel {
  padding: 20px;
  position: relative;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--blue);
  border-radius: 8px 8px 0 0;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.panel-heading h3,
.matrix-card h4,
.cert-card h4,
.gap-card h4,
.check-card h4,
.bullet-card h4 {
  color: #182230;
}

.bar-list,
.gap-list,
.cert-grid,
.matrix-grid,
.checklist-grid,
.bullet-list,
.comparison-grid,
.dataset-table {
  display: grid;
  gap: 12px;
}

.bar-item {
  display: grid;
  gap: 6px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.bar-track {
  height: 12px;
  background: #edf2f7;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 999px;
}

.roadmap {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.55;
}

.roadmap li + li {
  margin-top: 10px;
}

.summary {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.mini-label {
  display: block;
  margin-bottom: 7px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.matrix-card,
.cert-card,
.gap-card,
.check-card,
.bullet-card,
.comparison-card,
.empty-state {
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 8px;
}

.empty-state {
  color: var(--muted);
  line-height: 1.55;
}

.matrix-card h4,
.cert-card h4,
.gap-card h4,
.check-card h4,
.bullet-card h4,
.comparison-card h4 {
  margin: 0 0 8px;
}

.cert-card.priority {
  border-left: 4px solid var(--blue);
}

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

.comparison-card {
  border-left: 4px solid var(--line);
}

.comparison-card.active {
  border-left-color: var(--blue);
  background: #f3f8fd;
}

.dataset-row {
  display: grid;
  grid-template-columns: 1.1fr 0.45fr 0.65fr 1.5fr;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 8px;
  color: var(--muted);
  line-height: 1.4;
}

.dataset-row.heading {
  background: #e7f0fa;
  color: var(--blue-dark);
  font-weight: 900;
}

.priority-label {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 8px;
  background: #e7f0fa;
  color: var(--blue-dark);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 8px;
  background: #e7f0fa;
  color: var(--blue-dark);
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: 999px;
}

#resumeText {
  min-height: 310px;
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--ink);
}

.full-width {
  width: 100%;
  margin-top: 12px;
}

.gap-card.missing {
  border-left: 4px solid var(--red);
}

.gap-card.present {
  border-left: 4px solid var(--green);
}

.check-card.done {
  border-left: 4px solid var(--green);
}

.check-card.todo,
.bullet-card {
  border-left: 4px solid var(--gold);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .metrics-grid,
  .two-column,
  .resume-grid,
  .role-grid,
  .comparison-grid,
  .dataset-row {
    grid-template-columns: 1fr;
  }


  .sidebar,
  .workspace {
    padding: 0;
  }

  .sidebar {
    position: static;
    padding: 16px;
  }

  .workspace-header {
    padding: 18px;
  }
}
