/* Pattern library foundation */
.hm-pattern-archive { margin: 0 auto; }
.hm-pattern-archive__header { max-width: 44rem; margin: 0 auto 3rem; }
.hm-pattern-archive__eyebrow { margin: 0 0 .65rem; color: #6c38a5; font-size: .78rem; font-weight: 800; letter-spacing: .12em; }
.hm-pattern-archive__header h1 { margin: 0; color: #4a2468; }
.hm-pattern-archive__intro { font-size: 1.125rem; }
.hm-pattern-archive > .wp-block-query { width: min(calc(100% - 4rem), 73.75rem); margin-right: auto; margin-left: auto; }
.hm-pattern-card__type { margin: 0 0 .55rem; color: #6c38a5; font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.hm-pattern-card__type a { color: inherit; text-decoration: none; }
.hm-pattern-card .wp-block-post-title { margin: 0 0 .65rem; }
.hm-pattern-card .wp-block-post-title a { color: #4a2468; text-decoration: none; }
.hm-pattern-card__excerpt .wp-block-post-excerpt__more-link { color: #6c38a5; font-weight: 800; }
.hm-pattern-archive__empty { padding: 2rem; border-radius: 18px; background: #f3eaff; color: #746a7c; }
.hm-pattern-single { max-width: 50rem; margin: 0 auto; }
.hm-pattern-single__header { margin-bottom: 2rem; }
.hm-pattern-single__type { margin: 0 0 .8rem; color: #6c38a5; font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hm-pattern-single__type a { color: inherit; text-decoration: none; }
.hm-pattern-single__header .wp-block-post-title { margin: 0; color: #4a2468; }
.hm-pattern-single__excerpt { margin-top: 1rem; color: #746a7c; }
.hm-pattern-single__image { width: calc(100% - 1rem); margin: 0 auto 2.5rem; }
.hm-pattern-information { margin: 2.5rem 0; padding: 1.6rem; border: 1px solid #dfcceb; border-radius: 22px; background: linear-gradient(135deg, #faf7fd 0%, #f3eaff 100%); box-shadow: 0 10px 26px rgba(72, 36, 110, .07); }
.hm-pattern-information__heading { margin: 0 0 1.2rem; color: #4a2468; font-size: 1.35rem; }
.hm-pattern-information__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1.5rem; margin: 0; }
.hm-pattern-information__list > div { padding: .7rem 0; border-bottom: 1px solid #e4d4ee; }
.hm-pattern-information__list dt { margin-bottom: .15rem; color: #6c38a5; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.hm-pattern-information__list dd { margin: 0; color: #34243e; font-weight: 650; }
.hm-pattern-information__notes { margin: 1.2rem 0 0; padding-top: 1.1rem; border-top: 1px solid #e4d4ee; color: #746a7c; }
.hm-pattern-information--editor .hm-pattern-information__editor-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem 1rem; }
.hm-pattern-information--editor .components-base-control { margin-bottom: .75rem; }
.hm-pattern-information--editor .components-input-control__container input,
.hm-pattern-information--editor .components-textarea-control__input { background: #fff; }
.hm-pattern-stitches-used { margin: 2.5rem 0; padding: 1.6rem; border: 1px solid #dfcceb; border-radius: 22px; background: linear-gradient(135deg, #faf7fd 0%, #f3eaff 100%); box-shadow: 0 10px 26px rgba(72, 36, 110, .07); }
.hm-pattern-stitches-used__heading { margin: 0 0 1.2rem; color: #4a2468; font-size: 1.35rem; }
.hm-pattern-stitches-used__list,
.hm-pattern-stitches-used__editor-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 0; padding: 0; list-style: none; }
.hm-pattern-stitches-used__list a { display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 3rem; padding: .75rem 1rem; border: 1px solid #e4d4ee; border-radius: 14px; background: #fff; color: #4a2468; font-weight: 750; text-decoration: none; }
.hm-pattern-stitches-used__list a:hover { border-color: #a875d5; box-shadow: 0 4px 12px rgba(72, 36, 110, .1); }
.hm-pattern-stitches-used__name { display: none; }
.hm-pattern-stitches-used[data-terminology="uk"] [data-hm-pattern-stitches-used-name="uk"],
.hm-pattern-stitches-used[data-terminology="us"] [data-hm-pattern-stitches-used-name="us"] { display: inline; }
.hm-pattern-stitches-used--editor .components-input-control__container input { background: #fff; }
.hm-pattern-stitches-used__editor-list { margin-top: 1rem; }
.hm-pattern-stitches-used__editor-list li { padding: .6rem .75rem; border-radius: 10px; background: #fff; color: #4a2468; font-weight: 700; }
.hm-pattern-stitches-used__empty { margin: 1rem 0 0; color: #746a7c; }
.hm-pattern-instructions { margin: 2.5rem 0; padding: clamp(1.35rem, 3vw, 2.25rem); border: 1px solid #dfcceb; border-radius: 24px; background: #fff; box-shadow: 0 10px 26px rgba(72, 36, 110, .07); }
.hm-pattern-instructions__heading { margin: 0; color: #4a2468; font-size: 1.35rem; }
.hm-pattern-instructions__notation { margin: .75rem 0 0; padding: .65rem .8rem; border: 1px solid #e4d4ee; border-radius: 12px; background: #faf7fd; color: #5f5169; font-size: .84rem; line-height: 1.55; }
.hm-pattern-instructions__notation-label,
.hm-pattern-instructions__notation-example { display: block; }
.hm-pattern-instructions__notation-label { margin-bottom: .15rem; }
.hm-pattern-instructions__notation strong { color: #4a2468; }
.hm-pattern-instructions__notation code { padding: .08rem .28rem; border-radius: 4px; background: #efe3f9; color: #5e3090; font: inherit; font-weight: 800; }
.hm-pattern-instructions__intro { max-width: 44rem; margin: .9rem 0 1.7rem; color: #746a7c; }
.hm-pattern-instructions__intro > :last-child,
.hm-pattern-instructions__body > :last-child { margin-bottom: 0; }
.hm-pattern-instructions__switchers { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.hm-pattern-instructions__switcher { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem; border: 1px solid #d8c5e9; border-radius: 999px; background: #f8f3fc; }
.hm-pattern-instructions__switcher > span { display: inline-flex; align-items: center; gap: .45rem; padding-left: .5rem; padding-right: .1rem; color: #746a7c; font-size: .8rem; font-weight: 700; }
.hm-pattern-instructions__switcher > span::after { width: 0; height: 1.5rem; border-right: 2px solid #bf97df; content: ""; opacity: .9; }
.hm-pattern-instructions__switcher button { min-height: 34px; padding: .25rem .7rem; border: 0; border-radius: 999px; background: transparent; color: #4a2468; font: inherit; font-size: .84rem; font-weight: 800; cursor: pointer; }
.hm-pattern-instructions__switcher button[aria-pressed="true"] { background: #6c38a5; color: #fff; box-shadow: 0 2px 8px rgba(72, 36, 104, .22); }
.hm-pattern-instructions__variant { display: none; }
.hm-pattern-instructions[data-terminology="uk"][data-wording="abbreviations"] [data-hm-pattern-variant-terminology="uk"][data-hm-pattern-variant-wording="abbreviations"],
.hm-pattern-instructions[data-terminology="uk"][data-wording="names"] [data-hm-pattern-variant-terminology="uk"][data-hm-pattern-variant-wording="names"],
.hm-pattern-instructions[data-terminology="us"][data-wording="abbreviations"] [data-hm-pattern-variant-terminology="us"][data-hm-pattern-variant-wording="abbreviations"],
.hm-pattern-instructions[data-terminology="us"][data-wording="names"] [data-hm-pattern-variant-terminology="us"][data-hm-pattern-variant-wording="names"] { display: block; }
.hm-pattern-instructions__list,
.hm-pattern-instructions__editor-list { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.hm-pattern-instructions__list { margin-top: 1.35rem; }
.hm-pattern-instructions__intro + .hm-pattern-instructions__list { margin-top: 0; }
.hm-pattern-instructions__group + .hm-pattern-instructions__group { margin-top: 2rem; }
.hm-pattern-instructions__group-heading { margin: 1.6rem 0 .85rem; padding-bottom: .55rem; border-bottom: 1px solid #e4d4ee; color: #6c38a5; font-size: 1.15rem; }
.hm-pattern-instructions__group:first-of-type .hm-pattern-instructions__group-heading { margin-top: .3rem; }
.hm-pattern-instructions__group-heading + .hm-pattern-instructions__list { margin-top: 0; }
.hm-pattern-instructions__step,
.hm-pattern-instructions__editor-step { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: flex-start; padding: 1.1rem; border: 1px solid #e8daf1; border-radius: 16px; background: #faf7fd; }
.hm-pattern-instructions__step-number { display: inline-flex; width: 2rem; height: 2rem; flex: 0 0 2rem; align-items: center; justify-content: center; border-radius: 50%; background: #6c38a5; color: #fff; font-size: .84rem; font-weight: 800; }
.hm-pattern-instructions__step-content :is(h3, h4) { margin: .15rem 0 .45rem; color: #4a2468; font-size: 1.08rem; }
.hm-pattern-instructions__body { color: #34243e; }
.hm-pattern-instructions__step--untitled .hm-pattern-instructions__body > :first-child { margin-top: 0; }
.hm-pattern-instructions__editor-step-content { min-width: 0; }
.hm-pattern-instructions__editor-step-content .components-base-control { margin-bottom: .7rem; }
.hm-pattern-instructions__editor-actions { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: -.2rem; }
.hm-pattern-instructions--editor .components-input-control__container input,
.hm-pattern-instructions--editor .components-textarea-control__input { background: #fff; }

@media (max-width: 700px) {
  .hm-pattern-archive__header { margin-bottom: 2rem; }
  .hm-pattern-archive__grid { grid-template-columns: 1fr !important; }
  .hm-pattern-information__list,
  .hm-pattern-information--editor .hm-pattern-information__editor-fields,
  .hm-pattern-stitches-used__list,
  .hm-pattern-stitches-used__editor-list { grid-template-columns: 1fr; }
  .hm-pattern-instructions__step,
  .hm-pattern-instructions__editor-step { gap: .75rem; padding: 1rem; }
}
.hm-blog-timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hm-blog-timeline .wp-block-post {
  position: relative;
  margin: 0;
  padding: 0 0 var(--wp--preset--spacing--40) 3rem;
}
.hm-blog-timeline .wp-block-post::before {
  position: absolute;
  top: 1.2rem;
  bottom: 0;
  left: .7rem;
  width: 2px;
  background: #e7d8f7;
  content: "";
}
.hm-blog-timeline .wp-block-post:last-child::before { display: none; }
.hm-blog-timeline .wp-block-post::after {
  position: absolute;
  top: .7rem;
  left: 0;
  width: 1.4rem;
  height: 1.4rem;
  box-sizing: border-box;
  border: 4px solid #f3eaff;
  border-radius: 50%;
  background: #6c38a5;
  box-shadow: 0 0 0 1px #8f5bd3;
  content: "";
}
.hm-blog-timeline__card {
  position: relative;
  box-shadow: var(--hm-shadow);
}
.hm-blog-timeline__image {
  position: absolute;
  top: 50%;
  left: 3.25rem;
  width: 6.25rem;
  margin: 0;
  overflow: hidden;
  transform: translateY(-50%);
}
.hm-blog-timeline__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hm-blog-timeline__meta {
  align-items: center;
  gap: .65rem;
}
.hm-blog-timeline__meta .wp-block-post-terms { line-height: 1; }
.hm-blog-timeline__author,
.hm-post-meta__author {
  display: inline-block;
  padding: .35rem .7rem;
  border-radius: 999px;
  background: #c6a6ef;
  color: #f3eaff;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.hm-blog-timeline__author a,
.hm-post-meta__author a {
  color: inherit;
  text-decoration: none;
}
.hm-blog-timeline__author a:hover,
.hm-blog-timeline__author a:focus-visible,
.hm-post-meta__author a:hover,
.hm-post-meta__author a:focus-visible { color: #ffffff; }

@media (max-width: 1150px) {
  .hm-blog-timeline__image {
    position: static;
    width: min(100%, 10rem);
    margin: 0 auto var(--wp--preset--spacing--30);
    transform: none;
  }
}

.hm-post-featured-image {
  width: min(100%, 30rem);
  margin-right: auto !important;
  margin-left: auto !important;
}
.hm-post-featured-image img {
  display: block;
  width: 100%;
  height: auto;
}
.hm-linked-pattern { display: flex; justify-content: center; margin: .85rem 0 2.25rem; }
.hm-linked-pattern__button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 36px; padding: .35rem 1rem; border-radius: 999px; background: var(--hm-button-primary); color: var(--hm-button-light-text); box-shadow: 0 6px 14px rgba(108, 56, 165, .22); font-size: .9rem; font-weight: 800; text-decoration: none; }
.hm-linked-pattern__button:hover { background: #5b2d8a; color: var(--hm-button-light-text); transform: translateY(-1px); }
.hm-linked-pattern__button span { font-size: 1.2em; line-height: 1; text-shadow: 0 2px 4px rgba(47, 22, 74, .45); transition: transform .18s ease; }
.hm-linked-pattern__button:hover span { transform: translateX(3px); }
.hm-keep-crafting { padding-top: 2rem !important; padding-left: 2rem !important; }
.hm-keep-crafting h3 { color: #4a2468; }
.hm-keep-crafting > p { color: #746a7c; font-size: .9rem; white-space: normal; }
@media (min-width: 701px) { .hm-keep-crafting > p { white-space: nowrap; } }

.hm-pattern-meta {
  border: 1px solid #e7d8f7;
  box-shadow: 0 12px 36px rgba(72,36,110,.07);
}

.wp-block-query-pagination { gap: .55rem; }
.wp-block-query-pagination a,
.wp-block-query-pagination .current {
  display: inline-flex;
  min-width: 2.5rem;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
}
.wp-block-query-pagination .current { background: #6c38a5; color: #fff; }

@media (max-width: 781px) {
  .hm-hide-mobile { display: none !important; }
  .hm-show-mobile {
    display: block !important;
    text-align: center;
  }
  .hm-hero__mascot { display: none; }
  .hm-hero {
    border-radius: 24px !important;
    padding-right: 1rem !important;
    padding-left: 1rem !important;
  }
  .hm-hero h1 { font-size: clamp(1.75rem, 8vw, 2.35rem) !important; }
}

.hm-hero-title__first-line,
.hm-hero-title__second-line {
  display: block;
  flex: 0 0 auto;
}

.hm-hero-title__first-line {
  white-space: nowrap;
}

.hm-calm-cta {
  border: 1px solid #e2cdef;
  background: linear-gradient(135deg, #f5ebfc 0%, #e9d8f8 100%) !important;
  box-shadow: 0 14px 30px rgba(91, 47, 132, .12);
}

.hm-calm-cta__title {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
}

.hm-calm-cta__text {
  font-size: 1.1rem;
}

@media (min-width: 782px) {
  .hm-calm-cta__title { white-space: nowrap; }

  .hm-desktop-navigation .wp-block-navigation-item__content {
    color: #6c38a5 !important;
    font-family: var(--wp--preset--font-family--display) !important;
    font-size: 1.1rem !important;
  }

  .hm-desktop-navigation .wp-block-navigation-item__content:hover,
  .hm-desktop-navigation .wp-block-navigation-item__content:focus-visible {
    color: #4a2468 !important;
  }
}

