/* DataIT v242m (staging mockup): tighter mobile first screen.
   Phones only (max-width:480px). Desktop and tablet (481px and up) are untouched.
   Layout and spacing only: same plates, same artwork, same chassis rails and LED bars, no new graphics.
   Goal: the home H1 and the BUY / SELL tiles sit above the 56px cookie bar before Accept / Reject. */
@media (max-width:480px){
  /* ---- Home marks stack: compact (R2, women/minority owned and SERI in one row; ISO marks in a second row) ---- */
  html body .datait-r2-topbar.datait-r2-topbar--marks{
    margin-top:8px;
    padding-top:8px;
    padding-bottom:8px;
  }
  html body .datait-r2-topbar--marks .datait-r2-row{
    grid-template-columns:1fr 1fr 1fr;
    grid-template-areas:"r2 owned seri" "iso iso iso";
    gap:6px;
  }
  html body .datait-r2-topbar--marks .datait-r2-plate{
    padding:6px 4px;
    gap:3px;
    border-width:4px;
    border-image-width:4px;
  }
  html body .datait-r2-topbar--marks .datait-r2-p-r2 img{height:40px;padding:2px !important}
  html body .datait-r2-topbar--marks .datait-r2-p-r2 span{font-size:clamp(9px,2.6vw,11px);letter-spacing:.06em}
  html body .datait-r2-topbar--marks .datait-r2-p-owned p{font-size:clamp(9px,2.7vw,11px);line-height:1.15;letter-spacing:.04em}
  html body .datait-r2-topbar--marks .datait-r2-p-seri img{height:50px;padding:2px}
  html body .datait-r2-topbar--marks .datait-r2-p-iso{padding:6px 4px}
  html body .datait-r2-topbar--marks .datait-r2-marks{gap:6px}
  html body .datait-r2-topbar--marks .datait-r2-marks img{height:76px;padding:2px}

  html body .live-image-header + .datait-r2-topbar.datait-r2-topbar--marks{margin-top:8px !important}

  /* ---- Home hero: photo strip shorter, copy tighter, BUY / SELL always two across ---- */
  html:not([data-cookie-consent]) body .live-hero-base.hf15-hero-pinned .live-hero-slides,
  html[data-cookie-consent] body .live-hero-base.hf15-hero-pinned .live-hero-slides{
    aspect-ratio:16 / 6 !important;
  }
  html body main#main-content .live-hero-base.hf15-hero-pinned .live-hero-copy-panel .live-hero-eyebrow{
    margin-bottom:4px !important;
  }
  html body main#main-content .live-hero-base.hf15-hero-pinned .live-hero-copy-panel .live-hero-summary{
    min-height:0 !important;
    margin-top:4px !important;
    font-size:.86rem !important;
    line-height:1.3 !important;
  }
  html body main#main-content .live-hero-base.hf15-hero-pinned .live-hero-copy-panel .live-hero-actions{
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
    margin-top:6px !important;
  }
  html body main#main-content .live-hero-base.hf15-hero-pinned .live-hero-copy-panel .live-hero-actions a{
    min-height:0 !important;
    padding:6px 8px !important;
    gap:1px !important;
  }
}
/* Short phones (320x568, 375x667): BUY / SELL come right after the headline, the summary follows them. */
@media (max-width:480px) and (max-height:700px){
  html:not([data-cookie-consent]) body .live-hero-base.hf15-hero-pinned .live-hero-slides,
  html[data-cookie-consent] body .live-hero-base.hf15-hero-pinned .live-hero-slides{
    aspect-ratio:16 / 4 !important;
  }
  html body main#main-content .live-hero-base.hf15-hero-pinned .live-hero-copy-panel{display:flex !important;flex-direction:column}
  html body main#main-content .live-hero-base.hf15-hero-pinned .live-hero-copy-panel .live-hero-actions{order:3}
  html body main#main-content .live-hero-base.hf15-hero-pinned .live-hero-copy-panel .live-hero-summary{order:4}
}

/* Taller phones have the room: keep the original photo proportion. */
@media (max-width:480px) and (min-height:780px){
  html:not([data-cookie-consent]) body .live-hero-base.hf15-hero-pinned .live-hero-slides,
  html[data-cookie-consent] body .live-hero-base.hf15-hero-pinned .live-hero-slides{
    aspect-ratio:16 / 8 !important;
  }
}
/* Very narrow (320): ISO marks a little smaller so BUY / SELL clear the cookie bar with a gap. */
@media (max-width:340px){
  html body .datait-r2-topbar--marks .datait-r2-marks img{height:68px}
}

/* =====================================================================
   Inner pages (about, services, each service page, contact, policies, areas, case studies, certifications):
   compact certification band, no CTA lifts, hero copy tighter, so hero CTAs clear the 56px cookie bar.
   ===================================================================== */
@media (max-width:480px){
  /* Certification band: one row, tighter, same plates and artwork */
  html body .live-image-header + .datait-r2-topbar.datait-r2-topbar--inner{margin-top:8px !important}
  html body .datait-r2-topbar.datait-r2-topbar--inner .datait-r2-inner-plate{padding:6px 10px !important;border-width:5px}
  html body .datait-r2-topbar.datait-r2-topbar--inner .datait-r2-badges{flex-wrap:nowrap !important;width:auto;gap:8px !important;justify-content:center}
  html body .datait-r2-topbar.datait-r2-topbar--inner .datait-r2-badge img{height:44px !important}

  /* The v241d short-phone lifts slid CTA rows up over the copy. Reset them; the hero is tightened instead. */
  html:not([data-cookie-consent]) body .decomm-hero .decomm-cta-row,
  html:not([data-cookie-consent]) body .decomm-hero:not(:has(.well)) .decomm-cta-row,
  html:not([data-cookie-consent]) body .decomm-hero:has(.well) .decomm-cta-row,
  html:not([data-cookie-consent]) body .decomm-hero-copy .decomm-cta-row{transform:none !important}

  /* Hero CTA row: two across */
  html body main#main-content .decomm-hero .decomm-cta-row{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:8px !important;
    margin-top:8px !important;
  }
  html body main#main-content .decomm-hero .decomm-cta-row a{
    width:auto !important;
    min-width:0 !important;
    min-height:52px !important;
    padding:6px 8px !important;
    margin:0 !important;
    display:flex !important;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
  }
  html body main#main-content .decomm-hero .decomm-cta-row a strong{font-size:.86rem !important;line-height:1.15 !important}
  html body main#main-content .decomm-hero .decomm-cta-row a small{font-size:.66rem !important;line-height:1.1 !important}

  /* Hero copy */
  html body main#main-content .decomm-hero .chassis-face p.v222-answer,
  html body main#main-content .decomm-hero .chassis-face p.hf15-copy-lead{
    font-size:.9rem !important;
    line-height:1.3 !important;
    margin:6px 0 0 !important;
  }
}

/* Hero order on phones: kicker, headline, then the call-to-action buttons, then the supporting copy and photo.
   Layout only (flex order); the markup and the words are unchanged. Keeps every hero button above the cookie bar. */
@media (max-width:480px){
  html body main#main-content .decomm-hero .chassis-face:has(.decomm-cta-row){
    display:flex !important;
    flex-direction:column;
    align-items:stretch;
  }
  html body main#main-content .decomm-hero .chassis-face:has(.decomm-cta-row) .decomm-hero-grid,
  html body main#main-content .decomm-hero .chassis-face:has(.decomm-cta-row) .decomm-hero-copy{display:contents !important}
  html body main#main-content .decomm-hero .chassis-face:has(.decomm-cta-row) > *,
  html body main#main-content .decomm-hero .chassis-face:has(.decomm-cta-row) .decomm-hero-copy > *{order:3 !important}
  html body main#main-content .decomm-hero .chassis-face:has(.decomm-cta-row) .well{order:4 !important}
  html body main#main-content .decomm-hero .chassis-face:has(.decomm-cta-row) > .chassis-kicker{order:0 !important}
  html body main#main-content .decomm-hero .chassis-face:has(.decomm-cta-row) > h1{order:1 !important}
  html body main#main-content .decomm-hero .chassis-face:has(.decomm-cta-row) > .decomm-cta-row,
  html body main#main-content .decomm-hero .chassis-face:has(.decomm-cta-row) .decomm-hero-copy > .decomm-cta-row{order:2 !important;margin-bottom:10px !important}
}

/* Contact: phone and email plates sit together at the top of the status panel (before the response-time readout). */
@media (max-width:480px){
  html body .chassis-contact .chassis-console-status a.chassis-recessed-plate[href^="mailto:"]{order:-1 !important}
  html body .chassis-contact .chassis-console-status a.chassis-recessed-plate{padding:10px 14px !important}
}
/* Hero button labels: whole words, no mid-word breaks (DECOMMISSIONING at 360). */
@media (max-width:480px){
  html body main#main-content .decomm-hero .decomm-cta-row a strong{
    letter-spacing:.02em !important;
    overflow-wrap:normal !important;
    word-break:normal !important;
    hyphens:none !important;
  }
}
@media (max-width:380px){
  html body main#main-content .decomm-hero .decomm-cta-row a strong{font-size:.78rem !important}
}

/* Services hub: the DECOMMISSIONING label is one long word, so its two buttons stack on narrow phones. */
@media (max-width:480px){
  html body main#main-content .decomm-hero .decomm-cta-row:has(> a[href$="/services/data-center-decommissioning/"]) a strong{font-size:.76rem !important;letter-spacing:.01em !important}
}
@media (max-width:400px){
  html body main#main-content .decomm-hero .decomm-cta-row:has(> a[href$="/services/data-center-decommissioning/"]){grid-template-columns:1fr !important}
}

/* 320 to 380: the phone number stays on one line inside its button. */
@media (max-width:380px){
  html body main#main-content .decomm-hero .decomm-cta-row a[href^="tel:"]{padding-left:4px !important;padding-right:4px !important}
  html body main#main-content .decomm-hero .decomm-cta-row a[href^="tel:"] strong{white-space:nowrap !important;font-size:.72rem !important;letter-spacing:0 !important}
}
