/* Phone-only layer. Keep the original desktop styles, content and logic intact. */
@media screen and (max-width: 700px) {
  :root { --gutter: 16px; --tidy-padding: 20px; }
  body { font-size: 16px; }
  .section { padding-block: 28px; }
  main :is(h1, h2, h3) { overflow-wrap: anywhere; }
  main :is(input, select, textarea) { font-size: 16px; }
  main :is(input, select, textarea, button, a, summary) { scroll-margin-block: calc(var(--mobile-header-height, 130px) + 20px) 100px; }
  .button { min-height: 52px; padding: 14px 18px; border-radius: 10px; white-space: normal; text-align: center; line-height: 1.35; }
  .button > span { min-width: 0; }
  main details > summary { min-height: 48px; }

  /* Same navigation and actions, with comfortable finger targets. */
  .site-header { padding: 8px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); gap: 6px 10px; }
  .site-header .brand { min-width: 0; gap: 8px; }
  .site-header .brand-mark { flex-basis: 36px; width: 36px; height: 42px; }
  .site-header .brand strong { font-size: 1rem; }
  .site-header .brand small { font-size: .6875rem; max-width: 160px; }
  .js .nav-toggle, .js .nav-close { min-height: 48px; min-width: 48px; }
  .header-check-link { min-height: 44px; padding-block: 10px; border-radius: 8px; }
  .js .nav-panel { width: min(360px, calc(100vw - 24px)); max-height: calc(100dvh - var(--mobile-header-height, 130px)); padding: 16px 16px max(24px, env(safe-area-inset-bottom)); overscroll-behavior-y: contain; }
  .nav-panel nav a { min-height: 48px; display: flex; align-items: center; padding-block: 12px; }
  .sidebar-contact > a { min-height: 48px; display: flex; align-items: center; }
  .footer-links { flex-wrap: wrap; gap: 4px 20px; }
  .footer-links :is(a, button) { display: inline-flex; align-items: center; min-height: 48px; }
  body > footer { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .soot-trail { display: none; }

  /* Shared phone rhythm across the home, service, news and information pages. */
  .home-welcome { grid-template-areas: "intro" "finder" "portrait"; gap: 22px; }
  .home-owner-portrait { min-height: 320px; height: clamp(320px, 85vw, 430px); }
  .welcome-copy .button, .home-check-callout .button { width: 100%; white-space: normal; }
  .home-direct > a { min-height: 48px; }
  .home-finder { grid-template-columns: 80px minmax(0, 1fr); gap: 14px; padding: 16px; }
  .home-finder .button { width: 100%; padding-inline: 12px; }
  .service-card, .about-copy, .contact-card, .contact-panel > div:first-child,
  .news-card, #handwerk .news-card, .legal-content > section, .legal-toc { padding: 20px; }
  .contact-panel, .legal-layout { gap: 20px; }
  .contact-card > a { min-height: 48px; }
  .contact-card > a:not(.button) { display: flex; align-items: center; }
  .legal-toc a { min-height: 48px; align-items: center; }
  .legal-content :is(p, li, a, code) { overflow-wrap: anywhere; }

  /* Street suggestions stay in the page flow instead of covering the next field. */
  .finder-intro { gap: 20px; }
  .finder-intro-copy { padding: 18px; }
  .finder-intro-copy > p:first-child { font-size: 1rem; line-height: 1.6; }
  .finder-scope { margin-top: 16px; padding-top: 14px; }
  .finder-workspace { gap: 24px; }
  .finder-card-heading, .finder-map-heading { padding: 22px 16px; }
  .finder-card-heading h2, .finder-map-heading h2 { font-size: 1.6rem; }
  .finder-form { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 0 16px 22px; }
  .finder-field label { font-size: 1rem; }
  .finder-field input, .finder-field select { min-height: 56px; font-size: 16px; border-radius: 10px; }
  .finder-street-control input, .finder-house-control input { height: 56px; padding-right: 62px; }
  .finder-street-control #street-toggle { top: 0; bottom: auto; width: 52px; height: 56px; min-height: 56px; border-radius: 0 10px 10px 0; background: #b0d95710; }
  .finder-street-suggestions { position: static; margin-top: 8px; max-height: min(18rem, 32svh); border-radius: 10px; box-shadow: none; scroll-padding-block: 4px; }
  .finder-street-suggestions [role="option"] { display: flex; align-items: center; min-height: 52px; padding: 14px; line-height: 1.5; }
  .finder-street-suggestions [role="option"] + [role="option"] { border-top: 1px solid #b0d95720; }
  .finder-house-control #house-list, .finder-house-caret { width: 52px; }
  .finder-house-control #house-list { border-radius: 0 10px 10px 0; }
  .finder-house-caret { background: #b0d95710; border-radius: 0 10px 10px 0; }
  .finder-input-help { font-size: .875rem; }
  .finder-street-browser { border-radius: 10px; }
  .finder-street-browser summary { min-height: 52px; padding: 16px 14px; }
  .finder-picker-body { padding-inline: 14px; }
  .finder-field select[size] { height: 16rem; }
  .finder-field option { padding-block: 12px; }
  .finder-submit { min-height: 56px; gap: 12px; }
  .finder-privacy { padding: 16px; font-size: .875rem; }
  .finder-result { margin: 18px 16px; padding: 18px 14px; scroll-margin-top: calc(var(--mobile-header-height, 130px) + 16px); }
  .finder-result-district { padding: 14px 12px; }
  .finder-result-actions, .finder-street-choices { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .finder-result-actions :is(a, button), .finder-street-choices .button { width: 100%; min-height: 52px; overflow-wrap: anywhere; }
  .finder-street-assignment { padding: 16px 12px; }
  .finder-result-steps li { align-items: flex-start; line-height: 1.5; }

  /* Enlarge controls only. Do not change the map ratio, paths, colours or layers. */
  .finder-map-controls { top: 8px; left: 8px; right: 8px; grid-template-columns: minmax(0, 1fr) 48px 48px; gap: 6px; }
  .finder-map-controls button { min-width: 48px; min-height: 48px; padding: 8px; border-radius: 8px; }
  .finder-map-controls [data-map-zoom="reset"] { min-height: 48px; font-size: .8125rem; }
  .district-radial-dock { padding: 24px 16px; }
  .district-radial[data-enhanced] { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 18px; scrollbar-gutter: auto; }
  .district-radial-header { gap: 12px; padding: 12px; }
  .district-radial-close { min-height: 48px; }
  .district-radial-heading { min-width: 0; }
  .district-radial-heading h2 { font-size: 1.2rem; overflow-wrap: anywhere; }
  .district-radial-content { padding: 12px; gap: 16px; }
  .district-radial-preview { height: 250px; border-radius: 16px; }
  .district-radial-contacts { margin-inline: 12px; margin-bottom: max(16px, env(safe-area-inset-bottom)); }
  .district-card-links a, .district-card-map-button { min-height: 48px; }

  /* A compact four-step guide keeps the actual questions near the top. */
  .check-journey-page { padding: 28px var(--gutter) 36px; }
  .check-journey-page .check-intro h1 { font-size: clamp(2rem, 8vw, 2.6rem); }
  .check-journey-page .check-intro-description { font-size: 1rem; }
  .check-journey-page .check-intro-facts { gap: 8px; margin-block: 16px; }
  .check-journey-wrap { margin: 24px 0 20px; }
  .check-journey { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .check-journey-step, .check-journey-step:first-child { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 6px; min-height: 60px; padding: 10px 8px; border-radius: 10px; }
  .check-journey-step::before, .check-journey-step:first-child::before { clip-path: none; border-radius: 10px; }
  .check-journey-icon, .check-journey-step:first-child .check-journey-icon { position: static; width: 28px; height: 28px; border-width: 1px; box-shadow: none; }
  .check-journey-icon svg { width: 19px; height: 19px; }
  .check-journey-step[aria-current="step"] { outline: 2px solid var(--step-colour); outline-offset: 3px; }
  .check-journey-step[aria-current="step"] .check-journey-icon { box-shadow: none; }
  .check-journey-step > strong { margin: 0; font-size: .9375rem; }
  .check-journey-number, .check-journey-state { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .check-journey-page .check-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .check-journey-page .check-card { padding: 20px 16px; border-radius: 14px; }
  .check-journey-page .check-card h2 { margin-top: 20px; scroll-margin-top: calc(var(--mobile-header-height, 130px) + 20px); }
  .check-journey-page .check-field-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .check-journey-page .check-kinds { gap: 10px; }
  .check-journey-page .check-choice { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; min-height: 60px; padding: 14px; font-size: 1rem; }
  .check-journey-page .check-choice:has(input:checked) { padding: 13px; }
  .check-journey-page .check-field select, .check-journey-page .check-unit { min-height: 56px; }
  .check-journey-page .check-field select, .check-journey-page .check-unit input, .check-journey-page .check-details textarea { font-size: 16px; }
  .check-journey-page .check-parts { gap: 16px; }
  .check-journey-page .check-part { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 16px 12px; }
  .check-journey-page .check-number { padding-top: 0; }
  .check-journey-page .check-certificate, .check-journey-page .check-enquiry { padding: 16px; }
  .check-journey-page .check-checkbox { min-height: 52px; }
  .check-journey-page .check-card .button { min-height: 52px; min-width: 0; padding: 14px 12px; }
  .check-journey-page .check-actions { position: sticky; z-index: 3; bottom: 0; display: flex; flex-wrap: nowrap; gap: 10px; padding: 12px 0 max(12px, env(safe-area-inset-bottom)); margin-top: 24px; background: #0d1713; box-shadow: 0 -10px 16px #0d171310; }
  .check-journey-page .check-actions .button { width: auto; flex: 1 1 0; margin: 0; }
  .check-journey-page .check-actions .button-primary { flex-grow: 2; min-width: 0; }
  /* Do not crowd the software keyboard while someone is typing. */
  .check-journey-page form:has(input:not([type="radio"]):not([type="checkbox"]):focus, textarea:focus) .check-actions { position: static; }
  .check-journey-page .result-brief-heading { gap: 16px; }
  .check-journey-page .result-brief-heading > div { flex: 1 1 100%; min-width: 0; }
  .check-journey-page .result-panels { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .check-journey-page .result-panel, .check-journey-page .result-open { padding: 16px 12px; }
  .check-journey-page .result-full-report-content { padding: 16px 10px; }
  .check-journey-page .result-full-report > summary { padding: 16px 12px; }
  .check-journey-page .check-contact-actions { flex-direction: column; }
  .check-journey-page .check-contact-actions .button { width: 100%; }
  .certificate-guide-link { min-height: 48px; }

  @media (hover: none) {
    .check-journey-page .check-choice:hover { transform: none; }
  }
  @media (forced-colors: active) {
    .check-journey-step[aria-current="step"] { outline-color: Highlight; }
    .check-journey-page .check-actions { background: Canvas; }
  }
}
