.homePage {
  --home-text: #0f172a;
  --home-muted: #4b607b;
  --home-accent: #2f6fec;
  --home-accent-strong: #1d4ed8;
  --home-accent-soft: rgba(47, 111, 236, 0.14);
  --home-icon-gradient: linear-gradient(135deg, #3B82F6 0%, #6366F1 100%);
  --home-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
}

body.homePage .wrap {
  max-width: 1120px;
}

body.homePage .hero {
  padding-bottom: 8px;
}

.homeExplorer {
  display: grid;
  gap: 35px;
  margin-top: 35px;
}

.homeExplorerHead {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.homeKpiChip {
  display: grid;
  gap: 2px;
  min-width: 124px;
  border-radius: 18px;
  border: 1px solid #c5d8ec;
  background: #ffffff;
  box-shadow: var(--home-shadow-sm);
  padding: 8px 14px;
}

.homeKpiValue {
  color: #0d1b30;
  font-size: 1.08rem;
  font-weight: 730;
}

.homeKpiLabel {
  color: #597191;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.homeSearchWrap {
  position: relative;
}

.homeSearchLabel {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.homeSearchInput {
  width: 100%;
  border: 0;
  background: #ffffff;
  color: var(--home-text);
  border-radius: 999px;
  height: 60px;
  padding: 0 96px 0 20px;
  font-size: 1rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: box-shadow 0.14s ease;
}

.homeSearchInput::placeholder {
  color: #6b7f9a;
}

.homeSearchInput::-webkit-search-decoration,
.homeSearchInput::-webkit-search-results-button {
  -webkit-appearance: none;
}

.homeSearchInput::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.homeSearchInput::-ms-clear,
.homeSearchInput::-ms-reveal {
  display: none;
  width: 0;
  height: 0;
}

.homeSearchInput:focus {
  outline: none;
  box-shadow: 0 12px 28px rgba(47, 111, 236, 0.18), 0 0 0 2px rgba(47, 111, 236, 0.2);
}

.homeSearchIcon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2f6fec;
  pointer-events: none;
}

.homeSearchIcon svg {
  display: block;
  width: 22px;
  height: 22px;
}

.homeSearchIcon svg path {
  fill: currentColor;
}

.homeSearchClear {
  position: absolute;
  right: 52px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #2f6fec;
  font-size: 22px;
  line-height: 1;
  opacity: 0.92;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.homeSearchClear::before {
  content: "×";
}

.homeSearchClear:hover {
  opacity: 1;
}

.homeSearchClear:active {
  transform: translateY(-50%) scale(0.95);
}

.homeSearchClear:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 111, 236, 0.22);
  border-radius: 999px;
}

.homeSearchResults {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  z-index: 20;
  border: 1px solid #d0deed;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--home-shadow-sm);
  overflow: hidden;
  padding: 6px;
}

.homeSearchItem {
  display: block;
  border-radius: 10px;
  color: #1f2d43;
  padding: 11px 12px;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1.34;
}

.homeSearchItem:hover,
.homeSearchItem:focus-visible {
  outline: none;
  border-color: #cce0f9;
  background: #f3f9ff;
}

.homeSearchName {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.32;
}

.homeSearchMeta {
  white-space: nowrap;
}

.homeSearchDot {
  color: #94a5bc;
  margin: 0 4px;
  font-size: 0.82em;
}

.homeSearchCategory {
  color: #4e6888;
  font-size: 0.88rem;
}

.homeSearchCategoryPill {
  width: 7px;
  height: 7px;
  margin-left: 6px;
}

.homeSearchEmpty {
  color: #617896;
  padding: 14px 12px;
}

.homeCategoryRail {
  display: grid;
  gap: 8px;
}

.homeCategoryChips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.homeCategoryChip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  border-radius: 10px;
  background: white;
  color: #243247;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 640;
  padding: 8px 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.homeCategoryPill {
  width: 7px;
  height: 7px;
}

.homeCategoryChip:hover {
  border-color: #a8bfdf;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
  color: #1f4fc7;
}

.homeCategoryChip.active {
  background: #eef4ff;
  color: #1d4ed8;
}

.homeResultMeta {
  margin-top: 14px;
  margin-bottom: 10px;
  color: #4f6482;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 640;
}

.homeCardsGrid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.homeCalcCard {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  text-align: center;
  gap: 13px;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  padding: 16px 12px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.homeCalcIcon {
  width: 34px;
  height: 34px;
}

.homeCalcCard:hover {
  border-color: #a8bfdf;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.homeCalcTop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 1;
}

.homeCalcTitle {
  margin: 0;
  color: #243247;
  font-size: 0.95rem;
  font-weight: 600;
  min-height: 2.5em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  align-content: center;
}

.homeCalcCategory {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #7286a3;
  font-size: 0.7rem;
  letter-spacing: 0.01em;
  text-transform: none;
  font-weight: 500;
  margin-left: 0;
  margin-top: auto;
  align-self: center;
}

.homeCalcCategoryPill {
  width: 6px;
  height: 6px;
}

.homeCardsEmpty {
  border: 1px dashed #bfd5e8;
  border-radius: 14px;
  background: #f8fbff;
  color: #4d6482;
  padding: 18px;
}

@media (max-width: 860px) {
  .homeExplorerHead {
    flex-direction: column;
  }
}

@media (max-width: 620px) {

  .homeExplorer {
    margin-top: 20px;
    gap: 30px;
  }

  .heroTitle{
    margin-bottom: 0;
  }

  .homeSearchInput {
    height: 54px;
    font-size: 0.95rem;
    padding-right: 88px;
  }

  .homeCategoryChips {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .homeCategoryChips::-webkit-scrollbar {
    display: none;
  }

  .homeCategoryChip {
    flex: 0 0 auto;
    font-size: 0.76rem;
    padding: 8px 10px;
  }

  .homeCardsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .homeSearchName {
    font-size: 1.02rem;
  }

  .homeSearchCategory {
    font-size: 0.84rem;
  }

  .homeCalcIcon {
    width: 28px;
    height: 28px;
  }

  .homeCalcTitle {
    font-size: 0.8rem;
  }

  .homeCalcCategory {
    font-size: 0.6rem;
  }
}

@media (min-width: 1024px) {
  .homeCardsGrid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
