/* Shared finishing details: readable controls, stable headings, small screens. */
html { color-scheme: dark; }
/* Static pages are ready immediately; do not cover them with a loading curtain. */
html body .page-curtain { display: none !important; }
html[data-theme="light"] { color-scheme: light; }
.section-title:hover { animation: none; letter-spacing: -0.015em; }
/* Anchor destinations should not look like selected cards. */
:target { animation: none; }
.breadcrumb { flex-wrap: wrap; row-gap: .4rem; }
.footer-col, .footer-brand, .form-group { min-width: 0; }
.footer-col a, .contact-method-value { overflow-wrap: anywhere; }
.form-group .form-error:not(:empty) { display: block; margin-top: .45rem; line-height: 1.45; }
.form-success, .form-error-msg { line-height: 1.6; text-align: left; }
html body #cookieBanner {
  padding: .85rem 1rem !important;
  gap: .8rem !important;
  bottom: max(14px, env(safe-area-inset-bottom)) !important;
}
html body #cookieBanner .cookie-banner-text {
  font-size: .8rem !important;
  line-height: 1.5 !important;
}
html body #cookieBanner button { min-height: 40px; padding-inline: 1rem; }
html body .nav-mobile { max-height: calc(100dvh - 60px); overflow-y: auto; overscroll-behavior: contain; }
.qf-overlay.qf-hdr .qf-body { overscroll-behavior: contain; }
.qf-overlay.qf-hdr .qf-panel { max-height: min(760px, calc(100dvh - 100px)); }
.contact-hero { padding-top: clamp(3.5rem, 7vw, 6rem); }
.contact-hero-proof li { background: none; border: 0; padding: .25rem 0; }
.contact-hero-proof { column-gap: 1.15rem; }
@media (max-width: 768px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea { font-size: 16px; }
  html body #cookieBanner {
    width: min(380px, calc(100% - 24px)) !important;
    max-width: calc(100% - 24px) !important;
    flex-direction: column !important;
    align-items: stretch !important;
    border-radius: 16px !important;
  }
  html body #cookieBanner .cookie-banner-actions { display: flex; width: 100%; gap: .65rem; }
  html body #cookieBanner button { flex: 1; min-height: 44px; font-size: .8rem !important; }
  .contact-hero { padding-top: 2.5rem; }
  .contact-hero-proof { display: flex; }
  .qf-overlay.qf-hdr .qf-panel { max-height: calc(100dvh - 24px); }
  .qf-overlay.qf-hdr .qf-search { font-size: 16px; }
  .qf-overlay.qf-hdr .qf-close { min-height: 44px; min-width: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Visually hidden status text remains available to assistive technology. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* White button labels need a darker blue than the decorative accent. */
html body .btn-primary { background: linear-gradient(135deg, #486ca9, #4267a1); color: #fff; }
html body .btn-primary:hover { background: linear-gradient(135deg, #416399, #3c5f94); color: #fff; }
html body #cookieBanner .btn-accept { background: #486ca9; color: #fff; }

/* Emergency instructions must never shrink into clipped, unreadable rows. */
.sos-step { flex-shrink: 0; }
.sos-step:not(.active):not(.done) { display: none; }
.sos-step.done .sos-step-desc { display: none; }
.sos-step-content { min-width: 0; }
.sos-step-desc { color: #c1c9d4; font-size: .92rem; line-height: 1.65; }
.sos-overlay-panel { max-height: calc(100dvh - 32px); }
.sos-steps { overscroll-behavior: contain; }
.sos-close { min-width: 44px; min-height: 44px; }
html body .sos-nav-btn--next.btn-primary { background: #f39a82; color: #20150f; }
html body .sos-nav-btn--next.btn-primary:hover { background: #ee8c72; color: #20150f; }

@media (max-width: 768px) {
  html body .nav .nav-actions { display: none !important; }
}
/* Search results need enough context to distinguish similar repair guides. */
.qf-overlay.qf-hdr .qf-results .qf-link-name { white-space: normal; line-height: 1.4; }
.qf-overlay.qf-hdr .qf-results .qf-link-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  line-height: 1.5;
}
