/* Covozi v1.63 — Home responsive navigation + tablet editorial-flow repair.
 * Desktop remains the approved v1.52/v1.60 Home composition.
 * <=900px receives a real non-scrolling menu and the YouTube/Instagram pain
 * story is forced into normal document flow to eliminate subgrid collisions.
 */

.covozi-home-v152-topbar__menu-toggle,
.covozi-home-v152-topbar__mobile {
  display: none;
}

@media (max-width: 900px) {
  .covozi-home-v152-topbar {
    overflow: visible;
  }
  .covozi-home-v152-topbar__shell {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) auto;
    align-items: center;
    width: min(100% - 28px, 720px) !important;
    gap: 10px !important;
  }
  .covozi-home-v152-topbar__menu-toggle {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(7,25,54,.12);
    border-radius: 11px;
    background: #fff;
    color: #071936;
    font: 800 20px/1 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(7,25,54,.045);
  }
  .covozi-home-v152-topbar__menu-toggle:focus-visible {
    outline: 4px solid rgba(255,198,41,.42);
    outline-offset: 2px;
  }
  .covozi-home-v152-topbar__brand {
    justify-self: start;
    min-width: 0;
  }
  .covozi-home-v152-topbar__cta {
    justify-self: end;
  }
  .covozi-home-v152-topbar__mobile {
    position: absolute;
    z-index: 10040;
    top: calc(100% + 8px);
    left: max(14px, env(safe-area-inset-left));
    right: max(14px, env(safe-area-inset-right));
    display: block;
    padding: 10px;
    border: 1px solid rgba(7,25,54,.12);
    border-radius: 16px;
    background: rgba(255,255,255,.985);
    box-shadow: 0 18px 42px rgba(7,25,54,.16);
    backdrop-filter: blur(14px);
  }
  .covozi-home-v152-topbar__mobile[hidden] {
    display: none !important;
  }
  .covozi-home-v152-topbar__mobile nav {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 6px;
  }
  .covozi-home-v152-topbar__mobile a {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 11px;
    color: #071936;
    text-decoration: none;
    font: 750 14px/1.2 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  }
  .covozi-home-v152-topbar__mobile a:hover,
  .covozi-home-v152-topbar__mobile a:focus-visible {
    background: #fff7d8;
    outline: none;
  }

  /* Tablet-safe pain story. The high-fidelity desktop layer uses subgrid so the
     two editorial columns align perfectly at large widths. On tablets that
     structure becomes too constrained; reset every child to ordinary flow. */
  .covozi-home-v151 .pain-columns {
    display: block !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    margin-top: 44px !important;
    border-top: 2px solid var(--navy) !important;
    border-bottom: 1px solid var(--navy-12) !important;
  }
  .covozi-home-v151 .pain-column,
  .covozi-home-v151 .pain-column:first-child,
  .covozi-home-v151 .pain-column + .pain-column {
    display: block !important;
    grid-column: auto !important;
    grid-row: auto !important;
    grid-template-rows: none !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 32px 0 36px !important;
    border-left: 0 !important;
  }
  .covozi-home-v151 .pain-column + .pain-column {
    border-top: 1px solid var(--navy-12) !important;
  }
  .covozi-home-v151 .pain-platform {
    margin: 0 0 17px !important;
  }
  .covozi-home-v151 .pain-column h3,
  .covozi-home-v151 .pain-column p,
  .covozi-home-v151 .pain-punch {
    display: block !important;
    flex: none !important;
    min-height: 0 !important;
    height: auto !important;
    max-width: 680px !important;
  }
  .covozi-home-v151 .pain-column h3 {
    margin: 0 !important;
    font-size: clamp(29px,4.6vw,35px) !important;
    line-height: 1.12 !important;
  }
  .covozi-home-v151 .pain-column p {
    margin: 17px 0 0 !important;
    padding: 0 !important;
    font-size: 17px !important;
    line-height: 1.58 !important;
  }
  .covozi-home-v151 .pain-punch {
    margin: 22px 0 0 !important;
    padding: 17px 0 0 !important;
    border-top: 4px solid var(--yellow) !important;
    font-size: 19px !important;
    line-height: 1.42 !important;
  }
}

@media (max-width: 640px) {
  .covozi-home-v152-topbar__shell {
    grid-template-columns: 40px minmax(0,1fr) auto;
    width: calc(100% - 20px) !important;
    gap: 8px !important;
  }
  .covozi-home-v152-topbar__menu-toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 19px;
  }
  .covozi-home-v152-topbar__brand {
    width: 108px !important;
    min-width: 108px !important;
    flex-basis: 108px !important;
  }
  .covozi-home-v152-topbar__brand img {
    width: 108px !important;
    max-width: 108px !important;
  }
  .covozi-home-v152-topbar__cta {
    min-height: 44px !important;
    padding: 0 13px !important;
    border-radius: 10px !important;
    font-size: 13.5px !important;
  }
  .covozi-home-v152-topbar__mobile nav {
    grid-template-columns: 1fr;
  }
  .covozi-home-v152-topbar__mobile a {
    min-height: 46px;
    font-size: 14px;
  }
}

@media (max-width: 370px) {
  .covozi-home-v152-topbar__brand {
    width: 98px !important;
    min-width: 98px !important;
    flex-basis: 98px !important;
  }
  .covozi-home-v152-topbar__brand img {
    width: 98px !important;
    max-width: 98px !important;
  }
  .covozi-home-v152-topbar__cta {
    padding-inline: 11px !important;
    font-size: 13px !important;
  }
}
