/* V2.062: optional reading controls. Default design stays unchanged. */
/* V2.063: names and submit labels must reflow at intermediate widths too. */
body.p360-site .p360-reviews__embed :is(.wp-google-name,.grw-review-name,.rplg-review-name) {
  height: auto !important;
  max-height: none !important;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere;
  text-overflow: clip !important;
}
body.p360-site .p360-contact input[type="submit"] {
  max-width: 100%;
  height: auto !important;
  min-height: 56px;
  padding-inline: 16px !important;
  white-space: normal !important;
}
.p360-a11y-launcher { position: fixed; z-index: 900; left: max(16px,env(safe-area-inset-left)); bottom: max(16px,env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 18px; border: 2px solid #c8f75f; border-radius: 999px; background: #08111a; color: #fff; font: 700 .9375rem/1.3 var(--p360-font-body); box-shadow: 0 5px 24px #08111a33; cursor: pointer; }
.p360-a11y-launcher[hidden] { display: none !important; }
.p360-a11y-launcher svg { flex: 0 0 26px; color: #c8f75f; }
.p360-a11y-launcher:hover { background: #152330; }
.p360-a11y-dialog { --a11y-bg:#111d28; --a11y-text:#f7f8fa; --a11y-muted:#c7d0d8; --a11y-line:#7b8892; --a11y-soft:#1c2c3b; position: fixed; inset: auto auto 80px max(16px,env(safe-area-inset-left)); width: min(440px,calc(100% - 32px)); max-height: calc(100dvh - 112px); margin: 0; padding: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--a11y-line); border-radius: 24px; background: var(--a11y-bg); color: var(--a11y-text); box-shadow: 0 24px 80px #0006; font: 400 1rem/1.55 var(--p360-font-body); color-scheme: dark; }
.p360-a11y-dialog:not([open]) { display: none; }
.p360-a11y-dialog { max-width: calc(100vw - 32px); }
.p360-a11y-dialog::backdrop { background: rgba(8,17,26,.58); }
html[data-color-mode="light"] .p360-a11y-dialog { --a11y-bg:#fff; --a11y-text:#08111a; --a11y-muted:#39444e; --a11y-line:#77828b; --a11y-soft:#f4f1ea; color-scheme: light; }
.p360-a11y-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 24px 24px 16px; border-bottom: 1px solid var(--a11y-line); }
body.p360-site .p360-a11y-header h2 { margin: 6px 0 0; color: var(--a11y-text); font: 700 1.5rem/1.2 var(--p360-font-display); letter-spacing: -.02em; }
.p360-a11y-eyebrow { color: var(--a11y-muted); font: 700 .6875rem/1.5 var(--p360-font-body); letter-spacing: .12em; }
.p360-a11y-close { display: grid; flex: 0 0 44px; width: 44px; height: 44px; place-items: center; padding: 0; border: 1px solid var(--a11y-line); border-radius: 50%; background: var(--a11y-soft); color: var(--a11y-text); cursor: pointer; }
.p360-a11y-body { padding: 20px 24px 24px; }
body.p360-site .p360-a11y-body p { margin: 0 0 20px; color: var(--a11y-muted); font: 400 .9375rem/1.6 var(--p360-font-body); }
.p360-a11y-size { min-width: 0; margin: 0 0 20px; padding: 0; border: 0; }
.p360-a11y-size legend { float: none; width: auto; margin: 0 0 10px; color: var(--a11y-text); font-size: 1rem; font-weight: 700; }
.p360-a11y-size-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.p360-a11y-size label { position: relative; min-width: 0; margin: 0; cursor: pointer; }
.p360-a11y-size input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.p360-a11y-size span { display: grid; min-height: 48px; padding: 8px 2px; place-items: center; border: 1px solid var(--a11y-line); border-radius: 10px; background: var(--a11y-soft); color: var(--a11y-text); font-size: .875rem; font-weight: 700; }
.p360-a11y-size input:checked + span { border: 2px solid #365700; background: #c8f75f; color: #08111a; }
body.p360-site .p360-a11y-size input:focus-visible { outline: none !important; box-shadow: none !important; }
.p360-a11y-size input:focus-visible + span { outline: 3px solid var(--a11y-text); outline-offset: 3px; }
.p360-a11y-option { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 84px; margin: 0; padding: 16px 0; border-top: 1px solid var(--a11y-line); color: var(--a11y-text); cursor: pointer; }
.p360-a11y-option strong { display: block; font-size: 1rem; font-weight: 700; }
.p360-a11y-option small { display: block; margin-top: 4px; color: var(--a11y-muted); font-size: .875rem; font-weight: 400; line-height: 1.5; }
.p360-a11y-option input { appearance: none; position: relative; flex: 0 0 48px; width: 48px; height: 28px; margin: 0; border: 2px solid var(--a11y-line); border-radius: 999px; background: var(--a11y-soft); cursor: pointer; }
.p360-a11y-option input::before { position: absolute; inset: 4px auto auto 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--a11y-text); content: ""; }
.p360-a11y-option input:checked { border-color: #365700; background: #c8f75f; }
.p360-a11y-option input:checked::before { left: 24px; background: #08111a; }
.p360-a11y-option input:disabled { cursor: default; }
.p360-a11y-footer { margin-top: 12px; padding-top: 20px; border-top: 1px solid var(--a11y-line); }
.p360-a11y-reset { width: 100%; min-height: 48px; padding: 12px; border: 1px solid var(--a11y-line); border-radius: 12px; background: var(--a11y-soft); color: var(--a11y-text); font: 700 .9375rem/1.5 var(--p360-font-body); cursor: pointer; }
body.p360-site .p360-a11y-footer p { margin: 12px 0 0; font-size: .8125rem; }
.p360-a11y-status:empty { display: none; }
html[data-color-mode="light"] body.p360-site .p360-a11y-dialog :focus-visible { outline-color: #a93620 !important; }
html:not([data-color-mode="light"]) body.p360-site .p360-a11y-dialog :focus-visible { outline-color: #c8f75f !important; }

/* Relative sizing respects the visitor's browser default font setting. */
html[data-a11y-size="125"] { font-size: 125%; }
html[data-a11y-size="150"] { font-size: 150%; }
html[data-a11y-size="200"] { font-size: 200%; }
html[data-a11y-size]:not([data-a11y-size="100"]) body.p360-site { font-size: 1rem; }
html[data-a11y-links="true"] body.p360-site a[href] { text-decoration: underline !important; text-decoration-thickness: .1em !important; text-underline-offset: .2em; }
html[data-a11y-spacing="true"] body.p360-site :is(p,li,dd,dt,a,button,label,legend,summary,h1,h2,h3,h4,h5,h6,small) { line-height: 1.5 !important; letter-spacing: .12em !important; word-spacing: .16em !important; }
html[data-a11y-spacing="true"] body.p360-site p { margin-bottom: 2em !important; }
/* Flexible reading layouts avoid clipped text in decorative fixed-height cards. */
html.p360-reading-adjusted body.p360-site .p360-header { position: relative !important; top: auto !important; }
html.p360-reading-adjusted .p360-header__inner, html.p360-reading-adjusted .p360-header__actions { flex-wrap: wrap; height: auto; }
html.p360-reading-adjusted .p360-header__inner { padding-block: 12px; }
html.p360-reading-adjusted .p360-header__actions { justify-content: flex-end; }
html.p360-reading-adjusted body.p360-site .p360-header__cta.p360-button--small { max-width: 100%; width: auto; height: auto; padding: 12px !important; font-size: .8rem !important; white-space: normal; overflow: visible; }
html.p360-reading-adjusted .p360-nav { display: none !important; }
html.p360-reading-adjusted .p360-menu-toggle { display: inline-flex !important; }
html.p360-reading-adjusted .p360-service-card > a { position: relative; display: flex; min-height: inherit; flex-direction: column; justify-content: space-between; }
html.p360-reading-adjusted :is(.p360-service-card__top,.p360-service-card__content) { position: relative; inset: auto; }
html.p360-reading-adjusted body.p360-site :is(.p360-review-card__author,.p360-review-card__excerpt) { white-space: normal; overflow: visible; text-overflow: clip; }
html.p360-reading-adjusted body.p360-site .p360-review-card__excerpt { display: block; -webkit-line-clamp: unset; }
html.p360-reading-adjusted body.p360-site .p360-reviews__embed { --p360-review-columns: 1 !important; --p360-review-card-height: auto !important; }
html.p360-reading-adjusted body.p360-site :is(.p360-review-carousel__item,.p360-review-card) { height: auto !important; }
html.p360-reading-adjusted body.p360-site .p360-reviews__embed :is(.wp-google-name,.grw-review-name,.rplg-review-name) { height: auto !important; max-height: none !important; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; font-size: .9375rem !important; }
html.p360-reading-adjusted .p360-hero__stats { flex-wrap: wrap; }
html.p360-reading-adjusted .p360-contact__round-link { position: relative; inset: auto; width: auto; height: auto; min-height: 60px; margin-top: 24px; padding: 20px; border-radius: 16px; }
html.p360-reading-adjusted .p360-contact__headline { padding-bottom: 32px; }
html.p360-reading-adjusted body.p360-site .p360-contact input[type="submit"] { width: 100%; max-width: 100%; height: auto !important; min-height: 64px; padding: 16px !important; white-space: normal !important; }
html.p360-reading-adjusted body.p360-site .p360-quote-form :is(input:not([type="radio"]),textarea,select) { font-size: 1rem !important; }
html.p360-reading-adjusted .p360-a11y-size-options { grid-template-columns: repeat(2,minmax(0,1fr)); }

/* Contrast strengthens known color roles, never inverts media or the whole page. */
html[data-a11y-contrast="true"] body.p360-site { --p360-text-dark-muted:#25313c; --p360-text-light-muted:#f7f8fa; --p360-line:#77828b; --p360-line-light:#89949e; }
html[data-a11y-contrast="true"][data-color-mode="light"] body.p360-site { --p360-mode-copy:#25313c; --p360-text-light-muted:#25313c; --p360-mode-border:#77828b; }
html[data-a11y-contrast="true"] body.p360-site :is(.p360-review-card,.p360-post-card,.p360-project-card,.p360-inner-service-card a,.p360-service-directory__card a) { border-width: 2px !important; border-color: #77828b !important; }
html[data-a11y-contrast="true"] body.p360-site :is(.p360-hero__lead,.p360-hero__stats span,.p360-service-card p) { color: #fff !important; }
html[data-a11y-contrast="true"] .p360-a11y-dialog { --a11y-muted:#f7f8fa; }
html[data-a11y-contrast="true"][data-color-mode="light"] .p360-a11y-dialog { --a11y-muted:#25313c; }
body.p360-site :focus-visible { scroll-margin-block: 120px 90px; }
@media(max-width: 600px) {
  /* Keep the quote label readable beside the two existing preference controls. */
  body.p360-site .p360-header__inner { gap: 8px; }
  body.p360-site .p360-header .p360-brand { flex: 0 0 80px; width: 80px; min-width: 0; }
  body.p360-site .p360-header__actions { flex: 1 1 174px; min-width: 0; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  body.p360-site .p360-header .p360-header__cta.p360-button--small { flex: 0 0 auto; min-width: 110px; max-width: 100%; font-size: .75rem !important; white-space: normal; }
  :root { --p360-fixed-header-offset: 150px; }
  .p360-a11y-launcher { width: 52px; padding: 11px; }
  .p360-a11y-launcher > span { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
  .p360-a11y-dialog { inset: auto 0 0; width: 100%; max-width: 100vw; max-height: 90dvh; border-radius: 24px 24px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .p360-a11y-header { padding: 20px; }
  .p360-a11y-body { padding: 16px 20px 24px; }
  html.p360-reading-adjusted .p360-header__actions { width: 100%; justify-content: space-between; }
  html.p360-reading-adjusted :is(.p360-quote-grid,.p360-service-proof-strip__grid,.p360-hero__stats) { grid-template-columns: 1fr; }
  html.p360-reading-adjusted .p360-hero__scroll { display: none; }
}
@media(max-width: 440px) {
  html.p360-reading-adjusted .p360-a11y-option { align-items: start; flex-direction: column; gap: 12px; }
  html.p360-reading-adjusted .p360-a11y-option input { flex-basis: 28px; }
}
@media(forced-colors: active) {
  .p360-a11y-dialog,.p360-a11y-launcher,.p360-a11y-size span,.p360-a11y-reset,.p360-a11y-close { background: Canvas; color: CanvasText; border: 2px solid ButtonText; }
  .p360-a11y-option input { appearance: auto; accent-color: auto; }
  .p360-a11y-option input::before { display: none; }
  .p360-a11y-size input:checked + span { border: 3px solid Highlight; background: Highlight; color: HighlightText; }
}
