/* HL Websites preview kit — kit.css: reset and the parts site.js drives. Load it before css/site.css.
 * The builder styles everything else in css/site.css through the variables below. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, picture, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, figure, blockquote, ul, ol { margin: 0; }
h1, h2, h3, h4 { line-height: 1.15; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus, #2563eb); outline-offset: 3px; }
[id] { scroll-margin-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- placeholder for a missing fact (data-missing="<key>"): tidy, clearly "to be confirmed".
 * The dashed outline and the italic mark it; the text keeps its full colour so it passes the contrast check on any
 * background (no opacity). */
.tbc {
  display: inline-block;
  padding: 0.05em 0.55em;
  border: 1.5px dashed currentColor;
  border-radius: 0.4em;
  font-style: italic;
  line-height: 1.4;
}

/* ---- phone menu: [data-menu] is hidden on small screens until [data-menu-toggle] opens it */
@media (max-width: 799px) {
  [data-menu] { display: none; }
  [data-menu][data-open="true"] { display: block; }
}
@media (min-width: 800px) {
  /* !important: a site's own button class (display: grid) must not bring the toggle back on wide screens */
  [data-menu-toggle] { display: none !important; }
}

/* ---- lightbox */
.kit-lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-columns: 3rem 1fr 3rem; align-items: center; background: rgb(0 0 0 / 0.9); color: #fff; }
.kit-lightbox figure { grid-column: 2; display: grid; gap: 0.75rem; justify-items: center; }
.kit-lightbox img { max-height: 82vh; width: auto; border-radius: 0.25rem; }
.kit-lightbox p { font-size: 0.95rem; text-align: center; max-width: 60ch; }
.kit-lightbox button { background: none; border: 0; font-size: 2.5rem; line-height: 1; cursor: pointer; padding: 0.5rem; min-height: 44px; min-width: 44px; }
.kit-lightbox-close { position: absolute; top: 0.5rem; right: 0.75rem; }
.kit-lightbox-prev { grid-column: 1; }
.kit-lightbox-next { grid-column: 3; }

/* ---- tap-to-load video: [data-video] holds the poster <img> and a play badge */
[data-video] { position: relative; cursor: pointer; aspect-ratio: 9 / 16; max-width: 22rem; overflow: hidden; border-radius: var(--radius, 0.75rem); background: #000; }
[data-video].is-wide { aspect-ratio: 16 / 9; max-width: none; }
[data-video] > img { width: 100%; height: 100%; object-fit: cover; }
[data-video]::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 4rem; height: 4rem; transform: translate(-50%, -50%); border-radius: 50%; background: rgb(0 0 0 / 0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 2rem no-repeat; }
[data-video]:has(iframe)::after { display: none; }
.kit-video-frame { width: 100%; height: 100%; border: 0; }
