/*
 * Mobile polish for the compiled Future NP Club product.
 * Kept separate from the generated bundle so the responsive layer remains
 * readable and can be carried forward when the product bundle is refreshed.
 */

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
}

img,
svg,
canvas {
  max-width: 100%;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

.np-school-list-cta {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(28, 16, 54, 0.18);
  border-radius: 999px;
  background: #d6ff3f;
  box-shadow: 0 10px 28px rgba(28, 16, 54, 0.16);
  color: #1c1036;
  font-family: "Schibsted Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.np-school-list-cta:hover {
  transform: translateY(-1px);
}

.np-school-list-cta:focus-visible {
  outline: 3px solid #7445ff;
  outline-offset: 3px;
}

.np-home-freebie {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 501;
  display: none;
  width: min(410px, calc(100vw - 48px));
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: #1c1036;
  box-shadow: 0 22px 54px rgba(28, 16, 54, 0.28);
  color: #fff;
  font-family: "Schibsted Grotesk", sans-serif;
}

.np-product-home .np-home-freebie {
  display: block;
}

.np-product-home .np-school-list-cta {
  display: none;
}

.np-home-freebie__eyebrow {
  display: block;
  color: #d6ff3f;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.np-home-freebie h2 {
  margin: 10px 0 0;
  color: #fff;
  font-family: "Unbounded", sans-serif;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.np-home-freebie p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
  line-height: 1.55;
}

.np-home-freebie a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin-top: 18px;
  padding: 0 17px;
  border-radius: 999px;
  background: #d6ff3f;
  color: #1c1036;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.np-home-freebie a:hover {
  transform: translateY(-1px);
}

.np-home-freebie a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.np-home-freebie .np-home-freebie__research {
  margin: 14px 0 0;
}

.np-home-freebie .np-home-freebie__research a {
  display: inline;
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #d6ff3f;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 720px) {
  :root {
    --r-card: 16px;
    --r-card-lg: 20px;
  }

  body {
    font-size: 16px;
    line-height: 1.5;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .np-school-list-cta {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    min-height: 42px;
    padding: 0 15px;
    font-size: 12.5px;
  }

  .np-home-freebie {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    width: calc(100vw - 28px);
    padding: 20px;
    border-radius: 18px;
  }

  .np-home-freebie h2 {
    font-size: 18px;
  }

  .np-home-freebie p {
    font-size: 13px;
  }

  .container {
    width: 100%;
    min-width: 0;
    padding-left: max(16px, env(safe-area-inset-left)) !important;
    padding-right: max(16px, env(safe-area-inset-right)) !important;
  }

  h1,
  h2,
  h3,
  p,
  a,
  span {
    overflow-wrap: anywhere;
  }

  h1 {
    font-size: clamp(1.85rem, 9vw, 2.35rem);
    line-height: 1.08;
  }

  h2 {
    font-size: clamp(1.35rem, 6.5vw, 1.75rem);
  }

  input,
  select,
  textarea {
    min-height: 46px;
    font-size: 16px !important;
  }

  .btn {
    min-height: 44px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .btn-sm {
    min-height: 40px;
  }

  button.chip {
    min-height: 36px;
  }

  header > .container {
    height: 60px !important;
    gap: 8px !important;
  }

  header > .container > button.chip {
    display: none !important;
  }

  header .saved-btn,
  header .mobile-menu-btn {
    min-height: 40px;
  }

  header > nav.container {
    gap: 0 !important;
    padding-top: 4px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom)) !important;
  }

  header > nav.container a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 8px !important;
    border-top: 1px solid var(--border);
    text-decoration: none;
  }

  main section.container,
  main > .container {
    padding-top: 36px !important;
    padding-bottom: 48px !important;
  }

  .hero-grid {
    gap: 24px !important;
  }

  .hero-grid > div:first-child > .row {
    align-items: stretch !important;
  }

  .hero-grid > div:first-child > .row .btn {
    flex: 1 1 100%;
    width: 100%;
  }

  .hero-tabs {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .hero-tabs::-webkit-scrollbar {
    display: none;
  }

  .hero-tab {
    min-width: max-content;
    min-height: 44px;
  }

  .stat-strip-grid {
    gap: 22px 14px !important;
  }

  .decoder-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .decoder-card,
  .decoder-inner {
    min-height: 180px !important;
  }

  .schools-filter-toggle {
    width: 100%;
    margin-bottom: 16px !important;
  }

  .schools-sidebar.open {
    padding: 14px 16px !important;
  }

  .schools-layout .grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .schools-layout .card {
    padding: 16px !important;
  }

  .compare-cards {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .compare-cards > .card {
    padding: 16px !important;
  }

  .map-2col {
    min-width: 0;
    gap: 16px !important;
  }

  main [style*="position: sticky"] {
    position: static !important;
  }

  .cmdk-panel {
    width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 24px);
    margin-top: 12px !important;
  }

  .cmdk-panel button > span.muted {
    display: none;
  }

  footer {
    margin-top: 36px !important;
    padding: 28px 0 calc(28px + env(safe-area-inset-bottom)) !important;
  }

  footer .container,
  footer .row {
    width: 100%;
  }

  footer .row {
    gap: 10px 18px !important;
  }

  footer a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }
}

@media (max-width: 380px) {
  .saved-btn {
    display: none !important;
  }

  .stat-strip-grid {
    grid-template-columns: 1fr !important;
  }

  .hero-tab {
    font-size: 0.66rem !important;
  }

  .row > .btn:not(.btn-sm) {
    flex: 1 1 100%;
    width: 100%;
  }
}
