/* =========================================================
   SquiggleMath — guided paths
   Page styles for paths.html and the home-page path promo.
   ========================================================= */

.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;
}

/* ---------- hero ---------- */

.paths-hero {
  position: relative;
  padding: 66px 0 54px;
  overflow: hidden;
}

.paths-hero::before {
  content: "";
  position: absolute;
  top: -180px;
  left: 50%;
  width: 1150px;
  height: 760px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.84) 0%, rgba(255, 255, 255, 0) 68%);
  pointer-events: none;
}

.paths-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  align-items: center;
  gap: 54px;
}

.paths-hero h1 {
  margin-bottom: 22px;
  font-size: clamp(2.9rem, 5.6vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.paths-hero__lede {
  max-width: 570px;
  font-size: clamp(1.02rem, 1.5vw, 1.15rem);
  color: var(--ink-soft);
}

.paths-hero__proof {
  margin-top: 26px;
}

.path-age-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.path-age-tab {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fffdf8;
  color: var(--ink);
  font-family: var(--font-display);
  text-align: left;
  box-shadow: 0 4px 0 rgba(31, 42, 68, 0.08);
  transition: transform 0.2s var(--ease-bounce), box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.path-age-tab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(31, 42, 68, 0.1);
}

.path-age-tab__emoji {
  font-size: 1.3rem;
  line-height: 1;
}

.path-age-tab__name {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.15;
}

.path-age-tab__ages {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  white-space: nowrap;
}

.path-age-tab--prek[aria-selected="true"] {
  border-color: var(--mint-deep);
  background: var(--mint);
}

.path-age-tab--k[aria-selected="true"] {
  border-color: var(--blue-deep);
  background: var(--blue);
}

.path-age-tab--g1[aria-selected="true"] {
  border-color: var(--pink-deep);
  background: var(--pink);
}

.path-age-tab[aria-selected="true"] .path-age-tab__ages {
  color: rgba(31, 42, 68, 0.7);
}

.path-age-hint {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--ink-faint);
}

/* hero map */

.paths-hero__art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 470px;
  isolation: isolate;
}

.paths-blob {
  position: absolute;
  z-index: -1;
  border-radius: 46% 54% 60% 40% / 50% 42% 58% 50%;
}

.paths-blob--yellow {
  width: 340px;
  height: 340px;
  top: 34px;
  right: 16px;
  background: var(--yellow);
  transform: rotate(10deg);
}

.paths-blob--pink {
  width: 220px;
  height: 220px;
  left: -6px;
  bottom: 20px;
  background: var(--pink);
  transform: rotate(-12deg);
}

.path-map {
  position: relative;
  width: min(372px, 92%);
  padding: 24px 24px 18px;
  border: 2px solid rgba(31, 42, 68, 0.08);
  border-radius: 24px;
  background: #fffdf8;
  box-shadow: 0 26px 55px rgba(31, 42, 68, 0.18);
  transform: rotate(-2.2deg);
}

.path-map__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 2px dashed rgba(31, 42, 68, 0.13);
}

.path-map__badge {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--mint-deep);
}

.path-map__star {
  font-size: 1.1rem;
}

.path-map__title {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 1.62rem;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.path-map__sub {
  margin-top: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.path-map__list {
  margin-top: 16px;
}

.path-map__list li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px dashed rgba(31, 42, 68, 0.12);
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.path-map__list li:first-child {
  border-top: 0;
}

.path-map__num {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #f1ede2;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.path-map__list li.is-done {
  color: var(--ink);
}

.path-map__list li.is-done .path-map__num {
  background: var(--mint);
  color: #1c7650;
}

.path-map__list li.is-current {
  color: var(--ink);
}

.path-map__list li.is-current .path-map__num {
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 0 0 4px rgba(255, 212, 71, 0.24);
}

.path-map__tick {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: right;
  color: var(--mint-deep);
}

.path-map__list li.is-current .path-map__tick {
  color: var(--yellow-deep);
}

.path-map__footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 2px dashed rgba(31, 42, 68, 0.13);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.path-map__stars {
  margin-left: auto;
  color: var(--yellow-deep);
  letter-spacing: 4px;
}

.path-map__sticker {
  position: absolute;
  right: 4px;
  bottom: 32px;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  padding: 10px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 7px 0 rgba(31, 42, 68, 0.12);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.12;
  text-align: center;
  transform: rotate(9deg);
}

.paths-doodle {
  position: absolute;
  top: 20px;
  left: 4px;
  font-size: 2.2rem;
  opacity: 0.45;
  transform: rotate(-14deg);
}

/* ---------- section shell ---------- */

.paths-section {
  padding: 8px 0 84px;
}

.path-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.path-guide > div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 2px dashed rgba(31, 42, 68, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
}

.path-guide__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  background: var(--cream);
  font-size: 1.1rem;
}

.path-guide strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
}

.path-guide span:not(.path-guide__icon) {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--ink-soft);
}

/* ---------- summary ---------- */

.path-summary {
  --path-accent: var(--mint-deep);
  --path-soft: #e9fbf2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 30px;
  padding: 28px 30px;
  border: 2px solid rgba(31, 42, 68, 0.09);
  border-radius: 26px;
  background: #fffdf8;
  box-shadow: var(--shadow-sm);
  margin-bottom: 26px;
}

.path-summary--k {
  --path-accent: var(--blue-deep);
  --path-soft: #eaf7fe;
}

.path-summary--g1 {
  --path-accent: var(--pink-deep);
  --path-soft: #fdebf5;
}

.path-summary__main {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.path-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--path-accent) calc(var(--pct) * 1%), rgba(31, 42, 68, 0.08) 0);
}

.path-ring::before {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: #fffdf8;
}

.path-ring span {
  position: relative;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.path-summary__copy {
  min-width: 0;
}

.path-kicker {
  margin-bottom: 5px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--path-accent);
}

.path-summary h2 {
  font-size: clamp(1.8rem, 3vw, 2.35rem);
}

.path-summary__blurb {
  max-width: 560px;
  margin-top: 6px;
  font-size: 0.94rem;
  color: var(--ink-soft);
}

.path-summary__meta {
  margin-top: 9px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.path-summary__side {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 268px;
  flex: none;
}

.path-continue {
  width: 100%;
  min-height: 48px;
  font-size: 0.94rem;
}

.path-summary__tip {
  display: flex;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--path-soft);
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.path-summary__tip span {
  flex: none;
}

.path-complete {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--mint);
  color: #1c6b49;
}

.path-complete__star {
  font-size: 1.5rem;
}

.path-complete strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.98rem;
  line-height: 1.15;
}

.path-complete small {
  display: block;
  margin-top: 2px;
  font-size: 0.68rem;
  color: rgba(28, 107, 73, 0.8);
}

.path-summary__next {
  padding-bottom: 3px;
  border-bottom: 2px solid var(--path-accent);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  color: var(--path-accent);
}

.path-summary__next:hover {
  transform: translateY(-1px);
}

/* ---------- weeks ---------- */

.path-weeks {
  --path-accent: var(--mint-deep);
  --path-soft: #e9fbf2;
  display: grid;
  gap: 18px;
}

.path-weeks[data-level="k"] {
  --path-accent: var(--blue-deep);
  --path-soft: #eaf7fe;
}

.path-weeks[data-level="g1"] {
  --path-accent: var(--pink-deep);
  --path-soft: #fdebf5;
}

.path-week {
  padding: 22px 24px 12px;
  border: 2px solid rgba(31, 42, 68, 0.09);
  border-radius: 24px;
  background: #fffdf8;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.path-week.is-complete {
  border-color: var(--path-accent);
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 255, 255, 0.7), transparent 30%),
    var(--path-soft);
}

.path-week__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 13px;
}

.path-week__icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  flex: none;
  border-radius: 14px;
  background: var(--path-soft);
  font-size: 1.3rem;
  transform: rotate(-3deg);
}

.path-week.is-complete .path-week__icon {
  background: var(--path-accent);
}

.path-week__copy {
  min-width: 0;
  flex: 1;
}

.path-week__kicker {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--path-accent);
}

.path-week__copy h3 {
  margin-top: 1px;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
}

.path-week__copy p {
  margin-top: 1px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.path-week__count {
  flex: none;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--path-soft);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--path-accent);
}

.path-week.is-complete .path-week__count {
  background: var(--path-accent);
  color: #fff;
}

.path-session {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 6px;
  border-top: 1px dashed rgba(31, 42, 68, 0.13);
  transition: background 0.18s ease;
}

.path-session:first-child {
  border-top: 0;
}

.path-session:hover {
  background: rgba(255, 255, 255, 0.55);
  border-radius: 12px;
}

.path-check {
  display: grid;
  place-items: center;
  width: 28px;
  height: 32px;
  cursor: pointer;
}

.path-check input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--path-accent);
  cursor: pointer;
}

.path-session__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: var(--path-soft);
  font-size: 1.15rem;
}

.path-session__body {
  min-width: 0;
}

.path-session__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
}

.path-session__theme {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--path-soft);
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}

.path-session__note {
  margin-top: 2px;
  font-size: 0.79rem;
  color: var(--ink-soft);
}

.path-session__meta {
  margin-top: 3px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.path-session__open {
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.path-session__open:hover {
  border-color: var(--ink);
  color: var(--path-accent);
}

.path-session.is-done .path-session__title {
  color: var(--ink-soft);
}

.path-session.is-done .path-session__icon {
  opacity: 0.65;
}

.path-session.is-done .path-session__note {
  opacity: 0.7;
}

.path-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding: 0 4px;
}

.path-foot p {
  max-width: 520px;
  font-size: 0.72rem;
  color: var(--ink-faint);
}

.path-reset {
  padding: 4px 0;
  border: 0;
  border-bottom: 2px solid rgba(31, 42, 68, 0.22);
  background: none;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.path-reset:hover {
  color: var(--pink-deep);
  border-color: var(--pink-deep);
}

/* ---------- home page promo ---------- */

.path-promo__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 38px 44px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.45), transparent 28%),
    var(--mint);
  box-shadow: 0 18px 0 rgba(31, 42, 68, 0.08);
  overflow: hidden;
}

.path-promo__copy {
  min-width: 0;
}

.path-promo__card h2 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.path-promo__card p {
  margin-top: 6px;
  color: rgba(31, 42, 68, 0.72);
}

.path-promo__card .section-lede {
  max-width: 560px;
}

.path-promo__action {
  flex: none;
}

.path-promo__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.path-promo__meta span {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-soft);
}

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .paths-hero__inner {
    gap: 34px;
  }

  .path-summary {
    gap: 20px;
    padding: 24px;
  }

  .path-summary__side {
    width: 238px;
  }
}

@media (max-width: 980px) {
  .paths-hero {
    padding: 50px 0 40px;
  }

  .paths-hero__inner {
    grid-template-columns: 1fr;
  }

  .paths-hero__art {
    width: min(100%, 460px);
    min-height: 420px;
    margin: 0 auto;
  }

  .path-summary {
    grid-template-columns: 1fr;
  }

  .path-summary__side {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 14px;
  }

  .path-summary__tip {
    margin: 0;
  }

  .path-complete {
    align-self: stretch;
  }

  .path-summary__next {
    display: block;
    align-self: center;
    text-align: left;
  }
}

@media (max-width: 760px) {
  .paths-hero {
    padding: 40px 0 34px;
  }

  .paths-hero h1 {
    font-size: clamp(2.7rem, 10vw, 3.7rem);
  }

  .paths-hero__art {
    display: none;
  }

  .path-age-tabs {
    gap: 8px;
  }

  .path-age-tab {
    flex: 1 1 30%;
    min-width: 0;
    padding: 8px 9px;
  }

  .path-age-tab__ages {
    white-space: normal;
    font-size: 0.56rem;
  }

  .path-guide {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .path-guide > div {
    padding: 10px 13px;
  }

  .paths-section {
    padding-bottom: 60px;
  }

  .path-summary {
    padding: 20px;
    border-radius: 22px;
  }

  .path-summary__main {
    align-items: flex-start;
    gap: 16px;
  }

  .path-ring {
    width: 82px;
    height: 82px;
  }

  .path-ring::before {
    inset: 9px;
  }

  .path-ring span {
    font-size: 1.1rem;
  }

  .path-summary h2 {
    font-size: 1.75rem;
  }

  .path-summary__side {
    grid-template-columns: 1fr;
  }

  .path-week {
    padding: 18px 16px 8px;
    border-radius: 20px;
  }

  .path-week__head {
    gap: 10px;
    flex-wrap: wrap;
  }

  .path-week__count {
    margin-left: auto;
  }

  .path-week__icon {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  .path-week__copy {
    flex: 1 1 160px;
  }

  .path-session {
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 9px;
    padding: 12px 2px;
  }

  .path-check {
    width: 24px;
    height: 28px;
  }

  .path-check input {
    width: 20px;
    height: 20px;
  }

  .path-session__icon {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .path-session__title {
    font-size: 0.92rem;
  }

  .path-session__note {
    font-size: 0.75rem;
  }

  .path-session__open {
    grid-column: 2 / -1;
    justify-self: start;
    font-size: 0.74rem;
  }

  .path-foot {
    align-items: flex-start;
  }

  .path-promo__card {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 24px;
    gap: 20px;
  }

  .path-promo__action {
    width: 100%;
  }

  .path-promo__action .btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .path-age-tab {
    flex-basis: 100%;
  }

  .path-summary__main {
    flex-direction: column;
    gap: 12px;
  }

  .path-ring {
    width: 72px;
    height: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .path-age-tab,
  .path-session,
  .path-week,
  .path-summary__next {
    transition: none;
  }

  .path-age-tab:hover {
    transform: none;
  }
}
