/* Shared mobile safety layer for landing pages.
   Desktop layout remains unchanged; mobile rules only apply at breakpoints. */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  min-width: 0;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  body {
    overflow-wrap: anywhere;
  }

  header .mx-auto.flex.w-full[class*="max-w-"] {
    flex-wrap: wrap;
    row-gap: 0.75rem;
  }

  header .mx-auto.flex.w-full[class*="max-w-"] > a[aria-label="CookClip home"] {
    min-width: 0;
    flex: 1 1 auto;
  }

  header .mx-auto.flex.w-full[class*="max-w-"] > div {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.6rem;
  }

  header .brand-name {
    font-size: clamp(1.25rem, 5.6vw, 1.5rem) !important;
    line-height: 1.1;
  }

  .overflow-x-auto {
    overflow-x: visible !important;
  }

  table {
    width: 100%;
    table-layout: fixed;
  }

  th,
  td {
    overflow-wrap: anywhere;
    word-break: break-word;
    vertical-align: top;
  }

  code {
    white-space: normal;
  }
}

@media (max-width: 900px) {
  .spotlight-rail {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 1rem;
    overflow: visible !important;
    scroll-snap-type: none !important;
    padding-bottom: 0;
  }

  .spotlight-rail figure {
    min-width: 0 !important;
    width: 100% !important;
    scroll-snap-align: none;
  }
}
