/**
 * Duct Masters — shared mobile polish (all pages)
 * Desktop is unchanged — rules below are inside max-width media queries only.
 */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.dm-home-mobile-only {
  display: none;
}

/* Sticky mobile action bar — hidden on desktop */
.dm-mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  padding: 8px 12px;
  gap: 8px;
  box-shadow: 0 -4px 24px rgba(15, 40, 64, 0.12);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  align-items: stretch;
  box-sizing: border-box;
}

.dm-topbar-link.is-active {
  color: var(--white);
  font-weight: 700;
}

/* “5 questions before you hire” pill — Version B (cyan glass) */
.dm-topbar-guide {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 14px 5px 8px;
  border-radius: 8px;
  border: 1px solid rgba(41, 171, 226, 0.45);
  background: linear-gradient(135deg, rgba(41, 171, 226, 0.22) 0%, rgba(26, 86, 160, 0.18) 100%);
  color: #e0f2fe;
  text-decoration: none;
  line-height: 1.15;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  flex-shrink: 0;
}
.dm-topbar-guide:hover {
  background: linear-gradient(135deg, rgba(41, 171, 226, 0.32) 0%, rgba(26, 86, 160, 0.26) 100%);
  border-color: rgba(91, 196, 240, 0.7);
  color: #fff;
  transform: translateY(-1px);
}
.dm-topbar-guide.is-active {
  background: linear-gradient(135deg, rgba(41, 171, 226, 0.38) 0%, rgba(26, 86, 160, 0.32) 100%);
  border-color: rgba(91, 196, 240, 0.85);
  color: #fff;
}
.dm-topbar-guide-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--brand-light, #29abe2);
  color: var(--navy-dark, #0f2840);
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  line-height: 1;
}
.dm-topbar-guide-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.dm-topbar-guide-line {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
  color: #fff;
}
.dm-topbar-guide-sub {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.88;
}

@media (max-width: 960px) {
  html {
    scroll-padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  /* ── Mobile header: one clean white block (no dark navy strip) ── */
  .dm-site-header {
    background: #ffffff;
    box-shadow: 0 1px 0 #e2e8f0;
  }

  .dm-topbar {
    background: #ffffff;
    color: #1e293b;
    border-bottom: none;
  }

  .dm-topbar-inner {
    padding-top: 8px;
    padding-bottom: 4px;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .dm-topbar-left,
  .dm-topbar-right {
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
  }

  .dm-topbar-left {
    flex: 1;
    min-width: 0;
  }

  .dm-topbar-right {
    flex-shrink: 0;
  }

  /* Phone is in the sticky bottom bar — drop from topbar on phones */
  .dm-topbar-phone {
    display: none;
  }

  .dm-topbar-book {
    padding: 6px 12px;
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .dm-topbar-guide {
    padding: 5px 12px 5px 5px;
    gap: 8px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #1a56a0 0%, #0f2840 100%);
    border: 1.5px solid #29abe2;
    box-shadow: 0 2px 10px rgba(26, 86, 160, 0.28);
    color: #ffffff;
  }

  .dm-topbar-guide:hover {
    background: linear-gradient(135deg, #1e65b8 0%, #143552 100%);
    border-color: #5bc4f0;
    box-shadow: 0 4px 14px rgba(26, 86, 160, 0.35);
    color: #ffffff;
    transform: translateY(-1px);
  }

  .dm-topbar-guide.is-active {
    background: linear-gradient(135deg, #1e65b8 0%, #143552 100%);
    border-color: #5bc4f0;
  }

  .dm-topbar-guide-num {
    min-width: 28px;
    height: 28px;
    font-size: 14px;
    border-radius: 7px;
    background: #29abe2;
    color: #0f2840;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  }

  .dm-topbar-guide-text {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 5px;
    row-gap: 0;
    line-height: 1.2;
  }

  .dm-topbar-guide-line {
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    color: #ffffff;
    letter-spacing: 0.02em;
  }

  .dm-topbar-guide-sub {
    display: inline;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.9);
    opacity: 1;
  }

  .dm-topbar-guide-sub::before {
    content: "·";
    margin-right: 5px;
    opacity: 0.65;
    font-weight: 800;
  }

  .dm-lang-toggle {
    min-width: 36px;
    height: 28px;
    padding: 0 8px;
    font-size: 11px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #1a3a5c;
  }

  .dm-lang-toggle:hover {
    border-color: #1a56a0;
    background: #e8f4fc;
    color: #0f2840;
  }

  .dm-brand-header {
    padding: 2px 0 8px;
    border-bottom: none;
  }

  .dm-brand-header-inner {
    gap: 12px;
  }

  .dm-page {
    padding-bottom: calc(var(--dm-bar-offset, 76px) + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Homepage has 3 buttons (Call + Callback + Book) — needs more clearance */
  body:has(.dm-mb-callback) {
    --dm-bar-offset: 88px;
  }

  .dm-mobile-bar {
    display: flex;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }

  .dm-mobile-bar a,
  .dm-mobile-bar button {
    flex: 1;
    min-width: 0;
    text-align: center;
    padding: 10px 6px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    line-height: 1.25;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
  }

  .dm-mobile-bar button {
    appearance: none;
    -webkit-appearance: none;
  }

  .dm-mb-call {
    background: #f8fafc;
    color: #1a3a5c;
    border: 1px solid #e2e8f0;
  }

  .dm-mb-callback {
    background: #1a56a0;
    color: #fff;
    border: none;
  }

  .dm-mb-book {
    background: #1a3a5c;
    color: #fff;
    border: none;
  }

  .dm-page input,
  .dm-page select,
  .dm-page textarea {
    font-size: 16px;
  }

  .dm-page img {
    max-width: 100%;
    height: auto;
  }

  .dm-svc-sticky-inner {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .dm-svc-sticky a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    scroll-snap-align: start;
  }

  /* Extra space so last cards/sections aren't hidden behind sticky bar while scrolling */
  .dm-section,
  .dm-reviews,
  .dm-give,
  .dm-cta,
  .dm-truck,
  .dm-features {
    scroll-margin-bottom: 12px;
  }

  .dm-steps .dm-step:last-child,
  .dm-section:last-of-type {
    margin-bottom: 8px;
  }

  .dm-logo img {
    height: 40px;
    width: auto;
  }

  .dm-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    margin-left: 8px;
    flex-shrink: 0;
  }

  .dm-lang-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .dm-main-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .dm-trust-strip {
    padding-left: 4%;
    padding-right: 4%;
  }

  .dm-trust-strip p {
    font-size: 13px;
    line-height: 1.55;
  }

  .dm-svc-sticky,
  .dm-off-policy,
  .dm-off-list,
  .dm-off-loyalty,
  .dm-svc-cat,
  .dm-svc-featured,
  [id="packages"],
  [id="highlights"],
  [id="conditions"],
  [id="alacarte"],
  [id="policy"],
  [id="offers"],
  [id="loyalty"],
  [id="why-us"],
  [id="q1"],
  [id="q2"],
  [id="q3"],
  [id="q4"],
  [id="q5"],
  [id="checklist"],
  .dm-hire-q,
  .dm-hire-checklist {
    scroll-margin-top: 64px;
  }

  .dm-page[data-dm-page="hire"] .dm-svc-sticky {
    top: 88px;
  }

  .dm-page[data-dm-page="hire"] .dm-hire-q,
  .dm-page[data-dm-page="hire"] .dm-hire-checklist {
    scroll-margin-top: 140px;
  }

  .dm-btn {
    min-height: 48px;
  }

  /* ── Homepage mobile: shorter flow, less scroll ── */
  .dm-home-mobile-hide {
    display: none !important;
  }

  .dm-page[data-dm-page="home"] .dm-home-mobile-only {
    display: block;
  }

  .dm-page[data-dm-page="home"] .dm-hero h1 > span:first-child:empty {
    display: none;
  }

  .dm-page[data-dm-page="home"] .dm-hero-inner {
    padding-top: 24px;
    padding-bottom: 28px;
    gap: 20px;
  }

  .dm-page[data-dm-page="home"] .dm-hero h1 {
    font-size: clamp(1.45rem, 6vw, 1.85rem);
    line-height: 1.2;
    margin-bottom: 14px;
  }

  .dm-page[data-dm-page="home"] .dm-hero-lead {
    font-size: 15px;
    line-height: 1.55;
    margin-bottom: 18px;
  }

  .dm-page[data-dm-page="home"] .dm-hero-callout {
    padding: 10px 12px;
    margin-bottom: 14px;
  }

  .dm-page[data-dm-page="home"] .dm-hero-callout p {
    font-size: 13px;
    line-height: 1.5;
  }

  .dm-page[data-dm-page="home"] .dm-metrics {
    display: none;
  }

  .dm-page[data-dm-page="home"] .dm-collage-bg-1,
  .dm-page[data-dm-page="home"] .dm-collage-bg-2,
  .dm-page[data-dm-page="home"] .dm-collage-bg-3,
  .dm-page[data-dm-page="home"] .dm-collage-bg-4 {
    display: none !important;
  }

  .dm-page[data-dm-page="home"] .dm-collage-stage,
  .dm-page[data-dm-page="home"] .dm-collage {
    min-height: 0;
    height: auto;
  }

  .dm-page[data-dm-page="home"] .dm-collage-main {
    position: relative;
    inset: auto;
    transform: none;
    width: min(260px, 72vw);
    margin: 0 auto;
    display: block;
  }

  .dm-page[data-dm-page="home"] .dm-cert-hub-head h2 {
    font-size: 1.35rem;
    line-height: 1.25;
  }

  .dm-page[data-dm-page="home"] .dm-cert-hub-head p,
  .dm-page[data-dm-page="home"] .dm-intro {
    font-size: 15px;
    line-height: 1.55;
  }

  .dm-page[data-dm-page="home"] .dm-analogy {
    margin: 0 auto 0;
    padding: 16px 16px;
    border-left-width: 3px;
    border-radius: 10px 10px 0 0;
  }

  .dm-page[data-dm-page="home"] .dm-analogy-label {
    font-size: 10px;
    margin-bottom: 8px;
  }

  .dm-page[data-dm-page="home"] .dm-analogy p {
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 10px;
  }

  .dm-page[data-dm-page="home"] .dm-cert-bridge {
    margin: 0 0 14px;
    padding: 16px 14px 12px;
    text-align: center;
    background: linear-gradient(160deg, #0f2840 0%, #1a56a0 55%, #1e6bb8 100%);
    border-radius: 0 0 10px 10px;
    color: #fff;
    box-shadow: 0 6px 20px rgba(15, 40, 64, 0.14);
  }

  .dm-page[data-dm-page="home"] .dm-cert-bridge-kicker {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    margin: 0 0 8px;
  }

  .dm-page[data-dm-page="home"] .dm-cert-bridge-lead {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 12px;
    color: #fff;
  }

  .dm-page[data-dm-page="home"] .dm-cert-bridge-lead strong {
    color: #7dd3fc;
    font-weight: 700;
  }

  .dm-page[data-dm-page="home"] .dm-cert-bridge-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
  }

  .dm-page[data-dm-page="home"] .dm-cert-bridge-chip {
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    white-space: nowrap;
  }

  .dm-page[data-dm-page="home"] .dm-cert-bridge-chevron {
    display: block;
    font-size: 16px;
    line-height: 1;
    opacity: 0.65;
    margin-top: 2px;
  }

  /* Trust cert cards — logos slightly smaller; text stays readable */
  .dm-page[data-dm-page="home"] .dm-trust-badges {
    padding: 0 4% 28px;
  }

  .dm-page[data-dm-page="home"] .dm-cert-hub-head {
    margin-bottom: 16px;
  }

  .dm-page[data-dm-page="home"] .dm-trust-panel {
    gap: 12px;
  }

  .dm-page[data-dm-page="home"] .dm-trust-card {
    padding: 16px 14px 14px;
    border-radius: 10px;
  }

  .dm-page[data-dm-page="home"] .dm-trust-card-logo {
    height: 46px;
    max-height: 46px;
    max-width: 150px;
    margin-bottom: 8px;
    object-fit: contain;
  }

  .dm-page[data-dm-page="home"] .dm-trust-card-label {
    font-size: 12px;
    margin-bottom: 10px;
    line-height: 1.4;
  }

  .dm-page[data-dm-page="home"] .dm-trust-card-foot {
    margin-top: 12px;
    padding-top: 10px;
  }

  .dm-page[data-dm-page="home"] .dm-trust-card-link {
    font-size: 13px;
  }

  .dm-page[data-dm-page="home"] .dm-cert-mini-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .dm-page[data-dm-page="home"] .dm-cert-mini {
    padding: 8px 4px;
    border-radius: 6px;
  }

  .dm-page[data-dm-page="home"] .dm-cert-mini-code {
    font-size: 13px;
  }

  .dm-page[data-dm-page="home"] .dm-cert-mini-id {
    font-size: 9px;
    margin-top: 2px;
  }

  .dm-page[data-dm-page="home"] .dm-trust-card.nadca .dm-trust-card-stat {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.2;
  }

  .dm-page[data-dm-page="home"] .dm-trust-card-tags {
    font-size: 12px;
    line-height: 1.45;
  }

  .dm-page[data-dm-page="home"] .dm-trust-card.google .rplg-badge-logo svg {
    width: 46px;
    height: 46px;
  }

  .dm-page[data-dm-page="home"] .dm-trust-card.google .rplg-badge2-btn {
    gap: 6px;
  }

  .dm-page[data-dm-page="home"] .dm-trust-card.google .rplg-biz-score {
    font-size: 26px;
    line-height: 1;
  }

  .dm-page[data-dm-page="home"] .dm-trust-card.google .rplg-stars svg {
    width: 16px;
    height: 16px;
  }

  .dm-page[data-dm-page="home"] .dm-trust-card.google .rplg-biz-based-text {
    font-size: 12px;
  }

  .dm-page[data-dm-page="home"] .dm-trust-card.google .rplg-badge2-score > div:first-child {
    font-size: 12px;
    margin-bottom: 4px;
  }

  /* Callback strip duplicates sticky bottom bar on mobile */
  .dm-page[data-dm-page="home"] .dm-callback-strip {
    display: none !important;
  }

  .dm-page[data-dm-page="home"] .dm-callback-strip-inner {
    gap: 14px;
  }

  .dm-page[data-dm-page="home"] .dm-callback-strip-text p {
    font-size: 14px;
  }

  .dm-page[data-dm-page="home"] .dm-compare-extra {
    display: none;
  }

  .dm-page[data-dm-page="home"] .dm-compare-table.is-expanded .dm-compare-extra {
    display: grid;
  }

  .dm-page[data-dm-page="home"] .dm-compare-toggle {
    display: block;
    width: 100%;
    margin: 4px 0 0;
    padding: 12px 16px;
    border: 1px dashed var(--border, #e2e8f0);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--brand-dark, #1a56a0);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    min-height: 44px;
  }

  .dm-page[data-dm-page="home"] .dm-compare-toggle:hover {
    background: var(--blue-soft, #eef6fc);
  }

  .dm-page[data-dm-page="home"] .dm-steps {
    gap: 14px;
  }

  .dm-page[data-dm-page="home"] .dm-step p {
    font-size: 14px;
    line-height: 1.5;
  }

  .dm-page[data-dm-page="home"] .dm-reviews-q {
    font-size: 1.05rem;
    line-height: 1.45;
  }

  .dm-page[data-dm-page="home"] .dm-give-box p {
    font-size: 14px;
    line-height: 1.55;
  }

  .dm-page[data-dm-page="home"] .dm-cta p {
    font-size: 15px;
  }

  .dm-page[data-dm-page="home"] .dm-section {
    padding-top: 36px;
    padding-bottom: 36px;
  }
}

@media (max-width: 600px) {
  .dm-topbar-link {
    display: none;
  }

  /* Ultra-compact topbar — one slim row */
  .dm-topbar-inner {
    padding-top: 5px;
    padding-bottom: 5px;
    gap: 6px;
  }

  .dm-topbar-left,
  .dm-topbar-right {
    gap: 6px;
  }

  /* Book is in the sticky bottom bar on homepage; keep in topbar for subpages */
  .dm-page[data-dm-page="home"] .dm-topbar-book {
    display: none;
  }

  .dm-topbar-guide {
    padding: 4px 10px 4px 4px;
    gap: 6px;
  }

  .dm-topbar-guide-num {
    min-width: 26px;
    height: 26px;
    font-size: 13px;
  }

  .dm-topbar-guide-text {
    flex-direction: column;
    align-items: flex-start;
    column-gap: 0;
  }

  .dm-topbar-guide-line {
    font-size: 10px;
  }

  .dm-topbar-guide-sub {
    font-size: 8px;
  }

  .dm-topbar-guide-sub::before {
    content: none;
    margin: 0;
  }

  .dm-topbar-book {
    padding: 5px 10px;
    font-size: 10px;
  }

  .dm-brand-header {
    padding: 6px 0;
  }

  .dm-logo img {
    height: 34px;
  }

  .dm-nav-toggle {
    min-width: 40px;
    min-height: 40px;
    padding: 6px 8px;
    font-size: 16px;
  }

  .dm-trust-strip p {
    font-size: 12px;
  }

  .dm-mobile-bar {
    padding: 6px 10px;
    gap: 6px;
  }

  .dm-mobile-bar a,
  .dm-mobile-bar button {
    font-size: 11px;
    padding: 8px 4px;
    min-height: 44px;
  }

  .dm-container {
    padding-left: 4%;
    padding-right: 4%;
  }

  .dm-hero-btns,
  .dm-svc-hero-btns,
  .dm-cta-btns {
    flex-direction: column;
  }

  .dm-hero-btns .dm-btn,
  .dm-svc-hero-btns .dm-btn,
  .dm-cta-btns .dm-btn,
  .dm-cta-btns button {
    width: 100%;
  }
}
