/* CalNest homepage depth remediation — marketplace cards + equal family hubs */

.homepage-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.homepage-container .section-container,
.cn-hp .section-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 3.25rem 1.25rem;
}

/* —— Hero overrides (pair with calnest-hero-visual.css) —— */
.hero-section:has(.cn-hero-layout) {
  padding: 2.75rem 1.25rem 2.5rem;
  min-height: 0;
  max-height: none;
}

.cn-hero-layout {
  max-width: 1240px;
  gap: 1.5rem 2rem;
  align-items: center;
}

.cn-hero-layout .hero-content {
  max-width: 42rem; /* ~672px breathing room for workspace visual */
  color: #ffffff;
}

.cn-hp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.cn-hero-layout .hero-title {
  max-width: 680px;
  /* ~48–54px at 1440; do not grow to fill empty space */
  font-size: clamp(2.125rem, 1.7rem + 1.35vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
  white-space: normal !important;
  overflow-wrap: break-word;
  text-wrap: balance;
  color: #ffffff !important;
}

.cn-hero-layout .hero-subtitle {
  max-width: 36rem;
  font-size: clamp(0.95rem, 0.88rem + 0.35vw, 1.08rem);
  line-height: 1.55;
  margin-bottom: 0.55rem;
  font-weight: 400;
  opacity: 0.96;
  color: rgba(255, 255, 255, 0.96);
}

.cn-hero-layout .hero-trust-subtext {
  max-width: 34rem;
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.9;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.cn-hero-layout .hero-search-box {
  max-width: 560px;
  margin: 0 0 1rem;
}

.cn-hero-layout .hero-search-box .form-control {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  height: 52px;
}

.cn-hero-layout .hero-search-box .btn {
  height: 52px;
  min-width: 112px;
  font-weight: 700;
  background: #ff6b35;
  border-color: #ff6b35;
}

.cn-hero-layout .hero-cta-group {
  gap: 0.65rem;
  margin-top: 0.15rem;
}

.cn-hero-layout .hero-cta {
  padding: 0.6rem 1.15rem;
  font-size: 0.92rem;
}

.cn-hero-layout .hero-cta-group > .hero-cta:not(.hero-cta-secondary) {
  font-size: 1.02rem;
  min-height: 46px;
}

.cn-hero-layout .hero-badges-row {
  margin-top: 0.85rem;
}

.cn-hero-layout .hero-badge {
  font-size: 0.72rem;
  padding: 0.28rem 0.6rem;
  opacity: 0.95;
}

/* —— Section chrome —— */
.cn-hp .section-title {
  font-size: clamp(1.65rem, 1.35rem + 0.8vw, 2.15rem);
  font-weight: 750;
  margin-bottom: 0.65rem;
  text-align: center;
  color: var(--text-color);
  position: relative;
}

.cn-hp .section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 3px;
  background: linear-gradient(90deg, #2962ff, #00c9a7);
  border-radius: 2px;
}

.cn-hp .section-subtitle {
  color: var(--text-muted, #5b6578);
  text-align: center;
  max-width: 40rem;
  margin: 1.35rem auto 0;
  font-size: 1rem;
  line-height: 1.55;
}

/* —— Tool marketplace cards —— */
.cn-tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.15rem;
  margin-top: 2rem;
}

.cn-tool-card {
  --cn-accent: #2962ff;
  --cn-accent-soft: rgba(41, 98, 255, 0.12);
  --cn-accent-border: rgba(41, 98, 255, 0.28);
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: 1.2rem 1.15rem 1.05rem;
  background: var(--card-bg, #fff);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-top: 3px solid var(--cn-accent);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  outline: none;
}

.cn-tool-card:hover,
.cn-tool-card:focus-visible {
  text-decoration: none;
  color: inherit;
  border-color: var(--cn-accent-border);
  border-top-color: var(--cn-accent);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  transform: translateY(-3px);
}

.cn-tool-card:focus-visible {
  box-shadow: 0 0 0 3px var(--cn-accent-soft), 0 12px 30px rgba(15, 23, 42, 0.12);
}

/* Popular card icons: 32–36px glyph in tinted rounded square */
.cn-tool-card__icon {
  width: 3rem; /* 48px container */
  height: 3rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cn-accent-soft);
  color: var(--cn-accent);
  margin-bottom: 0.9rem;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.cn-tool-card__icon i {
  font-size: 2rem; /* 32px — popular card icon gate */
  line-height: 1;
}

.cn-tool-card:hover .cn-tool-card__icon,
.cn-tool-card:focus-visible .cn-tool-card__icon {
  transform: scale(1.06);
}

.cn-tool-card__title {
  font-size: 1.0625rem; /* 17px */
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.45rem;
  color: #0f172a;
}

.cn-tool-card__desc {
  font-size: 0.875rem; /* 14px */
  line-height: 1.5;
  color: #475569;
  margin: 0 0 0.85rem;
  flex: 1 1 auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cn-tool-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.cn-tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  background: var(--cn-accent-soft);
  color: var(--cn-accent);
  border: 1px solid transparent;
}

.cn-tool-badge--attr {
  background: rgba(15, 23, 42, 0.05);
  color: #64748b;
}

.cn-tool-card__action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cn-accent);
  margin-top: auto;
}

.cn-tool-card__action i {
  transition: transform 0.2s ease;
}

.cn-tool-card:hover .cn-tool-card__action i,
.cn-tool-card:focus-visible .cn-tool-card__action i {
  transform: translateX(3px);
}

/* Category accent tokens */
.cn-accent-finance { --cn-accent: #0d9488; --cn-accent-soft: rgba(13, 148, 136, 0.14); --cn-accent-border: rgba(13, 148, 136, 0.38); }
.cn-accent-math { --cn-accent: #2563eb; --cn-accent-soft: rgba(37, 99, 235, 0.14); --cn-accent-border: rgba(37, 99, 235, 0.38); }
.cn-accent-physics { --cn-accent: #7c3aed; --cn-accent-soft: rgba(124, 58, 237, 0.14); --cn-accent-border: rgba(124, 58, 237, 0.38); }
.cn-accent-health { --cn-accent: #e11d48; --cn-accent-soft: rgba(225, 29, 72, 0.14); --cn-accent-border: rgba(225, 29, 72, 0.35); }
.cn-accent-engineering { --cn-accent: #d97706; --cn-accent-soft: rgba(217, 119, 6, 0.14); --cn-accent-border: rgba(217, 119, 6, 0.38); }
.cn-accent-engineering-math { --cn-accent: #ea580c; --cn-accent-soft: rgba(234, 88, 12, 0.14); --cn-accent-border: rgba(234, 88, 12, 0.38); }
.cn-accent-statistics { --cn-accent: #4338ca; --cn-accent-soft: rgba(67, 56, 202, 0.14); --cn-accent-border: rgba(67, 56, 202, 0.38); }
.cn-accent-utilities { --cn-accent: #0891b2; --cn-accent-soft: rgba(8, 145, 178, 0.14); --cn-accent-border: rgba(8, 145, 178, 0.38); }
.cn-accent-datetime { --cn-accent: #0369a1; --cn-accent-soft: rgba(3, 105, 161, 0.14); --cn-accent-border: rgba(3, 105, 161, 0.38); }
.cn-accent-construction { --cn-accent: #b45309; --cn-accent-soft: rgba(180, 83, 9, 0.14); --cn-accent-border: rgba(180, 83, 9, 0.38); }
.cn-accent-pdf { --cn-accent: #ff6b00; --cn-accent-soft: rgba(255, 107, 0, 0.14); --cn-accent-border: rgba(255, 107, 0, 0.38); }

/* Compact cards inside family hubs — icons 28–34px */
.cn-tool-card--compact {
  min-height: 200px;
  padding: 1.05rem;
}

.cn-tool-card--compact .cn-tool-card__icon {
  width: 2.625rem; /* 42px container */
  height: 2.625rem;
  margin-bottom: 0.7rem;
  border-radius: 10px;
}

.cn-tool-card--compact .cn-tool-card__icon i {
  font-size: 1.75rem; /* 28px — category tool-card icon gate */
}

.cn-tool-card--compact .cn-tool-card__title {
  font-size: 1rem;
}

.cn-tool-card--compact .cn-tool-card__desc {
  font-size: 0.84rem;
  -webkit-line-clamp: 2;
}

/* —— Family hubs —— */
.cn-family-hub {
  --cn-accent: #2962ff;
  --cn-accent-soft: rgba(41, 98, 255, 0.12);
  --cn-accent-border: rgba(41, 98, 255, 0.24);
  margin-bottom: 2.35rem;
  padding: 1.5rem 1.35rem 1.45rem;
  border-radius: 18px;
  background:
    linear-gradient(180deg, var(--cn-accent-soft), transparent 48%),
    var(--card-bg, #fff);
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
  border-left: 4px solid var(--cn-accent);
}

.cn-family-hub--math,
.cn-family-hub--finance,
.cn-family-hub--physics,
.cn-family-hub--engineering-math,
.cn-family-hub--engineering,
.cn-family-hub--statistics,
.cn-family-hub--health,
.cn-family-hub--utilities,
.cn-family-hub--datetime,
.cn-family-hub--construction {
  /* tint already applied via generic hub gradient using accent soft */
}

.cn-family-hub__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.55rem;
}

.cn-family-hub__identity {
  display: flex;
  align-items: flex-start;
  gap: 0.95rem;
  min-width: 0;
}

/* Category icons: 48–64px container */
.cn-family-hub__icon {
  width: 3.75rem; /* 60px */
  height: 3.75rem;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cn-accent-soft);
  color: var(--cn-accent);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px var(--cn-accent-border);
}

.cn-family-hub__icon i {
  font-size: 2.125rem; /* 34px glyph in 60px square */
  line-height: 1;
}

.cn-family-hub__title {
  font-size: 1.4rem;
  font-weight: 750;
  margin: 0 0 0.25rem;
  color: #0f172a;
  line-height: 1.25;
}

.cn-family-hub__desc {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 48rem;
}

.cn-family-hub__count {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--cn-accent);
  background: var(--cn-accent-soft);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid var(--cn-accent-border);
}

.cn-family-hub__explore {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.1rem;
  padding: 0.55rem 0.95rem;
  border-radius: 10px;
  font-weight: 750;
  color: #fff;
  background: var(--cn-accent);
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.cn-family-hub__explore:hover {
  filter: brightness(1.06);
  text-decoration: none;
  color: #fff;
}

.cn-family-hub--compact .cn-tool-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-width: 280px;
}

.cn-chem-note {
  margin: 0.5rem 0 0;
  font-size: 0.86rem;
  color: #64748b;
  text-align: center;
}

/* —— Feature strip / PDF / Why —— */
.cn-feature-bar {
  background: linear-gradient(180deg, rgba(41, 98, 255, 0.04), rgba(255, 255, 255, 0.9));
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  padding: 2.5rem 1.25rem;
}

.cn-feature-bar__grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.cn-feature-item {
  text-align: center;
}

.cn-feature-item__icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.75rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(41, 98, 255, 0.12);
  color: #2563eb;
  font-size: 1.4rem;
}

.cn-feature-item__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: #0f172a;
}

.cn-feature-item__desc {
  font-size: 0.9rem;
  color: #475569;
  margin: 0;
  line-height: 1.45;
}

.cn-pdf-band {
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.75rem 1.25rem;
}

.cn-pdf-band__inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.cn-pdf-band__copy h3 {
  color: #fff;
  margin: 0 0 0.3rem;
  font-size: 1.25rem;
  font-weight: 750;
}

.cn-pdf-band__copy p {
  color: #c8d1e5;
  margin: 0;
  font-size: 0.95rem;
}

.cn-pdf-band .hero-cta {
  background: #ff6b00;
  color: #fff;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.cn-pdf-band .hero-cta:hover {
  background: #e85f00;
  color: #fff;
}

.why-calnest-section {
  background: linear-gradient(180deg, rgba(41, 98, 255, 0.05), transparent 55%);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.15rem;
  margin-top: 2rem;
}

.why-item {
  text-align: left;
  padding: 1.4rem 1.25rem;
  background: var(--card-bg, #fff);
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.why-item:hover {
  transform: translateY(-3px);
  border-color: rgba(41, 98, 255, 0.25);
}

.why-icon {
  width: 3rem; /* 48px — Why CalNest 32–40px gate */
  height: 3rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(41, 98, 255, 0.12);
  color: #2563eb;
  margin-bottom: 0.9rem;
}

.why-icon i {
  font-size: 1.75rem; /* 28–32px glyph */
  line-height: 1;
}

.why-item:nth-child(2) .why-icon { background: rgba(234, 88, 12, 0.14); color: #ea580c; }
.why-item:nth-child(3) .why-icon { background: rgba(13, 148, 136, 0.14); color: #0d9488; }
.why-item:nth-child(4) .why-icon { background: rgba(124, 58, 237, 0.14); color: #7c3aed; }

.why-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.45rem;
  color: #0f172a;
}

.why-item p {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.55;
  margin: 0;
}

.trust-section {
  background: linear-gradient(135deg, rgba(41, 98, 255, 0.06) 0%, rgba(0, 201, 167, 0.07) 100%);
  padding: 3rem 1.25rem;
}

.trust-content {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.trust-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: #2962ff;
  line-height: 1;
}

.trust-label {
  font-size: 1rem;
  color: #0f172a;
  font-weight: 650;
  margin-top: 0.35rem;
}

.popular-calculators-section {
  background:
    radial-gradient(circle at 10% 0%, rgba(41, 98, 255, 0.05), transparent 42%),
    var(--bg-color, #f4f7fb);
}

.category-section {
  background:
    radial-gradient(circle at 90% 8%, rgba(0, 201, 167, 0.05), transparent 40%),
    var(--bg-color, #f8fafc);
}

.cn-browse-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 10px;
  background: #d4a017;
  color: #1a1a1a;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(212, 160, 23, 0.28);
}

.cn-browse-all:hover {
  background: #eab308;
  color: #1a1a1a;
  text-decoration: none;
}

/* ========== Dark mode HARD GATE ==========
   Beat global [data-theme=dark] * { color: !important } from header CSS */
[data-theme="dark"] .cn-tool-card,
[data-theme="dark"] .cn-family-hub,
[data-theme="dark"] .why-item {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%), var(--card-bg, #121826) !important;
  border-color: rgba(200, 209, 229, 0.14) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  color: #f5f7ff !important;
}

[data-theme="dark"] .cn-family-hub {
  background:
    linear-gradient(180deg, var(--cn-accent-soft), transparent 46%),
    var(--card-bg, #121826) !important;
}

[data-theme="dark"] .cn-tool-card__title,
[data-theme="dark"] .cn-family-hub__title,
[data-theme="dark"] .why-item h3,
[data-theme="dark"] .cn-feature-item__title,
[data-theme="dark"] .trust-label,
[data-theme="dark"] .cn-hp .section-title {
  color: #f5f7ff !important;
}

[data-theme="dark"] .cn-tool-card__desc,
[data-theme="dark"] .cn-family-hub__desc,
[data-theme="dark"] .why-item p,
[data-theme="dark"] .cn-feature-item__desc,
[data-theme="dark"] .cn-hp .section-subtitle,
[data-theme="dark"] .cn-chem-note {
  color: #c8d1e5 !important;
}

[data-theme="dark"] .cn-tool-card__icon,
[data-theme="dark"] .cn-family-hub__icon,
[data-theme="dark"] .cn-tool-badge,
[data-theme="dark"] .cn-tool-card__action,
[data-theme="dark"] .cn-family-hub__count,
[data-theme="dark"] .cn-family-hub__explore,
[data-theme="dark"] .cn-feature-item__icon,
[data-theme="dark"] .why-icon {
  color: var(--cn-accent) !important;
}

[data-theme="dark"] .cn-tool-card__icon,
[data-theme="dark"] .cn-family-hub__icon,
[data-theme="dark"] .cn-tool-badge,
[data-theme="dark"] .cn-family-hub__count,
[data-theme="dark"] .cn-feature-item__icon,
[data-theme="dark"] .why-icon {
  background: var(--cn-accent-soft) !important;
}

[data-theme="dark"] .cn-tool-card__icon i,
[data-theme="dark"] .cn-family-hub__icon i,
[data-theme="dark"] .cn-tool-card__action i,
[data-theme="dark"] .cn-family-hub__explore i,
[data-theme="dark"] .cn-feature-item__icon i,
[data-theme="dark"] .why-icon i {
  color: inherit !important;
}

[data-theme="dark"] .cn-family-hub__explore {
  background: var(--cn-accent) !important;
  color: #fff !important;
}

[data-theme="dark"] .cn-family-hub__explore i {
  color: #fff !important;
}

[data-theme="dark"] .cn-tool-badge--attr {
  background: rgba(255, 255, 255, 0.07) !important;
  color: #9eabc0 !important;
}

[data-theme="dark"] .popular-calculators-section,
[data-theme="dark"] .category-section {
  background:
    radial-gradient(circle at 12% 0%, rgba(41, 98, 255, 0.12), transparent 45%),
    var(--bg-color, #0b0f19);
}

[data-theme="dark"] .why-calnest-section {
  background: linear-gradient(180deg, rgba(41, 98, 255, 0.1), transparent 55%);
}

[data-theme="dark"] .cn-feature-bar {
  background: linear-gradient(180deg, rgba(41, 98, 255, 0.08), rgba(11, 15, 25, 0.6));
  border-color: rgba(200, 209, 229, 0.1);
}

[data-theme="dark"] .trust-section {
  background: linear-gradient(135deg, rgba(41, 98, 255, 0.12) 0%, rgba(0, 201, 167, 0.1) 100%);
}

[data-theme="dark"] .trust-number {
  color: #7dd3fc !important;
}

[data-theme="dark"] .cn-pdf-band__copy h3 {
  color: #fff !important;
}

[data-theme="dark"] .cn-pdf-band__copy p {
  color: #c8d1e5 !important;
}

/* Gold/amber homepage CTAs: bright white labels (beat residual dark-link inheritance) */
[data-theme="dark"] .cn-hp a.hero-cta,
[data-theme="dark"] .cn-hp a.hero-cta:hover,
[data-theme="dark"] .cn-hp a.hero-cta:focus,
[data-theme="dark"] .cn-hp a.hero-cta:visited,
[data-theme="dark"] .cn-hp a.cn-browse-all,
[data-theme="dark"] .cn-hp a.cn-browse-all:hover,
[data-theme="dark"] .cn-hp a.cn-browse-all:focus,
[data-theme="dark"] .cn-hp a.cn-browse-all:visited {
  color: #ffffff !important;
}

[data-theme="dark"] .cn-hp a.hero-cta i,
[data-theme="dark"] .cn-hp a.cn-browse-all i {
  color: #ffffff !important;
}

[data-theme="dark"] .why-item:nth-child(2) .why-icon { color: #ea580c !important; background: rgba(234, 88, 12, 0.14) !important; }
[data-theme="dark"] .why-item:nth-child(3) .why-icon { color: #0d9488 !important; background: rgba(13, 148, 136, 0.14) !important; }
[data-theme="dark"] .why-item:nth-child(4) .why-icon { color: #7c3aed !important; background: rgba(124, 58, 237, 0.14) !important; }
[data-theme="dark"] .why-item:nth-child(1) .why-icon { color: #2563eb !important; background: rgba(41, 98, 255, 0.14) !important; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cn-tool-card,
  .cn-tool-card__icon,
  .cn-tool-card__action i,
  .why-item {
    transition: none;
  }
  .cn-tool-card:hover,
  .cn-tool-card:focus-visible,
  .why-item:hover {
    transform: none;
  }
}

/* Responsive grids */
@media (max-width: 1200px) {
  .cn-tool-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .cn-feature-bar__grid,
  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .cn-tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cn-hero-layout .hero-title {
    font-size: clamp(2rem, 1.2rem + 1.4vw, 2.75rem);
  }

  .cn-family-hub__icon {
    width: 3.15rem;
    height: 3.15rem;
  }
}

@media (max-width: 900px) {
  .cn-hero-layout .hero-cta-group {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .cn-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cn-hero-layout .hero-title {
    font-size: clamp(2.125rem, 5.2vw, 2.45rem);
    max-width: 100%;
  }

  .trust-content {
    grid-template-columns: 1fr;
  }

  .cn-family-hub {
    padding: 1.15rem 1rem 1.2rem;
  }

  .cn-family-hub__icon {
    width: 3rem;
    height: 3rem;
  }
}

@media (max-width: 576px) {
  .cn-tool-grid {
    grid-template-columns: 1fr;
  }

  .cn-feature-bar__grid,
  .why-grid {
    grid-template-columns: 1fr;
  }

  .cn-tool-card,
  .cn-tool-card--compact {
    min-height: 0;
  }
}
