:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #5b6878;
  --line: #d8e1ea;
  --paper: #f8faf7;
  --panel: #ffffff;
  --teal: #087e8b;
  --green: #4f8a3f;
  --coral: #e0523f;
  --gold: #c98b1f;
  --blue: #3266a8;
  --shadow: 0 18px 50px rgba(23, 33, 43, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    linear-gradient(90deg, rgba(8, 126, 139, 0.08), transparent 28%),
    linear-gradient(180deg, #eef6f3, var(--paper));
}

button {
  font: inherit;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  min-height: 100vh;
  padding: 24px;
}

.stage,
.career-deck {
  min-width: 0;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(216, 225, 234, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.stage {
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 3vw, 36px);
}

.topbar,
.section-heading,
.quiz-actions,
.result-hero,
.deck-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow,
.chapter {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.02;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 3vw, 3.1rem);
  line-height: 1.06;
}

h3 {
  margin-bottom: 14px;
  font-size: 1rem;
}

.screen {
  display: none;
  flex: 1;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

.hud {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 32px 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.meter {
  flex: 1;
  height: 10px;
  overflow: hidden;
  background: #e7edf2;
  border-radius: 999px;
}

.meter span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--teal), var(--blue));
  transition: width 220ms ease;
}

.question-panel {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 22px;
}

.question-art {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  background: #dce9e6;
}

.question-art.clickable {
  cursor: pointer;
}

.question-art.clickable::after {
  content: "Start quiz";
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  color: white;
  background: rgba(23, 33, 43, 0.78);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.question-art.clickable:hover,
.question-art.clickable:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 126, 139, 0.18);
  outline: none;
}

.question-art img,
.result-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.question-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 220px;
  padding: clamp(22px, 4vw, 42px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.answer-card {
  min-height: 112px;
  padding: 18px;
  color: var(--ink);
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.answer-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
}

.answer-card span {
  color: var(--muted);
  line-height: 1.45;
}

.answer-card:hover,
.answer-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--teal);
  outline: none;
}

.answer-card.selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 126, 139, 0.18);
}

.primary-button,
.ghost-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  cursor: pointer;
  min-height: 44px;
}

.primary-button,
.ghost-button {
  padding: 0 18px;
  font-weight: 800;
}

.primary-button {
  color: white;
  background: var(--teal);
  border: 1px solid var(--teal);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.ghost-button,
.icon-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
}

.icon-button {
  width: 44px;
  padding: 0;
  flex: 0 0 44px;
}

.result-hero {
  align-items: stretch;
  margin: 32px 0 22px;
  padding: clamp(22px, 4vw, 34px);
  color: white;
  background: linear-gradient(135deg, #0b6f78, #2d6f45 54%, #b76f20);
  border-radius: 8px;
}

.result-image {
  width: clamp(120px, 18vw, 190px);
  min-height: 150px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(23, 33, 43, 0.22);
}

.result-hero p {
  max-width: 760px;
  margin-bottom: 0;
  line-height: 1.55;
}

.result-hero .eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.score-badge {
  display: grid;
  place-items: center;
  min-width: 128px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
}

.score-badge span {
  font-size: 2.1rem;
  font-weight: 900;
}

.score-badge small {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
  text-transform: uppercase;
}

.feedback-panel {
  margin-bottom: 18px;
  padding: 20px;
  background: #fff9ec;
  border: 1px solid rgba(201, 139, 31, 0.35);
  border-radius: 8px;
}

.feedback-panel h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.feedback-panel p:not(.eyebrow) {
  max-width: 850px;
  color: var(--muted);
  line-height: 1.5;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.roadmap-panel,
.insight-panel {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.timeline {
  display: grid;
  gap: 14px;
}

.step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.step-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: white;
  font-weight: 900;
  background: var(--coral);
  border-radius: 50%;
}

.step h4 {
  margin: 0 0 5px;
}

.step p,
.insight-panel li,
.career-list p {
  color: var(--muted);
  line-height: 1.45;
}

.insight-panel ul {
  padding-left: 20px;
  margin: 0 0 22px;
}

.mini-matches {
  display: grid;
  gap: 10px;
}

.mini-match,
.career-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.mini-match strong,
.career-item strong {
  display: block;
  margin-bottom: 4px;
}

.quiz-label {
  display: block;
  margin-bottom: 4px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.career-deck {
  position: sticky;
  top: 24px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px;
}

.career-deck h2 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 2.4vw, 2.5rem);
}

.career-orbit {
  position: relative;
  min-height: 250px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.74)),
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(8, 126, 139, 0.14) 29px 30px),
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(8, 126, 139, 0.14) 29px 30px);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.career-orbit::before {
  content: "";
  position: absolute;
  inset: 42px;
  border: 2px solid rgba(8, 126, 139, 0.28);
  border-radius: 50%;
}

.node {
  position: absolute;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  color: white;
  font-size: 0.88rem;
  font-weight: 900;
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(23, 33, 43, 0.18);
}

.product {
  top: 24px;
  left: 30px;
  background: var(--coral);
}

.data {
  top: 42px;
  right: 24px;
  background: var(--blue);
}

.security {
  right: 62px;
  bottom: 24px;
  background: var(--teal);
}

.cloud {
  left: 72px;
  bottom: 28px;
  background: var(--green);
}

.maker {
  top: 92px;
  left: calc(50% - 38px);
  background: var(--gold);
}

.career-list {
  display: grid;
  gap: 10px;
}

.career-item {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.career-item:hover,
.career-item:focus-visible,
.career-item.active {
  transform: translateY(-2px);
  border-color: var(--accent, var(--teal));
  box-shadow: 0 0 0 3px rgba(8, 126, 139, 0.18);
  outline: none;
}

.career-thumb {
  width: 66px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 3px solid var(--accent, var(--teal));
  border-radius: 8px;
}

.career-list p {
  margin: 0;
  font-size: 0.92rem;
}

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

  .career-deck {
    position: static;
    max-height: none;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 12px;
  }

  .topbar,
  .result-hero,
  .quiz-actions {
    align-items: flex-start;
  }

  .question-panel,
  .answer-grid,
  .result-layout {
    grid-template-columns: 1fr;
  }

  .question-art {
    min-height: 160px;
  }

  .question-copy {
    min-height: 0;
  }

  .result-hero,
  .topbar {
    flex-direction: column;
  }

  .result-image {
    width: 100%;
    max-height: 240px;
  }

  .quiz-actions {
    justify-content: stretch;
  }

  .quiz-actions button {
    flex: 1;
  }
}
