/* Shared styles for category hub pages (finance/health/science/etc.) */

body.category-hub {
  --hub-accent: #2563eb;
  --hub-accent-2: #7c3aed;
  --hub-accent-3: #f97316;
  --hub-surface: rgba(255, 255, 255, 0.88);
  --hub-surface-strong: rgba(255, 255, 255, 0.96);
  --hub-border: rgba(255, 255, 255, 0.26);
  --hub-ink: #0f172a;
  --hub-ink-soft: rgba(15, 23, 42, 0.78);
  --hub-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  --hub-radius: clamp(26px, 4vw, 44px);
  background: radial-gradient(
      1200px 620px at 15% -10%,
      rgba(124, 58, 237, 0.16),
      transparent 60%
    ),
    radial-gradient(
      1000px 520px at 90% 20%,
      rgba(37, 99, 235, 0.18),
      transparent 60%
    ),
    radial-gradient(
      860px 520px at 30% 120%,
      rgba(249, 115, 22, 0.12),
      transparent 65%
    ),
    var(--bg);
}

.category-hub__container {
  padding-top: clamp(1.25rem, 2vw, 1.75rem);
}

.category-hero {
  position: relative;
  margin-top: clamp(0.75rem, 1.5vw, 1.2rem);
  padding: clamp(2.6rem, 4.6vw, 4rem);
  border-radius: var(--hub-radius);
  overflow: hidden;
  color: #fff;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.92),
    rgba(15, 23, 42, 0.72) 50%,
    rgba(15, 23, 42, 0.88)
  );
  box-shadow: var(--hub-shadow);
  border: 1px solid rgba(255, 255, 255, 0.14);
  isolation: isolate;
}

.category-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
      900px 520px at 10% 10%,
      color-mix(in srgb, var(--hub-accent) 55%, transparent),
      transparent 65%
    ),
    radial-gradient(
      920px 560px at 96% 10%,
      color-mix(in srgb, var(--hub-accent-2) 52%, transparent),
      transparent 62%
    ),
    radial-gradient(
      760px 520px at 55% 110%,
      color-mix(in srgb, var(--hub-accent-3) 45%, transparent),
      transparent 62%
    );
  filter: saturate(1.05);
  opacity: 0.92;
}

.category-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.category-hero h1 {
  margin: 1.1rem 0 0;
  font-size: clamp(2.6rem, 4.6vw, 3.7rem);
  letter-spacing: -0.035em;
}

.category-hero__description {
  margin: 1.15rem 0 0;
  max-width: 70ch;
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.92);
}

.category-hero__cta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.95rem;
}

.category-hero__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 650;
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
    color 0.2s ease;
}

.category-hero__button--primary {
  background: rgba(255, 255, 255, 0.96);
  color: var(--hub-ink);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
  border-color: rgba(255, 255, 255, 0.66);
}

.category-hero__button--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.22);
}

.category-hero__button--secondary {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.94);
}

.category-hero__button--secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.category-hub .search-bar {
  margin-top: 2.1rem;
  max-width: min(720px, 100%);
}

.category-hub .search-bar__field {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
}

.category-hub .search-bar input {
  color: rgba(255, 255, 255, 0.96);
}

.category-hub .search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.category-hub .search-bar__submit-button {
  background: rgba(255, 255, 255, 0.92);
  color: var(--hub-ink);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.category-hub .search-bar__voice-button {
  color: rgba(255, 255, 255, 0.92);
}

.category-catalog {
  margin-top: clamp(2.2rem, 3.2vw, 3.2rem);
  background: color-mix(in srgb, var(--card-bg) 92%, transparent);
  border: 1px solid var(--card-border);
  border-radius: clamp(22px, 3.4vw, 34px);
  padding: clamp(1.65rem, 2.6vw, 2.35rem);
  box-shadow: var(--shadow-soft);
}

.category-catalog__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 1.35rem;
}

.category-catalog__header h2 {
  margin: 0;
  letter-spacing: -0.02em;
}

.category-catalog__header p {
  margin: 0.45rem 0 0;
  max-width: 70ch;
  color: var(--muted-text);
  line-height: 1.65;
}

.category-catalog__saved {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  color: var(--primary-strong);
  text-decoration: none;
  background: color-mix(in srgb, var(--card-bg) 86%, transparent);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.category-catalog__saved:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.1);
}

.topic-hub-list,
.topic-hub-section {
  margin-top: clamp(1.5rem, 2.5vw, 2.4rem);
  background: color-mix(in srgb, var(--card-bg) 94%, transparent);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: clamp(1.35rem, 2vw, 1.85rem);
  box-shadow: var(--shadow-soft);
}

.topic-hub-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  align-items: stretch;
  gap: 0.9rem;
}

.topic-hub-link {
  display: grid;
  gap: 0.4rem;
  align-content: start;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  padding: 1rem;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--text);
  background: var(--card-bg);
  text-decoration: none;
  overflow: hidden;
  contain: layout paint;
  transition: border-color 0.18s ease, transform 0.18s ease,
    box-shadow 0.18s ease;
}

.topic-hub-link:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--primary) 50%, var(--card-border));
  box-shadow: var(--shadow-soft);
}

.topic-hub-link span {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.topic-hub-link small {
  color: var(--muted-text);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.topic-hub__container {
  padding-top: clamp(1.25rem, 2vw, 1.75rem);
}

.topic-hub-hero {
  margin-top: clamp(0.75rem, 1.5vw, 1.2rem);
  padding: clamp(2rem, 4vw, 3.4rem);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: var(--card-bg);
  box-shadow: var(--shadow-soft);
}

.topic-hub-hero__eyebrow {
  margin: 0;
  color: var(--primary-strong);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topic-hub-hero h1 {
  margin: 0.65rem 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0;
}

.topic-hub-hero__description {
  max-width: 78ch;
  margin: 1rem 0 0;
  color: var(--muted-text);
  font-size: 1.05rem;
  line-height: 1.7;
}

.topic-hub-adjacent {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.4rem;
}

.topic-hub-adjacent span {
  color: var(--muted-text);
  font-size: 0.9rem;
  font-weight: 650;
}

.topic-hub-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  color: var(--primary-strong);
  background: color-mix(in srgb, var(--card-bg) 86%, transparent);
  text-decoration: none;
  font-weight: 650;
}

.topic-hub-pill:hover {
  border-color: color-mix(in srgb, var(--primary) 50%, var(--card-border));
}

.topic-hub-section .card-grid {
  margin-top: 0.5rem;
}

.category-hub .saved-calculators {
  margin-top: clamp(2.4rem, 3.6vw, 3.6rem);
}

@media (max-width: 720px) {
  .category-catalog__header {
    flex-direction: column;
    align-items: flex-start;
  }
}
