/* Final small-screen layer. Desktop declarations remain in their existing files.
   Keep this after brand-system.css and page styles: the old cascade contains
   desktop !important rules after its mobile breakpoints. */
@media (max-width:1024px), (max-width:1366px) and (pointer:coarse) {
  html body#bd-page.rd-site { --gutter:clamp(20px,5vw,44px); }
  html body#bd-page.rd-site :is(main,section,article,form,fieldset,nav,figure) { min-width:0; }
  html body#bd-page.rd-site #main[id] :is(h1,h2,h3,p,li) { max-width:100%; }
  html body#bd-page.rd-site #main[id] :is(input,textarea,select) { box-sizing:border-box; min-width:0; max-width:100%; font-size:16px!important; }
  html body#bd-page.rd-site #main[id] :is(.rd-button,.bh-button,.network-button,.industrial-cta) { min-width:0!important; max-width:100%; white-space:normal!important; text-align:center; line-height:1.35!important; }
  html body#bd-page.rd-site .rd-header-shortcuts { display:none!important; }
  html body#bd-page.rd-site .v12-header { min-height:80px!important; height:auto!important; padding:12px var(--gutter)!important; gap:20px!important; }
  html body#bd-page.rd-site .v12-brand { width:104px!important; min-width:104px!important; max-width:104px!important; flex-basis:104px!important; }
  html body#bd-page.rd-site .v12-menu { min-width:88px; min-height:48px; }
  html body#bd-page.rd-site .v12-nav { max-height:calc(100dvh - 80px)!important; overflow-y:auto; overscroll-behavior:contain; padding-bottom:max(24px,env(safe-area-inset-bottom)); }
  html body#bd-page.rd-site .v12-nav .v12-nav-label { white-space:normal!important; }
  html body#bd-page.rd-site .v12-footer { padding-bottom:calc(88px + env(safe-area-inset-bottom))!important; }
  html body#bd-page.rd-site .rd-footer-top { grid-template-columns:minmax(0,1fr)!important; gap:28px!important; }
  html body#bd-page.rd-site .rd-footer-top nav { grid-template-columns:repeat(3,minmax(0,1fr))!important; gap:8px 20px!important; }
  html body#bd-page.rd-site .rd-footer-top nav a { display:flex; align-items:center; min-height:44px; overflow-wrap:break-word; }
  html body#bd-page.rd-site .rd-footer-base { flex-wrap:wrap; gap:16px!important; }
  /* Tablet grids need to relinquish desktop minimum column widths. */
  html body#bd-page.bd-brand.rd-site #main[id] :is(.bd-about-standard,.bd-about-network,.bd-package-service,.bd-founder-intro,.bd-founder-form,.bd-network-close,.search-hero,.search-principle,.search-proof,.industrial-intro,.industrial-proof>.industrial-section,.industrial-close>.industrial-section) { grid-template-columns:minmax(0,1fr)!important; gap:36px!important; }
  html body#bd-page.bd-brand.rd-site #main[id] :is(.bd-about-principles article,.search-work-list article) { grid-template-columns:minmax(0,1fr)!important; gap:16px!important; }
  html body#bd-page.bd-brand.rd-site #main[id] :is(.bd-story-hero,.bd-services-hero,.bd-work-hero) { height:auto!important; min-height:560px!important; padding:100px var(--gutter) 56px!important; }
  html body#bd-page.bd-brand.rd-site #main[id] :is(.bd-story-hero-copy,.bd-services-hero>div,.bd-work-hero-copy) { min-width:0; width:100%!important; }
  html body#bd-page.bd-brand.rd-site #main[id] :is(.bd-story-hero h1,.bd-services-hero h1,.bd-work-hero h1) { font-size:clamp(40px,6.3vw,70px)!important; line-height:1.04!important; letter-spacing:-.018em!important; overflow-wrap:normal!important; word-break:normal!important; }
  html body#bd-page.bd-brand.rd-site #main[id].feed-gallery .feed-totals { grid-template-columns:repeat(3,minmax(0,1fr))!important; }
  html body#bd-page.bd-brand.rd-site #main[id].feed-gallery .feed-totals>div { display:flex!important; flex-direction:column!important; align-items:flex-start!important; justify-content:space-between!important; gap:22px!important; min-width:0; min-height:180px!important; padding:24px!important; }
  html body#bd-page.bd-brand.rd-site #main[id].feed-gallery .feed-totals span { max-width:none!important; color:#48545b!important; font-size:12px!important; line-height:1.5!important; }
  html body#bd-page.bd-brand.rd-site #main[id].feed-gallery .feed-totals strong { display:block; flex:none; white-space:nowrap!important; overflow-wrap:normal!important; word-break:normal!important; font-size:clamp(30px,4.8vw,49px)!important; line-height:1.12!important; letter-spacing:-.025em!important; }
  html body#bd-page.bd-brand.rd-site #main[id].feed-gallery .feed-brand-stats { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
  html body#bd-page.bd-brand.rd-site #main[id].feed-gallery .feed-brand-stats>a { min-width:0; min-height:220px!important; padding:24px!important; }
  html body#bd-page.bd-brand.rd-site #main[id].feed-gallery .feed-stat-growth { white-space:nowrap; overflow-wrap:normal; font-size:40px!important; }
  html body#bd-page.bd-brand.rd-site #main[id] :is(.profile-hero,.bd-client) { grid-template-columns:minmax(0,1fr)!important; }
  html body#bd-page.bd-brand.rd-site #main[id] .profile-heading h1 { font-size:clamp(36px,6.4vw,64px)!important; line-height:1.05!important; overflow-wrap:normal!important; }
  html body#bd-page.rd-site .bd-contact-fixed { min-height:44px!important; padding:0 16px!important; font-size:14px!important; right:max(16px,env(safe-area-inset-right)); bottom:max(12px,env(safe-area-inset-bottom)); }
  html body#bd-page.rd-site:has(#bd-privacy-choice:not([hidden])) .bd-contact-fixed,
  html body#bd-page.rd-site:has(.v12-menu[aria-expanded="true"]) .bd-contact-fixed,
  html body#bd-page.rd-site:has(#founder-call-form) .bd-contact-fixed { display:none!important; }
}

@media (max-width:600px) {
  /* A 320px screen still has a deliberate type scale and intact words. */
  html body#bd-page.bd-brand.rd-site #main[id] :is(h1,h2) { font-size:clamp(28px,8vw,44px)!important; line-height:1.08!important; letter-spacing:-.018em!important; overflow-wrap:break-word!important; word-break:normal!important; }
  html body#bd-page.bd-brand.rd-site #main[id] h3 { font-size:clamp(22px,6vw,28px)!important; line-height:1.2!important; overflow-wrap:break-word!important; }
  html body#bd-page.bd-brand.rd-site #main[id] :is(.bd-story-hero h1,.bd-services-hero h1,.bd-work-hero h1) { font-size:clamp(28px,8.4vw,48px)!important; line-height:1.08!important; overflow-wrap:normal!important; }
  html body#bd-page.bd-brand.rd-site.bh-page main#main[id].bdhome .bh-opening h1#hero-title { font-size:clamp(32px,9.6vw,54px)!important; line-height:1.04!important; letter-spacing:-.025em!important; }
  html body#bd-page.bd-brand.rd-site.bh-page main#main[id].bdhome .bh-opening h1#hero-title span { white-space:normal!important; }
  html body#bd-page.bd-brand.rd-site.bh-page main#main[id].bdhome .bh-opening { height:auto!important; min-height:560px!important; padding:100px 22px 52px!important; }
  html body#bd-page.bd-brand.rd-site #main[id] :is(.bd-story-hero,.bd-services-hero,.bd-work-hero) { min-height:520px!important; padding:90px 22px 48px!important; }
  html body#bd-page.bd-brand.rd-site #main[id] :is(.bd-story-hero p,.bd-services-hero>div>p,.bd-work-hero p) { font-size:17px!important; line-height:1.55!important; margin-top:24px!important; }
  html body#bd-page.bd-brand.rd-site #main[id] :is(.bd-about-standard,.bd-about-network,.bd-about-close,.bd-about-denver,.bd-package-service,.bd-services-intro,.bd-services-close,.bd-founder-intro,.bd-founder-form,.bd-network-close,.feed-results,.feed-posts,.feed-websites,.feed-close,.search-page>section,.industrial-intro,.industrial-services,.industrial-close>.industrial-section) { padding:48px 22px!important; }
  html body#bd-page.bd-brand.rd-site #main[id] :is(.bd-about-denver,.bd-about-close) { min-height:480px!important; }
  html body#bd-page.bd-brand.rd-site #main[id] :is(.bd-about-standard header,.bd-about-network-copy) { min-width:0; padding-bottom:0!important; }
  html body#bd-page.bd-brand.rd-site #main[id] .bd-about-principles article { padding:24px 0!important; }
  html body#bd-page.bd-brand.rd-site #main[id] :is(.bd-services-grid,.bd-about-network-logos,.industrial-grid,.capability-grid,.spec-grid,.resource-grid,.inquiry-layout,.partner-grid) { grid-template-columns:minmax(0,1fr)!important; }
  html body#bd-page.bd-brand.rd-site #main[id] .bd-about-network-logos { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
  html body#bd-page.bd-brand.rd-site #main[id] :is(.bd-services-grid article,.bd-services-grid article>div) { min-height:0!important; }
  html body#bd-page.bd-brand.rd-site #main[id] .bd-services-grid article>div { padding:36px 22px!important; }
  html body#bd-page.bd-brand.rd-site #main[id].feed-gallery .feed-totals,
  html body#bd-page.bd-brand.rd-site #main[id].feed-gallery .feed-brand-stats { grid-template-columns:minmax(0,1fr)!important; }
  html body#bd-page.bd-brand.rd-site #main[id].feed-gallery .feed-totals>div { min-height:0!important; gap:18px!important; padding:24px!important; border-right:0!important; border-bottom:1px solid #101c1f33!important; }
  html body#bd-page.bd-brand.rd-site #main[id].feed-gallery .feed-totals strong { width:100%; max-width:100%!important; font-size:clamp(36px,11.2vw,60px)!important; line-height:1.1!important; }
  html body#bd-page.bd-brand.rd-site #main[id].feed-gallery .feed-totals span { max-width:100%!important; font-size:12px!important; }
  html body#bd-page.bd-brand.rd-site #main[id].feed-gallery .feed-stat-name { font-size:17px!important; line-height:1.4!important; }
  html body#bd-page.bd-brand.rd-site #main[id].feed-gallery .feed-brand-stats>a { min-height:0!important; padding:24px!important; }
  html body#bd-page.bd-brand.rd-site #main[id].feed-gallery .company-feed-head { display:block!important; }
  html body#bd-page.bd-brand.rd-site #main[id].feed-gallery .company-feed-head>a { display:inline-flex; align-items:center; min-height:44px; margin-top:8px; }
  html body#bd-page.bd-brand.rd-site #main[id] :is(.profile-heading,.profile-panel,.bd-client-copy) { padding:36px 22px!important; }
  html body#bd-page.bd-brand.rd-site #main[id] .profile-heading h1 { font-size:clamp(28px,8vw,44px)!important; }
  html body#bd-page.bd-brand.rd-site #main[id] :is(.profile-hero .profile-image,.bd-client-image) { min-height:280px!important; }
  html body#bd-page.bd-brand.rd-site #main[id] :is(.partners-1 .partner-card,.partners-2 .partner-card) { display:block!important; }
  html body#bd-page.bd-brand.rd-site #main[id] .profile-tabs { position:static!important; overflow-x:auto!important; scroll-padding:22px; }
  html body#bd-page.bd-brand.rd-site #main[id] .profile-tabs a { flex:0 0 auto!important; min-height:44px; }
  html body#bd-page.bd-brand.rd-site #main[id] .bd-founder-form form { padding:24px 16px!important; grid-template-columns:minmax(0,1fr)!important; }
  html body#bd-page.bd-brand.rd-site #main[id] .bd-founder-form form>* { min-width:0; grid-column:1/-1!important; }
  html body#bd-page.bd-brand.rd-site #main[id] .bd-founder-form label { line-height:1.5!important; }
  html body#bd-page.bd-brand.rd-site #main[id] :is(.rd-button,.bh-button,.network-button,.industrial-cta) { width:100%!important; min-height:48px!important; padding:14px 18px!important; font-size:16px!important; }
  html body#bd-page.rd-site .rd-footer-top nav { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
  html body#bd-page.rd-site #main[id].op-production :is(.op-hook,.op-section-head h2,.op-about h2) { font-size:clamp(30px,8.5vw,48px)!important; line-height:1.1!important; overflow-wrap:break-word!important; }
  html body#bd-page.rd-site #main[id].op-production .op-actions { flex-wrap:wrap; gap:12px; }
  html body#bd-page.rd-site #main[id].op-production .op-actions a { flex:1 1 140px; min-height:48px; }
  html body#bd-page.rd-site #main[id].op-production .episode-copy b { font-size:22px!important; line-height:1.25!important; overflow-wrap:break-word; }
  html body#bd-page.rd-site .overlay h1 { font-size:clamp(28px,8vw,42px)!important; line-height:1.1!important; }
  html body#bd-page.rd-site #main[id] :is(.game-intro h1,.arcade-intro h1,.cabinet-intro h1,.mall-heading h1,.marquee h1,.ag-mast h1,.welcome-inner h1) { font-size:clamp(30px,9vw,48px)!important; line-height:1.05!important; }
}
