/* Desktop spacing tighten + trust Integrations chips.
   Desktop dead-space rules are inside @media (min-width:1024px) only.
   Integrations chip layout applies at all widths (Moe). */

/* ===== Trust Integrations chips (all widths) ===== */
#trust-home .int-wide{
  padding:18px 18px 16px;
}
#trust-home .int-wide h3{
  margin:0 0 10px;
  font-size:17px;
}
#trust-home .int-wide .int-logos{
  display:grid;
  grid-template-columns:repeat(7, minmax(0,1fr));
  gap:10px;
  margin-top:0;
  align-items:stretch;
}
#trust-home .int-wide .int-chip,
#trust-home .int-wide .int-logos > span{
  width:auto!important;
  height:auto!important;
  min-height:56px;
  flex:none;
  display:flex!important;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  background:#f4f7fc;
  border:1px solid #e1e9f5;
  box-sizing:border-box;
}
#trust-home .int-wide .int-chip img,
#trust-home .int-wide .int-logos img{
  width:40px;
  height:40px;
  flex:0 0 40px;
  display:block;
  object-fit:contain;
}
#trust-home .int-wide .int-chip b,
#trust-home .int-wide .int-logos b{
  font-size:15px;
  font-weight:700;
  line-height:1.2;
  color:var(--text,#1d1d1f);
  letter-spacing:-.01em;
}
#trust-home .int-wide .int-chip.int-api,
#trust-home .int-wide .int-api{
  justify-content:center;
  color:#ea580c;
  background:color-mix(in srgb,#ea580c 8%,#fff);
  border-color:color-mix(in srgb,#ea580c 28%,#e1e9f5);
}
#trust-home .int-wide .int-api svg{
  width:20px;height:20px;flex:0 0 20px;
}
#trust-home .int-wide .int-plus{
  color:var(--muted,#515154);
  background:#f4f7fc;
  border-color:#e1e9f5;
}
html[data-theme="dark"] #trust-home .int-wide .int-chip,
html[data-theme="dark"] #trust-home .int-wide .int-logos > span{
  background:#121316;
  border-color:#2a2e36;
}
html[data-theme="dark"] #trust-home .int-wide .int-chip b{
  color:#f3f4f6;
}
html[data-theme="dark"] #trust-home .int-wide .int-api{
  background:color-mix(in srgb,#ea580c 16%,#121316);
  border-color:color-mix(in srgb,#ea580c 40%,#2a2e36);
  color:#ff7a1a;
}
html[data-theme="dark"] #trust-home .int-wide .int-plus{
  color:#9ca3af;
  background:#121316;
  border-color:#2a2e36;
}

@media (max-width:1023px){
  #trust-home .int-wide .int-logos{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  #trust-home .int-wide .int-chip{min-height:48px;padding:8px 10px;gap:8px}
  #trust-home .int-wide .int-chip img{width:32px;height:32px;flex-basis:32px}
  #trust-home .int-wide .int-chip b{font-size:13.5px}
}
@media (max-width:560px){
  #trust-home .int-wide .int-logos{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* ===== Desktop-only dead-space tighten ===== */
@media (min-width:1024px){
  /* Section rhythm */
  main > section:not(.hero):not(.phero){padding:56px 0}
  main > section.hero{/* leave hero breathing room */}
  .phero{padding:96px 0 36px}
  .head{margin-bottom:28px}
  .head .h2{margin-top:10px}
  .head .lead{margin-top:12px;max-width:560px}
  .lead{max-width:560px}

  /* Cards / grids */
  .card{padding:22px 22px;border-radius:18px}
  .card h3{margin-top:14px;font-size:19px}
  .card p{margin-top:8px;font-size:14.5px;line-height:1.5}
  .card .ico{width:42px;height:42px;border-radius:12px}
  .card .ico svg{width:20px;height:20px}
  .grid{gap:16px;align-items:start}
  .bento{gap:14px;align-items:start}
  .bento > .card{padding:20px 18px}
  .bento h3{font-size:20px;margin-top:10px}
  .bento .link{padding-top:14px}

  /* Index: modules explorer */
  #modules .mx{gap:18px}
  #modules .mx-tabs{gap:8px}
  #modules .mx-panel{gap:20px}
  #modules .head{margin-bottom:22px}

  /* Index: AI / workspace */
  #aiw .head{margin-bottom:22px}
  #aiw .grid,#aiw .aiw-grid{gap:16px;align-items:start}
  #aiw .card,#aiw .aiw-card{padding:20px 20px}
  #aiw .ws-tile{padding:14px 12px;min-height:0}

  /* Index: proof / industries / trust / cta */
  #cs-proof .head,#industries-home .head,#trust-home .head,#compare .head{margin-bottom:22px}
  #industries-home .indgrid{gap:12px}
  #industries-home .ind-tile{padding:16px 14px;min-height:0;gap:10px}
  #industries-home .ind-ic{width:40px;height:40px;border-radius:12px}
  #industries-home .ind-ic svg{width:20px;height:20px}
  #industries-home .ind-lbl{font-size:14.5px}
  #industries-home .ind-note{margin-top:14px}
  #trust-home .grid{gap:14px;align-items:start}
  #trust-home .card{padding:20px 20px}
  #trust-home .int-wide{padding:16px 16px 14px}
  #trust-home .int-wide .int-logos{gap:8px}
  #trust-home .int-wide .int-chip{min-height:58px;padding:10px 12px}
  #cta{padding:64px 0}
  #cta .head,#cta .h2{margin-bottom:10px}
  #calc-entry{padding:40px 0}
  #compare{padding:56px 0}
  /* Keep vs-card visual rules untouched — spacing only around section chrome */
  #compare .vs-grid{gap:18px}
  #compare .vs-card{padding:24px 22px 14px}

  /* Logos / brand strips */
  .logos{gap:10px}
  .logos img,.lg img{max-height:28px;width:auto}
  .int-logos:not(#trust-home .int-logos){gap:8px;margin-top:14px}

  /* Features page */
  .page-features .phero + section,
  .page-features main > section{padding-top:40px}
  .page-features .shotstrip{padding-top:0;padding-bottom:24px}
  .page-features .ft-card{padding:16px 16px}
  .page-features .ft-card h3{font-size:15.5px}
  .page-features .ft-card p{font-size:13.5px;margin-top:6px}
  .page-features details{margin-bottom:12px}
  .ft-bar{padding:12px 0;gap:10px}

  /* Spark AI */
  body.page-rue-ai main > section:not(.phero),
  body.page-rue-ai main > section:not(.phero){padding:52px 0}
  .phones{gap:16px}
  .phones figure{margin:0}

  /* Case study */
  .page-case-study main > section:not(.phero){padding:48px 0}
  .page-case-study .cs-sec{padding:18px 0}
  .page-case-study .cs-shots{padding:14px 4px 8px;gap:12px}
  .page-case-study .cs-shots img{height:300px}
  .page-case-study .wc-stats{gap:12px}
  .page-case-study .wc-card{padding:16px 16px}

  /* FAQ / pricing */
  .page-faq main > section:not(.phero),
  body.page-faq main > section:not(.phero){padding:48px 0}
  .fq-acc{margin-bottom:8px}
  .qa{padding:18px 18px}

  /* Integrations / security / hosting / workspace / implementation / about */
  .page-integrations main > section:not(.phero),
  .page-security main > section:not(.phero),
  .page-hosting main > section:not(.phero),
  .page-workspace main > section:not(.phero),
  .page-implementation main > section:not(.phero),
  .page-about main > section:not(.phero),
  .page-get-started main > section:not(.phero),
  .page-contact main > section:not(.phero),
  .page-calculator main > section:not(.phero){padding:48px 0}
  .contact .wrap,.contact-page .wrap{gap:36px}
  .steps4{gap:12px;margin-top:22px}
  .steps4 .st{padding:16px 16px}

  /* Orphan / short cards: hug content */
  .grid.g3 > .card,
  .grid.g2 > .card,
  .bento > .card{align-self:start;min-height:0}
  .parts .card{padding:22px 20px}

  /* Footer a bit tighter */
  footer{padding:36px 0 28px}

  /* Dark mode: keep tightened cards readable (don't override vs gradients) */
  html[data-theme="dark"] .card:not(.vs-card):not(.vs-yes):not(.vs-no),
  html[data-theme="dark"] .ft-card,
  html[data-theme="dark"] #trust-home .int-chip{
    /* inherit existing dark card surface */
  }
}
