/* Sensiplan — mobile-only presentation layer
   Loaded only for screens up to 640px. Desktop styles.css is untouched. */

@media (max-width: 640px) {
  :root {
    --mobile-gutter: 12px;
    --mobile-radius: 24px;
  }

  html {
    min-height: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    overscroll-behavior-y: none;
    background: var(--mobile-edge-color, #FFF6E0);
    scroll-padding-top: calc(var(--mobile-header-space, 78px) + 14px);
    -webkit-text-size-adjust: 100%;
  }

  body {
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    overscroll-behavior-y: none;
    background:
      radial-gradient(circle at 8% 0%, rgba(203,198,252,.42), transparent 22rem),
      linear-gradient(180deg, #fffaf0 0%, #FFF6E0 38%, #fff9ec 100%);
    font-size: 15px;
    line-height: 1.55;
  }

  body.mobile-menu-open {
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  main {
    padding-bottom: 0;
  }

  [id] {
    scroll-margin-top: calc(var(--mobile-header-space, 78px) + 16px);
  }

  .container,
  .page-width,
  .plus-hero-grid,
  .plus-grid-2,
  .plus-grid-4,
  .plus-section .section-title,
  .grid-2,
  .offer-grid,
  .split-grid,
  .people-grid,
  .page-hero-grid {
    width: calc(100% - 24px) !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* ---------- Header ---------- */
  .floating-header {
    padding-top: 8px !important;
  }

  .floating-header .container {
    width: calc(100% - 20px) !important;
  }

  .nav-shell {
    min-height: 64px;
    padding: 9px 10px 9px 12px !important;
    gap: 10px;
    border-radius: 22px !important;
    background: rgba(255,250,240,.88) !important;
    border: 1px solid rgba(255,255,255,.78) !important;
    box-shadow: 0 12px 30px rgba(68,72,208,.12) !important;
    backdrop-filter: blur(18px) saturate(145%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(145%) !important;
  }

  .nav-shell .brand {
    gap: 10px;
    min-width: 0;
  }

  .nav-shell .brand img {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
  }

  .nav-shell .brand span {
    font-size: 1.08rem;
    letter-spacing: -.025em;
  }

  .mobile-toggle {
    width: 46px;
    height: 46px;
    min-width: 46px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    border-radius: 16px !important;
    background: rgba(255,255,255,.78) !important;
    border: 1px solid rgba(68,72,208,.07) !important;
    box-shadow: 0 8px 18px rgba(68,72,208,.07);
    color: #4448D0 !important;
    font-size: 1.3rem !important;
    line-height: 1;
    touch-action: manipulation;
  }

  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2850;
    background: rgba(39,37,61,.22);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  .mobile-menu-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links.mobile-open {
    display: flex !important;
    position: fixed !important;
    top: calc(var(--mobile-header-space, 78px) + 8px) !important;
    left: 12px !important;
    right: 12px !important;
    z-index: 3100 !important;
    max-height: calc(100dvh - var(--mobile-header-space, 78px) - 24px);
    overflow-y: auto;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    padding: 12px !important;
    border-radius: 24px !important;
    background: rgba(255,250,240,.98) !important;
    border: 1px solid rgba(255,255,255,.92) !important;
    box-shadow: 0 24px 60px rgba(39,37,61,.18) !important;
    backdrop-filter: blur(22px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(150%) !important;
  }

  .nav-links.mobile-open a {
    width: 100%;
    display: flex !important;
    align-items: center;
    min-height: 48px;
    padding: 12px 14px !important;
    border-radius: 15px !important;
    color: #27253D !important;
    font-size: .98rem;
    font-weight: 700;
  }

  .nav-links.mobile-open a.active {
    background: rgba(203,198,252,.42) !important;
    color: #4448D0 !important;
  }

  .nav-links.mobile-open a:not(.active):active {
    background: rgba(68,72,208,.07) !important;
  }

  .nav-links .mobile-menu-cta {
    margin-top: 6px;
    justify-content: center;
    background: linear-gradient(135deg, #4448D0, #6266E8) !important;
    color: #fff !important;
    box-shadow: 0 12px 22px rgba(68,72,208,.20);
  }

  /* ---------- Type & spacing ---------- */
  h1 {
    font-size: clamp(2rem, 9.3vw, 2.55rem) !important;
    line-height: 1.02 !important;
    letter-spacing: -.045em !important;
  }

  h2 {
    font-size: clamp(1.5rem, 7vw, 1.9rem) !important;
    line-height: 1.12 !important;
    letter-spacing: -.035em !important;
  }

  h3 {
    font-size: 1.08rem !important;
    line-height: 1.28 !important;
  }

  p,
  li {
    font-size: .93rem;
    line-height: 1.58;
  }

  .section,
  .plus-section {
    padding: 20px 0 !important;
  }

  .section.compact {
    padding-top: 14px !important;
  }

  .section-title {
    margin-bottom: 16px !important;
  }

  .eyebrow,
  .kicker,
  .plus-kicker,
  .tag {
    min-height: 30px;
    padding: 6px 10px !important;
    margin-bottom: 11px !important;
    border-radius: 999px !important;
    font-size: .78rem !important;
    line-height: 1.25;
  }

  .button,
  .footer-contact-button {
    width: 100%;
    min-height: 46px;
    padding: 0 16px;
    font-size: .9rem !important;
  }

  .hero-actions,
  .inline-actions,
  .form-actions,
  .registration-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 9px !important;
    margin-top: 18px !important;
  }

  /* ---------- Home ---------- */
  .hero-fullscreen {
    padding: 18px 0 12px !important;
  }

  .hero-fullscreen .hero-card,
  .hero-card,
  .panel,
  .card,
  .faq-card,
  .image-card,
  .overlay-block,
  .feature-card,
  .single-cta-card {
    border-radius: var(--mobile-radius) !important;
  }

  .hero-copy {
    padding: 24px 18px !important;
  }

  .hero-fullscreen .hero-card.hero-with-photo {
    border-radius: 26px !important;
    background-position: 58% center !important;
    box-shadow: 0 18px 42px rgba(68,72,208,.12) !important;
  }

  .hero-fullscreen .hero-card.hero-with-photo::before {
    background: linear-gradient(180deg, rgba(255,255,255,.80), rgba(255,255,255,.84)) !important;
  }

  .hero-fullscreen .hero-copy > p {
    font-size: .92rem;
    line-height: 1.58;
    margin-bottom: 11px;
  }

  .hero-fullscreen h1 {
    max-width: 13ch !important;
    margin-bottom: 16px !important;
  }

  .hero-highlight {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 10px !important;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 2px 2px 10px;
    margin-left: -2px;
    margin-right: -2px;
  }

  .hero-highlight::-webkit-scrollbar,
  .news-track::-webkit-scrollbar,
  .aside-menu ul::-webkit-scrollbar {
    display: none;
  }

  .hero-highlight .mini {
    flex: 0 0 78%;
    min-width: 0;
    padding: 16px !important;
    border-radius: 18px !important;
    scroll-snap-align: start;
  }

  .hero-highlight .mini strong {
    font-size: 1.05rem;
    margin-bottom: 4px;
  }

  .hero-highlight .mini span {
    font-size: .86rem;
    line-height: 1.45;
  }

  .intro-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .feature-card {
    padding: 18px !important;
    box-shadow: 0 12px 26px rgba(68,72,208,.08) !important;
  }

  .feature-card h3 {
    margin-bottom: 7px;
  }

  .full-bleed-photo {
    min-height: 500px !important;
    margin: 10px 12px 4px !important;
    border-radius: 28px;
    overflow: hidden;
    align-items: flex-end !important;
    background:
      linear-gradient(180deg, rgba(20,24,70,.06) 0%, rgba(20,24,70,.18) 48%, rgba(20,24,70,.68) 100%),
      url('assets/home-bg-full.jpg') 58% center / cover no-repeat !important;
  }

  .full-bleed-photo::after {
    background: none !important;
  }

  .full-bleed-inner {
    width: 100% !important;
    padding: 28px 20px !important;
  }

  .photo-copy {
    max-width: none !important;
  }

  .photo-copy h2 {
    max-width: 14ch !important;
    margin-bottom: 12px !important;
  }

  .photo-copy p {
    font-size: .92rem !important;
    line-height: 1.52;
  }

  .faq-clean {
    padding: 10px !important;
    border-radius: 26px !important;
    box-shadow: 0 16px 36px rgba(68,72,208,.10) !important;
  }

  .faq-clean-grid {
    gap: 10px !important;
  }

  .faq-intro {
    padding: 18px !important;
    border-radius: 20px !important;
  }

  .faq-card {
    min-height: 0 !important;
    padding: 10px !important;
    border-radius: 20px !important;
  }

  .faq-list {
    gap: 8px !important;
  }

  .faq-item {
    border-radius: 15px !important;
  }

  .faq-question {
    padding: 13px 13px !important;
    font-size: .9rem !important;
    line-height: 1.42;
  }

  .faq-question span {
    gap: 8px !important;
  }

  .faq-icon {
    width: 20px;
    flex-basis: 20px;
  }

  .faq-answer {
    padding: 0 13px 14px 41px !important;
    font-size: .88rem;
    line-height: 1.55;
  }

  .single-cta-card {
    padding: 22px 18px !important;
  }

  .news-track {
    grid-auto-columns: 88% !important;
    gap: 12px !important;
    padding: 3px 2px 20px !important;
  }

  .news-card {
    min-height: 365px !important;
    border-radius: 22px !important;
  }

  .news-card-link {
    border-radius: 22px !important;
  }

  .news-card-body {
    padding: 18px !important;
  }

  .news-card h3 {
    font-size: 1.08rem !important;
  }

  .news-arrow {
    display: none !important;
  }

  /* ---------- Shared subpages ---------- */
  body.subpage .page-hero {
    margin-top: 0 !important;
    padding: 16px 0 14px !important;
  }

  body.subpage .page-hero::before {
    width: calc(100% - 12px) !important;
    border-radius: 28px !important;
    opacity: .98;
  }

  body.subpage .page-hero-grid {
    padding: 10px 0 !important;
    gap: 10px !important;
  }

  body.subpage .page-hero-copy {
    padding: 22px 18px !important;
    border-radius: 23px !important;
  }

  body.subpage .page-hero-copy h1 {
    max-width: 13ch !important;
    margin-bottom: 14px !important;
  }

  body.subpage .sublead {
    font-size: .92rem !important;
    line-height: 1.56;
  }

  body.subpage .media-cover {
    min-height: 230px !important;
    height: 230px !important;
    border-radius: 23px !important;
  }

  body.subpage .media-cover img {
    object-position: center center;
  }

  .content-stack {
    gap: 12px !important;
  }

  .content-block,
  .panel,
  .card,
  .quote-card,
  .table-card,
  .book-card,
  .link-card,
  .contact-card,
  .form-card,
  .pricing-card,
  .callout {
    padding: 18px !important;
    border-radius: 21px !important;
    box-shadow: 0 12px 28px rgba(68,72,208,.08) !important;
  }

  .aside-menu {
    position: relative !important;
    top: auto !important;
    padding: 12px !important;
    border-radius: 20px !important;
    overflow: hidden;
  }

  .aside-menu h3 {
    margin: 0 0 9px !important;
    font-size: .82rem !important;
    color: #66627F;
    text-transform: uppercase;
    letter-spacing: .04em;
  }

  .aside-menu ul {
    display: flex;
    gap: 7px;
    margin: 0 !important;
    padding: 0 0 3px !important;
    overflow-x: auto;
    list-style: none;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .aside-menu li {
    flex: 0 0 auto;
    margin: 0 !important;
    scroll-snap-align: start;
  }

  .aside-menu a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(203,198,252,.28);
    color: #4448D0;
    font-size: .82rem;
    font-weight: 700;
    white-space: nowrap;
  }

  .book-grid,
  .links-grid,
  .people-grid,
  .form-grid,
  .offer-grid,
  .grid-2,
  .split-grid {
    gap: 12px !important;
  }

  .form-card input,
  .form-card textarea,
  .registration-field input,
  .registration-field textarea {
    font-size: 16px !important; /* prevents iOS zoom */
    border-radius: 14px !important;
    padding: 12px 13px !important;
  }

  .form-card textarea,
  .registration-field textarea {
    min-height: 120px !important;
  }

  /* ---------- Sensiplan+ ---------- */
  .plus-hero {
    padding: 18px 0 14px !important;
  }

  .plus-hero-grid,
  .plus-grid-2,
  .plus-grid-4 {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .plus-card {
    padding: 20px 18px !important;
    border-radius: 23px !important;
    box-shadow: 0 14px 34px rgba(68,72,208,.09) !important;
  }

  .plus-card .hero-copy {
    padding: 0 !important;
  }

  .plus-card h1 {
    margin: 6px 0 12px !important;
  }

  .plus-visual {
    min-height: 330px !important;
  }

  .real-app-stage {
    min-height: 290px !important;
  }

  .real-app-frame {
    width: min(74%, 255px) !important;
    padding: 10px !important;
    border-radius: 32px !important;
  }

  .real-app-frame img {
    border-radius: 23px !important;
  }

  .feature-number {
    width: 36px !important;
    height: 36px !important;
    margin-bottom: 12px !important;
    border-radius: 12px !important;
  }

  .store-card,
  .support-card {
    min-height: 0 !important;
  }

  .store-card .button,
  .support-card .button {
    align-self: stretch !important;
  }

  .doc-link {
    padding: 14px !important;
    border-radius: 16px !important;
    gap: 10px !important;
  }

  .doc-link-arrow {
    width: 34px !important;
    height: 34px !important;
  }

  .features-section,
  .stores-section,
  .docs-support-section {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
  }

  .stores-section .section-title,
  .features-section .section-title {
    margin-bottom: 18px !important;
  }

  /* ---------- Courses / advisors ---------- */
  #workshops-list .workshop-card,
  .workshop-card {
    border-radius: 21px !important;
  }

  #workshops-list .workshop-meta {
    gap: 8px !important;
  }

  #workshops-list .workshop-actions .button {
    width: 100% !important;
  }

  .registration-dialog {
    width: calc(100% - 20px) !important;
    max-height: calc(100dvh - 24px) !important;
    overflow-y: auto;
    padding: 20px 16px !important;
    border-radius: 22px !important;
  }

  .registration-close {
    width: 40px !important;
    height: 40px !important;
  }

  /* ---------- News article ---------- */
  .news-detail-section {
    padding-top: 18px !important;
  }

  .news-detail-wrap {
    width: 100% !important;
  }

  .news-detail-card {
    padding: 20px 17px !important;
    border-radius: 23px !important;
  }

  .news-detail-image,
  .news-gallery img {
    border-radius: 18px !important;
  }

  .news-detail-content {
    font-size: .93rem !important;
    line-height: 1.65 !important;
  }

  /* ---------- Footer ---------- */
  footer {
    margin-top: 30px !important;
    margin-bottom: 0 !important;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)) !important;
    background: linear-gradient(180deg, #fff8ea 0%, #F0EAFE 28%, #CBC6FC 58%, #5B60DC 100%) !important;
    overscroll-behavior-y: none;
  }

  .footer-panel.footer-premium {
    min-height: 0 !important;
    padding: 34px 18px 10px !important;
  }

  .footer-main {
    gap: 24px !important;
  }

  .footer-title-xl,
  .footer-title {
    font-size: clamp(46px, 14vw, 62px) !important;
    line-height: .88 !important;
    margin: 0 0 28px !important;
    background: linear-gradient(180deg, #4448D0 0%, #CBC6FC 32%, #FFFFFF 72%, #FFFFFF 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: transparent !important;
  }

  .footer-links-columns {
    grid-template-columns: 1fr 1fr !important;
    gap: 22px 16px !important;
  }

  .footer-links-columns > div:nth-child(3) {
    grid-column: 1 / -1;
  }

  .footer-links-columns > div:nth-child(3) .footer-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px !important;
  }

  .footer-links-columns h4 {
    margin: 0 0 9px !important;
    font-size: .85rem !important;
  }

  .footer-list {
    gap: 6px !important;
  }

  .footer-list a {
    font-size: .83rem !important;
    line-height: 1.45;
  }

  .footer-right {
    width: 100%;
  }

  .footer-contact-card {
    width: 100% !important;
    padding: 18px !important;
    border-radius: 19px !important;
    background: rgba(255,255,255,.22) !important;
  }

  .footer-contact-card h3 {
    font-size: 1.25rem !important;
    margin-bottom: 10px !important;
  }

  .footer-contact-card p,
  .footer-contact-lines a {
    font-size: .84rem !important;
    line-height: 1.52;
  }

  .footer-contact-lines {
    gap: 7px !important;
    margin-bottom: 15px !important;
  }

  .footer-bottomline {
    margin-top: 20px !important;
    padding: 12px 0 max(6px, env(safe-area-inset-bottom, 0px)) !important;
  }

  .footer-copy {
    font-size: 11px !important;
  }
}

/* =========================================================
   MOBILE V2 — menu layer + Safari edge tint
   Only active on phones. Desktop remains untouched.
   ========================================================= */
@media (max-width: 640px) {
  html {
    background: var(--mobile-edge-color, #FFF6E0) !important;
    transition: background-color .18s ease;
  }

  /* Keep the real menu crisp. The dark/blur layer sits behind the header/menu. */
  .floating-header {
    z-index: 3200 !important;
  }

  .mobile-menu-backdrop {
    z-index: 2500 !important;
    background: rgba(39,37,61,.18) !important;
    backdrop-filter: blur(3px) !important;
    -webkit-backdrop-filter: blur(3px) !important;
  }

  .nav-links.mobile-open {
    z-index: 3300 !important;
    background: rgba(255,250,240,.995) !important;
    border: 1px solid rgba(68,72,208,.10) !important;
    box-shadow: 0 22px 55px rgba(39,37,61,.22) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .nav-links.mobile-open a {
    color: #27253D !important;
  }

  .nav-links.mobile-open a.active {
    background: #E7E3FF !important;
    color: #4448D0 !important;
  }

  .nav-links.mobile-open .mobile-menu-cta {
    background: linear-gradient(135deg, #4448D0, #6266E8) !important;
    color: #FFFFFF !important;
  }

  /* The close button remains clear above the overlay. */
  .mobile-toggle {
    position: relative;
    z-index: 3350;
  }
}


/* =========================================================
   MOBILE V3 — visual polish / typography / rhythm
   Loaded only on phones (<= 640px). Desktop is untouched.
   ========================================================= */
@media (max-width: 640px) {
  :root {
    --mobile-gutter: 16px;
    --mobile-radius: 20px;
    --mobile-card-shadow: 0 12px 30px rgba(68,72,208,.085);
    --mobile-card-border: 1px solid rgba(68,72,208,.07);
  }

  body {
    font-size: 15.5px;
    line-height: 1.62;
    letter-spacing: -.006em;
  }

  .container,
  .page-width,
  .plus-hero-grid,
  .plus-grid-2,
  .plus-grid-4,
  .plus-section .section-title,
  .grid-2,
  .offer-grid,
  .split-grid,
  .people-grid,
  .page-hero-grid {
    width: calc(100% - 32px) !important;
  }

  /* Typography */
  h1,
  h2,
  h3 {
    text-wrap: balance;
  }

  h1 {
    font-size: clamp(2.02rem, 9vw, 2.35rem) !important;
    line-height: 1.045 !important;
    letter-spacing: -.042em !important;
    margin-bottom: 14px !important;
  }

  h2 {
    font-size: clamp(1.52rem, 6.8vw, 1.78rem) !important;
    line-height: 1.13 !important;
    letter-spacing: -.032em !important;
    margin-bottom: 10px !important;
  }

  h3 {
    font-size: 1.08rem !important;
    line-height: 1.3 !important;
    letter-spacing: -.018em !important;
    margin-bottom: 8px !important;
  }

  p,
  li {
    font-size: .94rem;
    line-height: 1.62;
  }

  p {
    margin-bottom: 13px;
  }

  strong {
    font-weight: 750;
  }

  .section-title {
    max-width: none !important;
    margin-bottom: 15px !important;
    text-align: left !important;
  }

  .section-title p {
    max-width: 42ch;
    margin-bottom: 0;
    color: rgba(39,37,61,.68) !important;
  }

  .eyebrow,
  .kicker,
  .plus-kicker,
  .tag {
    min-height: 0;
    padding: 7px 11px !important;
    font-size: .76rem !important;
    line-height: 1.28;
    letter-spacing: .005em;
  }

  /* Header */
  .floating-header {
    padding-top: 7px !important;
  }

  .floating-header .container {
    width: calc(100% - 24px) !important;
  }

  .nav-shell {
    min-height: 62px;
    padding: 8px 9px 8px 11px !important;
    border-radius: 21px !important;
    box-shadow: 0 10px 26px rgba(68,72,208,.10) !important;
  }

  .nav-shell .brand img {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
  }

  .nav-shell .brand span {
    font-size: 1.06rem !important;
  }

  .mobile-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 15px !important;
  }

  .nav-links.mobile-open {
    top: calc(var(--mobile-header-space, 76px) + 6px) !important;
    left: 16px !important;
    right: 16px !important;
    gap: 4px !important;
    padding: 10px !important;
    border-radius: 21px !important;
  }

  .nav-links.mobile-open a {
    min-height: 45px;
    padding: 10px 13px !important;
    border-radius: 13px !important;
    font-size: .93rem !important;
  }

  .nav-links .mobile-menu-cta {
    margin-top: 5px;
    min-height: 46px;
  }

  /* Shared vertical rhythm */
  .section,
  .plus-section {
    padding: 24px 0 !important;
  }

  .section.compact {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }

  .content-stack {
    gap: 14px !important;
  }

  .content-block,
  .panel,
  .card,
  .quote-card,
  .table-card,
  .book-card,
  .link-card,
  .contact-card,
  .form-card,
  .pricing-card,
  .callout,
  .feature-card,
  .single-cta-card,
  .plus-card {
    border-radius: var(--mobile-radius) !important;
    box-shadow: var(--mobile-card-shadow) !important;
  }

  .content-block,
  .panel,
  .card,
  .quote-card,
  .table-card,
  .book-card,
  .link-card,
  .contact-card,
  .form-card,
  .pricing-card,
  .callout {
    padding: 19px 18px !important;
  }

  .content-block > :last-child,
  .card > :last-child,
  .contact-card > :last-child,
  .pricing-card > :last-child,
  .callout > :last-child,
  .feature-card > :last-child,
  .plus-card > :last-child {
    margin-bottom: 0 !important;
  }

  /* Buttons */
  .button,
  .footer-contact-button {
    min-height: 44px;
    padding: 0 15px !important;
    border-radius: 999px !important;
    font-size: .88rem !important;
    line-height: 1.2;
  }

  .hero-actions,
  .inline-actions,
  .form-actions,
  .registration-actions {
    gap: 8px !important;
    margin-top: 16px !important;
  }

  /* Home hero */
  .hero-fullscreen {
    padding: 16px 0 14px !important;
  }

  .hero-fullscreen .hero-card.hero-with-photo {
    border-radius: 24px !important;
    background-position: 62% center !important;
  }

  .hero-fullscreen .hero-card.hero-with-photo::before {
    background:
      linear-gradient(180deg, rgba(255,255,255,.78) 0%, rgba(255,255,255,.86) 55%, rgba(255,255,255,.90) 100%) !important;
  }

  .hero-fullscreen .hero-copy {
    padding: 25px 19px 21px !important;
  }

  .hero-fullscreen .eyebrow {
    display: flex;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    text-align: center;
  }

  .hero-fullscreen h1 {
    max-width: 18ch !important;
    margin-left: auto !important;
    margin-right: auto !important;
    font-size: clamp(2.05rem, 9.1vw, 2.4rem) !important;
  }

  .hero-fullscreen .hero-copy > p {
    max-width: 38ch !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: left !important;
    font-size: .93rem !important;
    line-height: 1.62 !important;
  }

  .hero-fullscreen .hero-copy > p:first-of-type {
    max-width: 31ch !important;
    text-align: center !important;
    color: rgba(39,37,61,.82);
    font-size: .95rem !important;
  }

  .hero-fullscreen .hero-actions {
    grid-template-columns: 1fr 1fr !important;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-fullscreen .hero-highlight {
    margin-top: 17px !important;
    gap: 9px !important;
    padding-bottom: 7px !important;
  }

  .hero-highlight .mini {
    flex-basis: 72% !important;
    padding: 15px 15px 14px !important;
    border-radius: 17px !important;
  }

  .hero-highlight .mini strong {
    font-size: 1rem !important;
  }

  .hero-highlight .mini span {
    font-size: .83rem !important;
    line-height: 1.48;
  }

  /* Home feature cards */
  .intro-grid {
    gap: 10px !important;
  }

  .feature-card {
    padding: 17px 17px 16px !important;
  }

  .feature-card h3 {
    color: #3F43C7;
  }

  .feature-card p {
    font-size: .89rem !important;
    line-height: 1.55;
  }

  /* Large image section */
  .full-bleed-photo {
    min-height: 430px !important;
    margin: 12px 16px 8px !important;
    border-radius: 24px !important;
    background-position: 58% center !important;
  }

  .full-bleed-inner {
    padding: 26px 19px !important;
  }

  .photo-copy h2 {
    max-width: 15ch !important;
    font-size: 1.72rem !important;
    line-height: 1.08 !important;
  }

  .photo-copy p {
    max-width: 36ch !important;
    font-size: .9rem !important;
    line-height: 1.55 !important;
  }

  /* FAQ */
  .faq-clean {
    padding: 8px !important;
    border-radius: 22px !important;
  }

  .faq-clean-grid {
    gap: 8px !important;
  }

  .faq-intro {
    padding: 17px !important;
    border-radius: 17px !important;
  }

  .faq-card {
    padding: 8px !important;
    border-radius: 17px !important;
  }

  .faq-question {
    padding: 12px 12px !important;
    font-size: .87rem !important;
    line-height: 1.4 !important;
  }

  .faq-question strong {
    font-weight: 700;
  }

  .faq-answer {
    padding: 0 12px 13px 39px !important;
    font-size: .86rem !important;
    line-height: 1.58 !important;
  }

  /* CTA */
  .single-cta-card {
    padding: 20px 18px !important;
    text-align: left !important;
  }

  .single-cta-card .inline-actions,
  .single-cta-card .hero-actions {
    grid-template-columns: 1fr 1fr !important;
  }

  /* News */
  .news-section-head {
    display: block !important;
  }

  .news-track {
    grid-auto-columns: 84% !important;
    gap: 11px !important;
    padding: 3px 1px 18px !important;
  }

  .news-card {
    min-height: 340px !important;
    border-radius: 20px !important;
  }

  .news-card-media {
    height: 170px !important;
  }

  .news-card-body {
    padding: 16px !important;
  }

  .news-date {
    font-size: .73rem !important;
  }

  .news-card h3 {
    font-size: 1.02rem !important;
  }

  .news-card p {
    font-size: .86rem !important;
    line-height: 1.52 !important;
  }

  /* Shared subpage hero */
  body.subpage .page-hero {
    padding: 16px 0 16px !important;
  }

  body.subpage .page-hero::before {
    width: calc(100% - 16px) !important;
    border-radius: 24px !important;
  }

  body.subpage .page-hero-grid {
    width: calc(100% - 32px) !important;
    gap: 10px !important;
    padding: 8px 0 !important;
  }

  body.subpage .page-hero-copy {
    padding: 21px 18px !important;
    border-radius: 20px !important;
    text-align: left !important;
  }

  body.subpage .page-hero-copy h1 {
    max-width: 18ch !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    font-size: clamp(2rem, 8.8vw, 2.3rem) !important;
  }

  body.subpage .sublead {
    max-width: 39ch;
    font-size: .92rem !important;
    line-height: 1.6 !important;
    margin-bottom: 0;
  }

  body.subpage .page-hero-copy .inline-actions {
    grid-template-columns: 1fr 1fr !important;
  }

  body.subpage .media-cover {
    min-height: 205px !important;
    height: 205px !important;
    border-radius: 20px !important;
  }

  /* Horizontal contents navigation */
  .aside-menu {
    padding: 11px 12px !important;
    border-radius: 18px !important;
  }

  .aside-menu h3 {
    margin-bottom: 8px !important;
    font-size: .76rem !important;
  }

  .aside-menu ul {
    gap: 6px !important;
  }

  .aside-menu a {
    min-height: 35px;
    padding: 7px 10px !important;
    font-size: .78rem !important;
  }

  /* Long-form reading */
  .content-block h2,
  .content-block h3 {
    color: #30336F;
  }

  .content-block p,
  .content-block li,
  .link-card p,
  .book-card p,
  .contact-card p {
    font-size: .91rem !important;
    line-height: 1.64 !important;
  }

  .content-block p + p {
    margin-top: 2px;
  }

  .content-block ul,
  .content-block ol {
    padding-left: 1.22rem;
  }

  .content-block li + li {
    margin-top: 7px;
  }

  .callout {
    background: linear-gradient(180deg, rgba(203,198,252,.22), rgba(255,255,255,.78)) !important;
    border: 1px solid rgba(68,72,208,.09) !important;
  }

  .table-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-card table {
    min-width: 620px;
    font-size: .82rem !important;
  }

  .book-grid,
  .links-grid,
  .people-grid,
  .form-grid,
  .offer-grid,
  .grid-2,
  .split-grid {
    gap: 11px !important;
  }

  .book-card,
  .link-card,
  .contact-card {
    border: var(--mobile-card-border) !important;
  }

  /* Sensiplan+ */
  .plus-hero {
    padding: 16px 0 16px !important;
  }

  .plus-hero-grid,
  .plus-grid-2,
  .plus-grid-4 {
    gap: 11px !important;
  }

  .plus-card {
    padding: 19px 18px !important;
    border-radius: 20px !important;
  }

  .plus-card h1 {
    font-size: 2.35rem !important;
  }

  .plus-card .hero-actions {
    grid-template-columns: 1fr 1fr !important;
  }

  .plus-visual {
    min-height: 285px !important;
  }

  .real-app-stage {
    min-height: 255px !important;
  }

  .real-app-frame {
    width: min(68%, 225px) !important;
  }

  .feature-number {
    width: 34px !important;
    height: 34px !important;
    border-radius: 11px !important;
    font-size: .8rem !important;
  }

  .doc-link {
    padding: 12px 13px !important;
    border-radius: 14px !important;
  }

  /* Courses / advisors */
  #workshops-list .workshop-card,
  .workshop-card {
    padding: 18px !important;
  }

  #workshops-list .workshop-title,
  .workshop-card h3,
  .people-grid .contact-card h3 {
    font-size: 1.05rem !important;
  }

  #workshops-list .workshop-meta {
    margin-top: 12px !important;
  }

  #workshops-list .workshop-meta-item {
    padding: 10px 11px !important;
    border-radius: 13px !important;
  }

  #workshops-list .workshop-description {
    font-size: .88rem !important;
    line-height: 1.56 !important;
  }

  .pricing-card {
    text-align: left !important;
  }

  /* Forms */
  .form-card label,
  .registration-field label {
    font-size: .82rem !important;
    font-weight: 700;
  }

  .form-card input,
  .form-card textarea,
  .form-card select,
  .registration-field input,
  .registration-field textarea,
  .registration-field select {
    min-height: 46px;
    font-size: 16px !important;
    border-radius: 13px !important;
    padding: 11px 12px !important;
  }

  .form-card textarea,
  .registration-field textarea {
    min-height: 112px !important;
  }

  /* News article */
  .news-detail-card {
    padding: 20px 18px !important;
    border-radius: 20px !important;
  }

  .news-detail-card h1 {
    max-width: none !important;
  }

  .news-detail-summary {
    font-size: .96rem !important;
    line-height: 1.56 !important;
  }

  .news-detail-content {
    font-size: .91rem !important;
    line-height: 1.66 !important;
  }

  .news-detail-content h2 {
    margin-top: 24px !important;
  }

  .news-detail-content h3 {
    margin-top: 20px !important;
  }

  /* Footer */
  footer {
    margin-top: 32px !important;
  }

  .footer-panel.footer-premium {
    padding: 31px 18px 10px !important;
  }

  .footer-title-xl,
  .footer-title {
    font-size: clamp(42px, 12.5vw, 54px) !important;
    line-height: .9 !important;
    margin-bottom: 25px !important;
  }

  .footer-links-columns {
    gap: 20px 16px !important;
  }

  .footer-links-columns h4 {
    font-size: .8rem !important;
    margin-bottom: 8px !important;
  }

  .footer-list a {
    font-size: .8rem !important;
  }

  .footer-contact-card {
    padding: 17px !important;
    border-radius: 18px !important;
  }

  .footer-contact-card h3 {
    font-size: 1.14rem !important;
  }

  .footer-contact-card p,
  .footer-contact-lines a {
    font-size: .81rem !important;
  }

  .footer-bottomline {
    margin-top: 17px !important;
  }
}

/* =========================================================
   MOBILE V4 — pull-to-refresh, consistent top rhythm,
   calmer home hero, centered buttons, dynamic edge color.
   Phones only. Desktop remains untouched.
   ========================================================= */
@media (max-width: 640px) {
  :root {
    --mobile-first-gap: 10px;
  }

  /* Re-enable native iPhone/Chrome/Safari pull-to-refresh.
     The edge itself is tinted dynamically through --mobile-edge-color. */
  html,
  body {
    overscroll-behavior-y: auto !important;
    background-color: var(--mobile-edge-color, #F3EFFA) !important;
  }

  body.mobile-menu-open {
    overscroll-behavior: none !important;
  }

  /* Every page starts the first visual block at the same distance
     below the fixed navigation. */
  .hero-fullscreen,
  body.subpage .page-hero,
  .plus-hero,
  .news-detail-section {
    margin-top: 0 !important;
    padding-top: var(--mobile-first-gap) !important;
  }

  body.subpage .page-hero-grid,
  .plus-hero-grid,
  .news-detail-wrap {
    padding-top: 0 !important;
  }

  /* Home: quieter title and denser reading rhythm so the first card
     does not feel overloaded on a phone. */
  .hero-fullscreen .hero-copy {
    padding: 22px 18px 20px !important;
  }

  .hero-fullscreen h1 {
    max-width: 19ch !important;
    font-size: clamp(1.72rem, 7.6vw, 2rem) !important;
    line-height: 1.04 !important;
    letter-spacing: -.038em !important;
    margin-bottom: 14px !important;
  }

  .hero-fullscreen .hero-copy > p {
    max-width: 40ch !important;
    font-size: .85rem !important;
    line-height: 1.55 !important;
    margin-bottom: 12px !important;
  }

  .hero-fullscreen .hero-copy > p:first-of-type {
    max-width: 34ch !important;
    font-size: .88rem !important;
    line-height: 1.52 !important;
    margin-bottom: 15px !important;
  }

  .hero-fullscreen .eyebrow {
    font-size: .72rem !important;
    line-height: 1.24 !important;
    padding: 6px 10px !important;
    margin-bottom: 14px !important;
  }

  /* Slightly calmer typography across subpage hero boxes too. */
  body.subpage .page-hero-copy h1 {
    font-size: clamp(1.8rem, 7.9vw, 2.08rem) !important;
    line-height: 1.04 !important;
  }

  body.subpage .sublead {
    font-size: .88rem !important;
    line-height: 1.56 !important;
  }

  .plus-card h1 {
    font-size: 2.05rem !important;
  }

  /* All pill/buttons: text always visually centered, including wrapped labels. */
  .button,
  .footer-contact-button,
  .hero-actions .button,
  .inline-actions .button,
  .form-actions .button,
  .registration-actions .button,
  .workshop-actions .button,
  #workshops-list .workshop-actions .button,
  .nav-links .mobile-menu-cta {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: normal !important;
    line-height: 1.18 !important;
    padding-top: 9px !important;
    padding-bottom: 9px !important;
  }

  body.subpage .page-hero-copy .inline-actions .button,
  .plus-card .hero-actions .button,
  .single-cta-card .inline-actions .button,
  .single-cta-card .hero-actions .button {
    font-size: .84rem !important;
  }
}

/* V6 — iPhone bottom edge.
   Keep native pull-to-refresh at the top. Near the real page end only the
   root canvas turns footer-violet, so Safari has no pale strip underneath. */
@media (max-width: 640px) {
  html.mobile-at-bottom {
    background: #5B60DC !important;
    background-color: #5B60DC !important;
  }
}

/* =========================================================
   MOBILE V7 — stable iPhone/Safari scrolling.
   Native pull-to-refresh stays enabled.
   No scroll-driven theme-color or touch interception is used,
   which removes the flashing/jitter at certain scroll speeds.
   ========================================================= */
@media (max-width: 640px) {
  :root {
    --mobile-edge-color: #5B60DC;
  }

  /* Safari's canvas below the real end of the document is violet.
     The page itself keeps the same cream/lilac design. */
  html {
    overscroll-behavior-y: auto !important;
    background: #5B60DC !important;
    background-color: #5B60DC !important;
    transition: none !important;
  }

  body {
    overscroll-behavior-y: auto !important;
    background:
      radial-gradient(circle at 8% 0%, rgba(203,198,252,.42), transparent 22rem),
      linear-gradient(180deg, #fffaf0 0%, #FFF6E0 38%, #fff9ec 100%) !important;
  }

  footer {
    margin-bottom: 0 !important;
  }

  html.mobile-at-bottom {
    background: #5B60DC !important;
    background-color: #5B60DC !important;
  }
}

