.directions-page {
  --marketplace-shelf-card-width: 225px;
  --marketplace-shelf-gap: 12px;
  margin: 0;
}

.directions-page *,
.directions-page *::before,
.directions-page *::after {
  box-sizing: border-box;
}

.directions-page img {
  max-width: 100%;
}

.directions-page [hidden] {
  display: none !important;
}

.directions-page .marketplace-header-tool img {
  width: 20px;
  height: 20px;
}

.wb-preserved-hero-stack {
  padding-bottom: 78px;
}

.wb-preserved-hero {
  min-height: 470px;
  grid-template-columns: minmax(0, 1.06fr) minmax(430px, 0.94fr);
  gap: 34px;
  padding: 50px 54px 104px;
  background: #e3efe9;
}

.wb-preserved-hero-copy {
  position: relative;
  z-index: 3;
  width: min(680px, 100%);
  align-self: center;
  transform: translateY(10px);
}

.wb-preserved-hero-copy h1 {
  max-width: 670px;
  margin: 8px 0 0;
  color: var(--marketplace-ink);
  font-size: 54px;
  font-weight: 650;
  line-height: 1.03;
  white-space: pre-line;
}

.wb-preserved-hero-copy > p:not(.wb-directions-kicker) {
  max-width: 570px;
  margin: 18px 0 0;
  color: var(--marketplace-text);
  font-size: 17px;
  line-height: 1.55;
}

.wb-directions-kicker {
  margin: 0;
  color: var(--marketplace-accent-deep);
  font-size: 13px;
  font-weight: 780;
}

.wb-preserved-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  margin-top: 22px;
}

.wb-preserved-hero-actions .wb-catalog-personal-link {
  margin-top: 0;
}

.wb-catalog-personal-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  margin-top: 19px;
  border: 1px solid var(--marketplace-accent);
  border-radius: 11px;
  padding: 9px 15px;
  color: #fff;
  background: var(--marketplace-accent);
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
}

.wb-catalog-personal-link:hover {
  border-color: var(--marketplace-accent-deep);
  background: var(--marketplace-accent-deep);
}

.wb-preserved-hero-secondary {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  color: var(--marketplace-accent-deep);
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
}

.wb-preserved-hero-secondary::after {
  width: 18px;
  height: 18px;
  margin-left: 8px;
  background: url("/assets/icons/arrow-right.svg") center / contain no-repeat;
  content: "";
}

.wb-preserved-hero-people {
  position: relative;
  width: 100%;
  min-height: 330px;
  align-self: center;
}

.wb-preserved-person {
  position: absolute;
  z-index: 2;
  display: block;
  overflow: hidden;
  background: #bdd6ca;
  box-shadow: 0 14px 34px rgba(18, 54, 46, 0.12);
}

.wb-preserved-person img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.wb-preserved-person.is-main {
  top: 0;
  right: 0;
  width: min(340px, 66%);
  height: 350px;
  border-radius: 47% 53% 46% 54% / 42% 46% 54% 58%;
}

.wb-preserved-person.is-main img {
  object-position: 56% 20%;
}

.wb-preserved-person.is-top {
  top: 20px;
  left: 0;
  width: 124px;
  height: 124px;
  border-radius: 48% 52% 45% 55% / 50% 44% 56% 50%;
}

.wb-preserved-person.is-bottom {
  bottom: 2px;
  left: 8px;
  width: 118px;
  height: 140px;
  border-radius: 48% 52% 45% 55% / 50% 44% 56% 50%;
}

.wb-preserved-hero-people::before {
  position: absolute;
  inset: 10px 4px -12px 54px;
  border: 1px dashed rgba(30, 85, 75, 0.52);
  border-radius: 50%;
  content: "";
}

.directions-index {
  width: min(var(--marketplace-wide), calc(100% - 48px));
  margin: 56px auto 0;
}

.directions-index-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.directions-index-heading p {
  margin: 0 0 6px;
  color: var(--marketplace-accent-deep);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.directions-index-heading h2 {
  margin: 0;
  color: var(--marketplace-ink);
  font-size: 29px;
  line-height: 1.12;
  letter-spacing: 0;
}

.directions-index-heading > a,
.directions-shelf-actions > a {
  flex: 0 0 auto;
  color: var(--marketplace-accent-deep);
  font-size: 14px;
  font-weight: 760;
}

.directions-index-list {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scroll-padding-inline: 2px;
  scrollbar-width: thin;
}

.directions-index-list a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--marketplace-line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--marketplace-text);
  background: var(--marketplace-paper);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.directions-index-list a:hover,
.directions-index-list a:focus-visible {
  border-color: var(--marketplace-accent);
  color: var(--marketplace-accent-deep);
  background: var(--marketplace-soft);
}

.directions-shelves {
  min-height: 360px;
}

.directions-loading {
  margin-top: 12px;
}

.directions-loading-shelf {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--marketplace-shelf-gap);
  margin-top: 14px;
}

.directions-loading-shelf i {
  display: block;
  min-height: 338px;
  border-radius: 20px;
}

.directions-shelf {
  margin-top: 30px;
  scroll-margin-top: 84px;
}

.directions-shelf:first-child {
  margin-top: 24px;
}

.directions-shelf-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.directions-shelf-actions,
.directions-shelf-controls {
  display: flex;
  align-items: center;
}

.directions-shelf-actions {
  flex: 0 0 auto;
  gap: 12px;
}

.directions-shelf-controls {
  gap: 6px;
}

.directions-shelf-controls button {
  display: inline-grid;
  width: 34px;
  min-height: 34px;
  place-items: center;
  border: 1px solid var(--marketplace-line-strong);
  border-radius: 50%;
  padding: 0;
  color: var(--marketplace-ink);
  background: var(--marketplace-paper);
}

.directions-shelf-controls button:first-child img {
  transform: rotate(180deg);
}

.directions-shelf-controls button:hover:not(:disabled) {
  border-color: var(--marketplace-accent);
  background: var(--marketplace-soft);
}

.directions-shelf-controls button:disabled {
  cursor: default;
  opacity: 0.35;
}

.directions-shelf-heading h2 {
  margin: 0;
  color: var(--marketplace-ink);
  font-size: 28px;
  line-height: 1.15;
}

.directions-shelf .marketplace-product-shelf {
  min-height: 352px;
  grid-auto-columns: var(--marketplace-shelf-card-width);
}

.directions-card {
  height: 340px;
  border-color: transparent;
  background: transparent;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.directions-card:hover {
  border-color: transparent;
  box-shadow: none;
}

.directions-card:focus-within {
  border-color: var(--marketplace-line-strong);
  box-shadow: 0 12px 26px rgba(18, 54, 46, 0.09);
}

.directions-card .marketplace-product-card-link {
  height: 100%;
}

.directions-card .marketplace-product-card-media {
  aspect-ratio: 1 / 1;
  border-radius: 18px;
}

.directions-card .marketplace-card-tools {
  flex-direction: column;
}

.directions-card .marketplace-card-tool img {
  width: 18px;
  height: 18px;
}

.directions-card-tool-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.directions-card .marketplace-product-card-body {
  min-height: 102px;
  align-content: start;
  gap: 2px;
  padding: 7px 4px 0;
}

.directions-card .marketplace-product-card-name {
  font-size: 14px;
}

.directions-card .marketplace-product-card-method {
  display: block;
  min-height: 16px;
  max-height: 16px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directions-card .marketplace-product-card-offer {
  font-size: 12px;
}

.directions-card .marketplace-product-card-offer span {
  color: var(--marketplace-muted);
  font-weight: 560;
}

.directions-card .marketplace-product-card-rating {
  display: flex;
  align-items: center;
  gap: 5px;
}

.directions-card .marketplace-product-card-rating::before {
  color: var(--marketplace-warning);
  content: "☆";
  font-size: 13px;
  line-height: 1;
}

.directions-card .marketplace-product-card-proof {
  display: flex;
  min-width: 0;
  gap: 5px;
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--marketplace-accent-deep);
  font-size: 10.5px;
  font-weight: 750;
  line-height: 1.25;
  white-space: nowrap;
}

.directions-card .marketplace-product-card-proof span + span::before {
  margin-right: 5px;
  color: var(--marketplace-muted);
  content: "·";
}

.directions-shelf-more {
  display: grid;
  min-height: 100%;
  align-content: end;
  overflow: hidden;
  border: 1px solid var(--marketplace-line);
  border-radius: 20px;
  padding: 18px;
  color: #fff;
  background: var(--marketplace-accent-deep);
  text-decoration: none;
  scroll-snap-align: start;
}

.directions-shelf-more span {
  font-size: 13px;
  opacity: 0.8;
}

.directions-shelf-more strong {
  margin-top: 8px;
  font-size: 21px;
  line-height: 1.18;
}

.directions-shelf-more b {
  margin-top: 20px;
  font-size: 14px;
}

.directions-shelf-more.is-wb-card-pilot {
  min-height: 0;
  height: auto;
  aspect-ratio: 1 / 1;
  align-self: start;
  align-content: center;
  justify-items: center;
  gap: 7px;
  border-color: transparent;
  border-radius: 18px;
  padding: 20px;
  color: var(--marketplace-ink);
  background: var(--marketplace-paper);
  text-align: center;
}

.directions-shelf-more.is-wb-card-pilot strong {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
}

.directions-shelf-more.is-wb-card-pilot span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--marketplace-ink);
  font-size: 13px;
  font-weight: 560;
  opacity: 1;
}

.directions-shelf-more.is-wb-card-pilot span::after {
  font-size: 18px;
  line-height: 1;
  content: "›";
}

.directions-matching-band {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 48px;
  margin-top: 54px;
  padding: 34px max(24px, calc((100% - var(--marketplace-wide)) / 2));
  color: var(--marketplace-ink);
  background: #e8f1d7;
}

.directions-matching-band > div {
  width: min(680px, 100%);
}

.directions-matching-band p {
  margin: 0 0 5px;
  color: var(--marketplace-accent-deep);
  font-size: 13px;
  font-weight: 780;
}

.directions-matching-band h2 {
  margin: 0;
  color: var(--marketplace-ink);
  font-size: 24px;
  line-height: 1.2;
}

.directions-matching-band .button {
  flex: 0 0 auto;
  text-decoration: none;
}

.directions-footer > div {
  display: grid;
  gap: 4px;
}

.directions-footer strong {
  color: var(--marketplace-ink);
}

.directions-footer span {
  font-size: 12px;
}

.directions-footer nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.directions-footer a {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
}

body.directions-page main {
  padding-bottom: 0;
}

.directions-page .marketplace-public-footer {
  margin-top: 0;
}

@media (max-width: 1100px) {
  .wb-preserved-hero {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.84fr);
    padding-inline: 42px;
  }

  .wb-preserved-hero-copy h1 {
    font-size: 46px;
  }

  .wb-preserved-person.is-main {
    width: min(310px, 68%);
    height: 324px;
  }
}

@media (max-width: 820px) {
  .marketplace-public-shell.directions-page .marketplace-search-panel {
    width: calc(100% - 20px);
  }

  .wb-preserved-hero-stack {
    padding-bottom: 188px;
  }

  .wb-preserved-hero {
    min-height: 380px;
    grid-template-columns: minmax(0, 1fr) 170px;
    gap: 16px;
    align-items: center;
    padding: 32px 26px 112px;
  }

  .wb-preserved-hero-copy {
    transform: none;
  }

  .wb-preserved-hero-copy h1 {
    font-size: 36px;
  }

  .wb-preserved-hero-copy > p:not(.wb-directions-kicker) {
    font-size: 14px;
  }

  .wb-preserved-hero-actions {
    gap: 8px 14px;
    margin-top: 16px;
  }

  .wb-preserved-hero-people {
    min-height: 226px;
  }

  .wb-preserved-person.is-main {
    width: 150px;
    height: 218px;
  }

  .wb-preserved-person.is-top {
    top: 4px;
    left: -34px;
    width: 66px;
    height: 66px;
  }

  .wb-preserved-person.is-bottom {
    bottom: 3px;
    left: -30px;
    width: 62px;
    height: 74px;
  }

  .wb-preserved-hero-people::before {
    inset: 4px -4px -4px -16px;
  }

  .directions-index {
    width: calc(100% - 24px);
    margin-top: 32px;
  }

  .directions-shelf {
    margin-top: 24px;
  }

  .directions-shelf:first-child {
    margin-top: 20px;
  }

  .directions-shelf .marketplace-product-shelf {
    min-height: 329px;
    grid-auto-columns: 204px;
  }

  .directions-card,
  .directions-shelf-more {
    height: 317px;
  }

  .directions-loading-shelf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directions-loading-shelf i:nth-child(n + 3) {
    display: none;
  }

  .directions-matching-band {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .directions-footer,
  .directions-footer nav {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .marketplace-public-shell:is(.directions-page, .methods-page) .marketplace-search-field :is(input, select) {
    font-size: 12px;
  }

  .wb-preserved-hero-stack {
    padding-bottom: 196px;
  }

  .wb-preserved-hero {
    min-height: 336px;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 4px;
    padding: 24px 18px 104px;
  }

  .wb-preserved-hero-copy h1 {
    width: auto;
    max-width: 100%;
    font-size: 21.5px;
  }

  .wb-preserved-hero-copy > p:not(.wb-directions-kicker) {
    max-width: 250px;
    margin-top: 11px;
    font-size: 13px;
    line-height: 1.4;
  }

  .wb-preserved-hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
    margin-top: 13px;
  }

  .wb-preserved-hero-actions .wb-catalog-personal-link,
  .wb-preserved-hero-secondary {
    min-height: 36px;
    font-size: 12px;
  }

  .wb-catalog-personal-link {
    padding: 8px 11px;
  }

  .wb-preserved-hero-people {
    min-height: 144px;
  }

  .wb-preserved-person.is-main {
    top: 5px;
    width: 90px;
    height: 132px;
  }

  .wb-preserved-person.is-top {
    left: -22px;
    width: 42px;
    height: 42px;
  }

  .wb-preserved-person.is-bottom {
    left: -20px;
    width: 39px;
    height: 48px;
  }

  .wb-preserved-hero-people::before {
    inset: 4px -5px -2px -12px;
  }

  .directions-page .marketplace-search-field {
    padding-inline: 10px;
  }

  .directions-page .marketplace-search-field :is(input, select) {
    font-size: 13px;
  }

  .directions-index-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .directions-index-heading h2 {
    font-size: 25px;
  }

  .directions-shelf-heading h2 {
    font-size: 23px;
  }

  .directions-shelf-controls {
    display: none;
  }

  .directions-shelf .marketplace-product-shelf {
    min-height: 298px;
    grid-auto-columns: min(178px, 58vw);
  }

  .directions-card,
  .directions-shelf-more {
    height: 286px;
  }

  .directions-card .marketplace-product-card-name {
    font-size: 13px;
  }

  .directions-card .marketplace-product-card-proof {
    gap: 3px;
    font-size: 9.5px;
  }

  .directions-card .marketplace-product-card-proof span + span::before {
    margin-right: 3px;
  }

  .directions-matching-band h2 {
    font-size: 21px;
  }
}

@media (max-width: 350px) {
  .wb-preserved-hero-stack {
    padding-bottom: 290px;
  }

  .wb-preserved-hero-copy h1 {
    font-size: 20px;
  }

  .directions-index {
    width: calc(100% - 16px);
  }

  .directions-page .marketplace-search-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directions-page .marketplace-search-field,
  .directions-page .marketplace-search-field:nth-of-type(even) {
    border-right: 1px solid var(--marketplace-line);
  }

  .directions-page .marketplace-search-field:nth-of-type(even) {
    border-right: 0;
  }

  .directions-page .marketplace-search-submit {
    grid-column: 1 / -1;
  }

  .directions-page .marketplace-search-field select {
    font-size: 12px;
  }

  .directions-index-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .directions-loading-shelf {
    grid-template-columns: minmax(0, 1fr);
  }

  .directions-loading-shelf i:not(:first-child) {
    display: none;
  }

}

@media (prefers-reduced-motion: reduce) {
  .directions-card {
    transition: none;
  }
}
