/* Homepage tool library: category chips + compact tool tiles */

.page--home .section--library {
  position: relative;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.page--home .section--library::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 15% 0%, rgba(16, 160, 248, 0.22), transparent 60%),
    radial-gradient(ellipse 55% 45% at 90% 30%, rgba(8, 136, 240, 0.16), transparent 55%);
}

.page--home .section--library .container {
  position: relative;
  z-index: 1;
}

.home-library {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.35rem 1.35rem 1.5rem;
  border-radius: var(--radius-xl, 28px);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 18px 50px rgba(0, 16, 48, 0.28);
  backdrop-filter: blur(10px);
}

.home-library__search {
  max-width: none;
  margin-bottom: 0.65rem;
}

.page--home .home-library .tools-search-hint {
  margin: 0 0 1.15rem;
  text-align: center;
  color: rgba(235, 244, 255, 0.78);
  font-size: 0.9rem;
}

.home-library__toolbar {
  margin-bottom: 1rem;
}

.home-library__label {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(200, 224, 255, 0.8);
  text-align: center;
}

.home-library__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.home-library__chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(8, 28, 72, 0.45);
  color: #f4f8ff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.home-library__chip:hover,
.home-library__chip:focus-visible {
  outline: none;
  border-color: rgba(120, 196, 255, 0.7);
  background: rgba(12, 56, 128, 0.72);
  box-shadow: 0 0 0 3px rgba(16, 160, 248, 0.22);
  transform: translateY(-1px);
}

.home-library__chip.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, #0898f8, #0066c8);
  color: #fff;
  box-shadow: 0 8px 22px rgba(0, 96, 210, 0.35);
}

.home-library__chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.75rem;
  font-weight: 700;
}

.home-library__chip.is-active .home-library__chip-count {
  background: rgba(0, 24, 64, 0.22);
}

.home-library__empty {
  margin-top: 1rem;
  padding: 1.35rem 1.1rem;
  border-radius: var(--radius-lg, 20px);
  border: 1px dashed rgba(170, 210, 255, 0.35);
  background: rgba(0, 24, 64, 0.28);
  text-align: center;
}

.home-library__empty.is-hidden {
  display: none !important;
}

.home-library__empty-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: #f5f9ff;
}

.home-library__empty-text {
  margin: 0;
  color: rgba(220, 234, 255, 0.78);
  font-size: 0.925rem;
  line-height: 1.5;
}

.page--home .tools-category-picker {
  max-width: none;
  margin: 0;
}

.page--home .tools-category-picker__result {
  margin-top: 1rem;
  padding: 1.1rem 1.1rem 1.2rem;
  border-radius: var(--radius-lg, 20px);
  background: #f4f8fc;
  border: 1px solid rgba(0, 40, 96, 0.08);
  box-shadow: 0 10px 28px rgba(0, 24, 64, 0.12);
  animation: homeLibraryPanelIn 0.28s ease;
}

@keyframes homeLibraryPanelIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page--home .tools-category-picker__panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(0, 40, 96, 0.08);
}

.page--home .tools-category-picker__title {
  margin: 0;
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #001840;
}

.page--home .tools-category-picker__count {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4a6a90;
}

.page--home .tools-category-picker__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
  gap: 0.55rem;
}

.page--home .tools-category-picker__list li {
  margin: 0;
  padding: 0;
}

.page--home .tools-category-picker__list li.is-hidden {
  display: none !important;
}

.page--home .tools-category-picker__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 56, 120, 0.1);
  background: #fff;
  color: #001840;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  box-shadow: 0 1px 2px rgba(0, 24, 64, 0.04);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease;
}

.page--home .tools-category-picker__link:hover,
.page--home .tools-category-picker__link:focus-visible {
  outline: none;
  text-decoration: none;
  border-color: rgba(8, 136, 240, 0.45);
  background: #f3f9ff;
  box-shadow: 0 8px 20px rgba(0, 72, 160, 0.12);
  transform: translateY(-1px);
}

.page--home .tools-category-picker__link-name {
  min-width: 0;
}

.page--home .tools-category-picker__link-go {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0066b3;
  opacity: 0.85;
}

.page--home .tools-search-empty {
  margin-top: 1rem;
  color: rgba(230, 240, 255, 0.85);
}

/* Homepage atmosphere polish */
.page--home .features {
  background: transparent;
  border-block: 0;
  padding: 0.5rem 0 0.25rem;
}

.page--home .features__grid {
  gap: 1rem;
}

.page--home .feature {
  padding: 1.15rem 1.15rem 1.2rem;
  border-radius: var(--radius-lg, 20px);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 30px rgba(0, 16, 48, 0.18);
}

.page--home .feature__icon {
  background: rgba(16, 160, 248, 0.18);
  color: #9fd4ff;
}

.page--home .feature__title,
.page--home .feature h3 {
  color: #f4f8ff;
}

.page--home .feature p {
  color: rgba(214, 228, 246, 0.82);
}

.page--home .section--publisher {
  margin: 1.5rem auto 0;
  max-width: 46rem;
  padding: 1.5rem 1.35rem;
  border-radius: var(--radius-xl, 28px);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.page--home .section--publisher h2,
.page--home .section--publisher p {
  color: #eef5ff;
}

.page--home .section--publisher p {
  opacity: 0.9;
}

.page--home .section--publisher a {
  color: #8ecbff;
}

.page--home .tool-of-day {
  background: transparent;
  border-block: 0;
  padding: 2.5rem 0 3.25rem;
}

.page--home .tool-of-day__label {
  color: #8ecbff;
}

.page--home .tool-of-day .tool-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 40px rgba(0, 16, 48, 0.28);
}

@media (max-width: 720px) {
  .home-library {
    padding: 1.05rem;
    border-radius: 22px;
  }

  .page--home .tools-category-picker__list {
    grid-template-columns: 1fr;
  }

  .page--home .features__grid {
    grid-template-columns: 1fr;
  }
}
