/* Shared shell for Kako zveni matematika? — cardless FFF Lab surface. */
.fff-msl-app,
.fff-msl-collection {
  --fff-msl-ink: #16212b;
  --fff-msl-muted: #5b6670;
  --fff-msl-line: rgba(22, 33, 43, .14);
  --fff-msl-accent: #6c48e8;
  --fff-msl-accent-soft: #f0edff;
  max-width: 1180px;
  margin: 0 auto;
  color: var(--fff-msl-ink);
}

.fff-msl-app__title {
  margin: 1rem 0 .5rem;
  color: var(--fff-msl-ink);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.fff-msl-app__context {
  max-width: 720px;
  margin: 0 auto 1.4rem;
}

.fff-msl-app__eyebrow,
.fff-msl-collection__kicker {
  margin: 0 0 .45rem;
  color: var(--fff-msl-accent);
  font-size: .73rem;
  font-weight: 760;
  letter-spacing: .13em;
  line-height: 1.25;
  text-transform: uppercase;
}

.fff-msl-app__question,
.fff-msl-collection__lead {
  max-width: 56ch;
  margin: 0;
  color: var(--fff-msl-muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.fff-msl-nav {
  display: flex;
  align-items: center;
  gap: .55rem;
  max-width: 1180px;
  margin: 0 auto 1.5rem;
  overflow-x: auto;
  padding: .2rem 0 .55rem;
  scrollbar-width: thin;
  white-space: nowrap;
}

.fff-msl-nav a {
  border-bottom: 1px solid transparent;
  color: var(--fff-msl-muted);
  font-size: .88rem;
  line-height: 1.4;
  padding: .38rem .45rem;
  text-decoration: none;
}

.fff-msl-nav a:hover,
.fff-msl-nav a:focus-visible,
.fff-msl-nav a.is-active {
  border-color: var(--fff-msl-accent);
  color: var(--fff-msl-ink);
}

.fff-msl-nav__collection {
  color: var(--fff-msl-ink) !important;
  font-weight: 720;
}

.fff-msl-nav__divider {
  color: var(--fff-msl-line);
}

.fff-msl-app__explanation {
  max-width: 760px;
  margin: 2rem auto 0;
  border-top: 1px solid var(--fff-msl-line);
  padding-top: 1.5rem;
}

.fff-msl-app__explanation h2 {
  margin: 0 0 .55rem;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  letter-spacing: -.02em;
}

.fff-msl-app__explanation p {
  margin: 0;
  color: var(--fff-msl-muted);
  line-height: 1.7;
}

.fff-msl-app :where(button, input, select):focus-visible,
.fff-msl-collection :where(a, button):focus-visible {
  outline: 3px solid rgba(108, 72, 232, .35);
  outline-offset: 3px;
}

.fff-msl-collection__hero {
  max-width: 760px;
  margin: 0 auto 2.2rem;
}

.fff-msl-collection__list {
  display: grid;
  gap: 1.2rem;
}

.fff-msl-collection__item {
  display: grid;
  grid-template-columns: minmax(220px, .9fr) minmax(0, 1.1fr);
  min-height: 250px;
  border-top: 1px solid var(--fff-msl-line);
  padding-top: 1.2rem;
}

.fff-msl-collection__visual {
  display: grid;
  min-height: 220px;
  place-items: end start;
  overflow: hidden;
  padding: 1.15rem;
  background: #111923;
  color: #f8f7ff;
  position: relative;
}

.fff-msl-collection__visual::before,
.fff-msl-collection__visual::after {
  position: absolute;
  content: '';
  pointer-events: none;
}

.fff-msl-collection__visual::before {
  inset: 12% 13%;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(108, 72, 232, .08), 0 0 0 54px rgba(108, 72, 232, .05);
  transform: rotate(-14deg) scaleY(.48);
}

.fff-msl-collection__visual::after {
  width: 130%;
  height: 1px;
  background: rgba(255, 255, 255, .3);
  left: -15%;
  top: 53%;
  transform: rotate(-11deg);
}

.fff-msl-collection__item--chladni .fff-msl-collection__visual::before {
  border-radius: 12%;
  box-shadow: 0 0 0 20px rgba(247, 161, 76, .09), 0 0 0 62px rgba(247, 161, 76, .05);
  transform: rotate(0) scaleY(1);
}

.fff-msl-collection__item--galaxy .fff-msl-collection__visual::before {
  border-radius: 50%;
  box-shadow: 0 0 0 22px rgba(90, 193, 255, .1), 0 0 0 68px rgba(90, 193, 255, .06);
  transform: rotate(24deg) scaleY(.5);
}

.fff-msl-collection__visual span {
  position: relative;
  z-index: 1;
  max-width: 14ch;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-weight: 720;
  letter-spacing: -.025em;
}

.fff-msl-collection__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.4rem clamp(1rem, 4vw, 3rem);
}

.fff-msl-collection__body h2 {
  margin: 0 0 .55rem;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  letter-spacing: -.035em;
}

.fff-msl-collection__body p:not(.fff-msl-collection__kicker) {
  max-width: 44ch;
  margin: 0;
  color: var(--fff-msl-muted);
  line-height: 1.65;
}

.fff-msl-collection__cta {
  align-self: flex-start;
  margin-top: 1.1rem;
  color: var(--fff-msl-accent);
  font-weight: 720;
  text-decoration: none;
}

.fff-msl-collection__cta:hover,
.fff-msl-collection__cta:focus-visible {
  text-decoration: underline;
  text-underline-offset: .18em;
}

.fff-msl-error {
  border-left: 3px solid #b42318;
  padding: .8rem 1rem;
}

@media (max-width: 720px) {
  .fff-msl-nav {
    margin-bottom: 1rem;
  }

  .fff-msl-collection__item {
    grid-template-columns: 1fr;
  }

  .fff-msl-collection__visual {
    min-height: 170px;
  }

  .fff-msl-collection__body {
    padding: 1rem 0 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fff-msl-app *,
  .fff-msl-collection * {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
