/* ===== HOME DASHBOARD ===== */
/* Semantic tokens, body.has-sidebar, footer, FAQ, and reveal animations are in layout.css */

html {
  scroll-behavior: smooth;
}

[data-theme="dark"] body.page-home.has-sidebar::before {
  display: none;
}

.page-home .main-content {
  margin-left: 0;
  max-width: 100%;
  padding: calc(var(--header-height, 64px) + 1rem) 2rem 0;
}


/* ===== HERO (theme-aware full-bleed) ===== */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(3rem, 6vh, 4.5rem) 0 clamp(5rem, 10vh, 8rem);
}

.hero::before {
  content: "";
  position: absolute;
  top: calc(-1 * (var(--header-height, 72px) + 1rem));
  left: calc(-50vw + 50%);
  width: 100vw;
  bottom: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, color-mix(in srgb, var(--accent-blue) 5%, transparent), transparent 70%),
    linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg-body) 100%);
  z-index: -1;
}

[data-theme="dark"] .hero::before {
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(138, 161, 255, 0.12), transparent 65%),
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(138, 161, 255, 0.06), transparent 60%),
    linear-gradient(180deg, #0d0f13 0%, #101114 100%);
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  color: var(--accent-blue);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero .hero-title {
  max-width: 1000px;
  margin: 0 auto 1.5rem;
  font-family: var(--pulse-font-display);
  font-size: clamp(3.2rem, 7vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.05;
  padding-bottom: 0.05em;
  background: linear-gradient(145deg, var(--text-primary) 40%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .hero .hero-title {
  background: linear-gradient(145deg, #ffffff 30%, #8aa1ff 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  max-width: 48rem;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 2.2rem;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 46px;
  padding: 0.72rem 1.3rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border-color) 88%, transparent);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--pulse-font-body);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.hero-link:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent-blue) 28%, var(--border-color) 72%);
  background: color-mix(in srgb, var(--bg-surface) 78%, transparent);
  color: var(--text-primary);
  text-decoration: none;
}

[data-theme="dark"] .hero-link {
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(245, 241, 235, 0.8);
}

[data-theme="dark"] .hero-link:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #f5f1eb;
}

.hero-link-primary {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
}

.hero-link-primary:hover {
  background: color-mix(in srgb, var(--accent-blue) 85%, #fff 15%);
  border-color: color-mix(in srgb, var(--accent-blue) 85%, #fff 15%);
  color: #fff;
}

.hero-link-accent {
  border-color: color-mix(in srgb, var(--accent-blue) 55%, transparent);
  background: color-mix(in srgb, var(--accent-blue) 8%, transparent);
  color: var(--accent-blue);
}

.hero-link-accent:hover {
  border-color: var(--accent-blue);
  background: color-mix(in srgb, var(--accent-blue) 14%, transparent);
  color: var(--accent-blue);
}

[data-theme="dark"] .hero-link-accent {
  border-color: color-mix(in srgb, var(--accent-blue) 60%, transparent);
  background: color-mix(in srgb, var(--accent-blue) 18%, transparent);
  color: color-mix(in srgb, var(--accent-blue) 30%, #f5f1eb);
}

[data-theme="dark"] .hero-link-accent:hover {
  border-color: var(--accent-blue);
  background: color-mix(in srgb, var(--accent-blue) 26%, transparent);
  color: #f5f1eb;
}

/* Trust strip - icon cards below hero CTAs */
.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: 1000px;
  margin: 3rem auto 0;
}

.hero-proof-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.4rem 1rem;
  border: 1px solid color-mix(in srgb, var(--border-color) 66%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg-surface) 50%, transparent);
}

[data-theme="dark"] .hero-proof-card {
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.hero-proof-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
  margin-bottom: 0.15rem;
}

[data-theme="dark"] .hero-proof-icon {
  background: rgba(138, 161, 255, 0.1);
  color: #8aa1ff;
}

.hero-proof-stat {
  color: var(--text-primary);
  font-family: var(--pulse-font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.hero-proof-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

/* Scroll hint — fixed to bottom of viewport, fades on scroll */
.hero-scroll-hint {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  transition: opacity 400ms ease, visibility 400ms ease;
}

.hero-scroll-hint:hover {
  text-decoration: none;
}

.hero-scroll-hint.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hero-scroll-label {
  color: var(--accent-blue);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-scroll-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1.5px solid var(--accent-blue);
  background: color-mix(in srgb, var(--accent-blue) 8%, transparent);
  color: var(--accent-blue);
  animation: hero-bounce 1.8s ease-in-out infinite;
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent-blue) 15%, transparent);
}

.hero-scroll-arrow svg {
  animation: hero-chevron-fade 1.8s ease-in-out infinite;
}

@keyframes hero-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@keyframes hero-chevron-fade {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* On mobile, the fixed bottom hint overlaps the secondary CTA buttons,
   and the hint is unnecessary anyway — the hero naturally pushes
   content below the fold and the CTAs themselves act as the visual cue. */
@media (max-width: 768px) {
  .hero-scroll-hint { display: none; }
}


/* Dashboard data notice */
.dashboard-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: color-mix(in srgb, var(--accent-amber) 14%, var(--bg-surface));
  border: 1px solid color-mix(in srgb, var(--accent-amber) 25%, var(--border-color));
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  font-family: var(--pulse-font-body);
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.55;
}
.dashboard-notice svg {
  flex-shrink: 0;
  color: var(--accent-amber);
  margin-top: 0.15rem;
}

/* AY-specific update callout (e.g. April CPC clearance for FY 2025-26 archive)
   Quiet inline note - matches insights-cta tonality so it sits with the
   card grid rather than fighting it for attention. */
.ay-update-callout {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: color-mix(in srgb, var(--accent-blue) 4%, var(--bg-surface) 96%);
  border: 1px solid color-mix(in srgb, var(--accent-blue) 22%, var(--border-color) 78%);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  margin: 1rem 0 0;
  font-family: var(--pulse-font-body);
}
.ay-update-callout[hidden] { display: none; }
.ay-update-callout svg {
  flex-shrink: 0;
  color: var(--accent-blue);
  opacity: 0.85;
}
.ay-update-callout-body { line-height: 1.45; }
.ay-update-callout-title {
  display: inline;
  margin: 0 0.5rem 0 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-blue);
}
.ay-update-callout-text {
  display: inline;
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.ay-update-callout-text strong { color: var(--text-primary); font-weight: 700; }
.ay-update-callout-source {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Section meta — inline timestamps under heading */
.section-meta {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.section-meta strong {
  color: var(--text-secondary);
  font-family: var(--pulse-font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent-green);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-green) 14%, transparent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ===== SECTIONS ===== */
.metrics-section {
  padding-top: 3.5rem;
  margin-top: 2.25rem;
}

.guides-section,
.blog-section,
.content-section {
  padding-top: 2.25rem;
  margin-top: 2.25rem;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 1.25rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.section-heading-compact {
  grid-template-columns: 1fr;
  margin-bottom: 1.2rem;
}

.section-title,
.chart-title,
.guides-section h2,
.blog-section h2,
.content-section h2,
.insights-cta-copy h3 {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--pulse-font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 0.98;
}

.section-summary,
.chart-subtitle,
.section-subtitle,
.insights-cta-copy p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.8;
}

/* ===== METRIC CARDS ===== */
#cards-container {
  min-height: 148px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.9rem;
}

.card {
  grid-column: span 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 0;
  padding: 1rem 1rem 1.05rem;
  border: 1px solid color-mix(in srgb, var(--border-color) 90%, transparent);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: var(--surface-shadow);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.card:hover,
.guide-card:hover,
.blog-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent-blue) 24%, var(--border-color) 76%);
  box-shadow: var(--surface-shadow-strong);
}

.card-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
}

.card-info {
  margin-left: auto;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-subtle) 88%, transparent);
  color: var(--text-muted);
}

.card-tooltip {
  top: calc(100% + 10px);
  right: -12px;
  width: 220px;
  padding: 0.8rem 0.85rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--border-color) 88%, transparent);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.76rem;
  line-height: 1.55;
  box-shadow: var(--surface-shadow);
}

.card-value {
  color: var(--text-primary);
  font-family: var(--pulse-font-display);
  font-size: clamp(1.65rem, 2vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.card-delta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  padding: 0;
  background: none;
  font-size: 0.78rem;
  font-weight: 700;
}

.delta-positive { color: var(--accent-green); }
.delta-negative { color: var(--accent-red); }
.delta-neutral { color: var(--text-secondary); }

.card-note {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid color-mix(in srgb, var(--border-color) 60%, transparent);
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.card-note strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* ===== DASHBOARD GRID (chart + explore rail) ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 0.8fr);
  gap: 2rem;
  align-items: start;
  padding-top: 2.25rem;
  margin-top: 2.25rem;
}

.chart-section {
  margin: 0;
  padding: 1.4rem;
  border: 1px solid color-mix(in srgb, var(--border-color) 88%, transparent);
  border-radius: 20px;
  background: var(--bg-surface);
  box-shadow: var(--surface-shadow);
  min-width: 0;
  overflow: hidden;
}

.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.chart-filters {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.3rem;
  border: 1px solid color-mix(in srgb, var(--border-color) 88%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-subtle) 72%, transparent);
}

.chart-filter-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.68rem 0.95rem;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--pulse-font-body);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.chart-filter-btn:hover {
  color: var(--text-primary);
}

.chart-filter-btn.active {
  background: var(--bg-emphasis);
  color: var(--bg-surface);
}

[data-theme="dark"] .chart-filter-btn.active {
  color: #111;
}

/* AY switcher — global toggle for which assessment year the dashboard reflects.
   Same pill shape as .chart-filter-btn but lives above the metrics section. */
.ay-switcher {
  display: inline-flex;
  gap: 0.25rem;
  background: var(--bg-surface);
  border-radius: 999px;
  padding: 0.3rem;
  border: 1px solid color-mix(in srgb, var(--border-color) 88%, transparent);
  margin-bottom: 1.25rem;
}
.ay-switcher-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--pulse-font-body);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
  white-space: nowrap;
}
.ay-switcher-btn:hover {
  color: var(--text-primary);
}
.ay-switcher-btn.active {
  background: var(--bg-emphasis);
  color: var(--bg-surface);
}
[data-theme="dark"] .ay-switcher-btn.active {
  color: #111;
}
@media (max-width: 480px) {
  .ay-switcher { overflow-x: auto; max-width: 100%; }
  .ay-switcher-btn { padding: 0.5rem 0.75rem; font-size: 0.74rem; }
}

.chart-metric-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem 0;
}
.chart-metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid color-mix(in srgb, var(--border-color) 88%, transparent);
  background: color-mix(in srgb, var(--bg-subtle) 56%, transparent);
  color: var(--text-secondary);
  font-family: var(--pulse-font-body);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.chart-metric-pill:hover {
  color: var(--text-primary);
  transform: translateY(-1px);
}
.chart-metric-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--metric-color, var(--accent-blue));
  flex-shrink: 0;
}
.chart-metric-pill.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: color-mix(in srgb, var(--metric-color, var(--accent-blue)) 55%, var(--border-color));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--metric-color, var(--accent-blue)) 12%, transparent);
}

.chart-container {
  position: relative;
  height: 480px;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--border-color) 88%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg-subtle) 56%, transparent);
  min-width: 0;
  overflow: hidden;
}

/* ===== EXPLORE RAIL ===== */
.explore-rail {
  padding-top: 0;
}

.explore-stack {
  display: grid;
}

.explore-rail-card {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 1rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border-color) 88%, transparent);
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease;
}

.explore-rail-card:first-child {
  border-top: 1px solid color-mix(in srgb, var(--border-color) 88%, transparent);
}

.explore-rail-card:hover {
  transform: translateX(4px);
  text-decoration: none;
}

.explore-rail-tag,
.blog-card-tag {
  color: var(--accent-blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.explore-rail-title,
.guide-title,
.blog-card-title {
  color: var(--text-primary);
  font-family: var(--pulse-font-display);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.explore-rail-title {
  font-size: 1.05rem;
  line-height: 1.08;
}

.explore-rail-desc,
.guide-desc,
.blog-card-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.65;
}

/* ===== INSIGHTS CTA ===== */
.insights-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent-blue) 40%, var(--border-color) 60%);
  background: color-mix(in srgb, var(--accent-blue) 4%, var(--bg-surface) 96%);
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.insights-cta:hover {
  border-color: color-mix(in srgb, var(--accent-blue) 35%, var(--border-color) 65%);
  background: color-mix(in srgb, var(--accent-blue) 8%, var(--bg-surface) 92%);
  text-decoration: none;
}

.insights-cta-text {
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
}

.insights-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-blue);
  font-family: var(--pulse-font-body);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ===== GUIDES + BLOG GRIDS ===== */
.guides-grid,
.blog-cards-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.guide-card,
.blog-card {
  border: 1px solid color-mix(in srgb, var(--border-color) 88%, transparent);
  border-radius: 18px;
  background: var(--bg-surface);
  box-shadow: var(--surface-shadow);
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.guide-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 1.5rem;
}

.guide-card:nth-child(4),
.guide-card:nth-child(5) {
  grid-column: span 6;
}

.guide-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
  flex-shrink: 0;
  margin-bottom: 0.25rem;
}

.guide-title {
  font-size: 1.08rem;
  line-height: 1.15;
}

.guide-link,
.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: auto;
  padding-top: 0.5rem;
  color: var(--accent-blue);
  font-size: 0.84rem;
  font-weight: 600;
}

.guide-link svg,
.blog-card-link svg {
  transition: transform 200ms ease;
}

.guide-card:hover .guide-link svg,
.blog-card:hover .blog-card-link svg {
  transform: translateX(3px);
}

.blog-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.5rem;
}

.blog-card-title {
  font-size: 1.18rem;
  line-height: 1.12;
}

.blog-card-meta {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* FAQ, footer, and reveal animation styles are in layout.css */

/* ===== RESPONSIVE (homepage-specific) ===== */
@media (max-width: 1180px) {

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    grid-template-columns: 1fr;
  }

  .cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .page-home .main-content {
    padding: calc(var(--header-height, 64px) + 0.75rem) 1rem 0;
  }

  .hero::before {
    left: -1rem;
    width: calc(100% + 2rem);
    top: calc(-1 * (var(--header-height, 72px) + 0.75rem));
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 720px) {
  .hero .hero-title {
    max-width: none;
    font-size: clamp(3rem, 13vw, 5rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: max-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-link {
    width: auto;
  }

  .hero-proof {
    grid-template-columns: 1fr;
    max-width: 320px;
  }

  .cards-grid,
  .guides-grid,
  .blog-cards-grid {
    grid-template-columns: 1fr;
  }

  .card,
  .card:nth-child(4),
  .card:nth-child(5),
  .guide-card,
  .guide-card:nth-child(4),
  .guide-card:nth-child(5),
  .blog-card {
    grid-column: auto;
  }

  .chart-header,
  .insights-cta {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-section {
    padding: 1rem;
  }

  .chart-container {
    height: 280px;
    padding: 0.5rem;
  }

}

/* ============================================================
   SUBSCRIBE FAB + MODAL (homepage only)
   ------------------------------------------------------------
   - Floating pill on the bottom-left
   - Visible only above 240px scroll, then fades out
   - Click → opens flat-blue Public Signal modal
   - Form is wired by shared scripts/subscribe.js
   ============================================================ */

.sub-fab {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  height: 48px;
  padding: 0 1.1rem 0 0.95rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent-blue) 35%, var(--border-color));
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--pulse-font-body);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--surface-shadow-strong);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    border-color 0.18s ease,
    box-shadow 0.25s ease;
}

.sub-fab svg {
  color: var(--accent-blue);
  flex-shrink: 0;
}

.sub-fab:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent-blue) 60%, var(--border-color));
}

.sub-fab.scroll-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

@media (max-width: 480px) {
  .sub-fab {
    width: 48px;
    padding: 0;
    justify-content: center;
  }
  .sub-fab .sub-fab-label {
    display: none;
  }
}

/* ── Modal overlay ─────────────────────────────────────────── */
.sub-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: color-mix(in srgb, var(--bg-emphasis) 55%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sub-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ── Modal box ─────────────────────────────────────────────── */
.sub-modal {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border: 1px solid color-mix(in srgb, var(--border-color) 88%, transparent);
  border-radius: 18px;
  box-shadow: var(--surface-shadow-strong);
  overflow: hidden;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.28s ease;
}

.sub-modal-overlay.open .sub-modal {
  transform: translateY(0) scale(1);
}

/* ── Header band (flat blue, NO gradient, NO violet) ───────── */
.sub-modal-header {
  position: relative;
  padding: 1.75rem 1.5rem 1.5rem;
  background: var(--accent-blue);
}

.sub-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  margin-bottom: 0.7rem;
}

.sub-modal-header h3 {
  margin: 0 0 0.3rem;
  font-family: var(--pulse-font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.sub-modal-header p {
  margin: 0;
  font-family: var(--pulse-font-body);
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

.sub-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 160ms ease;
}

.sub-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ── Body ──────────────────────────────────────────────────── */
.sub-modal-body {
  padding: 1.5rem;
}

.sub-benefits {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sub-benefits li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--pulse-font-body);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.sub-benefits li svg {
  color: var(--accent-blue);
  flex-shrink: 0;
}

/* ── Form ──────────────────────────────────────────────────── */
.sub-modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sub-modal-form input[type="email"] {
  width: 100%;
  height: 46px;
  padding: 0 1rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--border-color) 88%, transparent);
  background: color-mix(in srgb, var(--bg-subtle) 56%, transparent);
  color: var(--text-primary);
  font-family: var(--pulse-font-body);
  font-size: 0.92rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
  box-sizing: border-box;
}

.sub-modal-form input[type="email"]::placeholder {
  color: var(--text-muted);
}

.sub-modal-form input[type="email"]:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent-blue) 50%, var(--border-color));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-blue) 14%, transparent);
  background: var(--bg-surface);
}

.sub-modal-form button[type="submit"] {
  height: 46px;
  padding: 0 1.5rem;
  border: 1px solid var(--accent-blue);
  border-radius: 12px;
  background: var(--accent-blue);
  color: #ffffff;
  font-family: var(--pulse-font-body);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 160ms ease, transform 160ms ease;
}

.sub-modal-form button[type="submit"]:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.sub-modal-form button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.sub-modal-form.is-success input[type="email"] {
  border-color: color-mix(in srgb, var(--accent-green) 40%, var(--border-color));
}

.sub-modal .form-feedback {
  text-align: center;
  margin-top: 0.4rem;
}

.sub-modal-microcopy {
  margin: 0.85rem 0 0;
  text-align: center;
  font-family: var(--pulse-font-body);
  font-size: 0.76rem;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .sub-fab,
  .sub-modal-overlay,
  .sub-modal {
    transition: none;
  }
}
