@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* Let the document own vertical scrolling, not the content wrapper. */
#root > .overflow-x-hidden {
  overflow-x: clip;
  overflow-y: visible;
}

/* Fit the hero and ticker below the navbar while retaining natural overflow. */
#hero {
  min-height: calc(100vh - 89px);
  min-height: calc(100svh - 89px);
}

#hero > .container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: clamp(24px, 5svh, 48px);
  padding-bottom: clamp(24px, 4svh, 36px);
}

#hero > .container > a {
  margin-bottom: 20px;
  max-width: 100%;
}

#hero > .container > a > img {
  display: block;
  width: 224px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

@media (max-width: 600px), (max-height: 700px) {
  #hero > .container > a > img {
    width: 176px;
  }
}

#hero #hero-subheadline {
  margin-top: 20px;
}

#hero > .container > [data-hero-delay] {
  margin-top: 28px;
}

#hero > .mt-auto {
  flex-shrink: 0;
  margin-top: 0;
  padding-block: 12px;
}

@media (max-height: 700px) {
  #hero > .container {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  #hero > .container > a {
    margin-bottom: 16px;
  }

  #hero #hero-subheadline,
  #hero > .container > [data-hero-delay] {
    margin-top: 18px;
  }
}

/* Fit the book reader between its controls and above the site navbar. */
#reader-modal {
  z-index: 10000;
  height: 100dvh;
}

#reader-modal > :first-child,
#reader-modal > :last-child {
  flex-shrink: 0;
}

#reader-modal #book-area {
  min-height: 0;
  min-width: 0;
  padding-block: 12px;
}

/* Keep the original footer's DOM hooks available to Slanglish's scripts. */
#root footer {
  display: none !important;
}

#navbar,
#suraksha-footer {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

#navbar a,
#suraksha-footer a {
  color: inherit;
  text-decoration: none;
}

#navbar {
  position: sticky;
  inset: 0 0 auto;
  z-index: 9000;
  color: #162033;
  background: linear-gradient(135deg, rgba(255,250,241,.98), rgba(255,255,255,.98) 58%, rgba(240,253,244,.96));
  border-bottom: 1px solid rgba(15,23,42,.12);
  box-shadow: 0 10px 32px rgba(15,23,42,.10), inset 0 -1px 0 rgba(255,255,255,.65);
  backdrop-filter: blur(20px);
}

#navbar .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1200px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
}

#navbar .nav-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: clamp(128px, 12vw, 158px);
  height: clamp(42px, 4.5vw, 52px);
  margin-block: clamp(4px, .45vw, 6px);
  border-radius: 6px;
}

#navbar .nav-logo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#navbar .nav-links {
  display: flex;
  gap: 2px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

#navbar .nav-links a {
  display: block;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: color .2s, background .2s;
}

#navbar .nav-links a:hover,
#navbar .nav-links a.active {
  /* color: #007aff; */
  background: rgb(255 107 26 / 35%);
}

#navbar .nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

#navbar .nav-cta,
#navbar .mobile-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 50px;
  color: #fff;
  background: #007aff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,122,255,.25);
}

#navbar .nav-cta.hs-bubble {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

#navbar .nav-cta.hs-bubble::before {
  content: '';
  position: absolute;
  left: var(--bx, 50%);
  top: var(--by, 50%);
  width: var(--br, 320px);
  height: var(--br, 320px);
  border-radius: 50%;
  background: rgba(0,0,0,.62);
  transform: translate(-50%, -50%) scale(0);
  transition: transform .55s ease;
  pointer-events: none;
  z-index: -1;
}

#navbar .nav-cta.hs-bubble:hover::before,
#navbar .nav-cta.hs-bubble:focus-visible::before {
  transform: translate(-50%, -50%) scale(1);
}

#navbar .nav-cta:hover {
  opacity: .85;
  box-shadow: 0 8px 24px rgba(0,122,255,.25);
}

#navbar a:focus-visible,
#navbar button:focus-visible,
#suraksha-footer a:focus-visible {
  outline: 2px solid #007aff;
  outline-offset: 4px;
}

#navbar .nav-right-mobile,
#navbar .mobile-menu,
#navbar .close-icon {
  display: none;
}

#navbar .hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(15,23,42,.20);
  border-radius: 10px;
  background: transparent;
  color: #162033;
  cursor: pointer;
}

#navbar .hamburger svg {
  width: 20px;
  height: 20px;
}

#navbar .hamburger.is-open .menu-icon { display: none; }
#navbar .hamburger.is-open .close-icon { display: block; }

#suraksha-footer {
  padding: 72px 0 0;
  border-top: 1px solid #2c3338;
  background: #101415;
  color: #f5f5f5;
}

#suraksha-footer .container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

#suraksha-footer .footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, .95fr) minmax(0, 1.65fr);
  gap: clamp(36px, 6vw, 76px);
  align-items: start;
  padding-bottom: clamp(36px, 5vw, 56px);
}

#suraksha-footer .footer-logo-circle-link { display: inline-block; margin-bottom: 16px; }
#suraksha-footer .footer-logo-circle { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; padding: 10px; border-radius: 50%; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.18); }
#suraksha-footer .footer-logo-img { display: block; width: 100%; height: 100%; object-fit: contain; filter: none; }
#suraksha-footer .footer-brand { max-width: 380px; }
#suraksha-footer .footer-brand p { max-width: 340px; margin: 16px 0 20px; font-size: 14px; line-height: 1.7; }
#suraksha-footer .footer-partner-logos { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 20px; }
#suraksha-footer .cert-govt-kicker { font-size: 11px; font-weight: 700; line-height: 1.35; }
#suraksha-footer .footer-certin-logo { width: auto; max-width: min(200px, 100%); height: 46px; padding: 4px 8px; border-radius: 6px; background: #fff; object-fit: contain; }
#suraksha-footer .footer-socials { display: flex; flex-wrap: wrap; gap: 12px; }
#suraksha-footer .footer-socials a { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 42px; width: 42px; height: 42px; border: 1px solid #2c3338; border-radius: 999px; background: rgba(255,255,255,.025); transition: color .2s, border-color .2s, background .2s, transform .2s; }
#suraksha-footer .footer-socials a:hover { color: #007aff; border-color: #f8fafc; background: rgba(0,122,255,.08); transform: translateY(-2px); }
#suraksha-footer .footer-socials svg { display: block; width: 20px; height: 20px; }
#suraksha-footer .footer-links-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 42px); align-items: start; }
#suraksha-footer .footer-col { min-width: 0; }
#suraksha-footer .footer-col h5 { margin: 0 0 16px; font: 600 12px/1.2 'Plus Jakarta Sans', system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #f5f5f5; }
#suraksha-footer .footer-col a { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; }
#suraksha-footer .footer-col a:hover { color: #f8fafc; }
#suraksha-footer .footer-bottom { max-width: 1140px; margin: 0 auto; padding: 22px 0; border-top: 1px solid #2c3338; text-align: center; }
#suraksha-footer .footer-bottom p { max-width: 880px; margin: 0 auto; font-size: 12px; line-height: 1.6; }

@media (max-width: 1100px) {
  #suraksha-footer .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  #suraksha-footer .footer-brand { max-width: 680px; }
  #suraksha-footer .footer-brand p { max-width: 620px; }
}

@media (max-width: 999px) {
  #navbar .nav-links,
  #navbar .nav-right { display: none; }
  #navbar .nav-right-mobile { display: flex; margin-left: auto; }
  #navbar .mobile-menu.open { display: flex; flex-direction: column; gap: 4px; padding: 12px 20px 20px; max-height: calc(100dvh - 68px); overflow-y: auto; border-top: 1px solid rgba(15,23,42,.10); background: linear-gradient(135deg, rgba(255,250,241,.99), rgba(255,255,255,.99) 58%, rgba(240,253,244,.98)); }
  #navbar .mobile-menu > a { padding: 13px 0 13px 5px; border-bottom: 1px solid rgba(15,23,42,.10); font-size: 14px; font-weight: 500; line-height: 1.35; }
  #navbar .mobile-menu a.active { color: #007aff; font-weight: 700; }
  #navbar .mobile-signup-dropdown { padding-top: 8px; }
  #navbar .mobile-cta { display: block; margin-top: 8px; border-radius: 8px; text-align: center; }
}

@media (max-width: 767px) {
  #suraksha-footer .footer-grid { grid-template-columns: minmax(0, 1fr); padding-bottom: 20px; }
  #suraksha-footer .footer-brand { text-align: center; }
  #suraksha-footer .footer-brand p { margin-inline: auto; }
  #suraksha-footer .footer-partner-logos { align-items: center; }
  #suraksha-footer .footer-socials { justify-content: center; }
}

@media (max-width: 600px) {
  #navbar .nav-logo { width: clamp(108px, 34vw, 132px); height: 44px; }
}

@media (max-width: 560px) {
  #suraksha-footer .footer-links-group { grid-template-columns: minmax(0, 1fr); gap: 24px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  #navbar .nav-cta.hs-bubble::before { transition: none; }
}

@media (max-width: 400px) {
  #root section a.inline-flex,
  #root section button.inline-flex {
    max-width: 100%;
    min-height: 44px;
    height: auto;
    padding: 12px 16px;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
    font-size: 14px;
  }

  #hero > .container > [data-hero-delay] > div.inline-flex {
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 5px;
    padding-inline: 16px;
    /* font-size: 12px; */
  }
}

@media (max-width: 375px) {
  #root section .container,
  #root section .grid > * {
    min-width: 0;
    max-width: 100%;
  }

  #root section h1,
  #root section h2,
  #root section h3 {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  #hero h1 {
    width: 100%;
    font-size: 36px;
    line-height: 1.1;
  }

  #hero .typewriter-text {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    animation: blink-caret .75s step-end infinite;
  }

  #hero > .container > [data-hero-delay] {
    width: 100%;
    min-width: 0;
  }

  /* #root section a.inline-flex,
  #root section button.inline-flex {
    max-width: 100%;
    min-height: 44px;
    height: auto;
    padding: 12px 16px;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
  } */

  /* #hero > .container > [data-hero-delay] > div.inline-flex {
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 10px;
    padding-inline: 16px;
  } */

  #hero #daily-term {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  #hero #share-word,
  #hero #copy-word {
    flex-shrink: 0;
  }

  #hall-of-slang .grid-cols-2 {
    column-gap: 12px;
  }

  #hall-of-slang .grid-cols-2 > .group {
    padding: 12px;
    overflow-wrap: anywhere;
  }

  #hall-of-slang .grid-cols-2 > .group img {
    width: 80px;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
  }
}
