/* Shared homepage community. Keep the existing planner stages untouched. */
body.page-index.show-stage-topbar .home-community,
body.page-index.basket-active .home-community { display: none; }

.home-community {
  margin: -60px calc(50% - 50vw) 0;
  padding: 64px 24px 80px;
  position: relative;
  z-index: 2;
  background: #f7f9fc;
  color: #17233c;
}
.home-community *, .home-community *::before, .home-community *::after { box-sizing: border-box; }
.home-community__inner { max-width: 1200px; margin: 0 auto; }
.home-community__header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.home-community__header > div { min-width: 0; }
.home-community__eyebrow { margin: 0 0 12px; color: #2459df; font-size: 13px; font-weight: 750; letter-spacing: .04em; }
.home-community h2 { margin: 0; font-size: clamp(26px, 3.1vw, 38px); font-weight: 800; line-height: 1.35; letter-spacing: -.045em; word-break: keep-all; }
.home-community h2 span { color: #285cf0; }
.home-community h2, .home-community__empty h3 { overflow-wrap: anywhere; }
.home-community__intro { margin: 12px 0 0; color: #647089; font-size: 15px; line-height: 1.7; word-break: keep-all; }
.home-community a { text-decoration: none; }
.home-community__all { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 20px; min-height: 46px; padding: 0 18px; border: 1px solid #dce2ed; border-radius: 12px; background: #fff; color: #283951; font-size: 14px; font-weight: 700; }
.home-community__all span { font-size: 20px; }
.home-community__all:hover { border-color: #285cf0; color: #2459df; }
.home-community__topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.home-community__topics button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 17px; border: 1px solid #e2e7f0; border-radius: 24px; background: #fff; color: #526079; font-family: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.home-community__topics button:hover { color: #2459df; background: #edf3ff; border-color: #c7d7fc; }
.home-community__topics button[aria-pressed="true"] { color: #fff; background: #285cf0; border-color: #285cf0; }
.home-community__status { min-height: 20px; margin: -12px 0 12px; color: #647089; font-size: 12px; line-height: 20px; }
#home-community-results[aria-busy="true"] { opacity: .55; pointer-events: none; }
.home-community__retry { margin-top: 18px; padding: 10px 16px; border: 1px solid #c7d7fc; border-radius: 10px; background: #eff4ff; color: #2459df; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.home-community__stories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.home-community__story { min-width: 0; }
.home-community__card { display: flex; flex-direction: column; height: 100%; min-height: 278px; padding: 26px; border: 1px solid #e0e6ef; border-radius: 20px; background: #fff; color: #17233c; transition: border-color .18s ease, box-shadow .18s ease; }
.home-community__card:hover { border-color: #a8c0f9; box-shadow: 0 8px 24px rgba(37, 65, 118, .06); }
.home-community__category { align-self: flex-start; margin-bottom: 16px; padding: 5px 9px; border-radius: 7px; background: #eff4ff; color: #315bb4; font-size: 11px; font-weight: 700; line-height: 1.4; }
.home-community h3 { margin: 0; font-size: 20px; font-weight: 750; line-height: 1.5; letter-spacing: -.035em; }
.home-community__card h3, .home-community__excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.home-community__excerpt { margin: 10px 0 24px; color: #69758a; font-size: 14px; line-height: 1.75; }
.home-community__meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; color: #647089; font-size: 12px; line-height: 1.5; }
.home-community__author { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #526079; }
.home-community__meta > span:last-child { flex-shrink: 0; }
.home-community__read { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 16px; border-top: 1px solid #edf0f5; color: #385884; font-size: 12px; font-weight: 650; }
.home-community__read > span { font-size: 19px; line-height: 1; }
.home-community__empty { padding: 36px 28px; border: 1px solid #e0e6ef; border-radius: 20px; background: #fff; }
.home-community__empty p { margin: 10px 0 0; color: #647089; font-size: 14px; line-height: 1.7; }
.home-community__swipe { display: none; }
.home-community a:focus-visible, .home-community button:focus-visible { outline: 3px solid #285cf0; outline-offset: 4px; }
.home-community[dir="rtl"] { text-align: start; }
.home-community[dir="rtl"] h2, .home-community[dir="rtl"] h3, .home-community[dir="rtl"] .home-community__eyebrow { letter-spacing: normal; }
.home-community[dir="rtl"] .home-community__all > span,
.home-community[dir="rtl"] .home-community__read > span,
.home-community[dir="rtl"] .home-community__swipe > span { display: inline-block; transform: scaleX(-1); }

@media (max-width: 880px) {
  .home-community { padding: 44px 20px 52px; }
  .home-community__header { align-items: flex-start; flex-direction: column; gap: 18px; margin-bottom: 22px; }
  .home-community h2 { font-size: 28px; }
  .home-community__intro { font-size: 14px; }
  .home-community__all { min-height: 44px; padding: 0 14px; gap: 18px; font-size: 13px; }
  .home-community__topics { flex-wrap: nowrap; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; padding: 6px 4px 10px; margin: -6px -4px 16px; scroll-padding-inline: 6px; scrollbar-width: thin; scrollbar-color: #c9d6ed transparent; }
  .home-community__topics button { flex: 0 0 auto; justify-content: center; min-width: 44px; padding: 0 12px; font-size: 12px; white-space: nowrap; }
  .home-community__stories { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(86%, 360px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 4px; padding: 4px 4px 12px; margin: -4px -4px 0; scrollbar-width: thin; scrollbar-color: #c9d6ed transparent; }
  .home-community__story { scroll-snap-align: start; }
  .home-community__card { min-height: 262px; padding: 22px; border-radius: 16px; }
  .home-community h3 { font-size: 18px; }
  .home-community__category { margin-bottom: 12px; }
  .home-community__excerpt { margin-bottom: 20px; font-size: 13px; }
  .home-community__swipe { display: block; margin: 12px 0 0; color: #647089; font-size: 11px; line-height: 1.5; }
  .home-community__empty { padding: 26px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-community__card { transition: none; }
}
