/* R24: phone-first layout. Desktop presentation above 900px is retained. */
.mobile-nav-toggle, .mobile-review-strip, .r24-mobile-title, .r24-mobile-actions { display: none; }
@media (max-width: 900px) {
  html { scroll-padding-top: 80px; }
  body { font-size: 16px; padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  body, body * { writing-mode: horizontal-tb !important; text-orientation: mixed !important; }
  main, section, article, aside, nav, footer, div { min-width: 0; }
  h1, h2, h3, h4, p, a, span, strong, small, label, button {
    word-break: normal !important; overflow-wrap: normal !important; hyphens: none !important;
  }
  input, textarea, select { min-width: 0; max-width: 100%; font-size: 16px !important; }
  p { line-height: 1.6; }
  .section { padding: 40px 16px !important; }
  .section p, .readable p, .text-columns p, .region-card p { font-size: 16px !important; line-height: 1.6 !important; }
  h1.page-heading, .project-hero h1 { font-size: clamp(30px, 7.8vw, 40px) !important; line-height: 1.1 !important; max-width: 100% !important; }
  .eyebrow { font-size: 11px !important; line-height: 1.4; letter-spacing: .1em !important; margin-bottom: 10px; }

  /* The score occupies normal document flow, never an image or a control. */
  .review-badge-stack, .review-badge--houzz { display: none !important; }
  .mobile-review-strip { display: flex; justify-content: flex-end; padding: 0 16px 4px; background: #f7f3ec; }
  .mobile-review-strip a { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 3px 10px; font-size: 12px; color: #28251e; }
  .mobile-review-strip strong { font-size: 14px; }

  /* Full navigation remains reachable without a narrow row of links. */
  body > nav { position: sticky !important; top: 0; display: flex !important; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px !important; min-height: 64px; }
  body > nav .brand { flex: 1 1 auto; max-width: none !important; font-size: 10px !important; letter-spacing: .07em !important; line-height: 1.3; white-space: nowrap; }
  .mobile-nav-toggle { display: inline-flex; order: 1; align-items: center; justify-content: center; border: 1px solid #c7bbae; border-radius: 8px; background: transparent; min-width: 44px; min-height: 44px; padding: 8px; font-size: 12px; color: #171714; }
  body > nav .navlinks { display: flex !important; order: 2; gap: 0; }
  body > nav .navlinks > a:not(.pill) { display: none !important; }
  body > nav .navlinks > .pill { display: inline-flex !important; min-height: 44px; align-items: center; justify-content: center; padding: 9px 12px !important; font-size: 12px !important; white-space: nowrap; }
  body > nav.mobile-menu-open .navlinks { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; flex: 1 0 100%; max-height: 65dvh; overflow-y: auto; padding: 8px 0; }
  body > nav.mobile-menu-open .navlinks > a { display: flex !important; align-items: center; min-height: 44px; padding: 10px 12px; font-size: 14px; border: 1px solid #dfd5c7; border-radius: 8px; }
  body > nav.mobile-menu-open .navlinks > .pill { grid-column: 1 / -1; }

  /* Main image becomes a framed landscape photograph, with no text pile-up. */
  .home-photo-first .hero-brand-stage { margin: 0 16px !important; padding: 8px !important; width: auto !important; height: auto !important; min-height: 0 !important; overflow: hidden; background: #eae2d7 !important; border: 1px solid #d6cbbb; border-radius: 16px; }
  .home-photo-first .hero-brand-stage::before, .home-photo-first .hero-brand-stage::after { content: none !important; display: none !important; }
  .home-photo-first .hero-brand-stage > img { position: static !important; width: 100% !important; height: auto !important; min-height: 0 !important; max-height: none !important; aspect-ratio: 16 / 10; object-fit: cover; object-position: center; margin: 0 !important; border: 0 !important; border-radius: 10px !important; box-shadow: none !important; transform: none !important; }
  .home-photo-first .hero-brand-lockup { display: none !important; }
  .home-photo-first .hero-brand-stage .hero-photo-label { position: static !important; display: flex; align-items: center; min-height: 38px; max-width: 100% !important; margin: 5px 0 -2px; padding: 6px 5px !important; background: transparent !important; color: #373027 !important; font-size: 11px !important; line-height: 1.4; text-transform: none; letter-spacing: .04em; border: 0 !important; border-radius: 0 !important; backdrop-filter: none !important; box-shadow: none !important; white-space: normal !important; transform: none !important; }
  .home-photo-first .home-profile { display: block !important; padding: 26px 20px 24px !important; }
  .home-photo-first .home-profile h1 { font-size: clamp(30px, 8vw, 40px) !important; line-height: 1.1 !important; max-width: 100% !important; margin: 0 0 12px; text-wrap: pretty; }
  .r24-desktop-title { display: none; }
  .r24-mobile-title { display: inline; }
  .home-photo-first .home-profile p { font-size: 16px !important; line-height: 1.55 !important; max-width: 42ch !important; margin: 0; }
  .r24-mobile-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
  .r24-mobile-actions .btn { min-height: 44px; padding: 12px 18px; font-size: 14px; }
  .r24-mobile-actions a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
  .home-photo-first .profile-nav { display: none !important; }
  .home-photo-first .trust { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .home-photo-first .trust > div { min-height: 74px !important; padding: 15px 20px !important; }
  .home-photo-first .trust > div:nth-child(n+3) { display: none !important; }
  .home-photo-first .trust b { font-size: 23px !important; line-height: 1.1; }
  .home-photo-first .trust span { font-size: 11px !important; line-height: 1.4; letter-spacing: .04em !important; color: #625a50; opacity: 1; }

  /* Inline anchors were collapsing the absolute captions to zero width. */
  .home-photo-first .home-projects { padding: 36px 16px 40px !important; }
  .home-photo-first .home-projects::before, .home-photo-first .project-showcase::before, .home-photo-first .project-showcase::after { display: none !important; }
  .home-photo-first .home-section-head { display: block !important; margin: 0 0 20px !important; }
  .home-photo-first .home-section-head h2, .home-photo-first .review-platform-head h2, .home-photo-first .home-story-copy h2, .home-photo-first .service-strip h2, .home-photo-first .home-areas h2, .home-photo-first .home-cta h2 { font-size: 30px !important; line-height: 1.12 !important; max-width: 100% !important; }
  .home-photo-first .home-section-head p, .home-photo-first .review-platform-head p { display: none !important; }
  .home-photo-first .project-showcase { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; grid-auto-rows: auto !important; gap: 18px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; }
  .home-photo-first .project-showcase .project-tile, .home-photo-first .project-showcase .project-tile.featured { display: block !important; position: relative; width: 100% !important; height: auto !important; min-height: 0 !important; aspect-ratio: auto !important; margin: 0 !important; padding: 8px !important; grid-column: auto !important; grid-row: auto !important; border: 1px solid #dbd0c1 !important; border-radius: 14px !important; background: #fffdf9 !important; box-shadow: 0 5px 16px #4236210a !important; transform: none !important; }
  .home-photo-first .project-showcase .project-tile:nth-child(n+4) { display: none !important; }
  .home-photo-first .project-tile::before, .home-photo-first .project-tile::after { display: none !important; }
  .home-photo-first .project-showcase .project-tile > img { display: block; width: 100% !important; height: auto !important; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px !important; transform: none !important; filter: none !important; }
  .home-photo-first .project-tile-copy { display: block !important; position: static !important; width: 100% !important; max-width: none !important; padding: 14px 8px 8px; margin: 0 !important; color: #25211c !important; text-shadow: none !important; transform: none !important; }
  .home-photo-first .project-tile-copy small { display: block !important; max-width: 100% !important; width: auto !important; margin: 0 0 5px; padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; color: #716453 !important; font-size: 11px !important; line-height: 1.4 !important; letter-spacing: .06em !important; white-space: normal !important; backdrop-filter: none !important; }
  .home-photo-first .project-tile-copy h3 { display: block !important; width: auto !important; max-width: 100% !important; font-size: 23px !important; line-height: 1.2 !important; margin: 0 0 10px !important; text-wrap: pretty; }
  .home-photo-first .project-tile-copy::after { content: 'View project ↗'; display: inline-block !important; width: auto !important; margin: 0; padding: 0 !important; background: none !important; color: #624a2e !important; box-shadow: none !important; font-size: 13px !important; font-weight: 700; text-transform: none !important; line-height: 1.5; letter-spacing: .02em !important; animation: none !important; transform: none !important; }
  .home-photo-first .projects-footer { display: block !important; margin: 14px 0 0 !important; }
  .home-photo-first .projects-footer p { display: none !important; }
  .home-photo-first .projects-footer a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px !important; }

  .home-photo-first .home-story { display: block !important; min-height: 0 !important; }
  .home-photo-first .home-story-media { min-height: 0 !important; aspect-ratio: 16 / 10; overflow: hidden; }
  .home-photo-first .home-story-copy { padding: 30px 20px !important; }
  .home-photo-first .home-story-copy p { font-size: 16px !important; line-height: 1.6 !important; }
  .home-photo-first .home-story-copy p:nth-of-type(n+2) { display: none !important; }
  .home-photo-first .service-strip { padding: 32px 16px !important; }
  .home-photo-first .service-links { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 8px !important; border: 0 !important; }
  .home-photo-first .service-links a { display: flex !important; flex-direction: row !important; justify-content: space-between !important; align-items: center !important; gap: 12px; min-height: 64px !important; padding: 14px !important; border: 1px solid #dcd1c2 !important; border-radius: 10px !important; }
  .home-photo-first .service-links strong { min-width: 0; font-size: 21px !important; line-height: 1.2 !important; }
  .home-photo-first .service-links span { flex: 0 0 auto; font-size: 12px !important; white-space: nowrap !important; }

  .review-platform-section { padding: 30px 0 !important; }
  .review-platform-section > .section { padding: 0 16px !important; }
  .review-platform-head { display: block !important; margin-bottom: 18px !important; }
  .review-platform-grid { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 12px !important; }
  .review-platform { padding: 18px !important; border-radius: 12px !important; }
  .review-platform header { display: block !important; }
  .platform-kicker { font-size: 12px !important; }
  .live-pill, .platform-copy, .platform-review-marquee { display: none !important; }
  .platform-score { display: flex !important; align-items: center !important; gap: 12px !important; margin: 12px 0 !important; }
  .platform-score > strong { font-size: 36px !important; line-height: 1 !important; }
  .platform-score small { display: block; font-size: 12px !important; line-height: 1.45 !important; margin: 4px 0 0 !important; }
  .review-source-note { display: none !important; }
  .platform-actions { display: block !important; margin: 10px 0 0 !important; }
  .platform-actions .btn { display: flex; justify-content: center; align-items: center; min-height: 44px; font-size: 13px !important; padding: 11px 14px !important; white-space: normal !important; }
  .platform-actions .text-link { display: none !important; }
  .home-photo-first .home-areas { padding: 36px 16px !important; }
  .home-photo-first .home-areas-inner { display: block !important; }
  .home-photo-first .home-areas p { font-size: 15px !important; line-height: 1.6 !important; }
  .home-photo-first .area-mini-list { margin-top: 16px; gap: 10px !important; }
  .home-photo-first .area-mini-list a { padding: 15px !important; }
  .home-photo-first .area-mini-list strong { font-size: 22px !important; }
  .home-photo-first .area-mini-list span { font-size: 11px !important; line-height: 1.5; }
  .home-photo-first .home-cta { padding: 34px 20px !important; }
  .home-photo-first .home-cta p { font-size: 15px !important; line-height: 1.6 !important; }

  /* Apply the same image/caption separation to the project archive. */
  .grid { grid-template-columns: minmax(0, 1fr) !important; gap: 18px !important; }
  .card { display: block !important; height: auto !important; min-height: 0 !important; aspect-ratio: auto !important; border: 1px solid #d9cfc1; padding: 8px; border-radius: 14px !important; background: #fffdf9 !important; }
  .card::after { display: none !important; }
  .card > img { height: auto !important; aspect-ratio: 16 / 10; border-radius: 8px; object-fit: cover; }
  .card .meta { position: static !important; width: auto !important; color: #25211c !important; padding: 14px 8px 8px; }
  .card h3 { max-width: none; font-size: 23px !important; line-height: 1.2 !important; }
  .card small { font-size: 11px !important; line-height: 1.5; }
  .card .placeholder { height: auto; min-height: 170px; aspect-ratio: 16 / 10; }
  .project-hero { padding: 30px 16px 22px !important; }
  .project-image { width: auto !important; height: auto !important; min-height: 0 !important; aspect-ratio: 16 / 10; margin: 0 16px !important; border-radius: 12px; overflow: hidden; }
  .project-copy { display: block !important; padding: 28px 20px 40px !important; }
  .project-copy > * { width: 100% !important; max-width: none !important; }
  .project-copy p { font-size: 16px !important; line-height: 1.65 !important; }
  .facts { margin-bottom: 24px; }
  .project-copy h2 { font-size: 29px !important; line-height: 1.18; }
  .region-grid, .area-list, .text-columns, .steps-grid, .split { grid-template-columns: minmax(0, 1fr) !important; gap: 20px; }
  .area-item { flex-direction: column !important; align-items: flex-start !important; }
  .area-item > a:last-child { white-space: normal !important; }

  /* Filters, gallery captions and the enlarged-photo viewer. */
  .gallery-title { font-size: 36px !important; line-height: 1.12 !important; }
  .gallery-intro, .gallery-count, .archive-status { font-size: 15px !important; line-height: 1.55 !important; }
  .gallery-filters { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
  .gallery-filters label { min-width: 0 !important; width: 100% !important; }
  .gallery-filters label:has(input), .gallery-filters > button { grid-column: 1 / -1; }
  .gallery-filters input, .gallery-filters select { width: 100% !important; min-height: 44px; }
  .photo-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 22px !important; }
  .photo-tile { min-width: 0; }
  .photo-open { display: block; border-radius: 12px !important; }
  .photo-open img { height: auto !important; aspect-ratio: 16 / 10 !important; }
  .photo-copy { width: 100%; padding: 12px 2px 0 !important; }
  .photo-copy small { font-size: 12px !important; line-height: 1.4 !important; }
  .photo-copy h3 { font-size: 23px !important; line-height: 1.2 !important; max-width: none !important; }
  .photo-copy a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px !important; }
  .photo-viewer { width: calc(100% - 16px) !important; max-width: 680px !important; padding: 18px !important; max-height: calc(100dvh - 20px) !important; border-radius: 12px !important; }
  .viewer-head { gap: 12px; }
  .viewer-head > div { flex: 1; min-width: 0; }
  .viewer-head h2 { font-size: 24px !important; line-height: 1.2; }
  .viewer-head button { flex: 0 0 44px; width: 44px !important; height: 44px !important; }
  .viewer-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
  .viewer-actions .btn { min-height: 44px; text-align: center; }

  /* Preserve every form field; never compress two inputs into unreadable columns. */
  .fieldgrid { grid-template-columns: minmax(0, 1fr) !important; gap: 12px !important; }
  .fieldgrid > * { grid-column: 1 !important; min-width: 0; }
  .fieldgrid input, .fieldgrid select, .fieldgrid textarea { width: 100%; min-height: 46px; }
  .fieldgrid label { font-size: 14px !important; line-height: 1.45; }
  .contact-main .content-form { padding: 18px 14px !important; }
  .ways { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
  .ways > * { min-height: 44px; padding: 12px 8px !important; font-size: 13px !important; }
  .smart-upload-head { flex-wrap: wrap; gap: 8px; }
  .smart-upload-head strong { font-size: 14px; line-height: 1.4; }
  .compression-badge { font-size: 11px !important; }
  .attachment-help { font-size: 13px !important; line-height: 1.55 !important; }
  .upload-pickers { flex-wrap: wrap; }
  .sheet { padding: 10px !important; }
  .sheetbox { width: 100% !important; max-height: calc(100dvh - 20px) !important; padding: 20px 16px 28px !important; border-radius: 14px !important; }
  .sheetbox h2 { font-size: 30px !important; line-height: 1.15; }
  .closex { min-width: 44px; min-height: 44px; }
  .contactdock { left: 10px !important; right: 10px !important; bottom: calc(8px + env(safe-area-inset-bottom)) !important; display: grid !important; grid-template-columns: 70px minmax(0, 1fr) !important; gap: 6px; padding: 6px !important; border-radius: 14px !important; }
  .contactdock a, .contactdock button { display: flex !important; align-items: center; justify-content: center; min-height: 44px !important; width: 100% !important; margin: 0; padding: 10px 8px !important; font-size: 14px !important; white-space: normal !important; }
  body.mobile-dialog-open .contactdock, body.mobile-input-active .contactdock { display: none !important; }
  .footer-quote-inner { grid-template-columns: minmax(0, 1fr) !important; padding: 32px 20px !important; gap: 20px !important; }
  .footer-quote h2 { max-width: 100% !important; font-size: 30px !important; line-height: 1.15 !important; }
  .footer-quote-copy > p { font-size: 15px !important; line-height: 1.6 !important; }
  .footer-proof { display: none !important; }
  .footer-quote-form { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 12px !important; }
  .footer-quote-form > * { grid-column: 1 !important; min-width: 0; }
  .footer-quote-form label > span { position: static !important; width: auto !important; height: auto !important; clip: auto !important; clip-path: none !important; display: block !important; overflow: visible !important; margin: 0 0 5px !important; font-size: 13px; }
  .footer-quote-form input, .footer-quote-form textarea { min-height: 46px; border-radius: 7px; }
  .footer-quote-form textarea { min-height: 100px; }
  .footer-quote-form button { min-height: 46px; font-size: 14px; }
  .footer-quote-form small { font-size: 12px !important; line-height: 1.5; }
  .site-footer-pro { padding: 32px 20px 30px !important; }
  .site-footer-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 24px 18px !important; }
  .footer-brand, .footer-contact { grid-column: 1 / -1 !important; }
  .footer-logo { font-size: 21px !important; }
  .footer-brand > p { font-size: 14px !important; line-height: 1.55 !important; }
  .footer-links { min-width: 0; gap: 0 !important; }
  .footer-links h3 { font-size: 12px !important; line-height: 1.5; }
  .footer-links > a { display: flex; align-items: center; min-height: 44px; font-size: 13px !important; line-height: 1.5 !important; }
  .footer-contact { display: flex !important; flex-direction: column !important; }
  .footer-contact > a, #emailDraft, .upload-row strong { overflow-wrap: anywhere !important; word-break: break-word !important; }
  .footer-rating-links { display: flex !important; gap: 10px; }
  .footer-rating-links > a { flex: 1; min-width: 0 !important; padding: 14px !important; border-radius: 10px !important; }
  .footer-rating-links span { font-size: 11px !important; }
  .footer-rating-links strong { font-size: 14px !important; }
  .footer-rating-links small { display: none; }
  .site-footer-bottom { display: block !important; margin-top: 24px; font-size: 11px !important; line-height: 1.6; }
}
@media (prefers-reduced-motion: reduce) {
  .home-photo-first .project-showcase .project-tile, .home-photo-first .project-showcase img { transition: none !important; }
}
