/* Bounded presentation repairs. No global colour, typography or image changes. */
#calculator-modal:not([open]) { display: none; }
#calculator-modal[open] {
    display: flex;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    overflow: hidden;
    z-index: 2147483647;
}
#calculator-modal::backdrop { background: transparent; }
#calculator-modal #calc-modal-inner {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    width: calc(100% - 2rem);
}
#calc-modal-inner > :first-child { flex-shrink: 0; gap: 0.5rem; }
#calculator-modal #calc-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1.5rem;
}
#calculator-modal [aria-label="Close calculator"] { color: #4b5563; flex-shrink: 0; }
#calculator-modal #calc-title { font-size: 1.375rem; line-height: 1.3; }
#calculator-modal #calc-error { color: #991b1b; margin-bottom: 1rem; }
#calculator-modal [aria-invalid="true"] { border-color: #991b1b; }
#calculator-modal [role="status"] { scroll-margin: 1rem; }
#calculator-modal :is(.text-gray-400, .text-gray-500) { color: #595264; }
#wizard-box .portal-input::placeholder,
.ppc-lead-form :is(input, textarea)::placeholder,
[data-presentation-contact-form] :is(input, textarea)::placeholder,
#calculator-modal input::placeholder {
    color: #716474;
    opacity: 1;
}
.guide-index-page .reading-time,
.blog-card-meta > span,
.site-redesign-about p.text-gray-400.uppercase.ml-2 { color: #595264; }
.guide-index-page .guide-card .text-brand-sky,
.blog-article-page article a.bg-white > span.text-xs.text-brand-sky,
[data-presentation-insurance] main a.bg-white > span.text-brand-sky,
[data-presentation-self-build] main h1 > .text-brand-sky,
[data-presentation-fcdo-table] .text-brand-sky { color: #22618a; }
.guide-index-page .guide-card .text-emerald-600,
.blog-article-page article a.bg-white > span.text-xs.text-emerald-600 { color: #047857; }
.guide-index-page .guide-card .text-amber-600,
.blog-article-page article a.bg-white > span.text-xs.text-amber-600 { color: #92400e; }
.blog-article-page article a.bg-white > span.text-xs.text-teal-600 { color: #0f766e; }
.site-redesign-about #Team h3.font-handwriting.text-white {
    display: inline-block;
    padding: 0 0.35em;
    background-color: #322536;
}
[data-presentation-social] { color: #1e40af !important; }
[data-presentation-social]:is(:hover, :focus-visible) {
    background-color: #1e40af !important;
    color: #fff !important;
}
:is(.home-logo-strip, [data-presentation-fcdo-table], [data-presentation-guide-table], .booking-stage-card,
.booking-location-option, #booking-retry, #booking-fallback a,
#calculator-modal button, #calculator-modal input, #calculator-modal select):focus-visible {
    outline: 3px solid #22618a;
    outline-offset: 3px;
}
#booking-status, #booking-fallback { padding: 0.75rem 1rem; color: #413544; }
#booking-fallback a { color: #65265f; text-decoration: underline; }
#booking-retry { margin-left: 0.75rem; color: #65265f; text-decoration: underline; }
#booking-fallback[hidden], #booking-retry[hidden] { display: none; }
#simply-cal-inline[aria-busy="true"] { min-height: 12rem; }

@media (max-width: 400px), (max-height: 500px) {
    #calc-modal-inner > :first-child { padding: 0.75rem 1rem; }
    #calculator-modal #calc-body { padding: 1rem; }
}
