:root {
  --primary: #0d6efd;
  --bg-soft: #f4fbff;
  --text-main: #333333;
  --card-radius: 28px;
  --card-shadow: 0 18px 40px rgba(13, 110, 253, 0.06);
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  color: var(--text-main);
  background-color: var(--bg-soft);
}

.page-background {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
}

.page-wrapper {
  width: 100%;
  max-width: 1200px;
}

/* Cards */

.initiative-card {
  background-color: #ffffff;
  width: 100%;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 40px 72px 48px;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.5s ease-out,
    transform 0.5s ease-out;
}

.initiative-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Header */

.initiative-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

.initiative-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 12px 26px;
  background-color: var(--primary);
  border-radius: 10px;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}

.initiative-logo .logo-tail {
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-30%);
  width: 18px;
  height: 18px;
  background-color: var(--primary);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.initiative-tagline {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
}

/* Intro card text */

.initiative-content {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 960px;
}

.initiative-content p {
  margin: 0 0 1.25rem;
}

.initiative-content .section-title {
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.4rem;
}

.initiative-content a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(13, 110, 253, 0.3);
}

.initiative-content a:hover {
  border-bottom-color: var(--primary);
}

/* Questionnaire structure */

.questionnaire {
  max-width: 1000px;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  font-size: 1.4rem;
  margin: 0 0 24px;
}

.section-label {
  font-weight: 700;
}

.section-heading span:last-child {
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.question-block {
  margin-bottom: 32px;
}

.question-label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 1.1rem;
  margin: 0 0 18px;
}

.question-number {
  font-weight: 600;
}

.question-intro {
  margin: 0 0 4px;
  font-size: 0.98rem;
}

.question-helper {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: #7b7b7b;
}

/* Age cards */

.age-options {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.age-card {
  border: none;
  padding: 18px 26px 16px;
  background-color: #cfe7ff;
  border-radius: 18px;
  cursor: pointer;
  max-width: 170px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition:
    transform 0.15s ease-out,
    box-shadow 0.15s ease-out,
    background-color 0.15s ease-out,
    border-color 0.15s ease-out;
  outline: none;
  border: 2px solid transparent;
}

.age-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(13, 110, 253, 0.18);
}

.age-card.selected {
  background-color: #e7f1ff;
  border-color: var(--primary);
  box-shadow: 0 12px 30px rgba(13, 110, 253, 0.25);
}

.age-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.age-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.age-label {
  font-size: 1rem;
  font-weight: 500;
}

.selected-age {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #555555;
}

/* Text fields */

.field-group {
  margin-bottom: 16px;
}

.field-group--compact {
  margin-top: 12px;
}

.field-label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.text-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid #cccccc;
  padding: 6px 0;
  font-size: 0.95rem;
  outline: none;
}

.text-input::placeholder {
  color: #b0b0b0;
}

.text-input:focus {
  border-bottom-color: var(--primary);
}

.text-input--multiline {
  resize: vertical;
  padding-top: 4px;
}

/* Generic chips */

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip-card {
  border-radius: 999px;
  border: 2px solid transparent;
  padding: 8px 18px;
  background-color: #e1f0ff;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition:
    background-color 0.15s ease-out,
    border-color 0.15s ease-out,
    box-shadow 0.15s ease-out,
    transform 0.15s ease-out;
}

.chip-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(13, 110, 253, 0.1);
}

.chip-card.selected {
  border-color: var(--primary);
  background-color: #f0f6ff;
}

.chip-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  background-color: #ffffff;
}

.chip-card--yes .chip-icon {
  border-color: #198754;
}

.chip-card--no .chip-icon {
  border-color: #dc3545;
}

.chip-card--neutral .chip-icon {
  border-color: #ffc107;
}

.rating-stars {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.rating-star {
    background: #fff;
    border: 2px solid #0d6efd;
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: 0.2s ease;
}

.rating-star:hover {
    background: #eaf2ff;
}

.rating-star input[type="radio"] {
    display: none;
}

.rating-star .star-icon {
    color: #ffc107;
    font-size: 20px;
}

.rating-star input[type="radio"]:checked + .star-icon,
.rating-star input[type="radio"]:checked ~ .star-number {
    font-weight: bold;
    color: #0d6efd;
}


/* Rating stars 1–10 */

.rating-stars {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rating-star {
  border: none;
  background-color: #e3f1ff;
  border-radius: 999px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition:
    background-color 0.15s ease-out,
    transform 0.15s ease-out,
    box-shadow 0.15s ease-out;
}

.rating-star .star-icon {
  font-size: 1rem;
  color: #b0c8e6;
}

.rating-star.selected .star-icon,
.rating-star.selected-range .star-icon {
  color: #f8c045;
}

.rating-star.selected,
.rating-star.selected-range {
  background-color: #f0f6ff;
  box-shadow: 0 8px 18px rgba(13, 110, 253, 0.14);
}

.rating-star:hover {
  transform: translateY(-1px);
}

/* Method cards */

.method-options {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}

.method-card {
  border: none;
  background-color: #cfe7ff;
  border-radius: 16px;
  padding: 14px 18px;
  max-width: 180px;
  width: 100%;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  transition:
    background-color 0.15s ease-out,
    box-shadow 0.15s ease-out,
    transform 0.15s ease-out,
    border-color 0.15s ease-out;
  border: 2px solid transparent;
}

.method-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(13, 110, 253, 0.16);
}

.method-card.selected {
  background-color: #e7f1ff;
  border-color: var(--primary);
}

.method-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.method-label {
  font-size: 0.9rem;
}

/* File upload */

.upload-helper {
  font-size: 0.8rem;
  color: #898989;
  margin: 4px 0 10px;
}

.file-upload {
  display: inline-block;
}

.file-input {
  display: none;
}

.file-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 12px;
  background-color: #e3f1ff;
  cursor: pointer;
  border: 2px solid transparent;
  font-size: 0.95rem;
  transition:
    background-color 0.15s ease-out,
    border-color 0.15s ease-out,
    box-shadow 0.15s ease-out,
    transform 0.15s ease-out;
}

.file-trigger:hover {
  background-color: #f0f6ff;
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(13, 110, 253, 0.16);
  transform: translateY(-1px);
}

.file-icon {
  font-size: 1.1rem;
}

.file-label {
  white-space: nowrap;
}

/* Responsive */

@media (max-width: 900px) {
  .initiative-card {
    padding: 32px 24px 40px;
  }

  .initiative-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .initiative-tagline {
    font-size: 1.3rem;
  }

  .age-options {
    gap: 16px;
  }

  .age-card {
    max-width: calc(50% - 12px);
  }
}

@media (max-width: 600px) {
  .initiative-card {
    padding: 28px 18px 32px;
    border-radius: 20px;
  }

  .initiative-logo {
    font-size: 1.1rem;
    padding: 10px 18px;
  }

  .initiative-content {
    font-size: 0.95rem;
  }

  .section-heading {
    font-size: 1.2rem;
  }

  .age-avatar {
    width: 96px;
    height: 96px;
  }

  .age-card {
    max-width: 100%;
  }

  .rating-stars {
    gap: 8px;
  }

  .rating-star {
    padding: 6px 10px;
  }

  .method-card {
    max-width: 100%;
  }
}

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

.age-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 26px 16px;
    border-radius: 18px;
    background-color: #cfe7ff;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.15s ease-out;
}

.age-card .age-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.age-card .age-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.age-card .age-label {
    margin-top: 10px;
    font-weight: 500;
}

/* Highlight selected age */
.age-card input:checked ~ .age-avatar,
.age-card input:checked ~ .age-label {
    /* tweak as needed */
    filter: saturate(1.1);
}

.age-card input:checked ~ .age-label {
    color: #0d6efd;
}

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

.chip-card {
    border-radius: 999px;
    padding: 8px 18px;
    background: #e1f0ff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    margin-bottom: 8px;
}

/* make checked radios look "active" */
.chip-card .chip-input:checked ~ .chip-label {
    color: #0d6efd;
    font-weight: 600;
}

.rating-stars {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: nowrap;
}

/* Hide actual radios */
.rating-star-input {
    display: none;
}

/* The star itself */
.rating-star {
    position: relative;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Draw the star shape */
.rating-star::before {
    content: "★";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #cfe7ff;           /* light blue fill like your design */
}

/* The number inside the star */
.rating-star-number {
    position: relative;
    z-index: 1;
    font-size: 14px;
    font-weight: 500;
    color: #111;
}

/* Hover state */
.rating-star:hover::before {
    color: #b9daff;
}

/* Checked state: darker blue star */
.rating-star-input:checked + .rating-star::before {
    color: #0d6efd;           /* primary blue when selected */
}

.rating-star-input:checked + .rating-star .rating-star-number {
    color: #fff;
    font-weight: 600;
}

.rating-stars {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: nowrap;
}

/* Hide the real radios */
.rating-star-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Circular badge that holds the star + number */
.rating-star {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #e9f4ff;      /* pale blue circle like your mockup */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

/* The star shape inside the circle */
.rating-star::before {
    content: "★";
    position: absolute;
    font-size: 26px;
    color: #bcd9ff;                  /* lighter blue star */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* The number on top of the star */
.rating-star-number {
    position: relative;
    z-index: 1;
    font-size: 15px;
    font-weight: 500;
    color: #111;
}

/* Hover effect */
.rating-star:hover {
    transform: translateY(-1px);
}

/* Checked state: slightly stronger colors */
.rating-star-input:checked + .rating-star {
    background-color: #d5e7ff;
}

.rating-star-input:checked + .rating-star::before {
    color: #0d6efd;                  /* primary blue star when selected */
}

.rating-star-input:checked + .rating-star .rating-star-number {
    color: #000;
    font-weight: 600;
}

.rating-stars {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: nowrap;
}

/* Hide real radios */
.rating-star-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* White circular badge */
.rating-star {
    position: relative;
    width: 54px;       /* bigger circle */
    height: 54px;
    border-radius: 50%;
    background-color: #ffffff;     /* white background */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

/* Pale blue star */
.rating-star::before {
    content: "★";
    position: absolute;
    font-size: 34px;  /* bigger star size */
    color: #c7e2ff;   /* pale blue */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: color 0.2s ease;
}

/* Number on top */
.rating-star-number {
    position: relative;
    z-index: 2;
    font-size: 17px;
    font-weight: 600;
    color: #111;
    transition: color 0.2s ease;
}

/* Hover animation */
.rating-star:hover {
    transform: translateY(-2px) scale(1.05);
}

/* Selected state */
.rating-star-input:checked + .rating-star {
    background-color: #e8f1ff;    /* soft blue glow */
}

.rating-star-input:checked + .rating-star::before {
    color: #0d6efd;               /* strong blue star */
}

.rating-star-input:checked + .rating-star .rating-star-number {
    color: #fff;                  /* white number on selected star */
}

/* ========== STAR RATING ========== */

.rating-stars {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: nowrap;
}

/* Hide real radios */
.rating-star-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* White circular badge */
.rating-star {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: scale(0.8);
    opacity: 0;
    /* entrance animation */
    animation: rating-pop 0.35s ease-out forwards;
    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

/* Pale blue star */
.rating-star::before {
    content: "★";
    position: absolute;
    font-size: 34px;
    color: #c7e2ff;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: color 0.2s ease;
}

/* Ripple / glow layer */
.rating-star::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(13, 110, 253, 0.16); /* #0d6efd with transparency */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}

/* Number on top */
.rating-star-number {
    position: relative;
    z-index: 2;
    font-size: 17px;
    font-weight: 600;
    color: #111;
    transition: color 0.2s ease;
}

/* Hover animation (float + slight scale) */
.rating-star:hover {
    transform: translateY(-2px) scale(1.05);
}

/* Selected state: stronger colors + glow */
.rating-star-input:checked + .rating-star {
    background-color: #e8f1ff;
    box-shadow: 0 0 0 6px rgba(13, 110, 253, 0.09);
    transform: translateY(-1px) scale(1.03);
}

.rating-star-input:checked + .rating-star::before {
    color: #0d6efd;
}

.rating-star-input:checked + .rating-star .rating-star-number {
    color: #fff;
}

/* Click ripple when selected */
.rating-star-input:checked + .rating-star::after {
    animation: rating-ripple 0.32s ease-out;
}

/* ========== KEYFRAMES ========== */

/* Pop-in on load */
@keyframes rating-pop {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }
    60% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Ripple from center when selected */
@keyframes rating-ripple {
    0% {
        width: 0;
        height: 0;
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(0.2);
    }
    70% {
        width: 110%;
        height: 110%;
        opacity: 0.15;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        width: 130%;
        height: 130%;
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Staggered entrance (up to 10 stars) */
.rating-stars label.rating-star:nth-of-type(1)  { animation-delay: 0.00s; }
.rating-stars label.rating-star:nth-of-type(2)  { animation-delay: 0.03s; }
.rating-stars label.rating-star:nth-of-type(3)  { animation-delay: 0.06s; }
.rating-stars label.rating-star:nth-of-type(4)  { animation-delay: 0.09s; }
.rating-stars label.rating-star:nth-of-type(5)  { animation-delay: 0.12s; }
.rating-stars label.rating-star:nth-of-type(6)  { animation-delay: 0.15s; }
.rating-stars label.rating-star:nth-of-type(7)  { animation-delay: 0.18s; }
.rating-stars label.rating-star:nth-of-type(8)  { animation-delay: 0.21s; }
.rating-stars label.rating-star:nth-of-type(9)  { animation-delay: 0.24s; }
.rating-stars label.rating-star:nth-of-type(10) { animation-delay: 0.27s; }
