/* Additive website corrections. Keep original themes and progressive form-step visibility. */
#estimate-form .estimate-step,
#estimate-form .optional-grid,
#estimate-form .form-field,
#tracker-form .form-field { min-width: 0; min-inline-size: 0; }
#estimate-form .estimate-step,
#estimate-form .optional-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#estimate-form .field-wide,
#estimate-form .estimate-step > .optional-grid { grid-column: 1 / -1; }
#estimate-form input:not([type="checkbox"]):not([type="radio"]),
#estimate-form textarea, #estimate-form select,
#tracker-form input { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; }
#tracker-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
#tracker-form button, #tracker-result { grid-column: 1 / -1; }
#tracker-result { min-width: 0; overflow-wrap: anywhere; }
#estimate-form [hidden], #tracker-form [hidden] { display: none !important; }
.tracker-fallback { margin: 0; background: #121518; color: #f5f5f1; font: 1rem/1.6 system-ui, sans-serif; }
.tracker-fallback main { box-sizing: border-box; max-width: 44rem; margin: 8vh auto; padding: 1.5rem; overflow-wrap: anywhere; }
.tracker-fallback a { color: #e7ce86; text-underline-offset: .2em; }
@media (max-width: 700px) {
  #estimate-form .estimate-step,
  #estimate-form .optional-grid,
  #tracker-form { grid-template-columns: minmax(0, 1fr); }
}

/* R9 reviewed navigation: one header and complete, scrollable menu on every public page. */
:root { --gar-header-height: 126px; --gar-header-bottom: 126px; }
html { scroll-padding-top: calc(var(--gar-header-height) + 16px); }
.skip-link { position: fixed; top: 0; left: 12px; transform: translateY(-160%); z-index: 1000; padding: 12px 18px; background: #dfbf78; color: #14201d; border-radius: 0 0 6px 6px; }
.skip-link:focus { transform: translateY(0); outline: 3px solid #fff; }
.gar-header, .gar-header * { box-sizing: border-box; }
.site-header.gar-header { position: sticky; top: 0; z-index: 100; background: #0a1414; color: #f6f4ec; border-bottom: 1px solid #344446; font-family: system-ui, sans-serif; }
.gar-header a { color: inherit; text-decoration: none; }
.gar-header button, .gar-header summary { font: inherit; color: inherit; cursor: pointer; }
.gar-header summary { list-style: none; }
.gar-header summary::-webkit-details-marker { display: none; }
.gar-header :is(a, button, summary):focus-visible { outline: 3px solid #f1dba0; outline-offset: 3px; }
.gar-header-inner { width: min(1440px, 100%); padding-inline: 28px; margin-inline: auto; }
.gar-utility { border-bottom: 1px solid #253436; }
.gar-utility .gar-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 40px; gap: 12px; }
.gar-location { font-size: 10px; letter-spacing: .12em; color: #adb8b5; }
.gar-language { position: relative; margin-left: auto; z-index: 104; }
.gar-language > summary { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 2px 6px 12px; font-size: 12px; }
.gar-language img { width: 24px; height: 16px; object-fit: cover; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px #ffffff30; }
.gar-language-panel { position: absolute; right: 0; top: 100%; width: 280px; max-width: calc(100vw - 24px); padding: 8px; border: 1px solid #4a5e5d; background: #152326; box-shadow: 0 18px 45px #0008; border-radius: 10px; }
.gar-language-panel button { width: 100%; min-height: 46px; display: grid; grid-template-columns: 24px 75px 1fr; align-items: center; gap: 10px; padding: 10px; border: 0; border-radius: 6px; background: none; text-align: left; font-size: 13px; }
.gar-language-panel button[aria-pressed="true"], .gar-language-panel button:hover { background: #2b3531; color: #efd494; }
.gar-main-nav { display: flex; align-items: center; gap: 24px; min-height: 86px; }
.gar-brand { display: flex; align-items: center; flex: 0 0 170px; }
.gar-brand img { display: block; width: 170px; height: auto; }
.gar-primary { display: flex; justify-content: flex-end; align-items: center; gap: 15px; flex: 1; min-width: 0; font-size: 13px; }
.gar-primary > a, .gar-primary > details > summary { display: flex; align-items: center; justify-content: center; min-height: 44px; gap: 6px; line-height: 1.25; }
.gar-primary > a:not(.gar-estimate-link):hover, .gar-primary > details > summary:hover { color: #efd494; }
.gar-primary .gar-estimate-link { background: #dfbf78; color: #14201d; font-weight: 750; border: 1px solid #dfbf78; border-radius: 7px; padding: 12px 16px; white-space: nowrap; }
.gar-primary .gar-estimate-link:hover { background: #efcf89; }
.gar-primary .gar-referral-link { color: #dfbf78; border: 1px solid #a38b58; border-radius: 7px; padding: 10px 12px; white-space: nowrap; }
.gar-referral-link svg { flex: none; }
.gar-referral-link span { min-width: 0; }
body.gar-menu-open { overflow: hidden; }
.gar-certificates { position: relative; }
.gar-certificates > div { position: absolute; top: calc(100% + 6px); left: 0; min-width: 170px; background: #152326; padding: 8px; border: 1px solid #4a5e5d; border-radius: 8px; box-shadow: 0 18px 45px #0007; }
.gar-certificates > div a { display: block; padding: 14px; border-radius: 5px; }
.gar-certificates > div a:hover { background: #283934; }
.gar-site-menu > summary { border: 1px solid #455754; border-radius: 7px; padding: 10px 12px; }
.gar-menu-panel { position: fixed; right: max(16px, calc((100vw - 1384px) / 2)); top: calc(var(--gar-header-bottom) + 8px); width: 430px; max-width: calc(100vw - 32px); max-height: calc(100vh - var(--gar-header-bottom) - 24px); max-height: calc(100dvh - var(--gar-header-bottom) - 24px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; background: #132123; border: 1px solid #516361; border-radius: 12px; padding: 0 18px 18px; box-shadow: 0 20px 65px #0009; text-align: left; }
.gar-menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 1; background: #132123; padding-block: 14px; border-bottom: 1px solid #344446; }
.gar-menu-heading strong { color: #dfbf78; font-size: 13px; letter-spacing: .08em; }
.gar-menu-close { background: #203235; border: 1px solid #5f726d; border-radius: 6px; padding: 10px 12px; min-height: 44px; }
.gar-menu-panel nav > a, .gar-menu-group > summary { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 12px 10px; border-bottom: 1px solid #2c4040; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.gar-menu-panel nav a:hover, .gar-menu-group > summary:hover { background: #243633; color: #f0d38e; }
.gar-menu-group > div { display: grid; padding: 4px 0 8px 12px; border-left: 2px solid #a58c54; margin: 4px 8px 10px; }
.gar-menu-group > div a { padding: 12px; min-height: 46px; line-height: 1.4; }
.gar-menu-socials { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 14px; }
.gar-menu-socials a { padding: 12px 8px; color: #dfbf78; }
.gar-anchor { display: block; scroll-margin-top: var(--gar-header-height); }
.gar-header ~ main :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { min-width: 0; max-width: 100%; }
#tracker-result .ops-update img { max-width: 100%; height: auto; display: block; object-fit: contain; }
@media (max-width: 1250px) and (min-width: 901px) {
 .gar-main-nav { gap: 15px; flex-wrap: wrap; padding-block: 12px; }
 .gar-brand { flex-basis: 145px; }
 .gar-brand img { width: 145px; }
 .gar-primary { justify-content: flex-end; gap: 10px; font-size: 12px; flex-wrap: wrap; }
 .gar-primary .gar-estimate-link { padding-inline: 12px; }
}
@media (max-width: 900px) {
 .gar-header-inner { padding-inline: max(14px, env(safe-area-inset-left)); }
 .gar-utility .gar-header-inner { min-height: 38px; }
 .gar-location { font-size: 8px; max-width: 155px; line-height: 1.5; }
 .gar-language > summary { min-height: 38px; font-size: 11px; }
 .gar-main-nav { display: grid; grid-template-columns: minmax(96px, 1fr) auto; gap: 8px 12px; padding-block: 10px; min-height: 0; }
 .gar-brand { grid-column: 1; grid-row: 1; width: 112px; }
 .gar-brand img { width: 112px; }
 .gar-primary { display: contents; }
 .gar-primary > .gar-contact-link { display: none; }
 .gar-primary > .gar-equipment-link, .gar-primary > .gar-about-link, .gar-primary > .gar-certificates { grid-row: 2; }
 .gar-main-nav { grid-template-columns: repeat(6, minmax(0, 1fr)); }
 .gar-brand { grid-column: 1 / 4; }
 .gar-primary > .gar-equipment-link { grid-column: 1 / 3; }
 .gar-primary > .gar-about-link { grid-column: 3 / 5; }
 .gar-primary > .gar-certificates { grid-column: 5 / 7; }
 .gar-primary > .gar-account-link { grid-row: 3; grid-column: 1 / 3; }
 .gar-primary > .gar-referral-link { grid-row: 3; grid-column: 3 / 5; padding-inline: 5px; white-space: normal; }
 .gar-primary > .gar-estimate-link { grid-row: 3; grid-column: 5 / 7; padding-inline: 5px; white-space: normal; }
 .gar-primary > .gar-site-menu { grid-row: 1; grid-column: 5 / 7; justify-self: end; }
 .gar-primary > a, .gar-primary > details > summary { font-size: 12px; text-align: center; min-height: 44px; }
 .gar-primary > a { overflow-wrap: anywhere; }
 .gar-certificates > div { right: 0; left: auto; min-width: 145px; }
 .gar-menu-panel { right: 12px; max-width: calc(100vw - 24px); top: calc(var(--gar-header-bottom) + 5px); max-height: calc(100vh - var(--gar-header-bottom) - var(--gar-mobile-bar-space, 72px) - 18px); max-height: calc(100dvh - var(--gar-header-bottom) - var(--gar-mobile-bar-space, 72px) - 18px); padding-bottom: max(18px, env(safe-area-inset-bottom)); }
 .gar-header .gar-main-nav { grid-template-columns: minmax(76px, 1fr) auto auto; gap: 8px; }
 .gar-header .gar-brand { grid-column: 1; grid-row: 1; width: 92px; }
 .gar-header .gar-brand img { width: 92px; }
 .gar-header .gar-primary > :not(.gar-estimate-link):not(.gar-site-menu) { display: none; }
 .gar-header .gar-primary > .gar-site-menu { grid-column: 2; grid-row: 1; }
 .gar-header .gar-primary > .gar-estimate-link { grid-column: 3; grid-row: 1; padding: 10px; max-width: 140px; }
 .gar-header ~ main :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { font-size: 16px; }
 body:has(.gar-site-menu[open]) details.contact-dock { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) { .gar-header * { scroll-behavior: auto; } }
@media (max-width: 900px) {
  :root { --gar-mobile-bar-space: calc(64px + env(safe-area-inset-bottom, 0px)); }
  body.redesign { padding-bottom: calc(var(--gar-mobile-bar-space) + 20px); }
  .mobile-bottom { box-sizing: border-box; padding-bottom: env(safe-area-inset-bottom, 0px); }
  details.contact-dock {
    bottom: calc(var(--gar-mobile-bar-space) + 12px);
    right: max(12px, env(safe-area-inset-right, 0px));
    max-width: calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  }
  .contact-dock-panel {
    box-sizing: border-box;
    max-width: calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    max-height: calc(100vh - var(--gar-mobile-bar-space) - 96px);
    max-height: calc(100dvh - var(--gar-mobile-bar-space) - 96px);
    overflow-y: auto;
    overscroll-behavior: contain;
    overflow-wrap: anywhere;
  }
}

/* R10 audit: long translated public actions must fit a narrow phone screen. */
.gar-header ~ main .btn { max-width: 100%; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  /* The earlier theme uses a more specific 14px input rule; keep text entry at
     16px to prevent focus zoom on iPhone while preserving file-picker controls. */
  .redesign #estimate-form :is(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea),
  .redesign #booking-form :is(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea) { font-size: 16px; }
}
