:root {
  --ink: #15202b;
  --muted: #5e6b77;
  --paper: #fffdf9;
  --surface: #ffffff;
  --line: #dde5e5;
  --navy: #183c56;
  --teal: #0e8f8f;
  --mint: #d8f1e9;
  --coral: #ee6b5f;
  --coral-soft: #ffe3df;
  --yellow: #f7c948;
  --green: #5b9c5a;
  --blue: #4b75b9;
  --shadow: 0 20px 50px rgba(21, 32, 43, 0.12);
  --radius: 8px;
  --content: min(1160px, calc(100vw - 32px));
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(216, 241, 233, 0.72), rgba(255, 253, 249, 0.92) 34%),
    var(--paper);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: var(--content);
  min-height: 72px;
  margin: 0 auto;
  padding: 14px 0;
}

.topbar::before {
  position: fixed;
  inset: 0 0 auto;
  z-index: -1;
  height: 72px;
  content: "";
  background: rgba(255, 253, 249, 0.86);
  border-bottom: 1px solid rgba(221, 229, 229, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-size: 0.96rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  background: var(--navy);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(24, 60, 86, 0.24);
}

.top-actions,
.hero-actions,
.result-actions,
.nav-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.primary-button {
  color: #fff;
  background: var(--coral);
  box-shadow: 0 12px 26px rgba(238, 107, 95, 0.28);
}

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

.ghost-button {
  color: var(--navy);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid transparent;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.ghost-button:focus-visible,
.scale-option:focus-within {
  outline: 3px solid rgba(14, 143, 143, 0.28);
  outline-offset: 3px;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
  transform: none;
  box-shadow: none;
}

[data-view] {
  display: none;
}

[data-view].active {
  display: block;
}

.hero-screen {
  position: relative;
  width: var(--content);
  min-height: calc(100vh - 122px);
  margin: 0 auto;
  padding: 36px 0 56px;
}

.hero-media {
  position: absolute;
  inset: 24px 0 34px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(21, 32, 43, 0.05), rgba(21, 32, 43, 0.42)),
    linear-gradient(180deg, rgba(255, 253, 249, 0.04), rgba(255, 253, 249, 0.62));
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  width: min(630px, 100%);
  min-height: calc(100vh - 214px);
  padding: clamp(32px, 5vw, 76px);
  color: #fff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-content .eyebrow {
  color: #c8fff2;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.7rem, 6vw, 5.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 60ch;
  margin: 22px 0 28px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1rem, 1.7vw, 1.16rem);
  line-height: 1.66;
}

.trust-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  background: rgba(21, 32, 43, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  backdrop-filter: blur(12px);
}

.test-screen,
.results-screen {
  width: var(--content);
  margin: 0 auto;
  padding: 28px 0 60px;
}

.test-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.test-sidebar,
.question-panel,
.result-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(21, 32, 43, 0.08);
}

.test-sidebar {
  position: sticky;
  top: 96px;
  padding: 24px;
}

.test-sidebar h2,
.results-hero h2,
.panel-heading h3 {
  margin: 0;
  color: var(--navy);
  line-height: 1.08;
  letter-spacing: 0;
}

.test-sidebar h2 {
  font-size: 2rem;
}

.test-sidebar p:not(.eyebrow),
.results-hero p,
.signal-item p,
.career-card p,
.step-card p {
  color: var(--muted);
  line-height: 1.58;
}

.progress-block {
  margin: 24px 0;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 900;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  background: #eaf1ef;
  border-radius: 999px;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--yellow), var(--coral));
  transition: width 240ms ease;
}

.section-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.section-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  border-radius: 8px;
}

.section-list li.active {
  color: var(--navy);
  background: var(--mint);
}

.section-list li.done::after {
  width: 10px;
  height: 10px;
  content: "";
  background: var(--green);
  border-radius: 50%;
}

.question-panel {
  min-height: 560px;
  padding: clamp(24px, 4vw, 44px);
}

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

.question-count {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
  background: var(--mint);
  border-radius: 8px;
}

.question-header h3 {
  max-width: 780px;
  margin: 18px 0 0;
  color: var(--ink);
  font-size: clamp(1.75rem, 3.2vw, 3rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.scale-field {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 18px 0 32px;
  border: 0;
}

.scale-option {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 132px;
  padding: 14px 10px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.scale-option:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(21, 32, 43, 0.08);
}

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

.scale-number {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin: 0 auto 10px;
  color: var(--navy);
  font-weight: 900;
  background: #f2f7f5;
  border-radius: 50%;
}

.scale-label {
  min-height: 40px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.22;
}

.scale-option:has(input:checked) {
  border-color: var(--teal);
  background: #f1fffb;
  box-shadow: 0 16px 34px rgba(14, 143, 143, 0.14);
}

.scale-option:has(input:checked) .scale-number {
  color: #fff;
  background: var(--teal);
}

.scale-option:has(input:checked) .scale-label {
  color: var(--navy);
}

.nav-row {
  justify-content: space-between;
}

.results-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
  padding: 32px;
  color: #fff;
  background:
    linear-gradient(110deg, rgba(24, 60, 86, 0.94), rgba(14, 143, 143, 0.9)),
    url("assets/vocacion-hero.png") center/cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.results-hero .eyebrow,
.results-hero h2,
.results-hero p {
  color: #fff;
}

.results-hero h2 {
  font-size: clamp(2rem, 4vw, 4rem);
}

.results-hero p {
  max-width: 72ch;
  margin: 14px 0 0;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.span-7 {
  grid-column: span 7;
}

.span-5 {
  grid-column: span 5;
}

.result-panel {
  padding: clamp(22px, 3vw, 30px);
  margin-bottom: 24px;
}

.panel-heading {
  margin-bottom: 20px;
}

.panel-heading h3 {
  font-size: clamp(1.35rem, 2.4vw, 2.2rem);
}

.score-list {
  display: grid;
  gap: 16px;
}

.score-item {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) 54px;
  gap: 14px;
  align-items: center;
}

.score-name {
  color: var(--navy);
  font-weight: 900;
}

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

.score-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--bar-color, var(--teal));
  border-radius: inherit;
}

.score-value {
  color: var(--navy);
  font-weight: 900;
  text-align: right;
}

.signal-list,
.career-grid,
.steps-grid {
  display: grid;
  gap: 14px;
}

.signal-item,
.career-card,
.step-card {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.signal-item h4,
.career-card h4,
.step-card h4 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 1.02rem;
}

.signal-item p,
.career-card p,
.step-card p {
  margin: 0;
  font-size: 0.96rem;
}

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

.career-card {
  border-top: 5px solid var(--teal);
}

.career-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.career-tags span {
  padding: 6px 8px;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 900;
  background: #f0f6f5;
  border-radius: 999px;
}

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

.step-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: 12px;
  color: #fff;
  font-weight: 900;
  background: var(--coral);
  border-radius: 8px;
}

.footer {
  width: var(--content);
  margin: 0 auto;
  padding: 8px 0 34px;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .topbar {
    min-height: 66px;
  }

  .topbar::before {
    height: 66px;
  }

  .hero-screen {
    min-height: auto;
    padding-top: 18px;
  }

  .hero-media {
    position: relative;
    inset: auto;
    height: min(62vh, 560px);
  }

  .hero-media::after {
    background:
      linear-gradient(180deg, rgba(21, 32, 43, 0.08), rgba(21, 32, 43, 0.68)),
      linear-gradient(90deg, rgba(21, 32, 43, 0.04), rgba(21, 32, 43, 0.12));
  }

  .hero-content {
    min-height: auto;
    margin-top: -390px;
    padding: 28px;
  }

  h1 {
    max-width: 13ch;
  }

  .test-layout,
  .results-hero,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .test-sidebar {
    position: static;
  }

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

  .question-panel {
    min-height: auto;
  }

  .scale-field,
  .career-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .scale-option {
    min-height: 76px;
    grid-template-columns: 46px 1fr;
    align-items: center;
    text-align: left;
  }

  .scale-number {
    margin: 0;
  }

  .scale-label {
    min-height: auto;
  }

  .span-7,
  .span-5 {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  :root {
    --content: min(100vw - 20px, 1160px);
  }

  .brand span:last-child {
    display: none;
  }

  .top-actions {
    gap: 6px;
  }

  .ghost-button {
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.86rem;
  }

  .hero-media {
    height: 600px;
  }

  .hero-content {
    margin-top: -600px;
    min-height: 600px;
    padding: 24px 18px;
  }

  .hero-actions,
  .result-actions,
  .nav-row {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions button,
  .result-actions button,
  .nav-row button {
    width: 100%;
  }

  .trust-row span {
    min-height: 32px;
    font-size: 0.82rem;
  }

  .section-list {
    grid-template-columns: 1fr;
  }

  .test-sidebar,
  .question-panel,
  .result-panel,
  .results-hero {
    padding: 20px;
  }

  .question-header {
    min-height: 128px;
  }

  .score-item {
    grid-template-columns: 1fr 48px;
  }

  .score-name {
    grid-column: 1 / -1;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .footer,
  .result-actions {
    display: none;
  }

  .results-screen,
  [data-view].active {
    display: block;
    width: 100%;
    padding: 0;
  }

  .results-hero,
  .result-panel {
    box-shadow: none;
    break-inside: avoid;
  }
}
