/* Gizlen Global — mobile fixes, 2026-11-16 (v20261116a)
   Load LAST on every page. Additive; nothing in the older bundles was edited.

   1. Older bundles set `main * { overflow-wrap:anywhere; min-width:0 }` at <=720px.
      `anywhere` lets the browser split ordinary words letter by letter
      ("A / u / di / t") and `min-width:0` cancels the table minimum, so the
      pricing comparison collapsed into unreadable slivers. `break-word` still
      prevents overflow, but only breaks a word when it cannot fit on its own line.
   2. styles.css set `hyphens:auto` on headings at <=820px ("confi-dent").
   3. Comparison tables stack into labelled rows on phones. */

@media (max-width: 820px) {
  h1, h2, h3, h4, .eyebrow, .label-row, .label-row span, .section-kicker,
  .home-framework-row h3, .card h3, .offer-card h3 {
    overflow-wrap: break-word;
    -webkit-hyphens: manual;
    hyphens: manual;
  }
}

@media (max-width: 720px) {
  body.gg-design-v2 main *,
  body.gg-refined main * {
    overflow-wrap: break-word;
  }

  /* Plain tables keep natural column widths and scroll inside .table-wrap
     instead of being squeezed to the viewport. */
  body.gg-design-v2 main table:not(.gg-stack-table),
  body.gg-refined main table:not(.gg-stack-table) {
    min-width: 0;
    width: 100%;
  }
  body.gg-design-v2 main th,
  body.gg-refined main th {
    overflow-wrap: normal;
  }

  /* ---- Stacked comparison table -------------------------------------- */
  .table-wrap:has(> .gg-stack-table) {
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  table.gg-stack-table,
  table.gg-stack-table tbody,
  table.gg-stack-table tr,
  table.gg-stack-table td {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Column headings move into each cell's label; keep them for screen readers. */
  table.gg-stack-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  table.gg-stack-table tbody {
    display: grid;
    gap: 14px;
  }

  table.gg-stack-table tr {
    background: #fff;
    border: 1px solid var(--gg-line, #dde4ea);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--gg-shadow-sm, 0 6px 22px rgba(8, 24, 42, .05));
  }

  /* Row title: the workstream being compared. */
  table.gg-stack-table td:first-child {
    padding: 16px 18px 14px !important;
    background: #10243a !important;
    color: #fff !important;
    font-family: Manrope, Inter, system-ui, sans-serif;
    font-weight: 750 !important;
    font-size: 1rem;
    line-height: 1.35;
    border-bottom: 0 !important;
  }

  table.gg-stack-table td:not(:first-child) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 14px;
    align-items: baseline;
    padding: 12px 18px !important;
    border-bottom: 1px solid var(--gg-line, #e3e8ee) !important;
    color: var(--gg-ink, #10243a) !important;
    font-size: .95rem;
    line-height: 1.45;
  }

  table.gg-stack-table td:last-child {
    border-bottom: 0 !important;
  }

  table.gg-stack-table td:not(:first-child)::before {
    content: attr(data-label);
    color: var(--gg-muted, #5a6878);
    font-size: .82rem;
    font-weight: 650;
    line-height: 1.4;
  }
}

/* ---- Brand & Trust Scan page: glass panels ------------------------------
   These panels used a translucent dark "glass" fill from the old dark theme.
   On the current light page it rendered as slate grey under dark navy text
   (2.5:1 heading contrast, 1.1:1 on some paragraphs). Make them solid navy so
   the gold labels and light pills they were designed with read properly. */
body.gg-design-v2 .glass:is(.scan-system-panel, .scan-preview-panel, .why-scan-panel, .blend-list) {
  background: #10243a !important;
  border-color: rgba(255, 255, 255, .1) !important;
  color: #d3dce8 !important;
}
body.gg-design-v2 .glass:is(.scan-system-panel, .scan-preview-panel, .why-scan-panel, .blend-list) :is(h2, h3, strong) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
body.gg-design-v2 .glass:is(.scan-system-panel, .scan-preview-panel, .why-scan-panel, .blend-list) :is(p, .copy p, .blend-list span, .scan-privacy-note) {
  color: #c4cfdc !important;
  -webkit-text-fill-color: #c4cfdc !important;
}
body.gg-design-v2 .glass:is(.scan-system-panel, .scan-preview-panel, .why-scan-panel) .section-kicker {
  color: #7fe0cf !important;
  -webkit-text-fill-color: #7fe0cf !important;
}
body.gg-design-v2 .scan-system-panel .scan-flow-box span {
  color: #e3eaf3 !important;
  -webkit-text-fill-color: #e3eaf3 !important;
}
body.gg-design-v2 .glass:is(.scan-system-panel, .scan-preview-panel) h2 {
  margin-bottom: 24px !important;
}
body.gg-design-v2 .blend-list > div + div {
  border-top-color: rgba(255, 255, 255, .12) !important;
}

/* Request-the-scan form: heading sat directly on the first field label. */
body.gg-design-v2 .brand-scan-tool h2 {
  margin-bottom: 24px !important;
}
@media (max-width: 400px) {
  body.gg-design-v2 .glass:is(.scan-system-panel, .scan-preview-panel, .why-scan-panel) {
    padding: 26px 20px !important;
  }
  body.gg-design-v2 .scan-system-panel .scan-flow-box {
    padding: 16px 14px !important;
  }
  body.gg-design-v2 .scan-flow-box span {
    padding: 9px 8px !important;
    font-size: .8rem !important;
  }
}

/* ---- Booking page: founder photo had a fixed 320px width attribute and no
   max-width, so it overflowed the card on 320–340px phones. */
.booking-photo {
  max-width: 100%;
  height: auto;
}

/* ---- Small phones (320–380px) ---------------------------------------- */
@media (max-width: 380px) {
  /* About: founder card squeezed its text column to ~89px; stack it. */
  body.page-about .about-portrait-card {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px !important;
  }
  body.page-about .about-portrait-card img {
    width: 112px !important;
    height: 132px !important;
  }

  /* Business performance page: "Transformation" was wider than the screen. */
  body.gg-design-v2 .ggt-hero h1,
  .ggt-hero h1 {
    font-size: clamp(1.9rem, 9.4vw, 2.5rem) !important;
  }

  /* Prompt library: number badge + large title left a 146px text column. */
  .prompt-scenario summary {
    column-gap: 12px !important;
  }
  .prompt-scenario summary strong {
    font-size: 1.08rem !important;
    line-height: 1.25 !important;
  }
}
