/* =====================================================================
   Sunshine Career styles
   Colours and fonts are set once here. Change a value below and the
   whole site follows.
   ===================================================================== */

:root {
  color-scheme: light;

  /* Core palette */
  --ink: #18212f; /* main text, outlines */
  --slate: #566173; /* secondary text */
  --desk: #f3f5f8; /* page background */
  --sheet: #ffffff; /* cards and panels */
  --wash: #f7f8fa; /* soft inner panels */
  --rule: #dde2e8; /* borders and dividers */
  --rule-strong: #c3cad4; /* input and button borders */
  --marigold: #f2a93b; /* the one accent colour: buttons, selected answers, progress */
  --marigold-hover: #e6992a;
  --marigold-tint: #fdf1dc;
  --danger: #b42318;
  --success: #1e6b3a;
  --success-tint: #e3f1e7;

  /* Kept for inline styles that reference it */
  --primary: var(--ink);

  --shadow-sheet: 0 1px 2px rgb(24 33 47 / 0.05), 0 16px 36px -20px rgb(24 33 47 / 0.18);

  /* Shape rule: controls 10px, inner cards 12px, page sheet 20px, chips fully round */
  --radius-control: 10px;
  --radius-card: 12px;
  --radius-sheet: 20px;

  --font: "Anek Latin", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 106.25%; /* 17px base: Anek Latin runs small */
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgb(24 33 47 / 0.08);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font);
  font-weight: 700;
  font-stretch: 92%;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink);
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

a {
  color: var(--ink);
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--ink);
}

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

button {
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

:is(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

#content:focus {
  outline: none;
}

/* ---------------------------------------------------------------------
   Page shell, navigation, footer
   --------------------------------------------------------------------- */

.app-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100dvh;
  margin: 0 auto;
  padding-block: 12px 32px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.site-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 64px;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 0;
  z-index: 10;
  padding: 10px 14px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--ink);
  color: var(--sheet);
  font-weight: 600;
  transform: translateY(-160%);
}

.skip-link:focus-visible {
  transform: none;
}

.site-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  font-stretch: 92%;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--marigold);
  box-shadow: inset 0 0 0 2px var(--ink);
}

.brand-word {
  margin-left: -4px;
  font-weight: 500;
  color: var(--slate);
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.site-nav-link {
  padding: 8px 12px;
  border-radius: var(--radius-control);
  color: var(--slate);
  font-weight: 500;
  font-size: 0.96rem;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.site-nav-link:hover {
  background: rgb(24 33 47 / 0.06);
  color: var(--ink);
}

.site-nav-link.active {
  background: var(--sheet);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--rule);
}

.site-nav-cta {
  margin-left: 8px;
  padding-inline: 16px;
  background: var(--marigold);
  color: var(--ink);
  font-weight: 600;
}

.site-nav-cta:hover,
.site-nav-cta.active {
  background: var(--marigold-hover);
  box-shadow: none;
}

.site-nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-control);
  background: var(--sheet);
}

.site-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.site-nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 880px) {
  .site-nav-toggle {
    display: inline-flex;
  }

  .site-nav-links {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 6px;
    border: 1px solid var(--rule);
    border-radius: var(--radius-card);
    background: var(--sheet);
    box-shadow: var(--shadow-sheet);
  }

  .site-nav-links.open {
    display: flex;
  }

  .site-nav-link {
    padding: 12px 14px;
  }

  .site-nav-link.active {
    box-shadow: none;
    background: var(--wash);
  }

  .site-nav-cta {
    margin: 4px 0 0;
    text-align: center;
  }
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-block: 12px 0;
  text-align: center;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
}

.site-footer-link {
  padding: 6px 0;
  color: var(--slate);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}

.site-footer-link:hover {
  color: var(--ink);
  text-decoration: underline;
}

.site-footer-copy {
  margin: 0;
  color: var(--slate);
  font-size: 0.86rem;
}

/* ---------------------------------------------------------------------
   Screens ("sheets")
   --------------------------------------------------------------------- */

.hero-screen,
.content-screen,
.assessment-screen,
.results-screen {
  width: 100%;
  min-width: 0;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sheet);
  box-shadow: var(--shadow-sheet);
}

.content-screen,
.assessment-screen,
.results-screen {
  padding: clamp(22px, 4.5vw, 48px);
}

.screen-heading {
  margin-bottom: 8px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}

.screen-heading h1,
.results-heading h1 {
  font-size: clamp(1.85rem, 3.4vw, 2.5rem);
  letter-spacing: -0.02em;
}

.screen-heading p {
  max-width: 68ch;
  margin: 8px 0 0;
  color: var(--slate);
  font-size: 1.05rem;
}

/* ---------------------------------------------------------------------
   Buttons, links, forms
   --------------------------------------------------------------------- */

.actions,
.form-actions,
.assessment-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.actions {
  margin-top: 28px;
}

.form-actions {
  justify-content: flex-end;
  margin-top: 28px;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.primary-button {
  background: var(--marigold);
  color: var(--ink);
}

.primary-button:hover:not(:disabled) {
  background: var(--marigold-hover);
}

.secondary-button {
  background: var(--sheet);
  color: var(--ink);
  border-color: var(--rule-strong);
}

.secondary-button:hover:not(:disabled) {
  border-color: var(--ink);
}

.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled) {
  transform: translateY(1px);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 3px;
}

.link-button:hover {
  text-decoration-color: var(--ink);
}

.student-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
  margin-top: 24px;
}

.student-form .form-actions {
  grid-column: 1 / -1;
  margin-top: 8px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.96rem;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-control);
  background: var(--sheet);
  color: var(--ink);
  font-weight: 400;
  transition: border-color 0.15s ease;
}

textarea {
  padding: 12px 14px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--slate);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--slate);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--ink);
  outline-offset: 1px;
}

.optional-tag {
  color: var(--slate);
  font-weight: 400;
  font-size: 0.86rem;
}

.validation-message {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--danger);
  font-weight: 500;
  font-size: 0.95rem;
}

.validation-message.success-message {
  color: var(--success);
}

.note {
  max-width: 68ch;
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-control);
  background: var(--marigold-tint);
  color: var(--ink);
  font-size: 0.95rem;
}

/* ---------------------------------------------------------------------
   Home and welcome hero
   --------------------------------------------------------------------- */

.hero-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  align-items: center;
  gap: 24px 48px;
  padding: clamp(24px, 5vw, 56px);
}

.hero-content h1 {
  max-width: 22ch;
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  font-stretch: 86%;
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.hero-copy {
  max-width: 46ch;
  margin: 18px 0 0;
  color: var(--slate);
  font-size: 1.15rem;
}

.fact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  color: var(--slate);
}

.fact-list li {
  padding: 0 16px;
}

.fact-list li:first-child {
  padding-left: 0;
}

.fact-list li + li {
  border-left: 1px solid var(--rule-strong);
}

.fact-list strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* The answer-bubble list of interest areas */
.hero-panel {
  display: grid;
  padding: 6px 20px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  background: var(--wash);
}

.area-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
}

.hero-panel .area-chip + .area-chip {
  border-top: 1px solid var(--rule);
}

.area-chip span {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid var(--area-color);
  border-radius: 50%;
  background: var(--sheet);
  color: var(--area-color);
  font-weight: 700;
}

.area-chip strong {
  font-weight: 600;
  font-size: 1rem;
}

.home-extras {
  grid-column: 1 / -1;
  display: grid;
  border-top: 1px solid var(--rule);
}

.home-extras .home-section {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  column-gap: 40px;
  padding: 32px 0;
}

.home-extras .home-section > * {
  grid-column: 2;
}

.home-extras .home-section > h2 {
  grid-column: 1;
  grid-row: 1 / span 8;
  align-self: start;
}

.home-extras .home-section:last-child {
  padding-bottom: 0;
}

.home-section + .home-section {
  border-top: 1px solid var(--rule);
}

.home-section h2 {
  font-size: 1.35rem;
}

.home-section p {
  max-width: 68ch;
  margin: 10px 0 0;
  color: var(--slate);
}

.home-extras .home-section > h2 + p {
  margin-top: 0;
}

.home-extras .strength-list {
  margin-top: 0;
}

.sample-result-card {
  max-width: 560px;
  margin-top: 16px;
}

.pricing-teaser-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-top: 12px;
}

.pricing-teaser-amount {
  font-size: 2.2rem;
  font-weight: 700;
  font-stretch: 92%;
  font-variant-numeric: tabular-nums;
}

.pricing-teaser-label {
  color: var(--slate);
}

/* The list of tests and prices on the home page. */
.home-pricing-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.home-pricing-list .dashboard-row {
  padding: 16px 0;
}

.home-pricing-list .dashboard-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

/* Let a long test name wrap inside the row, so the button stays on the same line. */
.home-pricing-list .dashboard-row-info {
  flex: 1 1 240px;
}

.home-pricing-list .pricing-teaser-amount {
  font-size: 1.4rem;
}

/* ---------------------------------------------------------------------
   Content pages (About, FAQ, How it works, legal)
   --------------------------------------------------------------------- */

.about-wrapper {
  display: grid;
}

.about-wrapper .home-section {
  padding: 28px 0;
}

.about-wrapper .home-section:last-child {
  padding-bottom: 0;
}

.faq-list {
  margin-top: 12px;
  border-top: 1px solid var(--rule);
}

.faq-item {
  border-bottom: 1px solid var(--rule);
}

.faq-item summary {
  position: relative;
  padding: 16px 40px 16px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 4px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--rule-strong);
  border-radius: 50%;
  color: var(--ink);
  font-weight: 600;
  line-height: 1;
  transform: translateY(-50%);
}

.faq-item[open] summary::after {
  content: "\2212";
  background: var(--marigold);
  border-color: var(--ink);
}

.faq-item p {
  max-width: 70ch;
  margin: 0 0 18px;
  color: var(--slate);
}

.riasec-about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.riasec-about-card {
  padding: 18px;
  border-radius: var(--radius-card);
  background: var(--wash);
}

.riasec-about-card .area-chip {
  padding: 0 0 6px;
}

.riasec-about-card p {
  margin: 8px 0 0;
  font-size: 0.96rem;
}

/* How it works: a numbered sequence */
.interpretation-grid.how-it-works-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  max-width: 780px;
}

.how-it-works-grid .interpretation-card {
  padding: 20px 0;
  border: 0;
  border-radius: 0;
  background: none;
}

.how-it-works-grid .interpretation-card + .interpretation-card {
  border-top: 1px solid var(--rule);
}

.how-it-works-grid .interpretation-card > p {
  margin-left: 50px;
}

.how-it-works-grid .interpretation-card .form-actions {
  justify-content: flex-start;
  margin: 14px 0 0 50px;
}

.about-wrapper > .home-section:first-child .how-it-works-grid .interpretation-card:first-child {
  padding-top: 0;
}

/* ---------------------------------------------------------------------
   Pricing, tests, login
   --------------------------------------------------------------------- */

.pricing-wrapper {
  display: flex;
  margin-top: 24px;
}

.pricing-card {
  width: min(480px, 100%);
  padding: 28px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  background: var(--sheet);
}

.pricing-plan-tag {
  margin: 0 0 12px;
  color: var(--slate);
  font-weight: 600;
}

.pricing-amount-row {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.pricing-currency {
  font-size: 1.7rem;
  font-weight: 600;
  transform: translateY(-5px);
}

.pricing-amount {
  font-size: 3.4rem;
  font-weight: 700;
  font-stretch: 90%;
  letter-spacing: -0.02em;
}

.pricing-amount-suffix {
  margin-left: 2px;
  font-size: 1.4rem;
  font-weight: 600;
  transform: translateY(-4px);
}

.pricing-amount-words {
  margin: 10px 0 0;
  color: var(--slate);
  font-size: 0.92rem;
  font-style: italic;
}

.pricing-note {
  margin: 8px 0 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
  color: var(--slate);
  font-size: 0.95rem;
}

.pricing-feature-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pricing-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.pricing-check {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--marigold);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
}

.pricing-paid-note {
  margin: 18px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius-control);
  background: var(--success-tint);
  color: var(--success);
  font-weight: 600;
}

/* Pricing page: one card per test, side by side where there is room. */
.pricing-list {
  flex-wrap: wrap;
  gap: 16px;
}

.pricing-list .pricing-card {
  flex: 1 1 300px;
  width: auto;
  max-width: 480px;
}

/* Same note, but for a test whose one paid attempt has already been used. */
.pricing-paid-note.is-used {
  background: var(--marigold-tint);
  color: var(--ink);
}

.pricing-test-note {
  margin: 18px 0 0;
  padding: 10px 14px;
  border: 1px dashed var(--ink);
  border-radius: var(--radius-control);
  background: var(--marigold-tint);
  font-size: 0.95rem;
  font-weight: 500;
}

.pricing-card .form-actions {
  justify-content: flex-start;
}

.tests-wrapper {
  display: grid;
}

.tests-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  align-items: start;
  gap: 24px 40px;
  padding: 32px 0;
}

.tests-card + .tests-card {
  border-top: 1px solid var(--rule);
}

.tests-card:last-child {
  padding-bottom: 0;
}

.tests-card-title {
  font-size: 1.6rem;
}

.tests-card-intro {
  max-width: 68ch;
  margin: 10px 0 0;
  font-size: 1.05rem;
}

.tests-card-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.tests-card-details h3 {
  font-size: 0.98rem;
  font-weight: 600;
  font-stretch: 100%;
}

.tests-card-details p {
  margin: 4px 0 0;
  color: var(--slate);
  font-size: 0.95rem;
}

.tests-card-aside {
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--wash);
}

.tests-fact {
  margin: 0 0 12px;
  color: var(--slate);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.tests-card-aside .pricing-amount {
  font-size: 2.6rem;
}

.tests-card-aside .pricing-currency {
  font-size: 1.35rem;
}

.tests-card-aside .pricing-amount-suffix {
  font-size: 1.1rem;
}

.tests-card-aside .pricing-note {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.tests-card-aside .form-actions {
  margin-top: 16px;
}

.tests-card-aside .primary-button {
  width: 100%;
}

.login-card {
  width: min(440px, 100%);
  padding: 0;
  border: 0;
}

.login-card .student-form {
  grid-template-columns: 1fr;
  margin-top: 0;
}

.login-card .form-actions {
  justify-content: flex-start;
}

.login-card .primary-button {
  min-width: 140px;
}

.login-feedback {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-control);
  background: var(--marigold-tint);
  font-size: 0.95rem;
}

.login-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  color: var(--slate);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: 32px;
  margin-top: 24px;
}

.contact-details {
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--wash);
}

.contact-details h2 {
  font-size: 1.25rem;
}

.contact-details p {
  margin: 10px 0 0;
  color: var(--slate);
}

.contact-form {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 0;
}

/* ---------------------------------------------------------------------
   Dashboards
   --------------------------------------------------------------------- */

.dashboard-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dashboard-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}

.dashboard-row-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  min-width: 0;
}

.dashboard-row-info strong {
  font-size: 1.08rem;
  font-weight: 600;
}

.dashboard-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-row-hint {
  flex-basis: 100%;
  color: var(--slate);
  font-size: 0.95rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--wash);
  color: var(--slate);
  font-size: 0.82rem;
  font-weight: 600;
}

.status-chip.is-paid {
  border-color: transparent;
  background: var(--success-tint);
  color: var(--success);
}

.dashboard-row.is-loading .status-chip {
  animation: soft-pulse 1.2s ease-in-out infinite alternate;
}

@keyframes soft-pulse {
  to {
    opacity: 0.45;
  }
}

.dashboard-note {
  margin: 18px 0 0;
  color: var(--slate);
  font-size: 0.95rem;
}

.table-wrap {
  margin-top: 24px;
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
}

.results-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.results-table th,
.results-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.results-table th {
  background: var(--wash);
  font-weight: 600;
  white-space: nowrap;
}

.results-table tbody tr:last-child td {
  border-bottom: 0;
}

/* ---------------------------------------------------------------------
   Test flow: student details, instructions, questions
   --------------------------------------------------------------------- */

.instruction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.instruction-grid article {
  padding: 22px;
  border-radius: var(--radius-card);
  background: var(--wash);
}

.instruction-grid h2,
.scale-card h2 {
  font-size: 1.1rem;
}

.instruction-grid p {
  margin: 8px 0 0;
  color: var(--slate);
}

.scale-card {
  margin-top: 14px;
  padding: 22px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
}

.scale-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.scale-list div {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.scale-list strong {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-weight: 700;
}

.scale-list span {
  color: var(--slate);
  font-size: 0.95rem;
  line-height: 1.35;
}

.assessment-top,
.results-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.question-count {
  margin: 0 0 10px;
  color: var(--slate);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.assessment-top h1 {
  max-width: 34ch;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  font-weight: 650;
  line-height: 1.2;
}

.answered-pill {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--wash);
  color: var(--slate);
  font-size: 0.88rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.progress-track {
  height: 6px;
  margin: 24px 0 28px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--desk);
}

.progress-track span {
  display: block;
  height: 100%;
  background: var(--marigold);
  transform-origin: left center;
  transition: transform 0.25s ease;
}

/* Answer bubbles: an empty ring that fills in when chosen, like an OMR sheet */
.rating-group {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.rating-option {
  min-height: 132px;
  padding: 18px 10px 16px;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 12px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-card);
  background: var(--sheet);
  color: var(--ink);
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.rating-option strong {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--sheet);
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.rating-option span {
  color: var(--slate);
  font-size: 0.93rem;
  line-height: 1.3;
}

.rating-option:hover {
  border-color: var(--ink);
}

.rating-option:hover strong {
  background: var(--marigold-tint);
}

.rating-option.selected {
  border-color: var(--ink);
  background: var(--marigold-tint);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.rating-option.selected strong {
  background: var(--marigold);
  transform: scale(1.06);
}

.rating-option.selected span {
  color: var(--ink);
  font-weight: 600;
}

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

.mcq-option {
  min-height: 68px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.mcq-option strong {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  font-size: 1rem;
}

.mcq-option span {
  color: var(--ink);
  font-size: 1.02rem;
}

.assessment-actions {
  justify-content: space-between;
  margin-top: 8px;
}

/* ---------------------------------------------------------------------
   Results report
   --------------------------------------------------------------------- */

.results-heading {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--slate);
  font-weight: 600;
}

.code-badge {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
}

.code-badge span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--area-color);
  color: #fff;
  font-size: 1.45rem;
  font-weight: 700;
}

.student-details-card {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px 20px;
  border-radius: var(--radius-card);
  background: var(--wash);
}

.student-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.student-detail-label {
  color: var(--slate);
  font-size: 0.85rem;
  font-weight: 500;
}

.student-detail-value {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
}

.results-layout > :only-child {
  grid-column: 1 / -1;
}

.score-card,
.profile-card,
.interpretation-card,
.career-card,
.disclaimer-card,
.counsellor-card {
  padding: 22px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  background: var(--sheet);
}

.score-card h2,
.profile-card h2,
.career-card h2,
.counsellor-card h2 {
  font-size: 1.2rem;
}

.profile-card p,
.interpretation-card p,
.career-card p,
.disclaimer-card p,
.counsellor-card p {
  max-width: 72ch;
  margin: 10px 0 0;
  color: var(--slate);
}

/* Sub-headings inside a report card, e.g. each trade-off in the Career Values report */
.profile-card h3 {
  margin: 18px 0 0;
  font-size: 1rem;
}

.score-bars,
.top-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.score-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.score-label strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.score-label span {
  color: var(--slate);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rank-badge {
  min-width: 30px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: var(--desk);
  color: var(--ink) !important;
  font-size: 0.8rem;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--desk);
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  transform-origin: left center;
  animation: bar-grow 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes bar-grow {
  from {
    transform: scaleX(0);
  }
}

.top-list article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--area-color) 7%, white);
}

.top-list article > span,
.interpretation-title span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--area-color);
  color: #fff;
  font-weight: 700;
}

.top-list h3 {
  padding-top: 6px;
  font-size: 1.08rem;
}

.top-list p {
  margin: 6px 0 0;
  color: var(--slate);
}

.top-list h4,
.interpretation-card h4 {
  margin: 14px 0 6px;
  font-size: 0.95rem;
  font-weight: 600;
  font-stretch: 100%;
}

.top-list ul,
.interpretation-card ul,
.guide-grid ul {
  margin: 0;
  padding-left: 20px;
  color: var(--slate);
}

.interpretation-section {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

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

/* Four or five cards (Big Five, Aptitude) read better as two columns */
.interpretation-grid:not(.how-it-works-grid):has(> :nth-child(4)) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.interpretation-card {
  background: color-mix(in srgb, var(--area-color) 5%, white);
}

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

.interpretation-title h3 {
  font-size: 1.08rem;
}

.strength-list {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--slate);
}

.interpretation-card li + li,
.strength-list li + li,
.guide-grid li + li,
.top-list li + li {
  margin-top: 4px;
}

.career-area-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.career-area-list span {
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--wash);
  font-size: 0.93rem;
  font-weight: 500;
}

.disclaimer-card {
  background: var(--marigold-tint);
  border-color: transparent;
}

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

.guide-grid {
  margin-top: 14px;
}

.guide-grid div {
  padding: 16px;
  border-radius: var(--radius-control);
  background: var(--wash);
}

.guide-grid h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.result-actions {
  justify-content: space-between;
  margin-top: 24px;
}

.print-report-table {
  display: block;
  width: 100%;
  border-collapse: collapse;
}

.print-report-table > thead,
.print-report-table > tfoot {
  display: none;
}

.print-report-table > tbody,
.print-report-table > tbody > tr,
.print-report-table > tbody > tr > td.print-report-body {
  display: block;
  padding: 0;
  border: none;
}

/* ---------------------------------------------------------------------
   Smaller screens
   --------------------------------------------------------------------- */

@media (max-width: 960px) {
  .hero-screen {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-content h1 {
    max-width: 24ch;
  }

  .tests-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .tests-card-details {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .tests-card-aside {
    max-width: 420px;
  }

  .results-layout,
  .interpretation-grid,
  .interpretation-grid:not(.how-it-works-grid):has(> :nth-child(4)) {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .home-extras .home-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-extras .home-section > *,
  .home-extras .home-section > h2 {
    grid-column: 1;
    grid-row: auto;
  }

  .home-extras .home-section > h2 + p,
  .home-extras .strength-list {
    margin-top: 10px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(1120px, calc(100% - 24px));
  }

  .student-form,
  .instruction-grid,
  .report-grid,
  .guide-grid,
  .contact-wrapper,
  .riasec-about-grid,
  .mcq-group {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .scale-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .scale-list div {
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
  }

  .rating-group {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .rating-option {
    min-height: 60px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
  }

  .rating-option strong {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .rating-option span {
    font-size: 1rem;
  }

  .assessment-top,
  .results-heading {
    flex-direction: column;
    gap: 12px;
  }

  .progress-track {
    margin: 18px 0 20px;
  }

  .form-actions,
  .assessment-actions,
  .result-actions {
    justify-content: stretch;
  }

  .form-actions > .primary-button,
  .form-actions > .secondary-button,
  .assessment-actions > button {
    flex: 1 1 auto;
  }

  .dashboard-row > button,
  .dashboard-row-actions {
    width: 100%;
  }

  .dashboard-row-actions > button {
    flex: 1 1 auto;
  }

  .how-it-works-grid .interpretation-card > p,
  .how-it-works-grid .interpretation-card .form-actions {
    margin-left: 0;
  }

  .code-badge span {
    width: 46px;
    height: 46px;
    font-size: 1.25rem;
  }
}

/* ---------------------------------------------------------------------
   Printed / saved PDF report
   --------------------------------------------------------------------- */

@media print {
  @page {
    size: A4;
    margin: 14mm 12mm 14mm;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    animation: none !important;
  }

  body {
    background: #fff;
    color: #111827;
    font-size: 10.5pt;
    line-height: 1.35;
  }

  .app-shell {
    width: 100%;
    min-height: auto;
    padding: 0;
    display: block;
  }

  .results-screen {
    border: 0;
    box-shadow: none;
    padding: 0;
    background: #fff;
  }

  /* Real <table>/<thead>/<tfoot> so the browser's native print pagination
     repeats the header and footer on every page and reserves space for
     them automatically. This is reliably supported across browsers,
     unlike CSS display:table-header-group applied to plain divs. */
  .print-report-table {
    display: table;
    width: 100%;
    border-collapse: collapse;
  }

  .print-report-table > thead {
    display: table-header-group;
  }

  .print-report-table > tfoot {
    display: table-footer-group;
  }

  .print-report-table > tbody {
    display: table-row-group;
  }

  .print-report-header td,
  .print-report-footer td {
    padding: 0;
    border: none;
  }

  .print-report-table > tbody > tr > td.print-report-body {
    padding: 0;
    border: none;
  }

  .print-report-header > tr > td > div,
  .print-report-footer > tr > td > div {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 8mm;
    font-family: var(--font);
    font-size: 7.5pt;
    line-height: 1.2;
    color: #566173;
    white-space: nowrap;
  }

  .print-report-header > tr > td > div {
    padding-bottom: 18mm;
    border-bottom: 1px solid #c3cad4;
  }

  .print-report-header span:first-child {
    font-weight: 700;
    color: #18212f;
    letter-spacing: 0.01em;
  }

  .print-report-footer > tr > td > div {
    padding-top: 18mm;
    border-top: 1px solid #c3cad4;
  }

  .results-heading {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #c3cad4;
    break-after: avoid;
    break-inside: avoid;
  }

  .results-layout,
  .interpretation-section {
    margin-top: 4mm;
  }

  /* CSS Grid rows don't paginate reliably in print when grid items differ
     in height (Chromium leaves blank space and pushes the taller item to
     the next page). Stacking single-column in print avoids that. */
  .results-layout {
    grid-template-columns: 1fr;
  }

  .results-heading h1 {
    font-size: 23pt;
    line-height: 1.08;
  }

  .eyebrow {
    margin-bottom: 5px;
    font-size: 8pt;
  }

  .code-badge span {
    width: 34px;
    height: 34px;
    font-size: 14pt;
  }

  .no-print,
  .result-actions {
    display: none !important;
  }

  .results-layout,
  .interpretation-grid,
  .report-grid,
  .guide-grid {
    gap: 10px;
  }

  .interpretation-section {
    gap: 10px;
    margin-top: 10px;
  }

  .student-details-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    break-inside: avoid;
    padding: 10px 14px;
    margin-bottom: 14px;
  }

  .student-detail-value {
    white-space: normal;
  }

  .profile-card,
  .interpretation-card,
  .career-card,
  .disclaimer-card,
  .score-card,
  .top-list article {
    box-shadow: none;
    break-inside: avoid;
  }

  /* The Top 3 box is taller than one page; let it break between its three areas */
  .score-card:has(.top-list) {
    break-inside: auto;
  }

  .score-card,
  .profile-card,
  .interpretation-card,
  .career-card,
  .disclaimer-card,
  .counsellor-card {
    padding: 12px 14px;
  }

  h2 {
    font-size: 14pt;
    line-height: 1.2;
    break-after: avoid;
  }

  h3 {
    font-size: 11.5pt;
    line-height: 1.25;
    break-after: avoid;
  }

  h4 {
    break-after: avoid;
  }

  p,
  li {
    orphans: 3;
    widows: 3;
  }

  ul {
    margin-bottom: 0;
  }

  .score-bars,
  .top-list {
    gap: 9px;
    margin-top: 10px;
  }

  .score-label {
    margin-bottom: 5px;
  }

  .rank-badge {
    min-width: 28px;
    height: 21px;
    font-size: 8pt;
  }

  .bar-track {
    height: 9px;
  }

  .top-list article {
    grid-template-columns: 32px 1fr;
    gap: 10px;
    padding: 10px;
  }

  .top-list article > span,
  .interpretation-title span {
    width: 29px;
    height: 29px;
  }

  .top-list h3 {
    padding-top: 3px;
  }

  .top-list h4,
  .interpretation-card h4 {
    margin: 8px 0 4px;
    font-size: 9.5pt;
  }

  .top-list p,
  .profile-card p,
  .interpretation-card p,
  .career-card p,
  .disclaimer-card p,
  .counsellor-card p,
  .top-list ul,
  .interpretation-card ul,
  .strength-list,
  .guide-grid ul {
    line-height: 1.35;
  }

  .interpretation-title {
    gap: 8px;
    margin-bottom: 7px;
  }

  .strength-list,
  .guide-grid ul {
    margin-top: 7px;
  }

  .interpretation-card li + li,
  .strength-list li + li {
    margin-top: 2px;
  }

  .career-area-list {
    gap: 6px;
    margin-top: 9px;
  }

  .career-area-list span {
    padding: 5px 8px;
    border-color: #c3cad4;
    background: #fff;
    color: #18212f;
    font-size: 9pt;
  }

  .counsellor-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .counsellor-card h2 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .guide-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 8px;
    break-before: avoid;
    page-break-before: avoid;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .guide-grid div {
    padding: 8px;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .guide-grid h3 {
    font-size: 9.5pt;
  }

  .guide-grid li {
    font-size: 9.2pt;
  }
}
