/* Assessment age detail — minimal, playful, responsive */

.page-assessment-age main {
  padding-block: 0;
}

/* ── Hero ── */
.as-hero {
  position: relative;
  padding: clamp(1.25rem, 3.5vw, 2rem) 0 clamp(1.5rem, 4vw, 2.5rem);
  overflow: hidden;
}

.as-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.as-hero--purple .as-hero__bg {
  background:
    radial-gradient(circle 280px at 88% 8%, rgba(167, 139, 250, 0.18), transparent),
    radial-gradient(circle 220px at 8% 75%, rgba(78, 205, 196, 0.12), transparent),
    radial-gradient(circle 180px at 50% 100%, rgba(255, 107, 107, 0.08), transparent),
    linear-gradient(180deg, var(--cream-100) 0%, var(--bg-page) 100%);
}

.as-hero--teal .as-hero__bg {
  background:
    radial-gradient(circle 260px at 90% 10%, rgba(78, 205, 196, 0.16), transparent),
    radial-gradient(circle 220px at 6% 80%, rgba(255, 107, 107, 0.1), transparent),
    linear-gradient(180deg, var(--cream-100) 0%, var(--bg-page) 100%);
}

.as-hero--coral .as-hero__bg {
  background:
    radial-gradient(circle 260px at 88% 12%, rgba(255, 107, 107, 0.14), transparent),
    radial-gradient(circle 220px at 10% 78%, rgba(255, 209, 102, 0.14), transparent),
    linear-gradient(180deg, var(--cream-100) 0%, var(--bg-page) 100%);
}

.as-hero__inner {
  position: relative;
}

.as-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: center;
}

.as-hero__copy {
  text-align: center;
}

.as-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--white);
  border: 1px solid var(--border);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
}

.as-hero__title {
  font-size: clamp(1.375rem, 4vw, 1.875rem);
  line-height: 1.25;
  margin-bottom: var(--space-3);
}

.as-hero__lead {
  margin: 0;
  font-size: var(--text-base);
  color: var(--ink-700);
  line-height: 1.75;
  max-width: 34rem;
  margin-inline: auto;
}

.as-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-4);
}

.as-chip {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 800;
}

.as-chip--age {
  background: var(--purple-100);
  color: var(--purple-500);
  font-family: var(--font-en);
  letter-spacing: 0.04em;
}

.as-hero--teal .as-chip--age {
  background: var(--teal-100);
  color: var(--teal-500);
}

.as-hero--coral .as-chip--age {
  background: var(--coral-100);
  color: var(--coral-500);
}

.as-chip--cefr,
.as-chip--vocab {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--ink-700);
}

.as-hero__visual {
  display: flex;
  justify-content: center;
}

.as-hero__img {
  width: min(100%, 26rem);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 3px solid var(--white);
}

.as-hero__img img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Sections ── */
.as-section {
  padding-block: var(--space-8);
}

.as-section--soft {
  background: var(--white);
  border-block: 1px solid var(--border);
}

.as-section__head {
  text-align: center;
  max-width: 30rem;
  margin: 0 auto var(--space-6);
}

.as-section__head h2 {
  margin-bottom: var(--space-2);
}

.as-section__head p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Grade breakdown ── */
.as-grades {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 36rem;
  margin-inline: auto;
}

.as-grade {
  padding: var(--space-4);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
}

.as-grade:hover {
  transform: translateX(-2px);
}

[dir="ltr"] .as-grade:hover {
  transform: translateX(2px);
}

.as-grade__top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-3);
}

.as-grade__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: var(--purple-100);
  color: var(--purple-500);
  flex-shrink: 0;
}

.as-grade--teal .as-grade__icon {
  background: var(--teal-100);
  color: var(--teal-500);
}

.as-grade--coral .as-grade__icon {
  background: var(--coral-100);
  color: var(--coral-500);
}

.as-grade__label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink-700);
  line-height: 1.4;
}

.as-grade__pct {
  font-family: var(--font-en);
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--purple-500);
  min-width: 2.5rem;
  text-align: end;
}

.as-grade--teal .as-grade__pct { color: var(--teal-500); }
.as-grade--coral .as-grade__pct { color: var(--coral-500); }

.as-grade__bar-wrap {
  height: 10px;
  background: var(--cream-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.as-grade__bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--purple-500), var(--coral-500));
  transition: width 600ms ease;
}

.as-grade--teal .as-grade__bar {
  background: linear-gradient(90deg, var(--teal-500), var(--purple-400));
}

.as-grade--coral .as-grade__bar {
  background: linear-gradient(90deg, var(--coral-500), var(--sun-400));
}

.as-grades__note {
  margin: var(--space-5) auto 0;
  max-width: 28rem;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Observation (4–6) ── */
.as-obs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  max-width: 40rem;
  margin-inline: auto;
}

.as-obs__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-700);
}

.as-levels {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-6);
}

.as-level {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-5);
  background: var(--cream-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.as-level__en {
  font-family: var(--font-en);
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--coral-500);
}

.as-level__fa {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ── Highlights ── */
.as-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 34rem;
  margin-inline: auto;
}

.as-highlights__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--ink-700);
  line-height: 1.65;
}

.as-highlights__dot {
  width: 8px;
  height: 8px;
  margin-top: 0.45em;
  border-radius: 50%;
  background: var(--purple-500);
  flex-shrink: 0;
}

/* ── Speaking criteria ── */
.as-speaking {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  max-width: 40rem;
  margin-inline: auto;
}

.as-speaking__card {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.as-speaking__en {
  font-family: var(--font-en);
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--coral-500);
}

.as-speaking__fa {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ── Outcomes ── */
.as-outcomes {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

.as-outcome {
  padding: var(--space-5);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.as-outcome--six { border-top: 3px solid var(--coral-500); }
.as-outcome--year { border-top: 3px solid var(--purple-500); }

.as-outcome h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
  font-size: var(--text-base);
}

.as-outcome ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.as-outcome li {
  position: relative;
  padding-inline-start: var(--space-5);
  font-size: var(--text-sm);
  color: var(--ink-700);
  line-height: 1.6;
}

.as-outcome li::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
  position: absolute;
  inset-inline-start: 0;
  color: var(--teal-500);
  font-weight: 800;
  font-size: var(--text-xs);
}

/* ── FAQ ── */
.as-faq {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 34rem;
  margin-inline: auto;
}

.as-faq__item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.as-faq__item summary {
  padding: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink-700);
  cursor: pointer;
  list-style: none;
}

.as-faq__item summary::-webkit-details-marker {
  display: none;
}

.as-faq__item p {
  margin: 0;
  padding: 0 var(--space-4) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Related links ── */
.as-related {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}

.as-related__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ink-700);
  text-decoration: none;
  transition:
    border-color var(--transition),
    transform var(--transition);
}

.as-related__link:hover {
  border-color: var(--purple-300);
  transform: translateY(-2px);
  color: var(--purple-500);
}

/* ── CTA ── */
.as-cta {
  padding-block: var(--space-10) var(--space-12);
}

.as-cta__box {
  text-align: center;
  max-width: 36rem;
  margin-inline: auto;
  padding: clamp(var(--space-6), 5vw, var(--space-8));
  background: linear-gradient(135deg, var(--purple-500), var(--teal-500));
  border-radius: var(--radius-xl);
  color: var(--white);
  box-shadow: 0 12px 40px rgba(167, 139, 250, 0.28);
}

.as-hero--teal ~ .as-cta .as-cta__box,
.page-assessment-age .as-hero--teal + * + .as-cta .as-cta__box {
  background: linear-gradient(135deg, var(--teal-500), var(--purple-500));
}

.as-cta__box h2 {
  color: var(--white);
  margin-bottom: var(--space-2);
}

.as-cta__box p {
  margin: 0 0 var(--space-6);
  font-size: var(--text-sm);
  opacity: 0.92;
  line-height: 1.65;
}

.as-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}

.as-cta__actions .btn-primary {
  background: var(--white);
  color: var(--purple-500);
  border-color: var(--white);
}

.as-cta__actions .btn-primary:hover {
  background: var(--cream-50);
  color: var(--purple-500);
}

.as-cta__actions .btn-outline {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
  background: transparent;
}

.as-cta__actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-color: var(--white);
}

/* ── Responsive ── */
@media (min-width: 640px) {
  .as-speaking {
    grid-template-columns: repeat(2, 1fr);
  }

  .as-outcomes {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .as-hero__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }

  .as-hero__copy {
    text-align: start;
  }

  .as-hero__lead {
    margin-inline: 0;
  }

  .as-hero__chips {
    justify-content: flex-start;
  }

  .as-speaking {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .as-grade:hover,
  .as-related__link:hover {
    transform: none;
  }
}
