/* The home planner promotion is independent of the authenticated book catalog.
 * Load after the home styles. Keep its public artwork separate from private data. */
.home-workspace .home-planner-promo {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 246px;
  aspect-ratio: 3.25 / 1;
  margin: 0;
  padding: clamp(24px, 3.5vw, 38px);
  overflow: hidden;
  border: 1px solid #c5ddc9;
  border-radius: 22px;
  background: #eaf3df;
  box-shadow: 0 8px 24px rgba(37, 83, 48, .08);
  color: #214a36;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.home-workspace .home-planner-promo:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 83, 48, .13);
}

.home-workspace .home-planner-promo:focus-visible {
  outline: 3px solid #32734b;
  outline-offset: 4px;
}

.home-workspace .home-planner-promo::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg, #f4f7e9 0%, rgba(244, 247, 233, .97) 26%, rgba(244, 247, 233, .45) 34%, rgba(244, 247, 233, 0) 43%);
  content: "";
  pointer-events: none;
}

.home-workspace .home-planner-promo-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  width: max-content;
  max-width: 100%;
  pointer-events: none;
}

.home-workspace .home-planner-promo-copy > small {
  color: #4b7155;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: .04em;
}

.home-workspace .home-planner-promo-copy > strong {
  color: #214a36;
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 850;
  line-height: 1.18;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.home-workspace .home-planner-promo-copy > span {
  color: #42614b;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.home-workspace .home-planner-promo-copy > em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  margin-top: 5px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #275e3b;
  color: #fffef0;
  font-size: 13px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.4;
  word-break: keep-all;
}

.home-workspace .home-planner-promo-copy > em .icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.home-workspace .home-planner-promo-visual {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  min-width: 0;
  overflow: hidden;
  pointer-events: none;
}

.home-workspace .home-planner-promo-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Focus anchors remain below the fixed topbar, including the plan-entry area. */
#personalPlanDaySection {
  scroll-margin-top: calc(var(--polish-topbar-h, 64px) + 18px);
}

@media (max-width: 900px) {
  .home-workspace .home-planner-promo {
    min-height: 238px;
    aspect-ratio: 3 / 1;
    padding: 26px;
  }

  .home-workspace .home-planner-promo-copy {
    gap: 8px;
  }

  .home-workspace .home-planner-promo-copy > strong {
    font-size: 30px;
  }

  .home-workspace .home-planner-promo-copy > span {
    max-width: 205px;
    font-size: 13px;
  }
}

/* Small screens separate copy and artwork so neither hides the other. */
@media (max-width: 600px) {
  .home-workspace .home-planner-promo {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    aspect-ratio: auto;
    padding: 0;
    border-radius: 18px;
    background: #f4f7e9;
  }

  .home-workspace .home-planner-promo::before {
    display: none;
  }

  .home-workspace .home-planner-promo-copy {
    width: 100%;
    gap: 7px;
    padding: 22px 22px 16px;
  }

  .home-workspace .home-planner-promo-copy > strong {
    font-size: 28px;
  }

  .home-workspace .home-planner-promo-copy > span {
    max-width: none;
    font-size: 13px;
  }

  .home-workspace .home-planner-promo-copy > em {
    margin-top: 3px;
  }

  .home-workspace .home-planner-promo-visual {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 2 / 1;
  }

  .home-workspace .home-planner-promo-art {
    position: absolute;
    inset: 0;
    object-position: right center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-workspace .home-planner-promo {
    transition: none;
  }

  .home-workspace .home-planner-promo:hover {
    transform: none;
  }
}
