/**
 * HAPI HappyHabit — site theme aligned with Mobile AppColors
 * (Mobile/lib/core/theme/app_theme.dart)
 *
 * sage / coral / warm neutrals
 */
:root {
  /* Mobile AppColors — sage / coral / warm neutral (#FAF9F7) */
  --hapi-bg: #faf9f7;
  --hapi-header-bg: #ffffff;
  --hapi-surface: #f3f4f6;
  --hapi-surface-light: #fafafa;
  --hapi-sage: #91a88f;
  --hapi-sage-dark: #7a9478;
  --hapi-coral: #e5a596;
  --hapi-coral-deep: #d9897a;
  --hapi-charcoal: #3d3d3d;
  --hapi-text-secondary: #6b7280;
  --hapi-border: #e5e7eb;
  --hapi-error: #ef4444;
  --hapi-fiber: #9bb89a;
  --hapi-carbs: #8baed4;

  --hapi-sage-rgb: 145, 168, 143;
  --hapi-coral-rgb: 229, 165, 150;
  --hapi-coral-deep-rgb: 217, 137, 122;
  --hapi-charcoal-rgb: 61, 61, 61;
  --hapi-bg-rgb: 250, 249, 247;
  --hapi-header-bg-rgb: 255, 255, 255;

  /* Primary CTA + accents */
  --hapi-black: #121317;
  --hapi-black-hover: #2a2b30;
  --hapi-black-muted: rgba(18, 19, 23, 0.08);
  --hapi-black-border: rgba(18, 19, 23, 0.12);
  --hapi-page-bg: #faf9f7;

  /* Legacy gradient token — kept for footer CTAs */
  --hapi-gradient: linear-gradient(
    90deg,
    var(--hapi-sage-dark) 0%,
    var(--hapi-coral-deep) 100%
  );

  /* Remap Antigravity/Google tokens → HAPI */
  --palette-grey-0: #ffffff;
  --palette-grey-10: #faf9f7;
  --palette-grey-15: #f3f4f6;
  --palette-grey-20: #f3f4f6;
  --palette-grey-50: #e5e7eb;
  --palette-grey-100: #e5e7eb;
  --palette-grey-200: #d1d5db;
  --palette-grey-300: #9ca3af;
  --palette-grey-400: #c5d0c4;
  --palette-grey-600: rgba(145, 168, 143, 0.35);
  --palette-grey-800: #6b7280;
  --palette-grey-900: #4b5563;
  --palette-grey-1000: #3d3d3d;
  --palette-grey-1100: #3d3d3d;
  --palette-grey-1200: #3d3d3d;
  --palette-grey-50-20: #5a5a5a;
  --palette-grey-1000-12: #ebe6dd;

  --palette-grey-0-rgb: 255, 253, 249;
  --palette-grey-50-rgb: 226, 217, 204;
  --palette-grey-400-rgb: 197, 208, 196;
  --palette-grey-600-rgb: 145, 168, 143;
  --palette-grey-1000-rgb: 61, 61, 61;
  --palette-grey-1200-rgb: 61, 61, 61;

  /* Primary accent = sage (was Google blue) */
  --palette-blue-600: #7a9478;

  --theme-surface-surface: #ffffff;
  --theme-surface-on-surface: var(--hapi-charcoal);
  --theme-surface-on-surface-variant: var(--hapi-text-secondary);
  --theme-surface-surface-container: var(--hapi-bg);
  --theme-surface-surface-container-low: transparent;
  --theme-surface-surface-container-high: var(--hapi-surface);
  --theme-surface-surface-container-higher: #e5e7eb;
  --theme-surface-surface-container-highest: var(--hapi-border);
  --theme-surface-inverse-surface: var(--hapi-charcoal);
  --theme-surface-inverse-on-surface: var(--hapi-bg);
  --theme-surface-overlay: rgba(250, 249, 247, 0.94);
  --theme-surface-overlay-low: rgba(255, 255, 255, 0.12);
  --theme-surface-overlay-high: rgba(255, 255, 255, 0.28);
  --theme-surface-overlay-higher: rgba(255, 255, 255, 0.72);

  --theme-primary-primary: var(--hapi-sage-dark);
  --theme-primary-on-primary: #ffffff;
  --theme-primary: var(--hapi-sage-dark);
  --theme-primary-container: rgba(145, 168, 143, 0.18);

  --theme-button-states-primary-enabled: var(--hapi-sage-dark);
  --theme-button-states-primary-hovered: var(--hapi-sage);
  --theme-button-states-primary-pressed: rgba(145, 168, 143, 0.2);
  --theme-button-states-primary-focused: rgba(145, 168, 143, 0.28);

  --theme-secondary-button: rgba(145, 168, 143, 0.12);
  --theme-button-secondary-hover: rgba(145, 168, 143, 0.2);
  --theme-nav-button: rgba(145, 168, 143, 0.1);
  --theme-nav-button-hover: rgba(145, 168, 143, 0.2);

  --theme-outline: rgba(61, 61, 61, 0.1);
  --theme-outline-variant: rgba(61, 61, 61, 0.06);
  --divider: rgba(61, 61, 61, 0.08);

  /* Typography — same clean stack as sidebar (Enterprise) */
  --hapi-font: "Google Sans Flex", "Nunito", system-ui, sans-serif;
}

html {
  background: var(--hapi-page-bg);
  min-height: 100%;
}

body {
  background: var(--hapi-page-bg) !important;
  color: var(--hapi-charcoal) !important;
  min-height: 100%;
  font-family: var(--hapi-font) !important;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
}

/* Header — flat page tone */
header.header,
.header[data-astro-cid-nen7h5rs],
.header[data-astro-cid-nen7h5rs].scrolled,
.header[data-astro-cid-nen7h5rs].opaque,
.header[data-astro-cid-nen7h5rs].dropdown-open,
.header[data-astro-cid-nen7h5rs].menu-open {
  background: var(--hapi-page-bg) !important;
  border-bottom: 1px solid var(--hapi-black-border);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.header[data-astro-cid-nen7h5rs] .dropdown[data-astro-cid-nen7h5rs],
.header[data-astro-cid-nen7h5rs] .mobile-menu[data-astro-cid-nen7h5rs],
.header[data-astro-cid-nen7h5rs].dropdown-open .dropdown[data-astro-cid-nen7h5rs],
.header[data-astro-cid-nen7h5rs].menu-open .mobile-menu[data-astro-cid-nen7h5rs] {
  background: var(--hapi-page-bg) !important;
  border-top: 1px solid var(--hapi-black-border);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.header[data-astro-cid-nen7h5rs] .dropdown-panel[data-astro-cid-nz4fptcl],
.header[data-astro-cid-nen7h5rs] .mobile-dropdown-section[data-astro-cid-nen7h5rs] {
  background: transparent !important;
}

.header[data-astro-cid-nen7h5rs] .hapi-main-nav .nav-trigger-btn.is-active,
.header[data-astro-cid-nen7h5rs] .hapi-main-nav .nav-trigger-btn[aria-current="page"] {
  color: #000 !important;
  background: rgba(0, 0, 0, 0.06) !important;
}

.logo-link[data-astro-cid-nen7h5rs],
.logo.brand-text,
.brand-text {
  color: var(--hapi-charcoal) !important;
  -webkit-text-fill-color: currentColor;
  background: none;
}

/* Header typeface — same as Enterprise sidebar (keep Google Symbols for icons) */
.header[data-astro-cid-nen7h5rs],
.header[data-astro-cid-nen7h5rs] :is(a, button, span, p, nav, div),
.header[data-astro-cid-nen7h5rs] .logo-link,
.header[data-astro-cid-nen7h5rs] .brand-text,
.header[data-astro-cid-nen7h5rs] .button-nav,
.header[data-astro-cid-nen7h5rs] .nav-trigger-btn,
.header[data-astro-cid-nen7h5rs] .download-button,
.header[data-astro-cid-nen7h5rs] .mobile-nav-item,
.header[data-astro-cid-nen7h5rs] .subnav-link,
.header[data-astro-cid-nen7h5rs] .dropdown-title,
.header[data-astro-cid-nen7h5rs] .nav-button {
  font-family: var(--hapi-font) !important;
}

.header[data-astro-cid-nen7h5rs] .logo-link.brand-text,
.header[data-astro-cid-nen7h5rs] .brand-text {
  font-size: 1.45rem !important;
  font-weight: 700;
}

.header[data-astro-cid-nen7h5rs] .hapi-main-nav .button-nav,
.header[data-astro-cid-nen7h5rs] .hapi-main-nav .nav-trigger-btn {
  font-size: 1.05rem !important;
  font-weight: 600;
}

.header[data-astro-cid-nen7h5rs] .download-button.button-primary,
.header[data-astro-cid-nen7h5rs] .download-button.button-primary span:not(.dropdown-icon) {
  font-size: 1.05rem !important;
}

.header[data-astro-cid-nen7h5rs] .mobile-nav-item {
  font-size: 1.35rem !important;
}

.header[data-astro-cid-nen7h5rs] .dropdown .subnav-link,
.header[data-astro-cid-nen7h5rs] .dropdown .dropdown-title,
.header[data-astro-cid-nen7h5rs] .dropdown .dropdown-info,
.header[data-astro-cid-nen7h5rs] .dropdown .subnav-label,
.header[data-astro-cid-nen7h5rs] .dropdown .body,
.header[data-astro-cid-nen7h5rs] .mobile-menu .subnav-link,
.header[data-astro-cid-nen7h5rs] .mobile-menu .mobile-nav-item {
  font-size: 1.05rem !important;
  color: var(--hapi-charcoal) !important;
  -webkit-text-fill-color: var(--hapi-charcoal) !important;
}

/* Header unfold: no sage/green text — charcoal only */
.header[data-astro-cid-nen7h5rs] .button-nav,
.header[data-astro-cid-nen7h5rs] .button-nav:hover,
.header[data-astro-cid-nen7h5rs] .button-nav:focus-visible,
.header[data-astro-cid-nen7h5rs] .button-nav[aria-expanded="true"],
.header[data-astro-cid-nen7h5rs] .nav-trigger-btn,
.header[data-astro-cid-nen7h5rs] .nav-trigger-btn:hover,
.header[data-astro-cid-nen7h5rs] .nav-trigger-btn:focus-visible,
.header[data-astro-cid-nen7h5rs] .nav-trigger-btn[aria-expanded="true"],
.header[data-astro-cid-nen7h5rs] .nav-trigger-btn.is-active,
.header[data-astro-cid-nen7h5rs] .nav-trigger-btn[aria-current="page"],
.header[data-astro-cid-nen7h5rs] .subnav-link,
.header[data-astro-cid-nen7h5rs] .subnav-link:hover,
.header[data-astro-cid-nen7h5rs] .subnav-link:focus,
.header[data-astro-cid-nen7h5rs] .subnav-link:focus-visible,
.header[data-astro-cid-nen7h5rs] a.body,
.header[data-astro-cid-nen7h5rs] .body a,
.header[data-astro-cid-nen7h5rs] .dropdown a,
.header[data-astro-cid-nen7h5rs] .dropdown a:hover,
.header[data-astro-cid-nen7h5rs] .dropdown a:focus-visible,
.header[data-astro-cid-nen7h5rs] .mobile-menu a,
.header[data-astro-cid-nen7h5rs] .mobile-menu a:hover,
.header[data-astro-cid-nen7h5rs] .mobile-menu a:focus-visible {
  color: var(--hapi-charcoal) !important;
  -webkit-text-fill-color: var(--hapi-charcoal) !important;
}

.header[data-astro-cid-nen7h5rs] .button-nav:hover,
.header[data-astro-cid-nen7h5rs] .button-nav:focus-visible,
.header[data-astro-cid-nen7h5rs] .button-nav[aria-expanded="true"],
.header[data-astro-cid-nen7h5rs] .nav-trigger-btn:hover,
.header[data-astro-cid-nen7h5rs] .nav-trigger-btn:focus-visible,
.header[data-astro-cid-nen7h5rs] .nav-trigger-btn[aria-expanded="true"],
.header[data-astro-cid-nen7h5rs] .nav-trigger-btn.is-active,
.header[data-astro-cid-nen7h5rs] .nav-trigger-btn[aria-current="page"] {
  background: rgba(0, 0, 0, 0.06) !important;
}

.header[data-astro-cid-nen7h5rs] .subnav-link:hover,
.header[data-astro-cid-nen7h5rs] .subnav-link:focus,
.header[data-astro-cid-nen7h5rs] .subnav-link:focus-visible {
  background-color: rgba(0, 0, 0, 0.06) !important;
}

.header[data-astro-cid-nen7h5rs] .dropdown-icon,
.header[data-astro-cid-nen7h5rs] .link-icon,
.header[data-astro-cid-nen7h5rs] .link-arrow,
.header[data-astro-cid-nen7h5rs] .menu-toggle,
.header[data-astro-cid-nen7h5rs] .menu-toggle span {
  font-family: "Google Symbols", sans-serif !important;
}

.header[data-astro-cid-nen7h5rs] .download-button.button-primary,
.header[data-astro-cid-nen7h5rs] .download-button.button-primary span:not(.dropdown-icon) {
  font-family: var(--hapi-font) !important;
  font-weight: 600;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Primary CTAs — black pill (exclude mobile menu icon) */
.button-primary:not(.menu-toggle),
.header[data-astro-cid-nen7h5rs] .download-button.button-primary {
  background: var(--hapi-black) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(18, 19, 23, 0.18);
  font-family: var(--hapi-font) !important;
  font-weight: 600;
}

.button-primary:not(.menu-toggle):hover,
.button-primary:not(.menu-toggle):focus-visible,
.header[data-astro-cid-nen7h5rs] .download-button.button-primary:hover,
.header[data-astro-cid-nen7h5rs] .download-button.button-primary:focus-visible {
  background: var(--hapi-black-hover) !important;
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(18, 19, 23, 0.22);
}

.header[data-astro-cid-nen7h5rs] .download-button .dropdown-icon {
  color: #fff !important;
}

.menu-toggle.button-primary {
  background: #121317 !important;
  color: #fff !important;
  box-shadow: none !important;
  font-family: "Google Symbols", sans-serif !important;
}

.button-secondary {
  background: rgba(145, 168, 143, 0.12) !important;
  border-color: rgba(145, 168, 143, 0.28) !important;
  color: var(--hapi-charcoal) !important;
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(145, 168, 143, 0.22) !important;
}

.button-nav:hover,
.button-nav:focus-visible {
  color: var(--hapi-sage-dark) !important;
  background: rgba(145, 168, 143, 0.16) !important;
}

/* Links that were Google-blue */
a.body,
.body a,
.markdown-content a:not(.button):not(.call-to-action):not(.chip),
app-recursive-renderer a {
  color: var(--hapi-sage-dark) !important;
}

.body a:hover,
.markdown-content a:not(.button):not(.call-to-action):not(.chip):hover {
  color: var(--hapi-coral-deep) !important;
}

.hapi-store-card .store-btn,
.hapi-store-card .store-btn:hover,
.hapi-store-card .store-btn:focus-visible,
.hapi-store-card .store-btn:active,
.body .hapi-store-card .store-btn,
.body .hapi-store-card .store-btn:hover,
.body .hapi-store-card .store-btn:focus-visible,
.body .hapi-store-card .store-btn:active {
  color: #3f2f2a !important;
  text-decoration: none !important;
  -webkit-text-fill-color: #3f2f2a;
}

.hapi-store-card .store-btn .button-text,
.hapi-store-card .store-btn:hover .button-text,
.hapi-store-card .store-btn:focus-visible .button-text,
.hapi-store-card .store-btn:active .button-text {
  color: #3f2f2a !important;
  -webkit-text-fill-color: #3f2f2a !important;
  text-decoration: none !important;
  text-shadow: none !important;
  background: transparent !important;
}

.hapi-store-card .store-btn::selection,
.hapi-store-card .store-btn *::selection {
  background: transparent;
  color: inherit;
}

.subnav-link[data-astro-cid-nz4fptcl]:focus,
.subnav-link[data-astro-cid-nz4fptcl]:hover {
  color: var(--hapi-sage-dark) !important;
  background-color: rgba(145, 168, 143, 0.12) !important;
}

/* Sidebar / use-case chips */
.chip:hover {
  background-color: rgba(145, 168, 143, 0.18) !important;
  border-color: rgba(145, 168, 143, 0.4) !important;
  color: var(--hapi-sage-dark) !important;
  box-shadow: 0 1px 3px rgba(145, 168, 143, 0.2);
}

.markdown-content .announcement {
  border-color: rgba(145, 168, 143, 0.35) !important;
  background-color: rgba(145, 168, 143, 0.14) !important;
}

.markdown-content .announcement .icon,
.markdown-content .announcement a {
  color: var(--hapi-sage-dark) !important;
}

/* Soft page atmosphere — let body Download-like wash show through */
.smooth-scroll-wrapper,
.uses-cases-container[data-astro-cid-fs2p5lbb],
main {
  background: transparent;
}

/* Footer — unified site typeface */
.hapi-site-footer,
.hapi-site-footer *,
.hapi-site-footer *::before,
.hapi-site-footer *::after,
.hapi-site-footer input,
.hapi-site-footer button,
.hapi-site-footer a,
.hapi-site-footer p,
.hapi-site-footer h3,
.hapi-site-footer span,
.hapi-site-footer label,
.hapi-site-footer li,
.hapi-site-footer .hapi-footer-btn,
.hapi-site-footer .hapi-footer-btn--outline,
.hapi-site-footer .hapi-footer-mark-text,
.hapi-site-footer .hapi-footer-heading,
.hapi-site-footer .hapi-footer-link,
.hapi-site-footer .hapi-footer-nav-link,
.hapi-site-footer .hapi-footer-copy,
.hapi-site-footer .hapi-newsletter-input,
.hapi-site-footer .hapi-newsletter-input::placeholder {
  font-family: var(--hapi-font) !important;
  font-style: normal;
}

.hapi-footer-btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  background: var(--hapi-gradient);
  color: #fff;
  padding: 0.55em 2em 0.65em;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(217, 137, 122, 0.22);
  transition:
    color 0.2s cubic-bezier(0.165, 0.84, 0.44, 1),
    background 0.2s cubic-bezier(0.165, 0.84, 0.44, 1),
    box-shadow 0.2s ease-out;
}

.hapi-footer-btn:hover {
  background: linear-gradient(90deg, #6f876d, #c97a6c);
  color: #fff;
  box-shadow: 0 10px 26px rgba(217, 137, 122, 0.28);
}

.hapi-footer-btn--outline {
  background: var(--hapi-black);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(18, 19, 23, 0.18);
  font-weight: 600;
}

.hapi-footer-btn--outline:hover {
  background: var(--hapi-black-hover);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px rgba(18, 19, 23, 0.22);
}

.hapi-site-footer {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 64px 0 48px;
  color: var(--hapi-charcoal);
  border-top: 1px solid rgba(61, 61, 61, 0.1);
  background: transparent;
  overflow: visible;
  box-sizing: border-box;
}

.hapi-footer-container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: clamp(24px, 5vw, 64px);
  box-sizing: border-box;
}

.hapi-footer-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  column-gap: clamp(16px, 3vw, 40px);
  margin-bottom: clamp(64px, 10vw, 140px);
  position: relative;
  min-height: 0;
}

.hapi-footer-mark {
  flex: none;
  justify-self: start;
  align-self: end;
  color: var(--hapi-charcoal);
  text-decoration: none;
  z-index: 1;
}

.hapi-footer-mark-text {
  display: inline-block;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
  transform-origin: center;
  color: var(--hapi-charcoal);
}

.hapi-footer-mark:hover .hapi-footer-mark-text {
  transform: rotate(12deg);
}

.hapi-footer-wordmark {
  position: static;
  left: auto;
  bottom: auto;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  overflow: visible;
  padding-inline-start: 0;
  padding-inline-end: clamp(24px, 6vw, 72px);
  width: 100%;
  max-width: none;
  justify-self: stretch;
  pointer-events: none;
}

.hapi-footer-brand-logo {
  --hapi-footer-logo-h: clamp(140px, 22vw, 260px);
  position: relative;
  display: block;
  height: var(--hapi-footer-logo-h);
  width: calc(var(--hapi-footer-logo-h) * 1.432);
  max-width: 100%;
  flex: none;
  margin-inline-end: 0;
}

.hapi-footer-brand-word {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left bottom;
  user-select: none;
  pointer-events: none;
}

.hapi-footer-brand-heart {
  position: absolute;
  left: calc(var(--hapi-footer-logo-h) * 0.22);
  top: calc(var(--hapi-footer-logo-h) * -0.02);
  height: calc(var(--hapi-footer-logo-h) * 0.56);
  width: auto;
  object-fit: contain;
  transform-origin: center center;
  animation: hapi-footer-heart-beat 1.75s ease-in-out infinite;
  user-select: none;
  pointer-events: none;
}

@keyframes hapi-footer-heart-beat {
  0%,
  48%,
  100% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.14);
  }
  26% {
    transform: scale(1);
  }
  38% {
    transform: scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hapi-footer-brand-heart {
    animation: none;
  }
}

.hapi-footer-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.7fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 64px);
  margin-bottom: clamp(48px, 7vw, 80px);
  align-items: start;
  position: relative;
  overflow: visible;
}

.hapi-footer-tree {
  position: absolute;
  left: clamp(14%, 24vw, 30%);
  bottom: 100%;
  z-index: 2;
  display: block;
  width: auto;
  height: clamp(440px, 50vw, 700px);
  max-width: min(540px, 60vw);
  object-fit: contain;
  object-position: bottom center;
  pointer-events: none;
  user-select: none;
  transform: translate(-55%, 1px);
}

.hapi-footer-heading {
  margin: 0 0 0.8em;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--hapi-charcoal);
}

.hapi-footer-address {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--hapi-charcoal);
}

.hapi-footer-contact-list,
.hapi-footer-social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.hapi-footer-link,
.hapi-footer-link span {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  font-size: calc(0.9375rem + 2px);
  letter-spacing: 0;
}

.hapi-footer-link:hover {
  text-decoration: underline;
}

.hapi-footer-link--icon {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}

.hapi-footer-link--icon:hover {
  text-decoration: none;
}

.hapi-footer-link--icon span {
  font-weight: 500;
}

.hapi-footer-link--icon:hover span {
  text-decoration: underline;
}

.hapi-footer-icon {
  display: block;
  width: 22px;
  height: 22px;
  flex: none;
  object-fit: contain;
}

.hapi-footer-icon--telegram {
  width: 24px;
  height: 24px;
}

html[data-theme="dark"] .hapi-footer-icon {
  filter: invert(1);
}

.hapi-newsletter-row {
  position: relative;
}

.hapi-newsletter-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 64px;
  margin: 0;
  padding: 18px 20px;
  border: 1.5px solid var(--hapi-charcoal);
  border-radius: 999px;
  background: transparent;
  color: var(--hapi-charcoal);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.2;
  outline: none;
}

.hapi-newsletter-input::placeholder {
  color: #96968a;
  font-weight: 400;
}

.hapi-newsletter-input:focus {
  border-color: var(--hapi-sage-dark);
}

.hapi-newsletter-success {
  margin: 10px 0 0;
  padding: 18px 24px;
  background: var(--hapi-charcoal);
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
}

.hapi-newsletter-success[hidden] {
  display: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.hapi-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 36px;
  border-top: 1.5px solid var(--hapi-charcoal);
  position: relative;
  overflow: visible;
}

.hapi-footer-copy {
  margin: 0;
  flex: none;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--hapi-charcoal);
}

.hapi-footer-nav-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  min-width: min(60%, 640px);
  padding-left: 20px;
}

.hapi-footer-nav {
  display: flex;
  flex: 1;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 8%;
}

.hapi-footer-nav-link {
  color: var(--hapi-charcoal);
  text-decoration: none;
  font-size: calc(0.9375rem + 2px);
  font-weight: 500;
  white-space: nowrap;
}

.hapi-footer-nav-link:hover {
  text-decoration: underline;
}

html[data-theme="dark"] .hapi-site-footer,
html[data-theme="dark"] .hapi-footer-heading,
html[data-theme="dark"] .hapi-footer-address,
html[data-theme="dark"] .hapi-footer-copy,
html[data-theme="dark"] .hapi-footer-nav-link,
html[data-theme="dark"] .hapi-footer-mark,
html[data-theme="dark"] .hapi-footer-wordmark,
html[data-theme="dark"] .hapi-newsletter-input {
  color: var(--hapi-bg);
}

html[data-theme="dark"] .hapi-footer-btn {
  background: var(--hapi-bg);
  border-color: var(--hapi-bg);
  color: var(--hapi-charcoal);
}

html[data-theme="dark"] .hapi-footer-btn:hover {
  background: transparent;
  color: var(--hapi-bg);
}

html[data-theme="dark"] .hapi-footer-btn--outline {
  background: var(--hapi-black);
  color: #fff;
  border: none;
}

html[data-theme="dark"] .hapi-footer-btn--outline:hover {
  background: var(--hapi-black-hover);
  color: #fff;
}

html[data-theme="dark"] .hapi-newsletter-input {
  border-color: var(--hapi-bg);
}

html[data-theme="dark"] .hapi-newsletter-success {
  background: var(--hapi-bg);
  color: var(--hapi-charcoal);
}

html[data-theme="dark"] .hapi-site-footer,
html[data-theme="dark"] .hapi-footer-bottom {
  border-color: rgba(250, 249, 247, 0.28);
}

@media (width <= 1024px) {
  .hapi-footer-cols {
    grid-template-columns: 1fr 1fr;
  }

  .hapi-footer-col--newsletter {
    grid-column: 1 / -1;
  }

  .hapi-footer-tree {
    left: 36%;
    height: clamp(370px, 52vw, 530px);
    max-width: min(400px, 55vw);
    transform: translate(-55%, 1px);
  }

  .hapi-footer-top {
    margin-bottom: 12%;
    min-height: 0;
  }

  .hapi-footer-wordmark {
    max-width: none;
  }
}

@media (width <= 767px) {
  .hapi-footer-container {
    width: 100%;
    padding-inline: 20px;
  }

  .hapi-footer-top {
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 16px;
    min-height: 0;
  }

  .hapi-footer-wordmark {
    position: static;
    width: 100%;
    justify-content: flex-start;
    margin-inline-start: 0;
  }

  .hapi-footer-brand-logo {
    --hapi-footer-logo-h: clamp(120px, 42vw, 200px);
  }

  .hapi-footer-cols {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hapi-footer-tree {
    left: 28%;
    height: 400px;
    max-width: 320px;
    transform: translate(-50%, 1px);
  }

  .hapi-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .hapi-footer-nav-wrap {
    order: -1;
    width: 100%;
    min-width: 0;
    margin-bottom: 28px;
    padding: 0 0 28px;
    border-bottom: 1px solid var(--hapi-charcoal);
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  html[data-theme="dark"] .hapi-footer-nav-wrap {
    border-bottom-color: rgba(250, 249, 247, 0.28);
  }

  .hapi-footer-nav {
    justify-content: space-between;
    gap: 12px 16px;
  }

  .hapi-footer-btn--outline {
    width: 100%;
  }

  .hapi-newsletter-input {
    min-height: 56px;
    padding: 14px 16px;
    font-size: 1rem;
  }
}

/* Sidebar chips — equal width (widest label wins: «Разработчику») */
.use-case-list[data-astro-cid-fs2p5lbb] {
  display: inline-grid !important;
  grid-template-columns: 1fr;
  justify-items: stretch;
  width: max-content;
  max-width: 100%;
}

.use-case-list-item[data-astro-cid-fs2p5lbb],
.use-case-cta[data-astro-cid-fs2p5lbb] {
  width: 100%;
  box-sizing: border-box;
}

.use-case-cta[data-astro-cid-fs2p5lbb] {
  display: flex !important;
  justify-content: flex-start;
  font-family: var(--hapi-font) !important;
  font-weight: 500;
  color: var(--hapi-charcoal) !important;
  background: rgba(255, 255, 255, 0.78) !important;
  border: 1px solid var(--hapi-black-border) !important;
  backdrop-filter: blur(8px);
  box-shadow: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease !important;
}

.use-case-cta[data-astro-cid-fs2p5lbb] > [data-astro-cid-fs2p5lbb] {
  opacity: 0.72;
  transition: opacity 0.2s ease;
}

.use-case-cta[data-astro-cid-fs2p5lbb]:hover {
  color: var(--hapi-black) !important;
  background: var(--hapi-black-muted) !important;
  border-color: rgba(18, 19, 23, 0.18) !important;
}

.use-case-cta[data-astro-cid-fs2p5lbb]:hover > [data-astro-cid-fs2p5lbb] {
  opacity: 1;
}

.use-case-cta[data-astro-cid-fs2p5lbb].active,
.use-case-cta[data-astro-cid-fs2p5lbb].active:hover {
  color: #fff !important;
  background: var(--hapi-black) !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(18, 19, 23, 0.2);
}

.use-case-cta[data-astro-cid-fs2p5lbb].active:hover {
  background: var(--hapi-black-hover) !important;
  box-shadow: 0 6px 18px rgba(18, 19, 23, 0.24);
}

.use-case-cta[data-astro-cid-fs2p5lbb].active > [data-astro-cid-fs2p5lbb] {
  opacity: 1;
}

.use-case-cta-label[data-astro-cid-fs2p5lbb] {
  white-space: nowrap;
  color: inherit;
  font-family: inherit;
  font-weight: 500;
}

.use-case-cta[data-astro-cid-fs2p5lbb].active .sidebar-icon {
  filter: brightness(0) invert(1);
}

@media (width <= 1024px) {
  .use-case-list[data-astro-cid-fs2p5lbb] {
    display: flex !important;
    flex-direction: row;
    width: auto;
    max-inline-size: 100vw;
  }

  .use-case-list-item[data-astro-cid-fs2p5lbb] {
    width: auto;
  }

  .use-case-cta[data-astro-cid-fs2p5lbb] {
    width: auto;
    min-width: 11.5rem;
  }
}

/* Selection */
::selection {
  background: rgba(145, 168, 143, 0.35);
  color: var(--hapi-charcoal);
}

/* Final lock: footer uses site typeface */
footer.hapi-site-footer,
footer.hapi-site-footer *:not(img):not(svg):not(path) {
  font-family: var(--hapi-font) !important;
}

/* Unified page typography (Enterprise / Google Sans Flex stack) */
.body,
.use-cases-overview[data-astro-cid-fs2p5lbb],
.use-cases-overview[data-astro-cid-fs2p5lbb] :is(p, span, a, button, li, label, input, textarea, aside, div):not(.dropdown-icon):not(.link-icon):not(.link-arrow):not(.menu-toggle):not(.menu-toggle span),
.use-case-content[data-astro-cid-fs2p5lbb] :is(p, span, a, button, li, label, aside, div):not(.dropdown-icon),
.use-case-content[data-astro-cid-fs2p5lbb] .use-case-description[data-astro-cid-fs2p5lbb],
.use-case-content[data-astro-cid-fs2p5lbb] .use-case-description--after-logo[data-astro-cid-fs2p5lbb],
.use-case-content[data-astro-cid-fs2p5lbb] .typed-container.use-case-title,
.use-case-content[data-astro-cid-fs2p5lbb] .typed-container.use-case-title .typed-content,
.hapi-phone-caption-live,
.hapi-phone-tap-hint,
.hapi-phone-screen,
.hapi-phone-screen *,
.panel-caption-live,
.panel-caption-typed,
.hero-caption-live,
.cta-download-caption,
.hapi-store-card .button-text,
a.learn-more,
button.learn-more {
  font-family: var(--hapi-font) !important;
}

.use-case-content[data-astro-cid-fs2p5lbb] .typed-container.use-case-title,
.use-case-content[data-astro-cid-fs2p5lbb] .typed-container.use-case-title .typed-content {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.use-case-content[data-astro-cid-fs2p5lbb] .use-case-description[data-astro-cid-fs2p5lbb],
.use-case-content[data-astro-cid-fs2p5lbb] .use-case-description--after-logo[data-astro-cid-fs2p5lbb],
.hapi-phone-caption-live,
.hapi-phone-tap-hint,
.panel-caption-live,
.panel-caption-typed,
.hero-caption-live,
.cta-download-caption {
  font-weight: 500;
  letter-spacing: 0.01em;
}

.hapi-phone-app-title,
.hapi-phone-brand,
.button-primary:not(.menu-toggle),
.hapi-footer-btn {
  font-weight: 600 !important;
  letter-spacing: 0.01em;
}
