/*
Theme Name: HandmadeBy.me
Theme URI: https://www.handmadeby.me
Author: Mark Lamont & Codex
Description: A modern purple block theme for knitting, crochet, handmade tutorials, and pattern-led blogging.
Version: 1.8.31
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: handmadeby-me
Tags: blog, block-patterns, full-site-editing, knitting, crochet, purple, one-column, two-columns
*/

:root {
  --hm-shadow: 0 16px 45px rgba(72, 36, 110, 0.10);
  --hm-shadow-hover: 0 22px 55px rgba(72, 36, 110, 0.16);
  --hm-button-primary: #6c38a5;
  --hm-button-light-text: #ffffff;
  --hm-button-dark-text: #eadcf9;
  --hm-button-hover-shadow: 0 10px 24px rgba(101, 53, 143, .18);
}

html { scroll-behavior: smooth; }
body { text-rendering: optimizeLegibility; }
a { text-underline-offset: 0.18em; }

/* Keep every template's main content comfortably inset on narrow screens. */
@media (max-width: 781px) {
  .wp-site-blocks > main.wp-block-group {
    padding-right: var(--wp--preset--spacing--30);
    padding-left: var(--wp--preset--spacing--30);
  }
}

.hm-site-header {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.hm-mobile-menu-toggle,
.hm-mobile-menu { display: none; }

/* Optional decorative frame for the Handmade Framed Image editor block. */
.hm-framed-image {
  --hm-framed-image-inset: 7.5%;
  --hm-framed-image-width: 42rem;
  --hm-framed-image-scale: 1;
  position: relative;
  width: min(100%, var(--hm-framed-image-width));
  aspect-ratio: 1;
  margin-right: auto;
  margin-left: auto;
  overflow: hidden;
  isolation: isolate;
}
.hm-framed-image--ratio-1-1 {
  aspect-ratio: 1;
}
.hm-framed-image--ratio-3-2 {
  aspect-ratio: 3 / 2;
  --hm-framed-image-inset: 12% 11%;
}
.hm-framed-image--ratio-2-3 {
  aspect-ratio: 2 / 3;
  --hm-framed-image-inset: 10% 12%;
}
.hm-framed-image--size-small { --hm-framed-image-width: 18rem; }
.hm-framed-image--size-medium { --hm-framed-image-width: 28rem; }
.hm-framed-image--size-large { --hm-framed-image-width: 42rem; }
.hm-framed-image--size-full { --hm-framed-image-width: 100%; }
.hm-framed-image__media,
.hm-framed-image__overlay {
  position: absolute;
  display: block;
}
.hm-framed-image__media {
  inset: var(--hm-framed-image-inset);
  overflow: hidden;
}
.hm-framed-image__overlay {
  inset: 0;
  width: 100%;
  height: 100%;
}
.hm-framed-image__photo {
  display: block;
  object-fit: cover;
  width: 100%;
  height: 100%;
  transform: scale(var(--hm-framed-image-scale));
  transform-origin: center;
}
.hm-framed-image--uncropped .hm-framed-image__photo {
  object-fit: contain;
}
.hm-framed-image__overlay {
  z-index: 1;
  object-fit: contain;
  pointer-events: none;
}
.editor-styles-wrapper .hm-framed-image {
  box-sizing: border-box;
}
.hm-framed-image--none .hm-framed-image__media {
  inset: 0;
}

/* Structured Crochet Stitch Reference */
.hm-stitch-reference { max-width: 48rem; margin: 0 auto; }
.hm-stitch-reference__back { display: inline-block; margin-bottom: 1.5rem; font-weight: 700; }
.hm-stitch-reference__header { padding-bottom: 1.75rem; border-bottom: 1px solid #e6d9f0; }
.hm-stitch-reference__eyebrow,
.hm-stitch-reference__system { margin: 0 0 .45rem; color: #6c38a5; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hm-stitch-reference h1 { margin: 0; color: #4a2468; }
.hm-stitch-reference__switcher { display: inline-flex; align-items: center; gap: .45rem; margin-top: 1.25rem; padding: .3rem; border: 1px solid #d8c5e9; border-radius: 999px; background: #f8f3fc; }
.hm-stitch-reference__switcher > span,
.hm-stitch-directory__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-stitch-reference__switcher > span::after,
.hm-stitch-directory__switcher > span::after { width: 0; height: 1.5rem; border-right: 2px solid #bf97df; content: ""; opacity: .9; }
.hm-stitch-reference__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-stitch-reference__switcher button[aria-pressed="true"] { background: #6c38a5; color: #ffffff; box-shadow: 0 2px 8px rgba(72, 36, 104, .22); }
.hm-stitch-reference__terms { margin-top: 1.75rem; padding: 1.5rem; border-radius: 18px; background: #f8f3fc; }
.hm-stitch-reference[data-terminology="uk"] .hm-stitch-reference__terms--us,
.hm-stitch-reference[data-terminology="us"] .hm-stitch-reference__terms--uk { display: none; }
.hm-stitch-reference__terms h2,
.hm-stitch-reference__details h2,
.hm-stitch-reference__sources h2 { margin-top: 0; color: #4a2468; }
.hm-stitch-reference__abbreviation { margin: .55rem 0 1.25rem; color: #4a2468; }
.hm-stitch-reference__instructions h3,
.hm-stitch-reference__repeat h3 { margin-bottom: .35rem; font-size: 1rem; }
.hm-stitch-reference__repeat { margin-top: 1.25rem; padding-top: 1.15rem; border-top: 1px solid #dfcee9; }
.hm-stitch-reference__details,
.hm-stitch-reference__sources { margin-top: 1.75rem; }
.hm-stitch-reference__details dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin: 0; }
.hm-stitch-reference__details dl > div { padding: .9rem; border: 1px solid #e6d9f0; border-radius: 12px; }
.hm-stitch-reference__details dt { color: #746a7c; font-size: .78rem; font-weight: 700; }
.hm-stitch-reference__details dd { margin: .2rem 0 0; color: #4a2468; font-weight: 700; }
.hm-stitch-reference__alternates,
.hm-stitch-reference__notes { margin-top: 1.4rem; padding: 1rem 1.1rem; border-left: 4px solid #8f5bd3; border-radius: 0 12px 12px 0; background: #f3eaff; }
.hm-stitch-reference__sources ul { padding-left: 1.2rem; }
@media (max-width: 600px) { .hm-stitch-reference__details dl { grid-template-columns: 1fr; } }

/* Crochet stitch directory */
.hm-stitch-directory { max-width: 56rem; margin: 0 auto; }
.hm-stitch-directory__header { margin-bottom: 3rem; }
.hm-stitch-directory__header h1 { margin: 0; color: #4a2468; }
.hm-stitch-directory__header p:last-child { max-width: 42rem; margin: .85rem 0 0; color: #746a7c; }
.hm-stitch-directory__switcher { display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 1.25rem; padding: .3rem; border: 1px solid #d8c5e9; border-radius: 999px; background: #f8f3fc; }
.hm-stitch-directory__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-stitch-directory__switcher button[aria-pressed="true"] { background: #6c38a5; color: #fff; box-shadow: 0 2px 8px rgba(72, 36, 104, .22); }
.hm-stitch-directory__search { margin: 0 0 2.5rem; }
.hm-stitch-directory__search > label { display: block; margin-bottom: .55rem; color: #4a2468; font-weight: 800; }
.hm-stitch-directory__search-control { position: relative; }
.hm-stitch-directory__search input { width: 100%; min-height: 48px; box-sizing: border-box; padding: .7rem 3rem .7rem 1rem; border: 1px solid #d8c5e9; border-radius: 12px; background: #fff; color: #2d2434; font: inherit; }
.hm-stitch-directory__search input::-webkit-search-decoration,
.hm-stitch-directory__search input::-webkit-search-cancel-button,
.hm-stitch-directory__search input::-webkit-search-results-button,
.hm-stitch-directory__search input::-webkit-search-results-decoration { display: none; -webkit-appearance: none; appearance: none; }
.hm-stitch-directory__search input:focus { outline: 3px solid rgba(143, 91, 211, .28); border-color: #8f5bd3; }
.hm-stitch-directory__search-control button { position: absolute; top: 50%; right: .45rem; display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 999px; background: #f3eaff; color: #4a2468; font: inherit; font-size: 1.45rem; line-height: 1; cursor: pointer; transform: translateY(-50%); }
.hm-stitch-directory__search-control button > span[aria-hidden="true"] { display: flex; width: 1em; height: 1em; align-items: center; justify-content: center; transform: translateY(-.04em); }
.hm-stitch-directory__search-control button:hover,
.hm-stitch-directory__search-control button:focus-visible { background: #e7d8f7; }
.hm-stitch-directory__search-status { min-height: 1.35em; margin: .5rem 0 0; color: #746a7c; font-size: .86rem; }
.hm-stitch-directory__results { margin-top: -.8rem; }
.hm-stitch-directory__results-heading { margin: 0 0 .8rem; color: #4a2468; font-size: 1.2rem; }
.hm-stitch-directory__no-results { margin: 0; padding: 1rem; border-radius: 12px; background: #f8f3fc; color: #746a7c; }
.hm-stitch-directory.is-searching .hm-stitch-directory__group { display: none; }
.hm-stitch-directory[data-terminology="uk"] [data-hm-stitch-directory-name="us"],
.hm-stitch-directory[data-terminology="uk"] [data-hm-stitch-directory-terms="us"],
.hm-stitch-directory[data-terminology="us"] [data-hm-stitch-directory-name="uk"],
.hm-stitch-directory[data-terminology="us"] [data-hm-stitch-directory-terms="uk"] { display: none; }
.hm-stitch-directory__group { margin-top: 2.75rem; }
.hm-stitch-directory__group-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: baseline; gap: 1rem; margin-bottom: .8rem; padding: 0 0 .65rem; border-bottom: 2px solid #e6d9f0; cursor: pointer; list-style: none; }
.hm-stitch-directory__group-heading::-webkit-details-marker { display: none; }
.hm-stitch-directory__group-heading::after { justify-self: end; content: "−"; color: #6c38a5; font-size: 1.4rem; font-weight: 700; line-height: 1; }
.hm-stitch-directory__group:not([open]) .hm-stitch-directory__group-heading::after { content: "+"; }
.hm-stitch-directory__group-title { color: #4a2468; font-family: var(--wp--preset--font-family--display); font-size: var(--wp--preset--font-size--large); font-weight: 800; }
.hm-stitch-directory__group-heading > span:not(.hm-stitch-directory__group-title) { grid-column: 2; }
.hm-stitch-directory__group-heading span { color: #746a7c; font-size: .85rem; font-weight: 700; white-space: nowrap; }
.hm-stitch-directory__list { margin: 0; padding: 0; border-top: 1px solid #eee5f5; list-style: none; }
.hm-stitch-directory__list li { margin: 0; border-bottom: 1px solid #eee5f5; }
.hm-stitch-directory__list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: 1.1rem .75rem; color: #2d2434; text-decoration: none; transition: background 160ms ease, padding 160ms ease; }
.hm-stitch-directory__list a:hover,
.hm-stitch-directory__list a:focus-visible { padding-right: 1rem; padding-left: 1rem; background: #f3eaff; }
.hm-stitch-directory__name { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .5rem; color: #5c2d89; font-size: 1.08rem; font-weight: 800; }
.hm-stitch-directory__abbreviation { display: inline-flex; min-height: 1.7rem; align-items: center; padding: .12rem .5rem; border-radius: 999px; background: #e7d8f7; color: #4a2468; font-family: var(--wp--preset--font-family--sans); font-size: .75rem; font-weight: 800; line-height: 1.2; }
.hm-stitch-directory__terms { display: flex; flex-wrap: wrap; gap: .45rem 1rem; color: #746a7c; font-size: .88rem; }
.hm-stitch-directory__terms strong { color: #4a2468; font-size: .75rem; letter-spacing: .04em; }
.hm-stitch-directory__terms em { font-style: normal; }
.hm-stitch-directory__arrow { color: #6c38a5; font-size: 1.25rem; font-weight: 800; }
@media (max-width: 700px) {
  .hm-stitch-directory__header { margin-bottom: 2.25rem; }
  .hm-stitch-directory__list a { grid-template-columns: 1fr auto; gap: .45rem .75rem; padding: 1rem .35rem; }
}

.hm-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  background: #f3eaff;
}

.hm-brand-mark svg { width: 34px; height: 34px; display: block; }
.hm-brand-link { text-decoration: none !important; }
.hm-brand-link:hover .hm-brand-mark { transform: rotate(-7deg) scale(1.04); }
.hm-brand-mark { transition: transform 180ms ease; }

.hm-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hm-hero::before,
.hm-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  z-index: -1;
}
.hm-hero::before {
  width: 420px;
  height: 420px;
  background: rgba(174, 123, 255, 0.18);
  top: -220px;
  right: -120px;
}
.hm-hero::after {
  width: 260px;
  height: 260px;
  background: rgba(220, 192, 255, 0.24);
  bottom: -150px;
  left: -80px;
}
.hm-hero__mascot {
  display: block;
  position: absolute;
  right: 1.2rem;
  bottom: .75rem;
  z-index: 0;
  width: clamp(6rem, 10vw, 8.5rem);
  aspect-ratio: 480 / 512;
  background: url("assets/images/hero-bear-donkey.png") center / contain no-repeat;
  pointer-events: none;
}
.hm-hero > :not(.hm-hero__mascot) {
  position: relative;
  z-index: 1;
}

.hm-hero-intro {
  max-width: 50rem;
  margin-right: auto;
  margin-left: auto;
}

.hm-hero > :where(.wp-block-heading, .wp-block-paragraph, .wp-block-buttons) {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.hm-hero h1 {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hm-card {
  height: 100%;
  overflow: hidden;
  box-shadow: var(--hm-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.hm-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hm-shadow-hover);
}
.hm-card .wp-block-post-featured-image img { transition: transform 300ms ease; }
.hm-card:hover .wp-block-post-featured-image img { transform: scale(1.025); }

.hm-home-latest__image {
  width: min(calc(100% - 2rem), 13rem);
  margin: var(--wp--preset--spacing--30) auto 0;
  border-radius: 18px !important;
  overflow: hidden;
}
.hm-home-latest__image img {
  display: block;
  width: 100%;
  height: auto;
}
.hm-show-mobile { display: none; }

.hm-category-card {
  display: flex;
  flex-direction: column;
  min-height: 13.5rem;
  transition: transform 180ms ease, background 180ms ease;
}
.hm-category-card:hover { transform: translateY(-3px); }
.hm-category-card > p:last-child { margin-top: auto; }
.wp-block-columns .wp-block-column > .hm-category-card { flex: 1; }
.wp-block-columns .wp-block-column:has(> .hm-category-card) { display: flex; }

.hm-category-card__icon {
  display: block;
  width: 48px;
  height: 72px;
  margin: 0 auto;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 48px 48px;
}

.hm-category-card__icon--knitting {
  background-image: url("assets/images/knitting-purple-yarn.png");
}

.hm-404__icon {
  width: 100px;
  height: 120px;
  background-size: 100px 100px;
}

.hm-category-card__icon--crochet {
  background-image: url("assets/images/crochet-granny-square.png");
}

.hm-category-card__icon--tools {
  background-image: url("assets/images/tools-craft-kit-icon.png");
}

.hm-category-card__icon--patterns {
  color: #6c38a5;
}

.wp-block-column:has(> .hm-footer-social-links) { position: relative; }
.hm-footer-social-links { position: absolute; top: .15rem; right: 2rem; margin: 0; }
.hm-footer-social-links__icons { display: flex; gap: .65rem; }
.hm-footer-social-links__link { display: inline-flex; width: 2.5rem; height: 2.5rem; align-items: center; justify-content: center; border: 1px solid rgba(198, 166, 239, .62); border-radius: 50%; color: #f4edf9 !important; transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease; }
.hm-footer-social-links__link:hover, .hm-footer-social-links__link:focus-visible { border-color: #ffffff; background: #ffffff; color: #6c38a5 !important; transform: translateY(-2px); }
.hm-footer-social-links__link:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }
.hm-footer-social-links__link svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.hm-footer-social-links__link[href*="facebook"] svg { fill: currentColor; stroke: none; }

@media (max-width: 781px) {
  .wp-block-column:has(> .hm-footer-social-links) { position: static; }
  .hm-footer-social-links { position: static; margin-top: 1.25rem; }
  .hm-category-card {
    height: 13.5rem;
    box-sizing: border-box;
  }
}

.hm-tools-page { max-width: 56rem; margin: 0 auto; }
.hm-tools-page__intro { max-width: 38rem; margin: 0 auto 2.25rem; color: #746a7c; text-align: center; }
.hm-tools-page__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.25rem; }
.hm-tool-card { display: flex; min-height: 14rem; flex-direction: column; align-items: flex-start; gap: 1.15rem; padding: 1.75rem; border: 1px solid #e1d1ee; border-radius: 24px; background: linear-gradient(135deg, #faf7fd 0%, #f3eaff 100%); box-shadow: var(--hm-shadow); color: #2d2434; text-decoration: none; transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; }
.hm-tool-card:hover, .hm-tool-card:focus-visible { border-color: #b58ae1; box-shadow: var(--hm-shadow-hover); color: #2d2434; transform: translateY(-4px); }
.hm-tool-card__icon { display: block; width: 58px; height: 58px; border-radius: 18px; background: #ffffff url("assets/images/crochet-granny-square.png") center / 42px 42px no-repeat; box-shadow: 0 7px 18px rgba(92, 45, 137, .16); }
.hm-tool-card__content { display: grid; gap: .5rem; }
.hm-tool-card__title { color: #4a2468; font-family: var(--wp--preset--font-family--display); font-size: 1.35rem; font-weight: 800; line-height: 1.2; }
.hm-tool-card__description { color: #746a7c; }
.hm-tool-card__action { margin-top: .35rem; color: #6c38a5; font-weight: 800; }
.hm-tool-card__icon--row-counter { background-color: #ffffff; background-image: url("assets/images/row-counter-tool-icon.png"); background-position: center; background-size: 46px auto; background-repeat: no-repeat; font-size: 0; }

.hm-row-counter-guide { max-width: 46rem; margin: 0 auto; }
.hm-row-counter-guide__intro { max-width: 39rem; margin: 0 auto 2rem; color: #746a7c; font-size: 1.1rem; text-align: center; }
.hm-row-counter-guide__steps { display: grid; gap: 1rem; }
.hm-row-counter-guide__step { display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; align-items: start; padding: 1.35rem; border: 1px solid #e1d1ee; border-radius: 20px; background: #faf7fd; box-shadow: var(--hm-shadow); }
.hm-row-counter-guide__step h2 { margin: 0 0 .4rem; color: #4a2468; font-size: 1.25rem; }
.hm-row-counter-guide__step p { margin: 0; color: #746a7c; }
.hm-row-counter-guide__number { display: grid; width: 3rem; height: 3rem; place-items: center; border-radius: 50%; background: #6c38a5; color: #ffffff; font-family: var(--wp--preset--font-family--display); font-size: 1.35rem; font-weight: 800; }

@media (max-width: 480px) {
  .hm-row-counter-guide__step { grid-template-columns: 2.5rem 1fr; padding: 1.1rem; }
  .hm-row-counter-guide__number { width: 2.5rem; height: 2.5rem; }
}

.hm-pill,
.wp-block-post-terms a {
  display: inline-block;
  border-radius: 999px;
  text-decoration: none;
}

.wp-block-post-terms a {
  padding: .35rem .7rem;
  background: #f3eaff;
  color: #61358f;
  font-size: .78rem;
  font-weight: 700;
  margin-right: .35rem;
}

.wp-block-navigation a { text-decoration: none; }
.wp-block-navigation a:hover { color: #7b3fc6; }

.wp-block-button .wp-block-button__link { transition: transform 160ms ease, box-shadow 160ms ease; }
.wp-block-button:not(.is-style-outline) .wp-block-button__link,
.wp-block-post-comments-form input[type="submit"],
.comment-form input[type="submit"],
footer a[href*="wordpress.com/reader/site/subscription"] { color: var(--hm-button-light-text) !important; }
.wp-block-button .wp-block-button__link:hover { transform: translateY(-2px); box-shadow: var(--hm-button-hover-shadow); }
.hm-hero .is-style-outline .wp-block-button__link { box-sizing: border-box; padding-top: .625rem; padding-bottom: .625rem; border: 2px solid var(--hm-button-primary); background: transparent; color: var(--hm-button-primary) !important; box-shadow: none; }
.hm-hero .is-style-outline .wp-block-button__link:hover,
.hm-hero .is-style-outline .wp-block-button__link:focus-visible { background: transparent; color: var(--hm-button-primary) !important; box-shadow: var(--hm-button-hover-shadow); }

.wp-block-post-content > :where(h2,h3,h4) { scroll-margin-top: 7rem; }
.wp-block-post-content h2 { margin-top: 2.2em; }
.wp-block-post-content h3 { margin-top: 1.8em; }
.wp-block-post-content :where(ul,ol) { padding-left: 1.25em; }

/* Give images placed in standard pages a soft, Apple-style round rectangle. */
body.page .wp-block-post-content .wp-block-image,
body.page .wp-block-post-content .wp-block-image img {
  border-radius: 24px;
}
body.page .wp-block-post-content .wp-block-image { overflow: hidden; }
body.page .wp-block-post-content .wp-block-image img { display: block; }
body.page .wp-block-post-content .wp-block-media-text__media {
  overflow: hidden;
  border-radius: 24px;
}
body.page .wp-block-post-content .wp-block-media-text__media img {
  display: block;
  border-radius: inherit;
}

/* Use the same aubergine title treatment as category pages such as Knitting. */
.wp-site-blocks > main > :is(.wp-block-post-title, .wp-block-query-title, h1.wp-block-heading) { color: #4a2468; }

.hm-blog-landing__intro {
  max-width: 42rem;
  margin-right: auto;
  margin-bottom: var(--wp--preset--spacing--50);
  margin-left: auto;
}

/* 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;
  }
}

/* HandmadeBy.me logo */
.hm-brand-link{display:inline-flex;align-items:center;text-decoration:none!important;line-height:0;width:200px;height:auto;max-width:38vw}
.hm-brand-logo{display:block;width:100%;aspect-ratio:1409 / 671;height:auto;background-image:url("assets/images/handmadeby-logo.png");background-repeat:no-repeat;background-position:left center;background-size:contain}
@media (max-width:781px){.hm-brand-link{width:158px;max-width:55vw}.hm-site-header{position:relative!important}}

@media (max-width:781px){
  .hm-desktop-navigation { display: none !important; }
  .hm-mobile-menu-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #4a2468;
    cursor: pointer;
  }
  .hm-mobile-menu-toggle:hover,
  .hm-mobile-menu-toggle:focus-visible { background: #f3eaff; }
  .hm-mobile-menu {
    display: block;
    position: fixed;
    z-index: 100000;
    inset: 0;
  }
  .hm-mobile-menu[hidden] { display: none; }
  .hm-mobile-menu__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(45,36,52,.36);
    opacity: 0;
    transition: opacity 260ms ease;
  }
  .hm-mobile-menu__panel {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    width: min(88vw,380px);
    min-height: 100vh;
    min-height: 100dvh;
    flex-direction: column;
    box-sizing: border-box;
    padding: 1.25rem 1.5rem 2rem;
    overflow-y: auto;
    background: #f3eaff;
    box-shadow: -18px 0 42px rgba(45,36,52,.18);
    transform: translateX(100%);
    transition: transform 260ms ease;
    will-change: transform;
  }
  .hm-mobile-menu.is-open .hm-mobile-menu__backdrop { opacity: 1; }
  .hm-mobile-menu.is-open .hm-mobile-menu__panel { transform: translateX(0); }
  .hm-mobile-menu__header {
    display: flex;
    min-height: 72px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
  }
  .hm-mobile-menu__brand {
    display: block;
    width: 154px;
    flex: 0 0 154px;
    line-height: 0;
  }
  .hm-mobile-menu__brand span {
    display: block;
    width: 100%;
    aspect-ratio: 1409 / 671;
    background: url("assets/images/handmadeby-logo-mobile.png") left center / contain no-repeat;
  }
  .hm-mobile-menu__close {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    color: #4a2468;
    cursor: pointer;
  }
  .hm-mobile-menu__close:hover,
  .hm-mobile-menu__close:focus-visible { background: #e7d8f7; }
  .hm-mobile-menu__links {
    display: grid;
    gap: .5rem;
    margin: 3rem 0 0;
    padding: 0;
    list-style: none;
  }
  .hm-mobile-menu__links a {
    display: block;
    min-height: 48px;
    box-sizing: border-box;
    padding: .85rem 1rem;
    border-radius: 14px;
    color: #4a2468;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
  }
  .hm-mobile-menu__links a:hover,
  .hm-mobile-menu__links a:focus-visible {
    background: #ffffff;
    color: #4a2468;
  }
  body.hm-mobile-menu-is-open { overflow: hidden; }
}

@media (prefers-reduced-motion:reduce){
  .hm-mobile-menu__backdrop,
  .hm-mobile-menu__panel { transition: none; }
}

/* Footer accessibility: keep footer links visible on hover/focus. */
.has-aubergine-background-color a,
.has-aubergine-background-color .wp-block-navigation-item__content {
  color: #c6a6ef;
}
.has-aubergine-background-color a:hover,
.has-aubergine-background-color a:focus-visible,
.has-aubergine-background-color .wp-block-navigation-item__content:hover,
.has-aubergine-background-color .wp-block-navigation-item__content:focus-visible {
  color: #ffffff;
}
.has-aubergine-background-color .wp-block-site-title a:hover,
.has-aubergine-background-color .wp-block-site-title a:focus-visible {
  color: #ffffff;
}

/* Persistent row counter */
.hm-row-counter {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 60;
  font-family: var(--wp--preset--font-family--sans);
}
.hm-row-counter--bottom-left {
  right: auto;
  left: max(1.25rem, env(safe-area-inset-left));
}
.hm-row-counter button {
  font: inherit;
  cursor: pointer;
}
.hm-row-counter__toggle {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  padding: .35rem;
  border: 1px solid #d8c5e9;
  border-radius: 999px;
  background: #ffffff;
  color: #4a2468;
  box-shadow: 0 8px 26px rgba(48, 23, 71, .18);
  font-size: .88rem;
  font-weight: 750;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease, width 160ms ease, padding 160ms ease;
}
.hm-row-counter__toggle.has-count {
  width: auto;
  min-width: 64px;
  gap: .35rem;
  padding-right: .75rem;
}
.hm-row-counter__toggle:hover,
.hm-row-counter__toggle:focus-visible {
  background: #f3eaff;
  box-shadow: 0 12px 30px rgba(48, 23, 71, .24);
  transform: translateY(-2px);
}
.hm-row-counter__icon { display: block; width: 32px; height: 32px; }
.hm-row-counter__badge {
  display: grid;
  min-width: 1.25rem;
  height: 32px;
  place-items: center;
  padding: 0;
  color: #4a2468;
  font-size: .9rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hm-row-counter__badge[hidden] { display: none; }
.hm-row-counter__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + .7rem);
  width: min(15.5rem, calc(100vw - 2rem));
  padding: 1rem;
  border: 1px solid #d8c5e9;
  border-radius: 18px;
  background: #ffffff;
  color: #2d2434;
  box-shadow: 0 16px 42px rgba(48, 23, 71, .24);
  text-align: center;
}
.hm-row-counter--bottom-left .hm-row-counter__panel {
  right: auto;
  left: 0;
}
.hm-row-counter__panel[hidden] { display: none; }
.hm-row-counter__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .35rem;
}
.hm-row-counter__header p {
  margin: 0;
  color: #4a2468;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hm-row-counter__close {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #746a7c;
  font-size: 1.35rem;
  line-height: 1;
}
.hm-row-counter__close:hover,
.hm-row-counter__close:focus-visible { background: #f3eaff; color: #4a2468; }
.hm-row-counter__number {
  display: block;
  color: #4a2468;
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.hm-row-counter__caption {
  display: block;
  margin-top: .15rem;
  color: #746a7c;
  font-size: .82rem;
}
.hm-row-counter__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  margin-top: 1rem;
}
.hm-row-counter__adjust {
  min-height: 48px;
  border: 1px solid #d8c5e9;
  border-radius: 12px;
  background: #f8f3fc;
  color: #4a2468;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}
.hm-row-counter__adjust:hover,
.hm-row-counter__adjust:focus-visible { background: #eadcf9; }
.hm-row-counter__adjust--increment {
  border-color: #6c38a5;
  background: #6c38a5;
  color: #ffffff;
}
.hm-row-counter__adjust--increment:hover,
.hm-row-counter__adjust--increment:focus-visible { background: #562b82; }
.hm-row-counter__shortcut {
  margin: .7rem 0 0;
  color: #746a7c;
  font-size: .72rem;
  line-height: 1.4;
}
.hm-row-counter__shortcut kbd {
  display: inline-block;
  min-width: 1.25rem;
  padding: .03rem .25rem;
  border: 1px solid #d8c5e9;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #f8f3fc;
  color: #4a2468;
  font-family: inherit;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.25;
}
.hm-row-counter__adjust:disabled,
.hm-row-counter__reset:disabled { cursor: not-allowed; opacity: .45; }
.hm-row-counter__reset {
  width: 100%;
  min-height: 38px;
  margin-top: .7rem;
  padding: .35rem .5rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #6c38a5;
  font-size: .82rem;
  font-weight: 700;
}
.hm-row-counter__reset:not(:disabled):hover,
.hm-row-counter__reset:not(:disabled):focus-visible { background: #f3eaff; }

@media (max-width:781px) {
  .hm-row-counter {
    right: max(.85rem, env(safe-area-inset-right));
    bottom: max(.85rem, env(safe-area-inset-bottom));
  }
  .hm-row-counter--bottom-left {
    right: auto;
    left: max(.85rem, env(safe-area-inset-left));
  }
  .hm-row-counter__toggle { width: 48px; height: 48px; }
}

/* Theme preference controls */
.hm-header-actions {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-left: auto;
}
.hm-theme-toggle {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  padding: 0;
  border: 1px solid #e1d1f0;
  border-radius: 999px;
  background: #f3eaff;
  color: #4a2468;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}
.hm-theme-toggle:hover,
.hm-theme-toggle:focus-visible {
  background: #e7d8f7;
  transform: translateY(-1px);
}
.hm-theme-toggle--mobile { display: none; }
.hm-dark-mode-disabled .hm-theme-toggle { display: none !important; }

@media (max-width:781px) {
  .hm-header-actions { display: none; }
  .hm-site-header > .wp-block-group.alignwide {
    display: flex !important;
    width: 100% !important;
    column-gap: .5rem !important;
    justify-content: flex-start !important;
  }
  .hm-theme-toggle:not(.hm-theme-toggle--mobile) { display: none; }
  .hm-theme-toggle--mobile {
    display: inline-flex;
    order: 2;
    margin-left: auto !important;
  }
  .hm-mobile-menu-toggle {
    order: 3;
    margin-left: .5rem !important;
  }
}

/* Dark mode */
html[data-theme="dark"] {
  color-scheme: dark;
  --hm-shadow: 0 16px 45px rgba(0, 0, 0, .30);
  --hm-shadow-hover: 0 22px 55px rgba(0, 0, 0, .42);
}
html[data-theme="dark"] body,
html[data-theme="dark"] .wp-site-blocks {
  background: #17131c !important;
  color: #f4edf9 !important;
}
html[data-theme="dark"] .has-white-background-color.has-background,
html[data-theme="dark"] .has-blush-background-color.has-background,
html[data-theme="dark"] .has-lilac-background-color.has-background {
  background-color: #251d2d !important;
}
html[data-theme="dark"] .has-aubergine-background-color.has-background {
  background-color: #1e1427 !important;
}
html[data-theme="dark"] .has-soft-lilac-gradient-background {
  background: linear-gradient(135deg, #21182a 0%, #30213e 100%) !important;
}
html[data-theme="dark"] .has-purple-yarn-gradient-background {
  background: linear-gradient(135deg, #2c1640 0%, #562b82 50%, #8e63c3 100%) !important;
}
html[data-theme="dark"] .hm-calm-cta { border-color: #59456a; box-shadow: 0 14px 30px rgba(0, 0, 0, .24); }
html[data-theme="dark"] .hm-site-header {
  border-bottom-color: #453653 !important;
}
html[data-theme="dark"] .hm-site-header.has-white-background-color {
  background-color: #17131c !important;
}
html[data-theme="dark"] .hm-brand-logo,
html[data-theme="dark"] .hm-mobile-menu__brand span {
  background-image: url("assets/images/handmadeby-logo-dark.png");
}
html[data-theme="dark"] .wp-block-heading,
html[data-theme="dark"] .has-ink-color,
html[data-theme="dark"] .has-aubergine-color {
  color: #f4edf9 !important;
}
html[data-theme="dark"] .has-muted-color {
  color: #cdbed8 !important;
}
html[data-theme="dark"] .has-purple-color,
html[data-theme="dark"] .has-violet-color {
  color: #d0b1f5 !important;
}
html[data-theme="dark"] a,
html[data-theme="dark"] .wp-block-navigation a,
html[data-theme="dark"] .wp-block-navigation-item__content {
  color: #d0b1f5;
}
html[data-theme="dark"] a:hover,
html[data-theme="dark"] a:focus-visible,
html[data-theme="dark"] .wp-block-navigation a:hover,
html[data-theme="dark"] .wp-block-navigation a:focus-visible {
  color: #ffffff;
}
html[data-theme="dark"] .wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background-color: #9b6bd0 !important;
  color: var(--hm-button-dark-text) !important;
}
html[data-theme="dark"] .wp-block-post-comments-form input[type="submit"],
html[data-theme="dark"] .comment-form input[type="submit"],
html[data-theme="dark"] footer a[href*="wordpress.com/reader/site/subscription"] { color: var(--hm-button-dark-text) !important; }
html[data-theme="dark"] .is-style-outline .wp-block-button__link {
  border-color: #d0b1f5 !important;
  background: transparent !important;
  color: #eadcf9 !important;
}
html[data-theme="dark"] .hm-hero .is-style-outline .wp-block-button__link { border-color: #d0b1f5; color: var(--hm-button-dark-text) !important; }
html[data-theme="dark"] .wp-block-post-terms a {
  background: #3a284a;
  color: #eadcf9;
}
html[data-theme="dark"] .hm-pattern-archive__header h1,
html[data-theme="dark"] .hm-pattern-card .wp-block-post-title a,
html[data-theme="dark"] .hm-pattern-single__header .wp-block-post-title { color: #eadcf9; }
html[data-theme="dark"] .hm-pattern-archive__eyebrow,
html[data-theme="dark"] .hm-pattern-card__type,
html[data-theme="dark"] .hm-pattern-single__type,
html[data-theme="dark"] .hm-pattern-card__excerpt .wp-block-post-excerpt__more-link { color: #d0b1f5; }
html[data-theme="dark"] .hm-pattern-card { border-color: #59456a; background: #251d2d; box-shadow: 0 10px 26px rgba(0, 0, 0, .22); }
html[data-theme="dark"] .hm-pattern-card__excerpt,
html[data-theme="dark"] .hm-pattern-single__excerpt { color: #cdbed8; }
html[data-theme="dark"] .hm-pattern-instructions__switcher > span::after { border-color: #9d74be; }
html[data-theme="dark"] .hm-stitch-reference__switcher > span::after,
html[data-theme="dark"] .hm-stitch-directory__switcher > span::after { border-color: #9d74be; }
html[data-theme="dark"] .hm-pattern-archive__empty { background: #251d2d; color: #cdbed8; }
html[data-theme="dark"] .hm-pattern-information { border-color: #59456a; background: linear-gradient(135deg, #251d2d 0%, #30213e 100%); box-shadow: 0 10px 26px rgba(0, 0, 0, .2); }
html[data-theme="dark"] .hm-pattern-information__heading,
html[data-theme="dark"] .hm-pattern-information__list dd { color: #eadcf9; }
html[data-theme="dark"] .hm-pattern-information__list > div,
html[data-theme="dark"] .hm-pattern-information__notes { border-color: #59456a; }
html[data-theme="dark"] .hm-pattern-information__list dt { color: #d0b1f5; }
html[data-theme="dark"] .hm-pattern-information__notes { color: #cdbed8; }
html[data-theme="dark"] .hm-pattern-stitches-used { border-color: #59456a; background: linear-gradient(135deg, #251d2d 0%, #30213e 100%); box-shadow: 0 10px 26px rgba(0, 0, 0, .2); }
html[data-theme="dark"] .hm-pattern-stitches-used__heading,
html[data-theme="dark"] .hm-pattern-stitches-used__list a,
html[data-theme="dark"] .hm-pattern-stitches-used__editor-list li { color: #eadcf9; }
html[data-theme="dark"] .hm-pattern-stitches-used__list a,
html[data-theme="dark"] .hm-pattern-stitches-used__editor-list li { border-color: #59456a; background: #30213e; }
html[data-theme="dark"] .hm-pattern-stitches-used__empty { color: #cdbed8; }
html[data-theme="dark"] .hm-pattern-instructions { border-color: #59456a; background: #251d2d; box-shadow: 0 10px 26px rgba(0, 0, 0, .2); }
html[data-theme="dark"] .hm-pattern-instructions__notation { border-color: #59456a; background: #30213e; color: #cdbed8; }
html[data-theme="dark"] .hm-pattern-instructions__notation strong { color: #eadcf9; }
html[data-theme="dark"] .hm-pattern-instructions__notation code { background: #4a3560; color: #e5d2f8; }
html[data-theme="dark"] .hm-pattern-instructions__heading,
html[data-theme="dark"] .hm-pattern-instructions__step-content :is(h3, h4),
html[data-theme="dark"] .hm-pattern-instructions__body { color: #eadcf9; }
html[data-theme="dark"] .hm-pattern-instructions__group-heading { border-color: #59456a; color: #d0b1f5; }
html[data-theme="dark"] .hm-pattern-instructions__intro { color: #cdbed8; }
html[data-theme="dark"] .hm-pattern-instructions__step { border-color: #59456a; background: #30213e; }
html[data-theme="dark"] .hm-pattern-instructions__switcher { border-color: #59456a; background: #30213e; }
html[data-theme="dark"] .hm-pattern-instructions__switcher > span { color: #cdbed8; }
html[data-theme="dark"] .hm-pattern-instructions__switcher button { color: #eadcf9; }
html[data-theme="dark"] .hm-pattern-instructions__switcher button[aria-pressed="true"] { background: #7951a5; color: #fff; }
html[data-theme="dark"] .hm-blog-timeline .wp-block-post::before {
  background: #59456a;
}
html[data-theme="dark"] .hm-blog-timeline .wp-block-post::after {
  border-color: #251d2d;
  background: #b486e8;
  box-shadow: 0 0 0 1px #d0b1f5;
}
html[data-theme="dark"] .hm-blog-timeline__author,
html[data-theme="dark"] .hm-post-meta__author {
  background: #7951a5;
  color: #f7f0ff;
}
html[data-theme="dark"] .hm-linked-pattern__button { background: var(--hm-button-primary); color: var(--hm-button-dark-text); box-shadow: 0 6px 14px rgba(0, 0, 0, .28); }
html[data-theme="dark"] .hm-linked-pattern__button:hover { background: #7b49b4; color: var(--hm-button-dark-text); }
html[data-theme="dark"] .hm-keep-crafting h3 { color: #eadcf9; }
html[data-theme="dark"] .hm-keep-crafting > p { color: #cdbed8; }
html[data-theme="dark"] .hm-pattern-meta {
  border-color: #59456a;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .20);
}
html[data-theme="dark"] .wp-block-query-pagination .current {
  background: #b486e8;
  color: #1d1325;
}
html[data-theme="dark"] .hm-theme-toggle {
  border-color: #665176;
  background: #362642;
  color: #f4edf9;
}
html[data-theme="dark"] .hm-theme-toggle:hover,
html[data-theme="dark"] .hm-theme-toggle:focus-visible {
  background: #4a3560;
}
html[data-theme="dark"] .hm-stitch-reference__header,
html[data-theme="dark"] .hm-stitch-reference__repeat { border-color: #59456a; }
html[data-theme="dark"] .hm-stitch-reference h1,
html[data-theme="dark"] .hm-stitch-reference__terms h2,
html[data-theme="dark"] .hm-stitch-reference__details h2,
html[data-theme="dark"] .hm-stitch-reference__sources h2,
html[data-theme="dark"] .hm-stitch-reference__abbreviation,
html[data-theme="dark"] .hm-stitch-reference__details dd,
html[data-theme="dark"] .hm-stitch-reference__instructions h3,
html[data-theme="dark"] .hm-stitch-reference__repeat h3 { color: #f4edf9; }
html[data-theme="dark"] .hm-stitch-reference__eyebrow,
html[data-theme="dark"] .hm-stitch-reference__system { color: #d0b1f5; }
html[data-theme="dark"] .hm-stitch-reference__switcher,
html[data-theme="dark"] .hm-stitch-reference__terms,
html[data-theme="dark"] .hm-stitch-reference__alternates,
html[data-theme="dark"] .hm-stitch-reference__notes { border-color: #665176; background: #251d2d; }
html[data-theme="dark"] .hm-stitch-reference__switcher > span,
html[data-theme="dark"] .hm-stitch-reference__details dt { color: #cdbed8; }
html[data-theme="dark"] .hm-stitch-reference__switcher button { color: #eadcf9; }
html[data-theme="dark"] .hm-stitch-reference__switcher button[aria-pressed="true"] { background: #b486e8; color: #1d1325; }
html[data-theme="dark"] .hm-stitch-reference__details dl > div { border-color: #59456a; background: #21182a; }
html[data-theme="dark"] .hm-tools-page__intro,
html[data-theme="dark"] .hm-tool-card__description,
html[data-theme="dark"] .hm-row-counter-guide__intro,
html[data-theme="dark"] .hm-row-counter-guide__step p { color: #cdbed8; }
html[data-theme="dark"] .hm-tool-card { border-color: #59456a; background: linear-gradient(135deg, #251d2d 0%, #2d2038 100%); color: #f4edf9; }
html[data-theme="dark"] .hm-tool-card:hover,
html[data-theme="dark"] .hm-tool-card:focus-visible { border-color: #b486e8; color: #ffffff; }
html[data-theme="dark"] .hm-tool-card__icon { background-color: #d3c1df; box-shadow: 0 7px 18px rgba(0, 0, 0, .28); }
html[data-theme="dark"] .hm-row-counter-guide__step { border-color: #59456a; background: #251d2d; }
html[data-theme="dark"] .hm-row-counter-guide__step h2 { color: #f4edf9; }
html[data-theme="dark"] .wp-site-blocks > main > :is(.wp-block-post-title, .wp-block-query-title, h1.wp-block-heading) { color: #eadcf9 !important; }
html[data-theme="dark"] .hm-tool-card__title { color: #f4edf9; }
html[data-theme="dark"] .hm-tool-card__action { color: #d0b1f5; }
html[data-theme="dark"] .hm-stitch-directory__header h1,
html[data-theme="dark"] .hm-stitch-directory__group-title,
html[data-theme="dark"] .hm-stitch-directory__name,
html[data-theme="dark"] .hm-stitch-directory__terms strong,
html[data-theme="dark"] .hm-stitch-directory__search > label,
html[data-theme="dark"] .hm-stitch-directory__results-heading { color: #f4edf9; }
html[data-theme="dark"] .hm-stitch-directory__header p:last-child,
html[data-theme="dark"] .hm-stitch-directory__group-heading span,
html[data-theme="dark"] .hm-stitch-directory__terms { color: #cdbed8; }
html[data-theme="dark"] .hm-stitch-directory__group-heading,
html[data-theme="dark"] .hm-stitch-directory__list,
html[data-theme="dark"] .hm-stitch-directory__list li { border-color: #59456a; }
html[data-theme="dark"] .hm-stitch-directory__list a { color: #f4edf9; }
html[data-theme="dark"] .hm-stitch-directory__list a:hover,
html[data-theme="dark"] .hm-stitch-directory__list a:focus-visible { background: #251d2d; }
html[data-theme="dark"] .hm-stitch-directory__arrow { color: #d0b1f5; }
html[data-theme="dark"] .hm-stitch-directory__search input { border-color: #665176; background: #251d2d; color: #f4edf9; }
html[data-theme="dark"] .hm-stitch-directory__abbreviation { background: #4a3560; color: #f4edf9; }
html[data-theme="dark"] .hm-stitch-directory__switcher { border-color: #665176; background: #251d2d; }
html[data-theme="dark"] .hm-stitch-directory__switcher > span { color: #cdbed8; }
html[data-theme="dark"] .hm-stitch-directory__switcher button { color: #eadcf9; }
html[data-theme="dark"] .hm-stitch-directory__switcher button[aria-pressed="true"] { background: #b486e8; color: #1d1325; }
html[data-theme="dark"] .hm-stitch-directory__search-control button { background: #362642; color: #f4edf9; }
html[data-theme="dark"] .hm-stitch-directory__search-control button:hover,
html[data-theme="dark"] .hm-stitch-directory__search-control button:focus-visible { background: #4a3560; }
html[data-theme="dark"] .hm-stitch-directory__no-results { background: #251d2d; color: #cdbed8; }
html[data-theme="dark"] .hm-row-counter__toggle,
html[data-theme="dark"] .hm-row-counter__panel {
  border-color: #665176;
  background: #251d2d;
  color: #f4edf9;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .38);
}
html[data-theme="dark"] .hm-row-counter__toggle:hover,
html[data-theme="dark"] .hm-row-counter__toggle:focus-visible { background: #362642; }
html[data-theme="dark"] .hm-row-counter__badge { color: #f4edf9; }
html[data-theme="dark"] .hm-row-counter__header p,
html[data-theme="dark"] .hm-row-counter__number,
html[data-theme="dark"] .hm-row-counter__reset { color: #eadcf9; }
html[data-theme="dark"] .hm-row-counter__caption,
html[data-theme="dark"] .hm-row-counter__shortcut,
html[data-theme="dark"] .hm-row-counter__close { color: #cdbed8; }
html[data-theme="dark"] .hm-row-counter__close:hover,
html[data-theme="dark"] .hm-row-counter__close:focus-visible,
html[data-theme="dark"] .hm-row-counter__reset:not(:disabled):hover,
html[data-theme="dark"] .hm-row-counter__reset:not(:disabled):focus-visible { background: #362642; color: #ffffff; }
html[data-theme="dark"] .hm-row-counter__adjust {
  border-color: #665176;
  background: #362642;
  color: #f4edf9;
}
html[data-theme="dark"] .hm-row-counter__adjust:hover,
html[data-theme="dark"] .hm-row-counter__adjust:focus-visible { background: #4a3560; }
html[data-theme="dark"] .hm-row-counter__shortcut kbd {
  border-color: #665176;
  background: #362642;
  color: #eadcf9;
}
html[data-theme="dark"] .hm-row-counter__adjust--increment {
  border-color: #b486e8;
  background: #b486e8;
  color: #1d1325;
}
html[data-theme="dark"] .hm-row-counter__adjust--increment:hover,
html[data-theme="dark"] .hm-row-counter__adjust--increment:focus-visible { background: #d0b1f5; }

@media (max-width:781px) {
  html[data-theme="dark"] .hm-mobile-menu-toggle {
    color: #f4edf9;
  }
  html[data-theme="dark"] .hm-mobile-menu-toggle:hover,
  html[data-theme="dark"] .hm-mobile-menu-toggle:focus-visible {
    background: #362642;
  }
  html[data-theme="dark"] .hm-mobile-menu__panel {
    background: #17131c;
  }
  html[data-theme="dark"] .hm-mobile-menu__close {
    background: #362642;
    color: #f4edf9;
  }
  html[data-theme="dark"] .hm-mobile-menu__close:hover,
  html[data-theme="dark"] .hm-mobile-menu__close:focus-visible,
  html[data-theme="dark"] .hm-mobile-menu__links a:hover,
  html[data-theme="dark"] .hm-mobile-menu__links a:focus-visible {
    background: #362642;
    color: #ffffff;
  }
  html[data-theme="dark"] .hm-mobile-menu__links a {
    color: #eadcf9;
  }
}
