/* Agridence — shared mobile optimisation. Loaded from every page's helmet. */
img{max-width:100%;height:auto;}
.agd-burger{display:none;}
#agd-mobile-actions{display:none;}
#agd-mobile-search{display:none;}
#agd-topbar{display:none;}
#agd-mnav{display:none;}
footer form[data-newsletter-form] button[type="submit"]{background:linear-gradient(100deg,#ff5151 0%,#c14a8a 45%,#4f52c4 100%) !important;color:#fff !important;box-shadow:0 10px 24px rgba(60,45,150,.35);transition:transform .15s,box-shadow .15s,filter .15s;}
@media (hover:hover) and (pointer:fine){footer form[data-newsletter-form] button[type="submit"]:hover{transform:translateY(-1px);box-shadow:0 14px 30px rgba(60,45,150,.48);filter:brightness(1.06);}}

@media (max-width:900px){
  html,body{overflow-x:clip;}
  .wrap{padding-left:20px !important;padding-right:20px !important;}

  /* Collapse every multi-column grid to a single column (JS promotes short-text card grids to 2-up) */
  section div[style*="grid-template-columns"],
  section a[style*="grid-template-columns"],
  footer div[style*="grid-template-columns"]{grid-template-columns:1fr !important;}

  /* Hide table-style header rows (grid + uppercase labels) once stacked */
  section div[style*="grid-template-columns"][style*="uppercase"]{display:none !important;}

  /* Let flex rows wrap instead of overflowing */
  section div[style*="flex"]{flex-wrap:wrap;}
  /* ...except icon + text rows (checklists, badges, status pills): keep icon inline, wrap the text within */
  section div:has(> span.ms:first-child){flex-wrap:nowrap !important;}
  section div:has(> span.ms:first-child + span) > span:last-child{flex:1 1 auto !important;min-width:0 !important;}
  /* ...and bullet/marker rows (small non-growing dot or icon, then text): keep the marker inline */
  section div:has(> span[style*="flex: none"]:first-child),
  section div:has(> span[style*="flex: 0 0 auto"]:first-child){flex-wrap:nowrap !important;}

  /* Fixed-width floating cards fit the viewport */
  section div[style*="width: 360px"],section div[style*="width:360px"],
  section div[style*="width: 380px"],section div[style*="width:380px"],
  section div[style*="width: 400px"],section div[style*="width:400px"]{width:100% !important;max-width:400px;}

  /* Centre timeline spines don't make sense stacked */
  section div[style*="translateX(-50%)"]{display:none !important;}

  /* Commodity picker: keep compact tiles 3-up instead of full-width stack */
  section div[style*="grid-template-columns"]:has(> [data-commodity]){grid-template-columns:repeat(3,1fr) !important;gap:8px !important;}
  [data-commodity]{padding:12px 6px !important;border-radius:11px !important;gap:6px !important;}
  [data-commodity] .ms{font-size:20px !important;}
  #commodity-detail{min-height:0 !important;padding:22px 20px !important;}

  /* Pain-point grid keeps its own behaviour */
  section div[data-pain]{padding:16px 18px !important;border-radius:14px !important;}
  section div[data-pain] > span{width:34px !important;height:34px !important;}
  section div[data-pain] > span .ms{font-size:18px !important;}
  section div[data-pain] > div{margin-top:8px !important;}
  section div[data-pain] > div:first-of-type{font-size:16px !important;}

  /* How-it-works flow: vertical spine in a left gutter, cards indented so it never crosses text */
  section div[style*="grid-template-columns"]:has(> #flow-line){grid-template-columns:1fr !important;padding-left:32px !important;}
  #flow-line{top:22px !important;bottom:22px !important;left:14px !important;right:auto !important;width:2px !important;height:auto !important;background:linear-gradient(180deg,rgba(255,81,81,.6),rgba(7,80,224,.8)) !important;}
  .flow-dot{display:none !important;}

  /* Stats bar: 2-up grid on mobile, even padding (no ragged single column) */
  section div[style*="grid-template-columns"]:has(> div [data-count]){grid-template-columns:repeat(2,1fr) !important;}
  section div[style*="grid-template-columns"]:has(> div [data-count]) > div{padding:18px 8px !important;}
  section div[style*="grid-template-columns"]:has(> div [data-count]) [data-count]{font-size:26px !important;}
  section div:has(> [data-count="75"]){display:none !important;}

  /* Inline hero stat row: compact 3-up, drop the tall vertical dividers */
  [data-hero-stats]{display:grid !important;grid-template-columns:repeat(3,1fr) !important;gap:14px !important;align-items:start !important;margin-top:26px !important;}
  [data-hero-stats] > div[style*="width: 1px"],[data-hero-stats] > div[style*="width:1px"]{display:none !important;}

  /* Hero CTA: keep the demo button + text link on one row */
  [data-cta-row]{flex-wrap:nowrap !important;gap:14px !important;}
  [data-cta-row] > a:first-child{flex:none !important;}
  [data-cta-row] > a{white-space:nowrap !important;}
  [data-cta-row] > a:last-child{font-size:13px !important;}

  /* Grids explicitly marked to stack one-per-row on mobile */
  section div[data-stack-mobile]{grid-template-columns:1fr !important;}

  /* End-to-End product flow: hidden on mobile (decorative, doesn't fit) */
  [data-flow-row]{display:none !important;}

  /* Center-line timeline (PPWR milestones): clean left-aligned stack on mobile */
  [data-timeline] > div[style*="position: absolute"]{display:none !important;}
  [data-timeline] > div[style*="grid-template-columns"]{display:block !important;margin-top:0 !important;padding:16px 0 !important;border-top:1px solid #e6e9f2 !important;}
  [data-timeline] > div[style*="grid-template-columns"] > div{text-align:left !important;}
  [data-timeline] > div[style*="grid-template-columns"] > div:empty{display:none !important;}
  [data-timeline] > div[style*="grid-template-columns"] > div[style*="justify-content: center"]{display:none !important;}
  [data-timeline] [style*="max-width: 340px"]{max-width:none !important;margin-left:0 !important;margin-top:8px !important;}

  /* Hero device cluster: browser goes full-width (no clip), phone shrinks to a corner overlay */
  #hero-devices,[data-hero-devices]{height:auto !important;margin-top:8px !important;margin-bottom:30px !important;max-width:320px;margin-left:auto !important;margin-right:auto !important;}
  #hero-browser,[data-hero-browser]{position:static !important;width:100% !important;}
  #hero-phone,[data-hero-phone]{width:38% !important;max-width:130px !important;height:auto !important;aspect-ratio:212/368;right:-2px !important;bottom:-22px !important;padding:1.5px !important;border-radius:22px !important;}
  /* Hide top-nav "Book a Demo" CTA on mobile (overlaps floating menu button) */
  [data-nav-cta]{display:none !important;}

  /* Press releases: featured hero + secondary cards use <article> with inline grid cols — collapse to single column on mobile */
  section article[style*="grid-template-columns"]{grid-template-columns:1fr !important;min-height:0 !important;}
  section article[style*="grid-template-columns"] > div:first-child{position:relative !important;aspect-ratio:16/10 !important;min-height:0 !important;}

  /* Footer: 2-up link columns instead of one long stack; brand blurb spans full width */
  footer div[style*="grid-template-columns"]{grid-template-columns:1fr 1fr !important;gap:26px 20px !important;}
  footer div[style*="grid-template-columns"] > div:first-child{grid-column:1 / -1 !important;}
  footer div[style*="space-between"]{flex-wrap:wrap !important;gap:12px !important;}

  /* AgriTrace hero */
  #agt-companion{display:none !important;}
  #agt-phone{transform:scale(.82) !important;transform-origin:top center;margin-bottom:-104px !important;}
  #agt-features{grid-template-columns:1fr 1fr !important;gap:4px 16px !important;}
  #agt-features > div{padding:16px 0 !important;}
  #agt-stats{display:grid !important;grid-template-columns:1fr 1fr !important;gap:24px 16px !important;}
  #agt-stats-region{text-align:left !important;max-width:none !important;}
  #agt-plantations-card{margin-bottom:40px !important;border-radius:16px !important;overflow:hidden !important;}
   #agt-legality{margin-top:8px !important;}
   #agt-survey-phone{display:none !important;}
  #agt-table{overflow:hidden !important;}
  #agt-table > div{min-width:0 !important;width:100% !important;}
  #agt-table > div > div[style*="grid-template-columns"]{grid-template-columns:1.4fr repeat(5,1fr) !important;min-width:0 !important;}
  #agt-table > div > div[style*="grid-template-columns"]{grid-template-columns:1.4fr repeat(5,1fr) !important;min-width:0 !important;min-height:0 !important;padding:0 !important;}
  #agt-table > div > div[style*="grid-template-columns"] > span{white-space:normal !important;overflow:visible !important;text-overflow:clip !important;word-break:normal !important;overflow-wrap:break-word !important;hyphens:none !important;font-size:8px !important;line-height:1.15 !important;padding:3px 2px !important;min-height:0 !important;}
  #agt-table > div > div[style*="grid-template-columns"]:first-child > span{font-size:7.5px !important;letter-spacing:0 !important;}
  #agt-table > div > div[style*="grid-template-columns"] > span .ms{font-size:12px !important;}




  /* Testimonial cards (ALL pages): lighter, smaller, more readable quote on mobile and desktop static blocks */
  section .wrap > div:has(> span.ms:first-child + p){padding:28px 24px !important;}
  section .wrap > div:has(> span.ms:first-child + p) > p{font-size:15.5px !important;font-weight:400 !important;line-height:1.7 !important;color:#3a4257 !important;}
  section .wrap > div:has(> span.ms:first-child + p) > span.ms:first-child{font-size:34px !important;}

  /* Gated collateral cards: stack + center on mobile; keep each card's own background */
  section div:has(> div > a[data-gate-download]){flex-direction:column !important;align-items:center !important;text-align:center !important;gap:16px !important;padding:32px 24px !important;}
  section div:has(> div > a[data-gate-download]) > div:first-child{display:none !important;}
  section div:has(> div > a[data-gate-download]) > div{min-width:0 !important;width:100% !important;}
  section div:has(> a[data-gate-download]) > div:first-child::before{content:"picture_as_pdf";font-family:'Material Symbols Outlined';font-weight:normal;font-size:17px;text-transform:none !important;letter-spacing:normal;vertical-align:-3px;margin-right:6px;display:inline-block;}
  section div:has(> a[data-gate-download]){width:100% !important;min-width:0 !important;}
  section div:has(> a[data-gate-download]) > *{max-width:100%;}
  section div:has(> a[data-gate-download]) > a[data-gate-download]{display:flex !important;width:-moz-max-content;width:max-content;max-width:100%;margin-left:auto !important;margin-right:auto !important;justify-content:center;}
  section div:has(> div > a[data-gate-download]) a[data-gate-download]{margin-left:auto !important;margin-right:auto !important;}
  section div:has(> div > a[data-gate-download]) p{margin-left:auto !important;margin-right:auto !important;}

  /* Solutions page: 4-step grid 2-up; wide track diagram scaled to fit */
  #sol-steps{grid-template-columns:1fr 1fr !important;gap:4px 16px !important;}
  #sol-diagram-card{padding:14px 10px !important;overflow:hidden !important;}
  #sol-diagram{zoom:0.28 !important;overflow:hidden !important;}

  /* Nordic Carbon regulatory-timeline cards: text-heavy, keep 1 per row */
  #ncarbon-timeline{grid-template-columns:1fr !important;}

  /* Upstream/downstream connector arrow: point down when cards stack */
  [data-flow-arrow]{padding:6px 0 !important;}
  [data-flow-arrow] .ms{transform:rotate(90deg);}

  /* "Built for" role chips: tidy full-width stack on mobile (no ragged wrap gaps) */
  [data-roles-bar]{flex-direction:column !important;align-items:stretch !important;gap:8px !important;}
  [data-roles-bar] > span[data-role]{width:100% !important;box-sizing:border-box !important;text-align:left !important;}

  /* Type scale */
  h1{font-size:31px !important;line-height:1.15 !important;}
  h2{font-size:25px !important;line-height:1.2 !important;}

  /* Header: hide desktop nav, mega menus and header CTAs; show burger */
  nav{display:none !important;}
  #solutions-menu,#resources-menu{display:none !important;}
  div[style*="sticky"] a[href*="admin"]{display:none !important;}
  div[style*="sticky"] a[href*="hsforms"]{display:none !important;}
  div[style*="sticky"] a[href*="book-a-demo"]{display:none !important;}
  #agd-mobile-actions{position:fixed;top:var(--agd-actions-top,14px);right:16px;z-index:150;display:flex;align-items:center;gap:8px;touch-action:manipulation;}
  body.agd-search-open #agd-mobile-actions,body.agd-search-open #agd-topbar{display:none !important;}
  #search-trigger,[data-injected-search]{display:none !important;}
  #agd-mobile-search{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border:1px solid #e6e9f2;border-radius:50%;background:#fff;box-shadow:0 6px 18px rgba(0,20,60,.18);cursor:pointer;padding:0;}
  #agd-mobile-actions .agd-lang-switch{background:#fff;border:1px solid #e6e9f2;border-radius:50%;box-shadow:0 6px 18px rgba(0,20,60,.18);}
  .agd-burger{position:static;z-index:150;display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border:none;border-radius:50%;background:linear-gradient(100deg,#ff5151 0%,#c14a8a 45%,#4f52c4 100%);box-shadow:0 10px 28px rgba(60,45,150,.45);cursor:pointer;padding:0;}
  #agd-mobile-actions button,#agd-mobile-actions button *{pointer-events:auto;touch-action:manipulation;}
  #agd-mobile-actions button > span,#agd-mobile-actions button svg{pointer-events:none;}
  .wrap:has(#agd-burger) a[href*="hsforms"]{display:none !important;}
  .wrap:has(#agd-burger) a[href*="book-a-demo"]{display:none !important;}
  #agd-topbar{display:flex;position:fixed;top:0;left:0;right:0;height:60px;z-index:149;align-items:center;padding:0 18px;background:#fff;border-bottom:1px solid #eef0f4;box-shadow:0 2px 10px rgba(0,20,60,.06);transform:translateY(-100%);transition:transform .25s ease;}
  #agd-topbar.show{transform:translateY(0);}
  #agd-topbar img{height:26px;}

  /* Blog page mobile layout */
  .blog-page section > div{padding-left:20px !important;padding-right:20px !important;}
  .blog-page h1{font-size:34px !important;line-height:1.1 !important;}
  .blog-page h2{font-size:24px !important;line-height:1.2 !important;}
  .blog-page h3{font-size:18px !important;}
  .blog-page article{grid-template-columns:1fr !important;min-height:0 !important;}
  .blog-page article > div:first-child{min-height:200px !important;aspect-ratio:16 / 10 !important;}
  .blog-page article > div:last-child{padding:22px !important;}
  .blog-page section > div[style*="grid-template-columns"]{grid-template-columns:1fr !important;gap:16px !important;}
  .blog-page section > div > div[style*="grid-template-columns"]{grid-template-columns:1fr !important;gap:16px !important;}
  .blog-page section > div[style*="padding: 56px 56px"],
  .blog-page section > div > div[style*="padding: 56px 56px"]{padding:32px 24px !important;}

  /* Home "How it works" 4-step flow: vertical left gradient spine on mobile */
  #how-it-works > div > div[style*="grid-template-columns"]{position:relative !important;padding-left:32px !important;gap:16px !important;margin-top:36px !important;}
  #how-it-works > div > div[style*="grid-template-columns"] > div[style*="linear-gradient(90deg"]{top:12px !important;bottom:12px !important;left:10px !important;right:auto !important;width:2px !important;height:auto !important;background:linear-gradient(180deg,rgba(255,81,81,.6),rgba(7,80,224,.85)) !important;margin-left:0 !important;}
  #how-it-works > div > div[style*="grid-template-columns"] > div[style*="railFlow"]{top:auto !important;left:11px !important;width:9px !important;height:9px !important;margin-left:-4px !important;animation:railFlowV 4.4s linear infinite !important;}

}

@keyframes railFlowV {
  0% { top: 12px; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: calc(100% - 12px); opacity: 0; }
}



