/*
 * Performance Max / Google Shopping page polish.
 *
 * The shared shell, theme tokens, typefaces, glow language and scramble
 * runtime stay owned by site.css/site.js.  This file is deliberately scoped
 * to the route so it can be loaded by the base template without changing
 * another service page.
 */

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping),
body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) *,
body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) *::before,
body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) *::after {
  box-sizing: border-box;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) {
  width: 100%;
  max-width: none;
  min-width: 0;
  color: var(--fg, #f5f5f5);
  font-size: 1rem;
  line-height: var(--lh-body, 1.55);
  overflow: visible;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.wrap, .pmax-wrap, .gs-wrap) {
  width: 100%;
  max-width: 1280px;
  min-width: 0;
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 40px);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) section {
  position: relative;
  min-width: 0;
  padding-block: clamp(52px, 7vw, 96px);
  scroll-margin-top: 96px;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(h1, h2, h3, h4, p) {
  min-width: 0;
  margin-top: 0;
}

/* Hero and scramble: the animation remains in place, but its measured box
   must be allowed to grow with a translated string and a narrow viewport. */
body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pmax-hero, .gs-hero, .hero) {
  min-width: 0;
  overflow: visible;
  padding-block: clamp(24px, 3vw, 44px) clamp(44px, 6vw, 80px);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pmax-title, .gs-title, .pmax-hero h1, .gs-hero h1, .hero h1, h1.mega) {
  max-width: min(100%, 18ch);
  min-width: 0;
  height: auto;
  min-height: 0;
  margin-block: 0;
  overflow: visible;
  font-family: var(--font-display, "Space Grotesk", "Onest", sans-serif);
  font-size: var(--ds-title-display, clamp(3rem, 7vw, 6.5rem));
  font-weight: 500;
  line-height: var(--ds-title-display-lh, .96);
  letter-spacing: var(--ds-title-display-ls, var(--ls-tight, -.04em));
  text-wrap: balance;
  overflow-wrap: anywhere;
  word-break: normal;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.scramble, .glow, .stroke, .skew, .accent) {
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* site.js may set a measured width while the scramble is settling.  The
   local important override is intentional: an old width must never clip a
   translated word at 320/390px.  Text and data attributes are untouched. */
body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(h1, .pmax-title, .gs-title) .scramble {
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  white-space: normal !important;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pmax-hero, .gs-hero, .hero) :where(.hero-meta, .gs-proof, .pmax-proof) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  min-width: 0;
  margin-bottom: 24px;
  color: var(--fg-2, #a6a6a6);
}

/* The PMax body is a fresh `.pmax-page` contract, while a few established
   Google Search primitives remain in use (`.gs-*`).  Keep the layout here so
   the route does not depend on another service's stylesheet. */
body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .hero-below {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line, #303030);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.hero-lede, .sec-intro, .cta-lede) {
  max-width: 68ch;
  color: var(--fg-2, #a6a6a6);
  font-size: 1rem;
  line-height: var(--lh-body, 1.55);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.hero-ctas, .cta-actions) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .hero-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  min-width: 0;
  border: 1px solid var(--line, #303030);
  background: var(--line, #303030);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .hero-kpis .kpi {
  min-width: 0;
  padding: 18px;
  background: var(--bg-1, var(--bg, #111));
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .hero-kpis .n {
  margin-bottom: 6px;
  color: var(--accent, #c7f53d);
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  line-height: 1.1;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .hero-kpis .l {
  color: var(--fg-2, #a6a6a6);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: max(12px, var(--fs-xs, 12px));
  line-height: 1.4;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.summary-inner, .split2, .pmax-channel-grid, .how-grid, .pmax-workflow-grid, .pmax-portal-grid, .decision, .notin-grid, .method, .pmax-proof-grid, .gs-trust-cases, .related-services-grid, .faq-list) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  min-width: 0;
  gap: clamp(16px, 2vw, 28px);
}

/* Four workflow cards read as a deliberate 2 × 2 sequence on desktop. */
body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pmax-workflow-grid, .how-grid) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .summary-inner {
  grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr);
  align-items: start;
  gap: clamp(24px, 5vw, 72px);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.s-head, .summary-head) {
  margin-bottom: 18px;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.s-head h2, .summary-head h2, .tldr-type) {
  max-width: 20ch;
  margin-bottom: 0;
  font-family: var(--font-display, "Space Grotesk", "Onest", sans-serif);
  font-size: var(--ds-title-section, clamp(2.25rem, 5vw, 4.5rem));
  font-weight: 500;
  line-height: var(--ds-title-section-lh, .98);
  letter-spacing: var(--ds-title-section-ls, var(--ls-tight, -.04em));
  text-wrap: balance;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .sec-intro {
  margin-bottom: 24px;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .tldr-terminal {
  min-width: 0;
  border: 1px solid var(--line, #303030);
  border-radius: var(--r-md, 14px);
  background: var(--bg-1, var(--bg, #111));
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .tldr-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line, #303030);
  color: var(--fg-3, #858585);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: max(12px, var(--fs-xs, 12px));
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .tldr-bar .url {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.tldr-lines, .tldr-cursor) {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .tldr-lines {
  padding: 18px;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .tldr-cursor {
  padding: 0 18px 16px;
  color: var(--accent, #c7f53d);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pmax-toc, .page-toc) {
  padding-block: 20px 6px;
  border-top: 1px solid var(--line, #303030);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .toc-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .toc-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--line, #303030);
  border-radius: var(--r-pill, 999px);
  color: var(--fg-2, #a6a6a6);
  text-decoration: none;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .pmax-proof-credentials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 12px 0 24px;
  padding: 0;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.gs-trust-badge, .gs-trust-stat) {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line, #303030);
  border-radius: var(--r-md, 14px);
  background: color-mix(in oklab, var(--bg-2, var(--bg, #111)) 55%, transparent);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.gs-trust-badge-name, .gs-trust-stat-n) {
  display: block;
  color: var(--fg, #f5f5f5);
  font-weight: 600;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.gs-trust-badge-meta, .gs-trust-stat-l) {
  display: block;
  margin-top: 4px;
  color: var(--fg-2, #a6a6a6);
  font-size: max(12px, var(--fs-xs, 12px));
  line-height: 1.4;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.split-card, .how-card, .pmax-portal-card, .dq, .notin-item, .pkg, .gs-pkg, .related-svc, .q, .glossary-item, .gs-trust-case) {
  min-width: 0;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--line, #303030);
  border-radius: var(--r-md, 14px);
  background: var(--bg-1, var(--bg, #111));
  overflow-wrap: anywhere;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.split-card.is-this, .how-card--accent, .pkg--featured, .pmax-portal-card[data-featured="true"]) {
  border-color: color-mix(in oklab, var(--accent, #c7f53d) 34%, var(--line, #303030));
  background: color-mix(in oklab, var(--accent, #c7f53d) 6%, var(--bg-1, var(--bg, #111)));
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.ck, .pkg-list, .how-feat, .dq ul, .cta-audit-list) {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.ck li, .pkg-list li, .how-feat li, .dq li, .cta-audit-list li) {
  position: relative;
  padding-left: 22px;
  color: var(--fg-2, #a6a6a6);
  font-size: 1rem;
  line-height: 1.5;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.ck li, .pkg-list li, .how-feat li, .cta-audit-list li)::before {
  position: absolute;
  left: 0;
  color: var(--accent, #c7f53d);
  content: "→";
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pkg-list li.inherit, .pkg-list li.inherit)::before {
  content: none;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.split-tag, .how-n, .dq-n, .mstep-big, .pmax-portal-eyebrow, .gs-trust-case-metric, .package-terms-title) {
  margin-bottom: 12px;
  color: var(--accent, #c7f53d);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: max(12px, var(--fs-xs, 12px));
  letter-spacing: var(--ls-caps, .1em);
  text-transform: uppercase;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.split-card h3, .how-card h3, .pmax-portal-card h3, .dq h3, .notin-item h3, .mstep h3) {
  max-width: 24ch;
  margin-bottom: 12px;
  font-size: var(--ds-title-card, clamp(1.35rem, 3vw, 2.25rem));
  line-height: 1.08;
  letter-spacing: var(--ls-snug, -.03em);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.how-card > p, .notin-item p, .other-d, .related-svc-sub, .pmax-portal-card p, .glossary-def, .q-body, .package-terms p) {
  margin-bottom: 0;
  color: var(--fg-2, #a6a6a6);
  font-size: 1rem;
  line-height: 1.55;
}

/* The portal screenshot is evidence, not a decorative background.  Preserve
   its native 1905:943 ratio so the dashboard remains legible and does not
   acquire a stretched crop when the content column changes width. */
body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .pmax-portal-figure {
  margin: 0;
  min-width: 0;
  border: 1px solid var(--line, #303030);
  border-radius: var(--r-md, 14px);
  background: var(--bg-1, var(--bg, #111));
  overflow: clip;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .pmax-portal-lightbox {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .pmax-portal-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .pmax-portal-figure figcaption {
  padding: 12px 16px;
  border-top: 1px solid var(--line, #303030);
  color: var(--fg-3, #858585);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: max(12px, var(--fs-xs, 12px));
  line-height: 1.45;
}

/* Aggregate context is a compact stat system, not a run-on text line. */
body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .pmax-evidence-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
  gap: 1px;
  margin: 24px 0 0;
  border: 1px solid var(--line, #303030);
  background: var(--line, #303030);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .pmax-evidence-stat {
  display: flex;
  min-width: 0;
  min-height: 132px;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--bg-1, var(--bg, #111));
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .pmax-evidence-value {
  display: block;
  color: var(--accent, #c7f53d);
  font-family: var(--font-display, "Space Grotesk", "Onest", sans-serif);
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 500;
  line-height: .95;
  letter-spacing: var(--ls-tight, -.04em);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .pmax-evidence-label {
  display: block;
  max-width: 22ch;
  color: var(--fg-2, #a6a6a6);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: max(12px, var(--fs-xs, 12px));
  line-height: 1.4;
  letter-spacing: .04em;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .pmax-evidence-details {
  margin-top: 18px;
  border: 1px solid var(--line, #303030);
  border-radius: var(--r-md, 14px);
  background: color-mix(in oklab, var(--bg-1, var(--bg, #111)) 70%, transparent);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .pmax-evidence-details > summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  color: var(--fg, #f5f5f5);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: max(12px, var(--fs-xs, 12px));
  line-height: 1.35;
  letter-spacing: var(--ls-caps, .1em);
  text-transform: uppercase;
  list-style: none;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .pmax-evidence-details > summary::-webkit-details-marker {
  display: none;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .pmax-evidence-details > summary::before {
  content: "▸";
  color: var(--accent, #c7f53d);
  font-size: 1.1em;
  transition: transform .2s var(--ease, ease);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .pmax-evidence-details[open] > summary {
  border-bottom: 1px solid var(--line, #303030);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .pmax-evidence-details[open] > summary::before {
  transform: rotate(90deg);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .pmax-evidence-body {
  display: grid;
  gap: 12px;
  padding: 18px 16px 20px;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .pmax-evidence-body p {
  margin: 0;
  color: var(--fg-2, #a6a6a6);
  font-size: 1rem;
  line-height: var(--lh-body, 1.55);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .pmax-evidence-body a {
  color: var(--accent, #c7f53d);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .gs-diff-table {
  min-width: 0;
  border: 1px solid var(--line, #303030);
  border-radius: var(--r-md, 14px);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.gs-diff-row, .pmax-diff-row) {
  display: grid;
  grid-template-columns: minmax(130px, .7fr) minmax(0, 1.3fr) minmax(0, 1.3fr);
  min-width: 0;
  border-top: 1px solid var(--line, #303030);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.gs-diff-row:first-child, .pmax-diff-headrow) {
  border-top: 0;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.gs-diff-cell, .gs-diff-h, .gs-diff-c-k, .gs-diff-c-us) {
  min-width: 0;
  padding: 14px 16px;
  color: var(--fg-2, #a6a6a6);
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.gs-diff-h, .gs-diff-row:first-child .gs-diff-cell) {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: max(12px, var(--fs-xs, 12px));
  text-transform: uppercase;
  letter-spacing: var(--ls-caps, .1em);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .gs-diff-c-k {
  color: var(--fg, #f5f5f5);
  font-weight: 600;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .gs-diff-c-us {
  background: color-mix(in oklab, var(--accent, #c7f53d) 5%, transparent);
}

/* Navigation: tablet is the deliberate handoff point to the existing burger.
   Keeping the language switcher and brand visible preserves orientation. */
body[data-page-scope="performance-max"] header.nav .nav-inner,
body[data-page-scope="performance-max"] header.nav .brand,
body[data-page-scope="performance-max"] header.nav .nav-right {
  min-width: 0;
}

body[data-page-scope="performance-max"] header.nav .brand {
  flex: 0 1 auto;
}

body[data-page-scope="performance-max"] header.nav .brand-word {
  min-width: 0;
  overflow-wrap: anywhere;
}

body[data-page-scope="performance-max"] header.nav .nav-right {
  flex: 0 0 auto;
}

@media (min-width: 901px) and (max-width: 1200px) {
  body[data-page-scope="performance-max"] header.nav .nav-inner > nav,
  body[data-page-scope="performance-max"] header.nav .nav-right .nav-cta {
    display: none;
  }

  body[data-page-scope="performance-max"] header.nav .burger {
    display: flex;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 900px) {
  body[data-page-scope="performance-max"] header.nav .nav-inner > nav,
  body[data-page-scope="performance-max"] header.nav .nav-right .nav-cta {
    display: none;
  }

  body[data-page-scope="performance-max"] header.nav .burger {
    display: flex;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
  }

  body[data-page-scope="performance-max"] header.nav .nav-inner {
    min-height: 60px;
  }
}

@media (max-width: 390px) {
  body[data-page-scope="performance-max"] header.nav .nav-inner {
    padding-inline: 10px;
    gap: 6px;
  }

  body[data-page-scope="performance-max"] header.nav .brand {
    gap: 6px;
  }

  body[data-page-scope="performance-max"] header.nav .nav-right {
    gap: 4px;
  }

  body[data-page-scope="performance-max"] header.nav .lang {
    gap: 0;
  }

  body[data-page-scope="performance-max"] header.nav .lang a {
    min-width: 36px;
    padding-inline: 4px;
  }
}

@media (max-width: 360px) {
  body[data-page-scope="performance-max"] header.nav .nav-inner {
    padding-inline: 8px;
    gap: 4px;
  }

  body[data-page-scope="performance-max"] header.nav .brand-word {
    font-size: clamp(1rem, 5.2vw, 1.25rem);
  }
}

/* Section rhythm and compositional grouping.  The selectors intentionally
   cover both the new pmax names and the established gs names. */
body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pmax-grid, .gs-proof-grid, .gs-diff, .gs-workflow-grid, .gs-wf-grid, .gs-packages-grid, .gs-decision-grid, .gs-hybrid, .related-services-grid, .glossary-list, .toc-grid) {
  min-width: 0;
  gap: clamp(16px, 2vw, 28px);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pmax-card, .gs-proof-card, .gs-diff-card, .gs-wf-step, .gs-pkg, .gs-decision-card, .gs-hybrid-card, .related-service, .glossary-item) {
  min-width: 0;
  overflow-wrap: anywhere;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pmax-card, .gs-proof-card, .gs-diff-card, .gs-wf-step, .gs-pkg, .gs-decision-card, .gs-hybrid-card, .related-service, .glossary-item) > :where(p, ul, ol) {
  max-width: 68ch;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pmax-grid, .gs-proof-grid, .gs-workflow-grid, .gs-wf-grid, .gs-packages-grid, .gs-decision-grid, .gs-hybrid) > * {
  min-width: 0;
}

/* TL;DR stays legible: the key moves above its value on small screens rather
   than asking an 11px monospaced column to carry the whole sentence. */
body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pmax-tldr-line, .gs-tldr-line, .tldr-line) {
  display: grid;
  grid-template-columns: 3ch minmax(8ch, 11ch) 2ch minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  padding-block: 8px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pmax-tldr-line, .gs-tldr-line, .tldr-line) > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pmax-tldr-line, .gs-tldr-line, .tldr-line) :where(.n, .k) {
  color: var(--accent, #c7f53d);
}

@media (max-width: 700px) {
  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) > section.hero {
    padding-block: clamp(24px, 7vw, 40px) 0;
  }

  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pmax-title, .gs-title, .pmax-hero h1, .gs-hero h1, .hero h1, h1.mega) {
    min-height: 0 !important;
    margin-block: 0 !important;
    contain: none;
  }

  /* The shared mobile section rule is intentionally broad.  This more
     specific hero contract keeps its bottom padding and the legacy mega
     containment from reintroducing an empty band below the title. */
  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) > section.hero > .wrap > h1.mega {
    min-height: 0 !important;
    margin-block: 0 !important;
    contain: none;
  }

  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .hero-below {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    margin-top: 16px;
    padding-top: 16px;
  }

  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .hero-below > * {
    width: 100%;
    min-width: 0;
  }

  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pmax-tldr-line, .gs-tldr-line, .tldr-line) {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
    padding-block: 10px;
    font-size: 1rem;
  }

  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pmax-tldr-line, .gs-tldr-line, .tldr-line) :where(.n, .k, .sep) {
    display: block;
    font-size: var(--fs-xs, 12px);
    line-height: 1.35;
  }

  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pmax-tldr-line, .gs-tldr-line, .tldr-line) :where(.v, .value) {
    display: block;
    font-size: 1rem;
    line-height: 1.5;
  }
}

/* Labels may stay compact, but meaningful notes and package decisions must
   not fall below a readable body size. */
body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.s-label, .hero-meta, .gs-proof-l, .gs-pkg-tag, .gs-pkg-s-label, .gs-pkg-for-label, .gs-pkg-why-label, .gs-wf-label, .gs-mt-label, .gs-q-n, .pkg-n, .toc-link, .last-updated) {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: max(12px, var(--fs-xs, 12px));
  line-height: 1.4;
  letter-spacing: var(--ls-caps, .1em);
  text-transform: uppercase;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.gs-pkg-price-note, .gs-pkg-for-v, .gs-pkg-why, .gs-pkg-why p, .gs-wf-step p, .gs-method p, .pmax-note, .pmax-package-note) {
  font-size: 1rem;
  line-height: var(--lh-body, 1.55);
}

/* Package cards reserve the badge's row.  The badge stays part of the visual
   language, but no longer hangs outside the card and gets cropped. */
body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.gs-pkg, .pmax-package, [data-package-card]) {
  position: relative;
  min-width: 0;
  padding-top: clamp(32px, 4vw, 48px);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.gs-pkg-optimal, .pmax-package--featured, .pkg--featured, [data-package-card][data-featured="true"]) {
  padding-top: clamp(44px, 5vw, 60px);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.gs-pkg-badge, .pmax-package-badge, .pkg-badge, [data-package-badge]) {
  position: absolute;
  top: 12px;
  left: clamp(14px, 2vw, 22px);
  right: auto;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: calc(100% - 28px);
  padding: 5px 10px;
  border-radius: var(--r-pill, 999px);
  color: var(--bg, #111);
  background: var(--accent, #c7f53d);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: max(11px, var(--fs-xs, 12px));
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: var(--ls-caps, .1em);
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
  transform: none;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pkgs, .pmax-package-grid, .gs-packages-grid) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  gap: 16px;
  align-items: stretch;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pkg, .pmax-package, .gs-pkg) {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(20px, 3vw, 30px);
}

/* The featured badge is taken out of normal flow so it can sit on the card
   edge.  Keep the Growth kicker below that badge on wide screens as well as
   on mobile; the generic card padding rule above would otherwise overwrite
   the reserved row. */
body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.gs-pkg-optimal, .pmax-package--featured, .pkg--featured, [data-package-card][data-featured="true"]) {
  padding-top: clamp(56px, 5vw, 72px);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pkg-top, .gs-pkg-top) {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line, #303030);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pkg-top h3, .gs-pkg-top h3) {
  margin-bottom: 8px;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pkg-price, .gs-pkg-price) {
  color: var(--fg, #f5f5f5);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1;
  letter-spacing: var(--ls-tight, -.04em);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pkg-price .cur, .gs-pkg-price .cur) {
  margin-right: 2px;
  color: var(--fg-2, #a6a6a6);
  font-size: .55em;
  vertical-align: .5em;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pkg-price .per, .gs-pkg-price .per) {
  margin-left: 4px;
  color: var(--fg-2, #a6a6a6);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: .3em;
  letter-spacing: .02em;
  vertical-align: .2em;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pkg-price-note, .pkg-for, .package-terms p) {
  color: var(--fg-2, #a6a6a6);
  font-size: 1rem;
  line-height: 1.55;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pkg-price-note, .pkg-for) {
  margin: 8px 0 4px;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .pkg-list {
  flex: 1;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .pkg-list li.inherit {
  padding-left: 0;
  color: var(--fg-3, #858585);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: max(12px, var(--fs-xs, 12px));
  letter-spacing: .04em;
  text-transform: uppercase;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pkg-cta, .gs-pkg-cta) {
  width: 100%;
  justify-content: center;
  margin-top: auto;
  text-align: center;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .package-terms {
  margin-top: 18px;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .package-terms-title {
  margin-bottom: 8px;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.method, .pmax-method) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line, #303030);
  border-radius: var(--r-md, 14px);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.mstep, .pmax-method-step) {
  min-width: 0;
  padding: 24px;
  color: var(--fg-2, #a6a6a6);
  overflow-wrap: anywhere;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.mstep + .mstep, .pmax-method-step + .pmax-method-step) {
  border-left: 1px solid var(--line, #303030);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.mstep p, .pmax-method-step p) {
  margin-bottom: 0;
  color: var(--fg-2, #a6a6a6);
  font-size: 1rem;
  line-height: 1.55;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .glossary-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  margin: 0;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .glossary-item {
  padding: 18px 22px;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .glossary-term {
  margin: 0 0 6px;
  color: var(--accent, #c7f53d);
  font-family: var(--font-display, "Space Grotesk", "Onest", sans-serif);
  font-size: var(--fs-lg, 1.125rem);
  font-weight: 600;
  letter-spacing: var(--ls-snug, -.03em);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.faq-list, .related-services-grid) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.q, .related-svc) {
  text-decoration: none;
  color: var(--fg, #f5f5f5);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.q-text, .related-svc-label) {
  color: var(--fg, #f5f5f5);
  font-size: var(--fs-md, 1rem);
  font-weight: 600;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .q > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .q > summary::-webkit-details-marker {
  display: none;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .q-num {
  color: var(--accent, #c7f53d);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: max(12px, var(--fs-xs, 12px));
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .q-mark {
  color: var(--accent, #c7f53d);
  font-size: 1.4rem;
  line-height: 1;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .q-body {
  padding-top: 16px;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .related-svc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 4px 14px;
  align-items: center;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.cta, .pmax-cta) {
  min-width: 0;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.cta-mega, .cta-lede, .cta-audit, .cta-actions) {
  max-width: 72ch;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .cta-audit {
  margin-block: 24px;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--line, #303030);
  border-radius: var(--r-md, 14px);
  background: color-mix(in oklab, var(--bg-2, var(--bg, #111)) 55%, transparent);
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .cta-audit-k {
  margin-bottom: 12px;
  color: var(--accent, #c7f53d);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: max(12px, var(--fs-xs, 12px));
  letter-spacing: var(--ls-caps, .1em);
  text-transform: uppercase;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.cta-email, .cta-hours) {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--fg-2, #a6a6a6);
  overflow-wrap: anywhere;
}

/* The shared quick form is portalled to body by the PMax accessibility
   layer, so its consent row needs a body-scoped contract instead of relying
   on the content root. */
body[data-page-scope="performance-max"] #quickForm .form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: none;
  margin: 0;
  color: var(--fg-2, #a6a6a6);
  font-family: var(--font-body, "Onest", sans-serif);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
}

body[data-page-scope="performance-max"] #quickForm .form-consent input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent, #c7f53d);
}

body[data-page-scope="performance-max"] #quickForm .form-consent > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

body[data-page-scope="performance-max"] #quickForm .form-consent a {
  color: var(--accent, #c7f53d);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.gs-pkg-tabs, .pmax-package-tabs) {
  min-width: 0;
}

@media (max-width: 980px) {
  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.gs-proof-grid, .gs-diff, .gs-workflow-grid, .gs-wf-grid, .pmax-workflow-grid, .pmax-portal-grid, .pmax-package-grid, .pkgs, .gs-decision-grid, .decision, .gs-hybrid, .related-services-grid, .faq-list, .glossary-list) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pmax-title, .gs-title, .pmax-hero h1, .gs-hero h1, .hero h1, h1.mega) {
    max-width: 100%;
    font-size: clamp(2.25rem, 11.2vw, 4.6rem);
    line-height: .98;
    text-wrap: pretty;
  }

  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) .pmax-evidence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.gs-proof-grid, .gs-diff, .gs-workflow-grid, .gs-wf-grid, .pmax-workflow-grid, .pmax-portal-grid, .gs-packages-grid, .pmax-package-grid, .pkgs, .gs-decision-grid, .decision, .gs-hybrid, .related-services-grid, .faq-list, .glossary-list) {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.gs-pkg, .pkg, .pmax-package, [data-package-card]) {
    padding-top: 42px;
  }

  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.gs-pkg-optimal, .pmax-package--featured, .pkg--featured, [data-package-card][data-featured="true"]) {
    padding-top: 54px;
  }

  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pmax-section, .gs-section, section) {
    padding-block: clamp(44px, 11vw, 72px);
  }

  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.gs-table-wrap, .pmax-table-wrap, .gs-diff-table, .gs-hy-table) {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.pmax-diff-table, .gs-diff-table) :where(.pmax-diff-row, .gs-diff-row) {
    min-width: 640px;
  }

  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.page-toc, .pmax-toc, .toc-grid) {
    max-width: 100%;
    overflow-x: auto;
  }

  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.method, .pmax-method) {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.mstep + .mstep, .pmax-method-step + .pmax-method-step) {
    border-top: 1px solid var(--line, #303030);
    border-left: 0;
  }
}

/* Controls keep the shell's behavior and only receive page-local spacing.
   The JS measures actual cookie/FAB height and supplies the custom offsets. */
body[data-page-scope="performance-max"] .cookie-banner {
  bottom: var(--pmax-cookie-bottom, max(10px, env(safe-area-inset-bottom)));
  z-index: 60;
}

body[data-page-scope="performance-max"] #mobileCtaBar.m-fab {
  right: max(12px, env(safe-area-inset-right));
  bottom: var(--pmax-fab-bottom, max(12px, env(safe-area-inset-bottom)));
  z-index: 80;
}

body[data-page-scope="performance-max"] :where(#cdSkipFloat.cd-skip-float, .landing-sticky-cta, .pmax-next) {
  right: var(--pmax-next-right, calc(var(--pmax-fab-size, 56px) + 24px));
  bottom: var(--pmax-next-bottom, max(16px, env(safe-area-inset-bottom)));
  z-index: 70;
  max-width: min(52vw, 260px);
  overflow-wrap: anywhere;
}

body[data-page-scope="performance-max"][data-pmax-fab-open="true"] :where(#cdSkipFloat.cd-skip-float, .landing-sticky-cta, .pmax-next) {
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(var(--pmax-fab-bottom, 12px) + 72px);
}

body[data-page-scope="performance-max"] .pmax-page {
  padding-bottom: var(--pmax-fixed-safe-space, 24px);
}

@media (min-width: 901px) {
  body[data-page-scope="performance-max"] :where(#cdSkipFloat.cd-skip-float, .landing-sticky-cta, .pmax-next) {
    right: max(24px, env(safe-area-inset-right));
  }
}

@media (max-width: 700px) {
  body[data-page-scope="performance-max"] .cookie-banner {
    width: calc(100vw - 20px);
  }

  body[data-page-scope="performance-max"] :where(#cdSkipFloat.cd-skip-float, .landing-sticky-cta, .pmax-next) {
    max-width: min(58vw, 220px);
  }
}

/* All page-local interactive controls retain a reliable touch target and a
   visible keyboard state. */
body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(a, button, summary, input, select, textarea) {
  max-width: 100%;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(.btn, .gs-pkg-cta, .pmax-package-cta, .cta-actions a, .hero-ctas a, .page-toc a, .toc-link) {
  min-height: 44px;
}

body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) :where(a, button, summary, input, select, textarea):focus-visible,
body[data-page-scope="performance-max"] :where(#cdSkipFloat.cd-skip-float, .landing-sticky-cta, .pmax-next):focus-visible {
  outline: 2px solid var(--accent, #c7f53d);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) *,
  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) *::before,
  body[data-page-scope="performance-max"] :where(.pmax-page, .google-shopping-page, .sec-raw-google-shopping) *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
