/* Base rules frozen from Automatic.css (3.3.8). Without them every rem-based token is 1.6x too large. */
html { font-size: var(--root-font-size) !important; }
body { min-block-size: 100vh; }
body:where(:not(.block-editor-writing-flow, .editor-styles-wrapper)) :where(p, h1, h2, h3, h4, h5, h6, ul, ol, li) { margin-block: 0; }

/* Line breaking that avoids stranded words (Automatic.css --text-text-wrap and --heading-text-wrap). */
body :where(p, li, blockquote, figcaption) { text-wrap: var(--text-text-wrap, pretty); }
body :where(h1, h2, h3, h4, h5, h6) { text-wrap: var(--heading-text-wrap, pretty); }

/* Text drawing, as on the live site (set globally by the old stack). Without it small text looks slightly different. */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body :where(h1, h2, h3, h4, h5, h6) { text-rendering: optimizeLegibility; }

/* Keyboard focus, as on the live site: 2px brand-red ring, 2px away. On dark sections (header, hero, call to action, mobile panel)
   the ring is the light red so it stays visible; form controls get the same ring (Fluent Forms removes the default one). */
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible { outline: var(--focus-width) solid var(--focus-color); outline-offset: var(--focus-offset); }
:is(.site-header, .nav-panel, .hero, .cta, .wp-block-navigation__responsive-container) :where(a, button, summary, input, select, textarea, [tabindex]):focus-visible { outline-color: var(--primary-light, #ffb3b3); }
.fluentform :is(input, select, textarea, button, .ff_upload_btn):focus-visible,
.fluentform .ff-el-form-check-input:focus-visible { outline: var(--focus-width) solid var(--focus-color); outline-offset: var(--focus-offset); box-shadow: none; }

/* On screens wider than 1920px live keeps the whole page in a centred 1920px box with a soft shadow, on white */
html { background-color: var(--white, #fff); }
body { max-width: 1920px; margin-inline: auto; box-shadow: 0 0 80px 0 rgb(26 26 26 / 20%); background-color: var(--white, #fff); }

/* Short pages (the thank-you pages): the page is at least as tall as the window and the footer sits at its bottom, as on live */
.wp-site-blocks { display: flex; flex-direction: column; min-height: 100vh; }
.wp-site-blocks > .wp-block-template-part:last-child { margin-block-start: auto; }
