/* Mobile polish layer: loaded last on our pages. Phone widths only (<=600px unless noted); desktop untouched.
   One side gutter (20px) everywhere, no clipped content, tap targets >=40px. */

/* ---------- industry pages: one 20px gutter ---------- */
@media (max-width:600px){
  html body .pg .wrap,
  html body section.hero.hero.hero.hero > .wrap,
  html body section#numbers#numbers > .wrap,
  html body section#start#start > .wrap,
  html body section#world#world > .wrap,
  html body section#fit#fit > .wrap,
  html body section#gap#gap > .wrap,
  html body section#rules#rules > .wrap,
  html body section#software#software > .wrap,
  html body section#proof#proof > .wrap,
  html body section#bench#bench > .wrap,
  html body section#standards#standards > .wrap,
  html body section#faq#faq > .wrap{ padding-left:20px !important; padding-right:20px !important; }

  /* layers card header: counter and subtitle drop under the title instead of clipping */
  html body .lay-top.lay-top{ flex-wrap:wrap !important; padding:16px 20px !important; gap:6px 12px !important; }
  html body .lay-top.lay-top .lay-sub{ flex:1 1 100% !important; order:3; }
  html body .lay-top.lay-top .lay-count{ margin-left:0 !important; }
}

/* ---------- manufacturing hero: scene labels fit the picture ---------- */
@media (max-width:600px){
  .mb-lab{ font-size:11px; line-height:16px; letter-spacing:1px; }
  .mb-lab.l1{ left:3%; margin:0; transform:translate(0,-100%); }
}

/* ---------- security teams ---------- */
@media (max-width:900px){
  /* compare card (Manual review / ZeroDay): three nodes on a left rail, status chip beside the middle node,
     outcome row pinned to the bottom. Fixed card height so nothing overlaps when the mode flips. */
  .pg .proof-singlemerge .s5-flow{ min-height:600px; height:600px; }
  .pg .proof-singlemerge .s5-node,
  .pg .proof-singlemerge .s5-node.s5-node-swap{ position:absolute; transform:none; }
  .pg .proof-singlemerge .s5-track,
  .pg .proof-singlemerge .s5-track-live{ top:76px; bottom:170px; }
  .pg .proof-singlemerge .s5-flow.mode-merge .s5-track-live{ height:calc((100% - 246px) * .5); }
  .pg .proof-singlemerge .s5-flow.mode-verify .s5-track-live{ height:calc(100% - 246px); }
  .pg .proof-singlemerge .s5-flow.mode-merge .s5-dot{ top:calc(76px + (100% - 246px) * .5); }
  .pg .proof-singlemerge .s5-flow.mode-verify .s5-dot{ top:calc(100% - 170px); }
  .pg .proof-singlemerge .s5-n2{ top:calc(76px + (100% - 246px) * .5); }
  .pg .proof-singlemerge .s5-n3{ top:calc(100% - 170px); }
  .pg .proof-singlemerge .s5-q-state{ top:calc(76px + (100% - 246px) * .5 - 6px); right:20px; }
  .pg .proof-singlemerge .s5-node-swap{ margin-left:0; }
  .pg .proof-singlemerge .s5-node-swap .s5-swap-face{ display:block; text-align:left; margin-left:0; }
  .pg .proof-singlemerge .s5-v-state .s5-checks,
  .pg .proof-singlemerge .s5-v-state .s5-checks-clean{ grid-template-columns:1fr; justify-content:start; gap:6px; }
  .pg .proof-singlemerge .s5-q-state p{ display:none; }
  .pg .proof-singlemerge .s5-v-state,
  .pg .proof-singlemerge .s5-v-state-clean{ left:82px; right:20px; top:calc(76px + (100% - 246px) * .5 + 62px); bottom:auto; }
  .pg .proof-singlemerge .s5-outcome,
  .pg .proof-singlemerge .s5-outcome-clean{ position:absolute; left:24px; right:24px; bottom:22px; margin:0; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding-top:14px; border-top:1px solid rgba(255,255,255,.08); }
}
@media (max-width:600px){
  .pg .section-inner{ margin-left:20px; margin-right:20px; }
  .pg .proof-singlemerge .s5-wrap{ width:calc(100% - 40px); }
}

/* ---------- glossary hover terms: a bottom sheet on phones (the floating bubble overflowed the page below 360px) ---------- */
@media (max-width:520px){
  .gloss .gtip{ position:fixed; left:16px; right:16px; bottom:16px; top:auto; width:auto; max-width:none; transform:translateY(8px); font-size:14px; padding:16px 18px; z-index:200; }
  .gloss:hover .gtip, .gloss:focus .gtip, .gloss:focus-visible .gtip{ transform:translateY(0); }
  .gloss .gtip::after{ display:none; }
  .gloss .gtip a{ display:block; width:fit-content; padding:8px 0 4px; font-size:13px; }
}

/* ---------- pricing ---------- */
@media (max-width:640px){
  html body section.pr-hero > .wrap, html body section#tiers > .wrap, html body section#how > .wrap, html body section.pr-end > .wrap{ padding-left:20px; padding-right:20px; }
  /* plan rail labels sit left-aligned under their circle so "Get Clean" never reaches the screen edge */
  .pk-steps span, .pk-steps small{ justify-content:flex-start; width:auto; }
}

/* ---------- demo / contact dashboard preview: nothing under 11px on a phone ---------- */
@media (max-width:640px){
  .zdp-hero .k, .zdp-hero .hr .k, .zdp-watch .k, .zdp-watch i, .zdp-watch em, .zdp-watch .r, .zdp-kl, .zdp-loop .n, .zdp-loop .chip,
  .zdp-hero .ms span, .zdp-hero .hr .s, .zdp-two span, .zdp-loop .cap, .zdp-loop .d, .zdp-loop .ck, .zdp-loop .lk,
  .zdp-top .upd, .zdp-sec, .zdp-stats .k, .zdp-stats .how, .zdp-tr.th, .zdp-sev, .zdp-f small{ font-size:11px; }
}
@media (max-width:640px){
  .ct-face .nm{ font-size:11px; letter-spacing:.06em; }
}
@media (max-width:420px){
  .zdp-watch .repos i:nth-child(n+3), .zdp-watch .repos em{ display:none; }
}

/* ---------- industries hub: compliance-mapping card reads as three label rows ---------- */
@media (max-width:600px){
  html body .cert-rows{ display:grid !important; gap:0 !important; padding:6px 20px !important; margin-top:28px !important; }
  html body .cert-rows .cr{ display:grid; grid-template-columns:84px minmax(0,1fr); align-items:baseline; column-gap:14px; padding:14px 0; border-top:1px solid var(--xy-hairline,#2A2A31); }
  html body .cert-rows .cr:first-child{ border-top:0; }
  html body .cert-rows .cr .v{ font:500 22px/28px var(--xy-mono,'DM Mono',monospace); }
  html body .cert-rows .cr .l{ font:400 11px/16px var(--xy-mono,'DM Mono',monospace); letter-spacing:.06em; text-transform:uppercase; color:var(--xy-ink-3,#7E838C); }
}

/* ---------- glossary database (glossary + resources pages): the A-Z rail is hidden on phones, so its column goes too ---------- */
@media (max-width:620px){
  .glosswin .gl-listwrap{ grid-template-columns:minmax(0,1fr) !important; }
  .glosswin .gl-row{ padding-left:40px; padding-right:40px; grid-template-columns:minmax(0,1fr) !important; gap:6px; }
  .glosswin .gl-row .gl-def{ -webkit-line-clamp:2; }
  .glosswin .gl-def code, .glosswin .gl-def a{ white-space:normal; overflow-wrap:anywhere; }
  .glosswin .gl-row.gl-first::before{ left:14px; }
  .glosswin .gl-row::after{ right:14px; }
}

/* ---------- FAQ: topic rail is a tidy two-column grid on phones ---------- */
@media (max-width:600px){
  .fq-rail{ display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 8px !important; }
  .fq-rail a{ padding:10px 12px; min-height:44px; }
}

/* ---------- resources: finding card header (ID / fixed time / badge) wraps cleanly instead of breaking the ID ---------- */
@media (max-width:600px){
  .lc-bar, .af-main .lc-bar{ height:auto !important; min-height:68px; flex-wrap:wrap; row-gap:2px; padding:8px 16px !important; }
  .lc-id{ white-space:nowrap; }
  .lc-fixed, .lc-badge{ font-size:12px !important; letter-spacing:.06em !important; white-space:nowrap; }
}

/* ---------- utilities hero illustration: labels were ~6px once the drawing shrinks to phone width ---------- */
@media (max-width:600px){
  .v23-card-title{ font-size:19px !important; }
  .v23-ops-name, .v23-svc-label{ font-size:19px !important; }
}

/* ---------- form fields: 16px minimum so iOS Safari does not zoom the page when a field is focused ---------- */
@media (max-width:820px){
  html body input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
  html body textarea,
  html body select{ font-size:16px !important; }
}

/* ---------- text links used as list actions get a proper tap height ---------- */
@media (max-width:600px){
  a.btn-link{ display:inline-flex; align-items:center; min-height:44px; }
}
