/* Equal free space above and below a short form, scrollable space around a long one. */
body [data-dialog].is-open {
  display: flex !important;
  flex-direction: column;
  box-sizing: border-box;
  top: var(--dialog-view-top, 0px) !important;
  bottom: auto !important;
  height: var(--dialog-view-height, 100dvh) !important;
  padding: 48px 12px !important;
}
body [data-dialog].is-open .dialog-content {
  flex: none;
  margin: auto !important;
  box-sizing: border-box;
  width: min(100%, 560px) !important;
}
body [data-dialog].is-open > :has(> [data-close-dialog]) {
  position: fixed !important;
  inset: calc(var(--dialog-view-top, 0px) + 4px) 6px auto auto !important;
  z-index: 2;
}
body [data-close-dialog] { min-width: 40px; min-height: 40px; }
.sp-contact .contact-directions { padding: clamp(20px,4vw,52px); background: #eef2f8; border-radius: 24px; }
.contact-directions h2 { margin: 0 0 .65em; }
.contact-directions p { margin: 0 0 1em; }
.contact-directions a { display: inline-block; margin: 0 1em .5em 0; text-decoration: underline; }
.sp-contact:has(.contact-directions) { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
@media(max-width: 720px) { .sp-contact:has(.contact-directions) { grid-template-columns: 1fr; } }

.reading-entry { margin: 12px 18px 20px; padding: 10px; font: inherit; cursor: pointer; }
.reading-toolbar[hidden], .reading-entry[hidden] { display: none !important; }
body[data-reading] {
  --paper: #fff;
  --ink: #111;
  --reading-text: calc(18px * var(--reading-scale));
  background: var(--paper) !important;
  color: var(--ink) !important;
  font-size: var(--reading-text) !important;
}
body[data-reading="dark"] { --paper: #131313; --ink: #fff; color-scheme: dark; }
.reading-toolbar {
  position: relative; isolation: isolate; z-index: 1; box-sizing: border-box;
  display: flex; flex-wrap: wrap; align-items: center; gap: .7em 1.2em;
  padding: .7em 5%; border-bottom: 2px solid currentColor;
}
.reading-toolbar label { display: flex; flex-wrap: wrap; gap: .35em; align-items:center; min-width: 0; max-width: 100%; }
.reading-toolbar :is(button, select, a) { padding: .25em .5em; border: 1px solid currentColor; border-radius: 4px; }
body[data-reading] :is(.reading-toolbar, #site-content, [data-dialog], [data-mobile-menu], .site-dropdown),
body[data-reading] :is(.reading-toolbar, #site-content, [data-dialog], [data-mobile-menu], .site-dropdown) :where(div, p, span, h1, h2, h3, h4, a, button, label, input, select, textarea, li, td, th, strong, section, article, summary, ul, ol, nav, footer, header, aside, b, small) {
  color: var(--ink) !important; background-color: var(--paper) !important;
  font-size: var(--reading-text) !important; line-height: 1.45 !important;
  letter-spacing: normal !important; overflow-wrap: anywhere; text-shadow: none !important;
}
body[data-reading] #site-content :is(h1, h1 *) { font-size: calc(44px * var(--reading-scale)) !important; line-height: 1.16 !important; }
body[data-reading] #site-content :is(h2, h2 *) { font-size: calc(30px * var(--reading-scale)) !important; line-height: 1.24 !important; }
body[data-reading] #site-content :is(h3, h3 *) { font-size: calc(22px * var(--reading-scale)) !important; }
body[data-reading] :is(button, select, input, textarea, .ct-button, .hd-button) { border: 1px solid currentColor !important; }
body[data-reading] a[href] { text-decoration: underline !important; }
body[data-reading] :focus-visible { outline: 3px solid var(--ink) !important; outline-offset: 2px; }
body[data-reading] #site-header :is(.section:has(.layout-board), .section:has(.notice-marquee)),
body[data-reading] #site-content :is(.home-original-section, .sticky-header, .ct-hero-photo, .ct-hero-logo) { display: none !important; }
body[data-reading] #site-header { position: static !important; height: auto !important; }
body[data-reading] #site-header .section:has([data-mobile-menu]) { display: block !important; }
body[data-reading] [data-mobile-menu].is-open {
  display: block !important; width: min(100%,32em) !important; max-width: 100% !important;
  height: 100dvh !important; overflow-y: auto !important;
}
body[data-reading] [data-mobile-menu] :is(li, a, .mobile-menu-row, button) { height: auto !important; white-space: normal !important; }
body[data-reading] #site-content :is(.hero-section, .ct-hero, .ct-hero-content, .ct-hero-content > *, .layout-shell, .layout-board) {
  position: static !important; transform: none !important; height: auto !important; min-height: 0 !important; max-height: none !important;
}
body[data-reading] #site-content :is(.hero-section, .ct-hero, .home-desktop-section, .ct-section, .scaled-content) {
  display: block !important; box-sizing: border-box; width: min(90%, 72em) !important;
  margin: 1.5em auto !important; padding: 0 !important;
}
body[data-reading] #site-content .layout-board { width: 100% !important; }
body[data-reading] #site-content .layout-board > :is(.surface-background,.surface-overlay,.kind-shape,.kind-image:not(:has(a)),[data-reading-offcanvas]) { display: none !important; }
body[data-reading] #site-content .layout-board > .layout-item:not([data-reading-offcanvas]) {
  position: static !important; transform: none !important; width: auto !important; height: auto !important; margin: .45em 0;
}
body[data-reading] #site-content .layout-board .element-content { position: static !important; width: auto !important; height: auto !important; }
body[data-reading] #site-content .hero-section .layout-board { display: flex; flex-direction: column; }
body[data-reading] .hero-section .layout-item:has(h1) { order: -1; }
body[data-reading] #site-content :is(.ct-hero-content, .ct-copy, .hd-copy, .hd-card-copy, .ct-button, .hd-button, .bulk-hero-copy) {
  box-sizing: border-box; max-width: 100% !important; width: auto !important; height: auto !important; min-height: 0 !important; white-space: normal !important;
}
body[data-reading] #site-content :is(.hd-grid,.ct-split,.hd-split,.ct-hero-content,.ct-container,article) { min-width: 0; }
body[data-reading] #site-content :is(.ct-split,.hd-split,.hd-grid,.hd-offers,.hd-reasons-grid,.ct-section > div:has(>article)) {
  grid-template-columns: repeat(auto-fit,minmax(min(100%,24em),1fr)) !important;
}
body[data-reading] #site-content :is(.hd-card, .hd-offer, .hd-reason, .hd-card-copy) { height: auto !important; min-height: 0 !important; }
body[data-reading] #site-content :is(.hd-copy,.hd-card-copy,.hd-offer,article .ct-copy) { padding: .7em !important; }
body[data-reading] #site-content :is(.hd-card,.hd-offer,.hd-split) { border: 1px solid currentColor; margin-bottom: .6em; }
body[data-reading] #site-content :is(p,.hd-prose,.ct-copy,.ct-hero-content) { max-inline-size: 68ch !important; }
body[data-reading] #site-content :is(.hd-button,.ct-button) { display: inline-flex; padding: .45em .7em !important; }
body[data-reading] :is([data-dialog],.allure-captcha-dialog) :is(input:not([type=checkbox]),button[type=submit],select,textarea) {
  height: auto !important; max-width: 100% !important; min-height: 1.8em; white-space: normal;
}
body[data-reading] [data-dialog] .dialog-content { padding: .7em !important; }
body[data-reading] [data-close-dialog] svg g { fill: var(--ink); }
body[data-reading] [hidden] { display: none !important; }
body[data-reading] :is(.analytics-consent,.analytics-settings,.analytics-consent a,.analytics-consent button) {
  font-size: var(--reading-text); color: var(--ink); background: var(--paper);
}
body[data-reading] .analytics-consent { max-height: 55dvh; overflow: auto; }
body[data-reading] .analytics-consent__actions { flex-wrap: wrap; }
@media(max-width: 650px) {
  body[data-reading] #site-content :is(h1, h1 *) { font-size: calc(28px * var(--reading-scale)) !important; }
  body[data-reading] #site-content :is(h2,h2 *) { font-size: calc(24px * var(--reading-scale)) !important; }
}

/* Important rules in this layer precede legacy ID-based mobile typography. */
@layer readingFlow {
  body[data-reading] #site-content .layout-board > .layout-item:not([data-reading-offcanvas]),
  body[data-reading] #site-content .layout-board a.element-content {
    position: relative !important; inset: auto !important;
  }
  body[data-reading] .hero-section .kind-button .a-5dc9920c43d7 { display: none !important; }
  body[data-reading] .layout-board .kind-button .a-bce548a80779 { display: none !important; }
  body[data-reading] #site-content [data-dialog].is-open { background: rgb(0 0 0 / 70%) !important; }
  body[data-reading] #site-content .layout-board :is(.kind-text,.kind-button):not(:has(h1,h2,h3)) :is(.element-content,.element-content *) {
    font-size: var(--reading-text) !important;
    line-height: 1.45 !important;
  }
  body[data-reading] #site-content .layout-board .layout-item :is(h1,h1 *) {
    font-size: calc(clamp(28px,4vw,44px) * var(--reading-scale)) !important;
    line-height: 1.14 !important;
  }
  body[data-reading] .layout-board .layout-item :is(h1,h1 *),
  body[data-reading] [data-dialog] .dialog-content { text-transform: none !important; hyphens: auto; }
  body[data-reading] #site-content .hd-media :is(img,video) {
    display: block !important; width: 100% !important; height: auto !important; max-height: 55vh; object-fit: contain;
  }
  body[data-reading] #site-content :is(.hd-media,.hd-picture) { max-width: 100% !important; }
  body[data-reading] #site-content [data-dialog] :is(input,textarea)::placeholder { color: var(--ink) !important; opacity: .8; }
  body[data-reading] #site-content [data-dialog] button[type=submit] {
    padding: .35em .45em !important; background: var(--paper) !important; color: var(--ink) !important;
  }
  body[data-reading] :is(.reading-toolbar,.reading-toolbar *,[data-dialog] button) { font-family: Arial, sans-serif; }
  body[data-reading] .reading-toolbar select { max-width: 100%; min-width: 0; }
}
