/* =========================================================
   ASSIGNZO FINAL MOBILE FIX
   This file loads AFTER homepage-refinement.css
   ========================================================= */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

body {
  min-width: 0 !important;
}

a,
button,
input,
select,
textarea {
  max-width: 100%;
}

p,
li,
h1,
h2,
h3,
summary,
strong,
small,
span,
a {
  overflow-wrap: break-word;
}

/* ---------------------------------------------------------
   REMOVE OLD / DUPLICATE HERO ITEMS
   --------------------------------------------------------- */

.hero .hero-actions > :nth-child(n + 3) {
  display: none !important;
}

.hero .interest-feedback,
.hero .intro-interest-feedback,
.hero .intro-audio-note {
  display: none !important;
}

.launch-intro .interest-feedback,
.launch-intro .intro-interest-feedback {
  display: none !important;
}

.launch-intro .intro-audio-note ~ .intro-audio-note {
  display: none !important;
}

/* ---------------------------------------------------------
   LOGO FIX
   --------------------------------------------------------- */

.brand-name > span,
.mini-brand strong > span,
.intro-brand > span > span {
  display: inline !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #ec304b !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  letter-spacing: inherit !important;
}

.mini-brand {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  min-width: 0 !important;
}

.mini-brand strong {
  display: block !important;
  white-space: nowrap !important;
  color: #071b43 !important;
  line-height: 1 !important;
}

/* ---------------------------------------------------------
   HERO COMMON
   --------------------------------------------------------- */

.hero {
  overflow: hidden !important;
}

.hero-grid,
.hero-copy,
.hero-visual {
  min-width: 0 !important;
}

.hero h1,
.student-copy h2,
.writer-copy h2,
.section-heading h2 {
  overflow-wrap: anywhere;
}

.live-interest-count {
  width: fit-content;
  max-width: 100%;
  margin: -3px 0 18px !important;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #d8ebff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.hero h1 .price-highlight {
  display: inline-block;
  padding: 0.02em 0.18em 0.08em;
  border-radius: 0.18em;
  color: #ffffff;
  background: #145ae1;
  box-shadow: 0 10px 22px rgba(20, 90, 225, 0.34);
}

.hero h1 .price-suffix {
  color: #c7e0ff;
}

.hero-proof-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.hero-proof-points span {
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.89);
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 700;
}

/* ---------------------------------------------------------
   PHONE MOCK COMMON
   --------------------------------------------------------- */

.phone-preview,
.phone-content {
  min-width: 0 !important;
}

.floating-note strong,
.floating-note small {
  white-space: nowrap;
}

/* ---------------------------------------------------------
   SHARED SUBPAGE SAFETY
   --------------------------------------------------------- */

.page-main,
.page-hero,
.policy-layout,
.detail-layout,
.policy-card,
.detail-card,
.detail-email-card,
.contact-page-card,
.detail-mini-card,
.contact-directory-card {
  min-width: 0 !important;
}

.detail-email-card .btn,
.contact-page-card a,
.detail-mini-card strong,
.footer-bottom a {
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------
   MOBILE + TABLET
   --------------------------------------------------------- */

@media (max-width: 959px) {
  .container {
    width: min(100% - 32px, 620px) !important;
  }

  .launch-intro,
  .interest-gate {
    align-items: start !important;
    padding: 14px !important;
    overflow-y: auto !important;
  }

  .intro-panel,
  .interest-gate-card {
    width: 100% !important;
    max-width: 560px !important;
    margin: auto 0 !important;
  }

  /* Header */
  .nav {
    min-height: 72px !important;
  }

  .menu-toggle {
    display: inline-grid !important;
  }

  .nav-cta {
    display: none !important;
  }

  .nav-links {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    left: 0 !important;
    display: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 8px !important;
    border: 1px solid var(--line) !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    box-shadow: var(--shadow-md) !important;
  }

  .nav-links.open {
    display: grid !important;
  }

  .nav-links a {
    padding: 12px 14px !important;
    font-size: 14px !important;
  }

  /* First student dashboard section */
  .student-section {
    padding: 58px 0 !important;
  }

  .student-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 30px !important;
  }

  .student-copy {
    min-width: 0 !important;
  }

  .student-copy h2 {
    max-width: 560px;
    font-size: clamp(34px, 9vw, 46px) !important;
    line-height: 1.08 !important;
  }

  .student-copy .section-lead {
    font-size: 15px !important;
    line-height: 1.62 !important;
  }

  .student-list {
    gap: 13px !important;
  }

  .student-list strong {
    font-size: 14px !important;
  }

  .student-list small {
    font-size: 12px !important;
    line-height: 1.45 !important;
  }

  .student-visual {
    width: 100% !important;
  }

  .student-panel {
    width: 100% !important;
    max-width: 500px !important;
    margin: 0 auto !important;
    padding: 20px !important;
    border-radius: 28px !important;
  }

  .student-panel-head h3 {
    font-size: 23px !important;
  }

  .dashboard-mock {
    padding: 18px !important;
    border-radius: 20px !important;
  }

  .dashboard-title {
    font-size: 18px !important;
  }

  .dashboard-meta,
  .dashboard-status {
    flex-wrap: wrap !important;
  }

  .dashboard-status > div {
    flex: 1 1 120px !important;
  }

  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
  }

  .quick-grid article {
    min-width: 0 !important;
    padding: 13px !important;
  }

  .quick-grid strong,
  .quick-grid small {
    overflow-wrap: anywhere !important;
  }

  /* Hero */
  .hero-grid {
    min-height: auto !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 28px !important;
    padding: 52px 0 46px !important;
  }

  .hero-copy {
    width: 100% !important;
  }

  .hero h1 {
    max-width: 100% !important;
    font-size: clamp(42px, 12vw, 58px) !important;
    line-height: 1.04 !important;
  }

  .hero-text {
    max-width: 100% !important;
    margin-bottom: 20px !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
  }

  .hero-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 15px !important;
  }

  .hero-actions > * {
    width: 100% !important;
    min-height: 50px !important;
  }

  .hero-location {
    font-size: 12px !important;
  }

  /* Phone preview becomes compact */
  .hero-visual {
    min-height: auto !important;
    display: flex !important;
    justify-content: center !important;
    padding: 12px 0 2px !important;
  }

  .phone-preview {
    width: min(320px, calc(100vw - 46px)) !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 9px !important;
    border-width: 8px !important;
    border-radius: 34px !important;
    transform: none !important;
  }

  .phone-notch {
    width: 86px !important;
    height: 18px !important;
    margin: -9px auto 3px !important;
  }

  .phone-content {
    min-height: 0 !important;
    padding: 16px 14px !important;
    border-radius: 25px !important;
  }

  .phone-welcome {
    padding: 19px 0 15px !important;
  }

  .phone-welcome strong {
    font-size: 21px !important;
  }

  .journey-list {
    gap: 11px !important;
    margin: 18px 0 !important;
  }

  .journey-list li:not(:last-child)::after {
    height: 14px !important;
  }

  .ambient-orb {
    display: none !important;
  }

  .floating-note {
    padding: 8px !important;
    border-radius: 12px !important;
    transform: scale(0.88) !important;
  }

  .note-top {
    top: 0 !important;
    left: -8px !important;
  }

  .note-bottom {
    right: -8px !important;
    bottom: 0 !important;
  }

  /* Trust area */
  .trust-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 8px 0 !important;
  }

  .trust-item {
    padding: 15px 0 !important;
    align-items: flex-start !important;
  }

  .trust-item:not(:last-child) {
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
  }

  /* Normal sections */
  .section {
    padding: 60px 0 !important;
  }

  .section-heading {
    margin-bottom: 28px !important;
  }

  .section-heading h2 {
    font-size: clamp(31px, 8vw, 42px) !important;
    line-height: 1.1 !important;
  }

  .process-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 13px !important;
  }

  .process-card {
    min-height: 0 !important;
    padding: 23px !important;
    border-radius: 23px !important;
  }

  /* Writer */
  .writer-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 30px !important;
  }

  .writer-copy h2 {
    font-size: clamp(33px, 9vw, 45px) !important;
  }

  .writer-points article {
    grid-template-columns: 38px minmax(0, 1fr) !important;
  }

  .writer-points article > div,
  .contact-choice-card,
  .process-card,
  .update-copy,
  .faq-list,
  .faq-list details {
    min-width: 0 !important;
  }

  /* Contact / Form / FAQ */
  .contact-choice-grid,
  .updates-layout,
  .faq-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px !important;
  }

  .contact-choice-card {
    padding: 23px !important;
  }

  .update-form {
    padding: 20px !important;
  }

  .faq-list summary {
    padding: 16px !important;
    font-size: 13px !important;
  }

  .faq-list p {
    padding: 0 16px 16px !important;
    font-size: 12px !important;
  }

  /* Subpages */
  .page-hero {
    padding: 54px 0 44px !important;
  }

  .page-hero h1 {
    font-size: clamp(34px, 10vw, 46px) !important;
    line-height: 1.08 !important;
  }

  .page-hero p:not(.eyebrow) {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }

  .policy-layout,
  .detail-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px !important;
    padding: 32px 0 58px !important;
  }

  .policy-card,
  .detail-card,
  .detail-email-card,
  .contact-directory-card {
    padding: 20px !important;
    border-radius: 22px !important;
  }

  .policy-card h2,
  .detail-card h2,
  .detail-email-card h2,
  .contact-directory-card h2 {
    font-size: 23px !important;
    line-height: 1.18 !important;
  }

  .category-grid,
  .contact-directory,
  .contact-page-grid,
  .detail-card-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .category-card {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    padding: 14px !important;
  }

  .category-card .category-number {
    width: 38px !important;
    height: 38px !important;
  }

  .detail-email-card .btn {
    width: 100% !important;
    min-height: 50px !important;
  }

  .footer-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px !important;
  }

  .footer-bottom {
    display: grid !important;
    justify-content: stretch !important;
    text-align: left !important;
  }
}

/* ---------------------------------------------------------
   SMALL ANDROID WIDTHS
   --------------------------------------------------------- */

@media (max-width: 390px) {
  .container {
    width: min(100% - 24px, 620px) !important;
  }

  .launch-intro,
  .interest-gate {
    padding: 12px !important;
  }

  .intro-panel,
  .interest-gate-card {
    padding-right: 15px !important;
    padding-left: 15px !important;
  }

  .brand {
    font-size: 18px !important;
  }

  .brand-logo {
    width: 37px !important;
    height: 37px !important;
  }

  .nav {
    min-height: 67px !important;
  }

  .student-section {
    padding: 52px 0 !important;
  }

  .student-copy h2 {
    font-size: 34px !important;
  }

  .student-panel {
    padding: 16px !important;
    border-radius: 24px !important;
  }

  .student-panel-head h3 {
    font-size: 22px !important;
  }

  .dashboard-mock {
    padding: 16px !important;
  }

  .quick-grid article {
    padding: 11px !important;
  }

  .quick-grid strong {
    font-size: 11px !important;
  }

  .quick-grid small {
    font-size: 8px !important;
  }

  .hero-grid {
    padding: 46px 0 40px !important;
  }

  .hero h1 {
    font-size: 38px !important;
  }

  .hero h1 .price-suffix {
    display: block !important;
    margin: 4px 0 0 !important;
    font-size: 0.43em !important;
  }

  .hero-proof-points {
    gap: 7px !important;
  }

  .hero-proof-points span {
    font-size: 10px !important;
  }

  .phone-preview {
    width: min(300px, calc(100vw - 34px)) !important;
  }

  .floating-note {
    display: none !important;
  }

  .page-hero h1 {
    font-size: 34px !important;
  }

  .category-card {
    grid-template-columns: 1fr !important;
  }
}

/* ---------------------------------------------------------
   TABLET / LANDSCAPE
   --------------------------------------------------------- */

@media (min-width: 640px) and (max-width: 959px) {
  .container {
    width: min(100% - 52px, 760px) !important;
  }

  .hero h1 {
    font-size: 56px !important;
  }

  .phone-preview {
    width: 350px !important;
  }
}
