.math-thinking-beta {
  --math-ink: #172541;
  --math-copy: #566982;
  --math-blue: #2d7ddb;
  --math-blue-soft: #e9f4ff;
  --math-violet: #6a55de;
  --math-violet-soft: #f1edff;
  --math-mint: #2aa68f;
  --math-mint-soft: #e7f8f4;
  --math-coral: #e56863;
  --math-coral-soft: #fff0ed;
}

.math-thinking-beta main {
  overflow: hidden;
}

.math-thinking-beta .math-hero {
  position: relative;
  background:
    radial-gradient(circle at 7% 18%, rgb(106 85 222 / 12%) 0 8rem, transparent 8.1rem),
    radial-gradient(circle at 93% 82%, rgb(42 166 143 / 11%) 0 10rem, transparent 10.1rem),
    #fffdfb;
}

.math-thinking-beta .math-hero-grid {
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3rem);
}

.math-thinking-beta .math-hero-grid > * {
  min-width: 0;
}

.math-thinking-beta .math-hero-copy h1,
.math-thinking-beta .math-section-heading-block h2,
.math-thinking-beta .math-map-section > .shell > h2,
.math-thinking-beta .math-levels-section > .shell > h2 {
  color: var(--math-ink);
}

.math-thinking-beta .math-hero-copy h1 {
  max-width: 13ch;
  margin: 0 auto 1rem;
  text-align: center;
  text-wrap: balance;
}

.math-thinking-beta .math-hero-copy .section-kicker,
.math-thinking-beta .math-hero-copy .direct-answer {
  margin-inline: auto;
  text-align: center;
}

.math-thinking-beta .math-hero-copy .direct-answer {
  max-width: 47rem;
  color: var(--math-copy);
  font-size: clamp(1.06rem, 1.55vw, 1.28rem);
  line-height: 1.75;
}

.math-hero-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.math-hero-points span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 4.6rem;
  padding: 0.85rem;
  border: 1px solid #d9e4ef;
  border-radius: 1.25rem;
  color: var(--math-ink);
  background: rgb(255 255 255 / 88%);
  box-shadow: 0 0.6rem 1.5rem rgb(31 57 91 / 8%);
  text-align: center;
}

.math-hero-points span:nth-child(2) {
  background: #f5f1ff;
}

.math-hero-points span:nth-child(3) {
  background: #eaf8f5;
}

.math-hero-points span:nth-child(4) {
  background: #edf6ff;
}

.math-hero-points img {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
}

.math-thinking-beta .math-hero-copy .zv-actions {
  justify-content: center;
}

.math-image-slot {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  margin: 0;
  padding: clamp(2rem, 5vw, 4.5rem);
  overflow: hidden;
  box-sizing: border-box;
  border: 2px dashed #8daee8;
  border-radius: 2.4rem;
  background:
    radial-gradient(circle at 15% 20%, rgb(106 85 222 / 12%) 0 5.5rem, transparent 5.6rem),
    radial-gradient(circle at 86% 82%, rgb(42 166 143 / 14%) 0 7rem, transparent 7.1rem),
    linear-gradient(145deg, #f4f8ff, #edf7fb 52%, #f5f1ff);
  box-shadow: 0 1.2rem 2.8rem rgb(31 57 91 / 12%);
  aspect-ratio: 16 / 9;
}

.math-image-slot::before,
.math-image-slot::after {
  position: absolute;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--math-blue);
  box-shadow: 1.25rem 0 var(--math-violet), 2.5rem 0 var(--math-mint);
  content: "";
}

.math-image-slot::before {
  top: 1.4rem;
  right: 1.4rem;
}

.math-image-slot::after {
  bottom: 1.4rem;
  left: 3.9rem;
  transform: rotate(180deg);
}

.math-image-slot figcaption {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  max-width: 31rem;
  color: var(--math-copy);
  text-align: center;
}

.math-image-slot figcaption strong {
  color: var(--math-ink);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.math-image-slot figcaption span {
  font-weight: 650;
  line-height: 1.6;
}

.math-image-slot figcaption small {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  color: #4f48b5;
  background: rgb(255 255 255 / 76%);
}

.math-image-slot-icon {
  display: grid;
  place-items: center;
  width: 5.2rem;
  height: 5.2rem;
  margin-bottom: 1rem;
  border-radius: 1.6rem;
  background: rgb(255 255 255 / 84%);
  box-shadow: 0 0.75rem 1.7rem rgb(52 76 120 / 15%);
}

.math-image-slot-icon img {
  width: 3.3rem;
  height: 3.3rem;
}

.math-hero-visual {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.math-hero-visual picture,
.math-hero-visual img {
  display: block;
  width: 100%;
}

.math-hero-visual img {
  height: auto;
  object-fit: contain;
}

.math-section-divider {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2.5rem, 7vw, 5.5rem);
  width: min(30rem, calc(100% - 2rem));
  height: 5rem;
  margin: -2.35rem auto 0.7rem;
}

.math-section-divider::before {
  position: absolute;
  inset-inline: 1.75rem;
  top: 50%;
  height: 0.24rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #2aa68f, #4d8de5 34%, #7257df 66%, #e66b65);
  box-shadow: 0 0.35rem 1rem rgb(76 92 164 / 18%);
  content: "";
}

.math-section-divider span {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border: 1px solid #dce4ee;
  border-radius: 1.05rem;
  background: linear-gradient(145deg, #fff, #f1f5ff);
  box-shadow: 0 0.65rem 1.35rem rgb(31 57 91 / 16%);
}

.math-section-divider span:nth-child(2) {
  width: 3.25rem;
  height: 3.25rem;
  transform: none;
  background: linear-gradient(145deg, #fff, #f1f5ff);
}

.math-section-divider img {
  width: 1.8rem;
  height: 1.8rem;
}

.math-section-divider span:nth-child(2) img {
  width: 1.8rem;
  height: 1.8rem;
}

.math-actions-intro {
  padding-top: 1.4rem;
}

.math-answer-panel {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid #dbe4ef;
  border-radius: 2rem;
  background: #fff;
  box-shadow: 0 1rem 2.6rem rgb(31 57 91 / 10%);
}

.math-answer-heading,
.math-section-heading-block,
.math-faq-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  max-width: 55rem;
  margin: 0 auto 1.5rem;
  text-align: center;
}

.math-answer-heading > span,
.math-section-heading-block > span,
.math-faq-heading > span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 1.35rem;
  background: var(--math-violet-soft);
  box-shadow: 0 0.7rem 1.5rem rgb(53 74 111 / 12%);
}

.math-answer-heading img,
.math-section-heading-block img,
.math-faq-heading img {
  width: 2.5rem;
  height: 2.5rem;
}

.math-answer-heading h2,
.math-section-heading-block h2,
.math-faq-heading h2 {
  margin: 0 0 0.4rem;
}

.math-answer-heading p,
.math-section-heading-block p,
.math-faq-heading p {
  margin: 0;
  color: var(--math-copy);
  line-height: 1.65;
}

.math-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.math-action-grid article {
  display: grid;
  align-content: start;
  justify-items: center;
  min-height: 13.5rem;
  padding: 1.25rem 1rem;
  border: 1px solid #dce5ef;
  border-radius: 1.4rem;
  text-align: center;
  background: #f5f9ff;
}

.math-action-grid article:nth-child(2) {
  background: #f2efff;
}

.math-action-grid article:nth-child(3) {
  background: #eaf8f5;
}

.math-action-grid article:nth-child(4) {
  background: #edf6ff;
}

.math-action-grid img {
  width: 3rem;
  height: 3rem;
}

.math-action-grid h3 {
  margin: 0.7rem 0 0.35rem;
  color: var(--math-ink);
  font-size: 1.1rem;
}

.math-action-grid p {
  margin: 0;
  color: var(--math-copy);
  line-height: 1.55;
}

.math-map-section {
  position: relative;
  padding-top: clamp(3rem, 7vw, 5.5rem);
  background: linear-gradient(180deg, #f8f7ff, #f4f9ff 52%, #f5fbf9);
}

.math-map-section > .shell > h2,
.math-map-section > .shell > .section-kicker,
.math-levels-section > .shell > h2,
.math-levels-section > .shell > .section-kicker {
  text-align: center;
}

.math-section-lead {
  max-width: 57rem;
  margin: 1rem auto 2.2rem;
  color: var(--math-copy);
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  font-weight: 650;
  line-height: 1.7;
  text-align: center;
}

.math-path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.math-path-card {
  position: relative;
  padding: clamp(1.4rem, 3vw, 2rem);
  overflow: hidden;
  border: 1px solid #dce5ef;
  border-top: 0.35rem solid var(--math-blue);
  border-radius: 1.8rem;
  background: #fff;
  box-shadow: 0 1rem 2.3rem rgb(31 57 91 / 9%);
}

.math-path-operations {
  border-top-color: var(--math-violet);
}

.math-path-relations {
  border-top-color: var(--math-mint);
}

.math-path-life {
  border-top-color: var(--math-coral);
}

.math-path-icon {
  display: grid;
  place-items: center;
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 1.35rem;
  background: var(--math-blue-soft);
}

.math-path-operations .math-path-icon {
  background: var(--math-violet-soft);
}

.math-path-relations .math-path-icon {
  background: var(--math-mint-soft);
}

.math-path-life .math-path-icon {
  background: var(--math-coral-soft);
}

.math-path-icon img {
  width: 2.7rem;
  height: 2.7rem;
}

.math-path-index {
  position: absolute;
  top: 1.3rem;
  left: 1.45rem;
  color: #b6c2d3;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.math-path-card h3 {
  margin: 1.15rem 0 0.6rem;
  color: var(--math-ink);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.math-path-card > p,
.math-path-card li {
  color: var(--math-copy);
  line-height: 1.6;
}

.math-path-card ul {
  margin: 1rem 0;
  padding-inline-start: 1.35rem;
}

.math-path-card li + li {
  margin-top: 0.35rem;
}

.math-path-result {
  margin-top: 1.2rem;
  padding: 0.8rem 1rem;
  border-radius: 1rem;
  color: var(--math-ink) !important;
  background: #f4f7fb;
}

.math-age-note {
  max-width: 60rem;
  margin: 2rem auto 0;
  text-align: center;
}

.math-representations-section {
  padding-top: clamp(3rem, 7vw, 5rem);
  background: #fffdfb;
}

.math-secondary-image-slot,
.math-secondary-visual {
  max-width: 68rem;
  margin: 0 auto clamp(2.2rem, 5vw, 4rem);
}

.math-representation-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 2rem;
}

.math-representation-flow article {
  position: relative;
  min-height: 15rem;
  padding: 1.35rem 1rem;
  border: 1px solid #dce5ef;
  border-radius: 1.5rem;
  text-align: center;
  background: #f5f9ff;
}

.math-representation-flow article:nth-child(2) {
  background: #f2efff;
}

.math-representation-flow article:nth-child(3) {
  background: #eaf8f5;
}

.math-representation-flow article:nth-child(4) {
  background: #edf6ff;
}

.math-representation-flow img {
  width: 3rem;
  height: 3rem;
}

.math-representation-flow article > span {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  background: var(--math-violet);
}

.math-representation-flow h3 {
  margin: 0.75rem 0 0.4rem;
  color: var(--math-ink);
  font-size: 1.12rem;
}

.math-representation-flow p {
  margin: 0;
  color: var(--math-copy);
  line-height: 1.55;
}

.math-insight {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 58rem;
  margin: 1.4rem auto 0;
  padding: 1rem 1.2rem;
  border: 1px solid #cfe3ef;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, #edf6ff, #edf9f6);
}

.math-insight img {
  flex: 0 0 auto;
  width: 2.8rem;
  height: 2.8rem;
}

.math-insight p {
  margin: 0;
  color: var(--math-copy);
  line-height: 1.6;
}

.math-levels-section {
  background: #f7f8fd;
}

.math-level-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.math-level-grid article {
  display: grid;
  align-content: start;
  justify-items: center;
  min-height: 21rem;
  padding: 1.6rem 1.2rem;
  border: 1px solid #dce4ef;
  border-top: 0.32rem solid var(--math-blue);
  border-radius: 1.6rem;
  text-align: center;
  background: #fff;
  box-shadow: 0 0.9rem 2rem rgb(31 57 91 / 8%);
}

.math-level-grid article:nth-child(2) {
  border-top-color: var(--math-violet);
}

.math-level-grid article:nth-child(3) {
  border-top-color: var(--math-mint);
}

.math-level-grid img {
  width: 4rem;
  height: 4rem;
}

.math-level-grid span {
  margin-top: 0.7rem;
  color: var(--math-violet);
  font-weight: 800;
}

.math-level-grid h3 {
  margin: 0.65rem 0 0.4rem;
  color: var(--math-ink);
}

.math-level-grid p {
  color: var(--math-copy);
  line-height: 1.6;
}

.math-level-grid a {
  margin-top: auto;
  color: #0d6283;
  font-weight: 800;
}

.math-divider-faq {
  margin-bottom: -2.2rem;
}

.math-faq-section {
  padding-top: clamp(2.1rem, 4vw, 3.2rem);
  background: linear-gradient(180deg, #f7f6ff, #f2f8ff);
}

.math-faq-section .faq-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
}

.math-faq-heading {
  display: grid;
  justify-items: center;
  position: static;
  top: auto;
  width: 100%;
  max-width: 52rem;
  margin: 0 auto 0.8rem;
}

.math-faq-heading::before {
  display: none !important;
  content: none !important;
}

.math-faq-section .faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  width: 100%;
  min-width: 0;
}

.math-faq-section .faq-list details {
  overflow: hidden;
  border: 1px solid #dce4ee;
  border-inline-end: 0.32rem solid var(--math-violet);
  border-radius: 1.15rem;
  background: #fff;
  box-shadow: 0 0.55rem 1.35rem rgb(31 57 91 / 7%);
}

.math-faq-section .faq-list details:nth-child(3n + 2) {
  border-inline-end-color: var(--math-mint);
}

.math-faq-section .faq-list details:nth-child(3n) {
  border-inline-end-color: var(--math-coral);
}

.math-faq-section .faq-list summary {
  min-height: 4.5rem;
  padding: 1rem 1.15rem;
  color: var(--math-ink);
  font-weight: 800;
}

.math-faq-section .faq-list details p {
  margin: 0;
  padding: 0 1.15rem 1.15rem;
  color: var(--math-copy);
  line-height: 1.65;
}

.math-cta .zv-actions {
  justify-content: center;
}

@media (max-width: 70rem) {
  .math-thinking-beta .math-hero-grid {
    grid-template-columns: 1fr;
  }

  .math-thinking-beta .math-hero-image-slot {
    width: min(100%, 48rem);
    margin-inline: auto;
  }

  .math-image-slot {
    min-height: 0;
  }

  .math-action-grid,
  .math-representation-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .math-level-grid {
    grid-template-columns: 1fr;
  }

  .math-level-grid article {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .math-thinking-beta .math-hero-copy,
  .math-thinking-beta .math-hero-copy h1,
  .math-thinking-beta .math-hero-copy .direct-answer {
    text-align: center;
  }

  .math-thinking-beta .math-hero-copy .zv-actions {
    justify-content: center;
  }

  .math-hero-points {
    grid-template-columns: 1fr 1fr;
  }

  .math-hero-points span {
    justify-content: center;
    min-height: 4.6rem;
    text-align: center;
  }

  .math-thinking-beta .math-hero-image-slot {
    width: min(100%, 30rem);
    margin-inline: auto;
  }

  .math-image-slot {
    min-height: 30rem;
    padding: 2rem 1.3rem;
    border-radius: 1.8rem;
    aspect-ratio: 9 / 16;
  }

  .math-hero-visual {
    overflow: visible;
    border-radius: 0;
  }

  .math-section-divider {
    gap: 2.4rem;
    width: min(18rem, calc(100% - 2rem));
    height: 4.25rem;
    margin-top: -2rem;
  }

  .math-section-divider span {
    width: 2.8rem;
    height: 2.8rem;
  }

  .math-section-divider span:nth-child(2) {
    width: 2.8rem;
    height: 2.8rem;
  }

  .math-section-divider img {
    width: 1.55rem;
    height: 1.55rem;
  }

  .math-section-divider span:nth-child(2) img {
    width: 1.55rem;
    height: 1.55rem;
  }

  .math-answer-heading,
  .math-section-heading-block,
  .math-faq-heading {
    flex-direction: column;
  }

  .math-action-grid,
  .math-path-grid,
  .math-representation-flow,
  .math-faq-section .faq-list {
    grid-template-columns: 1fr;
  }

  .math-action-grid article,
  .math-representation-flow article {
    min-height: auto;
  }

  .math-path-card {
    text-align: center;
  }

  .math-path-icon {
    margin-inline: auto;
  }

  .math-path-card ul {
    display: inline-block;
    max-width: 23rem;
    margin-inline: auto;
    text-align: start;
  }

  .math-insight {
    flex-direction: column;
    text-align: center;
  }

  .math-faq-section .faq-list summary {
    font-size: 0.98rem;
  }
}

@media (max-width: 430px) {
  .math-hero-points {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.6rem;
  }

  .math-hero-points span {
    min-height: 4rem;
    padding: 0.65rem 0.45rem;
    font-size: 0.88rem;
  }

  .math-image-slot {
    min-height: 27rem;
  }

  .math-answer-panel,
  .math-path-card {
    padding-inline: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .math-thinking-beta *,
  .math-thinking-beta *::before,
  .math-thinking-beta *::after {
    scroll-behavior: auto !important;
  }
}
