/* Blank Canvas: the shell's own stylesheet (P1c.3, 10 Nov 2026). Our code only. It styles two things: the shell page itself (the
   finished HTML under the full-window sealed frame) and, inside the shell's CLOSED shadow root, our own controls in the top layer
   (the cookie notice, the contact and lead forms, the legal texts). They wear the design's theme through its named roles
   (--mps-role-*, set on the shell's host from the design's theme.json), with plain fallbacks, and pass WCAG 2.2 AA: 4.5:1 text
   (the theme's roles are contrast-checked at compile, themeValues.js), visible focus, 44px targets, and no motion.

   This file is linked on the shell DOCUMENT too (after the design's scoped sheets), so every rule for our controls begins with
   ":host " and so matches only inside the shadow root: on the document it matches nothing, and the design's finished HTML (what
   visitors and Google read before the frame shows, and for good when the design gives up) is never restyled by us. Our custom
   properties are defined on :host, so no rule uses one where it is undefined (the review of 10 Nov 2026: a global
   `:focus-visible { outline: 3px solid var(--ink) }` took the focus ring off the finished page). Pinned by
   blankCanvasShellStyle.test.js. */

/* ── The page ── */
html, body { margin: 0; height: 100%; }
#mps-frame { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; pointer-events: none; background: transparent; }
body.mps-ready #mps-frame { opacity: 1; pointer-events: auto; }
body.mps-ready #finished { visibility: hidden; }
/* A TOUCH SCREEN IS LAID OUT AS A COMPUTER IS (22 Nov 2026): the frame is fixed to the VISIBLE window (the rule above) and scrolls
   itself, natively, so the page follows the finger with the phone's own momentum. WAS (10 to 22 Nov 2026, "paged" mode): this
   document scrolled and the frame, a sticky window 100lvh tall, was moved by message after every scroll event, so on an iPhone the
   page trailed the finger and jumped (the CEO: "sacadat"). Once the frame shows, the finished page leaves the flow (still laid out,
   hidden and inert, never display none), so this document has nothing to scroll: a pull past the frame's own edge never moves it and
   never folds Safari's bar, so the frame's height (and the design's vh) holds and nothing sits under the bar. */
body.mps-touch.mps-ready #mps-page { position: absolute; top: 0; left: 0; width: 100%; height: 0; overflow: hidden; }
/* A PAGE WITH WINDOWS STILL SCROLLS AS THE PAGE (NO DEPLOY EVER S0, kept through the merge with the retirement above, 22 Nov 2026;
   shell.js PAGE_SCROLL, shellWindows.js wantsPageScroll): a window is placed in this document's coordinates, so on every screen a page
   whose island names windows keeps the 10 Nov layout: the frame as tall as the LARGE viewport from the start, then, once the frame has
   said its height, this document that tall and scrolling, the frame a sticky window at its top and the finished page out of the flow.
   A page without windows never carries these classes. */
body.mps-windowed #mps-frame { bottom: auto; height: 100vh; height: 100lvh; }
body.mps-windowed.mps-page #mps-page { position: absolute; top: 0; left: 0; width: 100%; height: 0; overflow: hidden; }
body.mps-windowed.mps-page #mps-frame { position: sticky; inset: auto; top: 0; display: block; }
/* THE INSTALLED APP OPENS THE APP (22 Nov 2026; shared/installedApp.js). In the business's installed app the shell's first act is to
   hand it to the app's front page, and its script is deferred, so this render-blocking sheet keeps the website unpainted until it
   does: nothing flashes. A shell left in that display mode on purpose (inside a frame) carries html.mps-stay and shows at once; a
   script that cannot run shows the website after 4 s rather than a blank page; a script that has moved (html.mps-leaving) keeps it
   unpainted however long the app's page takes to arrive. A browser tab, crawlers and the render job are not in this display mode: the
   rule never applies to them. */
@media (display-mode: standalone) {
  html:not(.mps-stay) { visibility: hidden; animation: mps-app-reveal 0s linear 4s forwards; }
  html.mps-leaving { visibility: hidden; animation: none; }
}
@keyframes mps-app-reveal { to { visibility: visible; } }
/* The finished HTML's own box: whatever its root's rules do (fixed, a z-index, a transform), it paints only inside this box, which no
   design selector can name (every design rule is prefixed with the root's [data-mps-canvas] inside it; scopeCss.js). */
#mps-page { contain: paint; position: relative; z-index: 0; }

/* ── Inside the shadow root (":host " scopes every rule to it) ── */
:host {
  all: initial;
  --ink: var(--mps-role-text, #1f1f1f); --paper: var(--mps-role-background, #ffffff);
  --accent: var(--mps-role-accent, #1f1f1f); --on-accent: var(--mps-role-onAccent, #ffffff);
  --r: 10px; --rb: 999px; --gap: 14px; /* the design's form's shapes (dialog.designed[data-*] below); defined here so every use has one */
}
:host dialog, :host .notice {
  font-family: var(--mps-role-body, system-ui, sans-serif); font-size: 16px; line-height: 1.5; color: var(--ink);
}
:host dialog { padding: 0; border: 0; background: transparent; max-width: min(560px, calc(100vw - 32px)); width: 100%; max-height: calc(100dvh - 32px); }
:host dialog::backdrop { background: rgb(0 0 0 / 0.55); }
:host .card { background: var(--paper); color: var(--ink); border-radius: 16px; padding: 20px 20px 24px; box-shadow: 0 18px 50px rgb(0 0 0 / 0.3); max-height: calc(100dvh - 32px); overflow: auto; box-sizing: border-box; }
:host .head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
:host h2 { margin: 0; font-family: var(--mps-role-display, inherit); font-size: 1.4rem; line-height: 1.2; }
:host .field { display: grid; gap: 6px; margin-bottom: 14px; }
:host label { font-weight: 600; }
:host input, :host textarea { font: inherit; color: var(--ink); background: var(--paper); border: 2px solid currentColor; border-radius: 10px; padding: 10px 12px; min-height: 44px; box-sizing: border-box; width: 100%; }
:host textarea { resize: vertical; }
:host .terms { display: flex; gap: 10px; align-items: center; margin: 4px 0 14px; font-weight: 500; }
:host .terms input { width: 24px; height: 24px; min-height: 24px; }
/* The ticks (the terms box, the consent field) take the design's accent (11 Nov 2026); the browser draws the tick itself in the colour
   that reads on it. */
:host input[type="checkbox"] { accent-color: var(--accent); }
:host .sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:host .hp { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:host button { font: inherit; min-height: 44px; min-width: 44px; border-radius: 999px; padding: 10px 20px; cursor: pointer; }
:host .send { background: var(--accent); color: var(--on-accent); border: 2px solid var(--accent); font-weight: 700; }
:host .plain, :host .close { background: transparent; color: var(--ink); border: 2px solid currentColor; }
:host .link { background: transparent; color: var(--ink); border: 0; text-decoration: underline; padding-inline: 8px; }
:host button:disabled { opacity: 0.7; cursor: progress; }
:host :focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
:host .send:focus-visible { outline-color: var(--ink); }
:host .status { min-height: 1.5em; margin: 0 0 12px; font-weight: 600; }
:host .done { margin: 0; font-weight: 600; }
:host .legal { white-space: pre-wrap; max-height: 60dvh; overflow: auto; }
/* Report this website (C9, 11 Nov 2026): the reasons as radios with their own labels, 24px targets; the press under the legal text. */
:host fieldset { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
:host legend { font-weight: 600; margin: 0 0 6px; padding: 0; }
:host .choice { display: flex; gap: 10px; align-items: center; min-height: 32px; font-weight: 500; }
:host .choice input { width: 24px; height: 24px; min-height: 24px; padding: 0; flex: none; accent-color: var(--accent); }
:host .report { margin: 14px 0 0; }
:host .notice { position: fixed; inset: auto 16px max(16px, env(safe-area-inset-bottom)) 16px; margin: 0 auto; max-width: 640px; max-height: min(70dvh, calc(100dvh - 120px)); overflow: auto; background: var(--paper); color: var(--ink); border: 2px solid currentColor; border-radius: 14px; padding: 16px; box-sizing: border-box; box-shadow: 0 10px 30px rgb(0 0 0 / 0.25); }
/* The cookie notice's title and its settings (P7, 19 Nov 2026). Its three choices are ONE style, the same size and weight, so none
   nudges a yes (Accept all, Reject all, Settings; OK and Settings where there is nothing to choose). */
:host .notice-title { margin: 0 0 8px; font-family: var(--f-display, var(--mps-role-display, inherit)); font-size: 1.1rem; line-height: 1.25; }
:host .notice .setting { margin: 0 0 12px; }
:host .notice .setting p { margin: 2px 0 0; }
:host .notice .setting-name { font-weight: 700; margin: 0 0 4px; }
:host .notice .setting .choice { font-weight: 700; }
:host .pick { background: transparent; color: var(--ink); border: 2px solid currentColor; font-weight: 700; }
:host .notice .row.links { margin-top: 6px; gap: 0 4px; }
:host .notice .row.links .link { min-height: 36px; padding-inline: 6px; font-size: 0.92rem; }
/* The design's menu is open (the kit's `menu`): the notice steps out of the way until it closes. */
:host .notice[data-tucked] { display: none; }
:host .notice p { margin: 0 0 12px; }
:host .notice .now { font-weight: 600; }
:host .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ── The design's own contact form (10 Nov 2026; shell.js openDesignedForm, shared/canvasContactForm.js). The design chooses names of its
   theme's colours and fonts (set by the shell on the dialog as --ink, --paper, --accent, --on-accent, --f-body, --f-display, each
   checked to 4.5:1 against this theme) and three fixed shapes, read here from data-*. Nothing of the design's CSS reaches this.
   On a phone it is the whole screen, inside the safe areas (the shell page is viewport-fit=cover). No motion, as for all our controls.
   Since 11 Nov 2026 EVERY surface of ours wears the same look (shellRules.js shellLook: the form's style, else the theme's roles): the
   legal texts, our contact and lead forms, and the cookie notice, so the shapes below are read from any .designed element. ── */
:host .designed { font-family: var(--f-body, var(--mps-role-body, system-ui, sans-serif)); }
:host .designed[data-corners="square"] { --r: 0px; }
:host .designed[data-corners="round"] { --r: 18px; }
:host .designed[data-button="square"] { --rb: 0px; }
:host .designed[data-button="rounded"] { --rb: 10px; }
:host .designed[data-spacing="compact"] { --gap: 10px; }
:host .designed[data-spacing="airy"] { --gap: 20px; }
/* The cookie notice in the design's look: its surface, corners, type and buttons (the colour pair is the look's, 4.5:1). */
:host .notice.designed { border-radius: calc(var(--r) * 1.4); padding: calc(var(--gap) + 4px); }
:host .notice.designed .send, :host .notice.designed .plain, :host .notice.designed .pick { border-radius: var(--rb); }
:host .notice.designed .row { gap: calc(var(--gap) * 0.7); }
:host .legal { font-family: var(--f-body, inherit); }
:host dialog.designed .card { border-radius: calc(var(--r) * 1.4); padding: calc(var(--gap) + 8px) calc(var(--gap) + 8px) calc(var(--gap) + 12px); }
:host dialog.designed h2 { font-family: var(--f-display, var(--mps-role-display, inherit)); }
:host dialog.designed .field { gap: 6px; margin-bottom: var(--gap); }
:host dialog.designed input, :host dialog.designed textarea, :host dialog.designed select { border-radius: var(--r); }
:host dialog.designed .send { border-radius: var(--rb); width: 100%; }
:host dialog.designed .terms input { border-radius: 4px; }
:host select { font: inherit; color: var(--ink); background: var(--paper); border: 2px solid currentColor; border-radius: 10px; padding: 10px 12px; min-height: 44px; box-sizing: border-box; width: 100%; }
:host .intro { margin: 0 0 var(--gap, 14px); }
:host .note, :host .hint { margin: 0; font-size: 0.9rem; }
:host .note { margin-bottom: var(--gap, 14px); }
:host .req { font-weight: 700; }
:host .err { margin: 0; font-weight: 600; min-height: 0; }
:host .err:empty { display: none; }
:host [aria-invalid="true"] { border-width: 3px; border-style: dashed; }
:host .field.consent { margin-bottom: var(--gap, 14px); }
:host .field.consent .terms { margin: 0; }
:host dialog.designed.sheet { margin: auto auto 0; max-width: min(640px, 100vw); }
:host dialog.designed.sheet .card { border-bottom-left-radius: 0; border-bottom-right-radius: 0; padding-bottom: max(calc(var(--gap) + 12px), env(safe-area-inset-bottom)); }
/* "Do you cover my area?" (Helen's website P9, 19 Nov 2026; shell.js openAreaCheck): one field, the answer under it in a live region with
   the button that opens the enquiry form. A small dialog on every screen (a phone keeps it centred, never the whole screen: one field). */
:host .area-form .send { margin-bottom: var(--gap, 14px); }
:host .area-answer:empty { display: none; }
:host .area-answer { border-top: 2px solid currentColor; padding-top: var(--gap, 14px); }
:host .area-said { margin: 0 0 var(--gap, 14px); font-weight: 700; font-size: 1.1rem; line-height: 1.35; font-family: var(--f-display, inherit); }
/* Good news is marked by the design's accent beside it (a bar, never a fill under the words, so the words keep the look's own 4.5:1). */
:host .area-said.covered { border-inline-start: 5px solid var(--accent); padding-inline-start: 12px; }
:host input[name="postcode"]:not([data-places]) { text-transform: uppercase; letter-spacing: 0.04em; }
/* WINDOWS (slice C, ND5; 22 Nov 2026, NOT deployed; shellWindows.js): another company's page in a hole of the design, placed by us. Above
   it, OUTSIDE the company's frame, a label strip naming the company's address (S3); in it, before the visitor's yes, our card: one line of
   what the company sees, the button that loads it, and its privacy page (D1, S8). The theme's roles, the same contrast as our notice. */
:host .win { box-sizing: border-box; display: block; font-family: var(--mps-role-body, system-ui, sans-serif); color: var(--ink); }
:host .win-strip { margin: 0; height: 24px; line-height: 24px; font-size: 13px; padding: 0 8px; background: var(--paper); color: var(--ink); border-radius: 6px 6px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-sizing: border-box; }
:host .win-body { position: absolute; top: 24px; left: 0; right: 0; bottom: 0; background: var(--paper); border: 2px solid var(--ink); box-sizing: border-box; overflow: hidden; }
:host .win-frame { display: block; width: 100%; height: 100%; border: 0; }
:host .win-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; height: 100%; padding: 12px; box-sizing: border-box; overflow: auto; font-size: 15px; line-height: 1.4; }
:host .win-line, :host .win-off { margin: 0; }
:host .win-off { padding: 12px; font-size: 15px; }
:host .win-show { font: inherit; font-weight: 600; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--accent); background: var(--accent); color: var(--on-accent); cursor: pointer; }
:host .win-show:focus-visible, :host .win-privacy:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
:host .win-privacy { color: var(--ink); font-size: 14px; }
/* Answered from the registration service area (22 Nov 2026, shell.js openRegistrationAreaCheck): the area drawn by our own map under the
   answer, the visitor's postcode marked on it by a drop pin in the design's accent with a paper keyline (never over words: the picture
   holds no words of ours; its credit is printed on it). The card scrolls when the map and the answer are taller than the screen. */
:host .area-map[hidden], :host .area-pin[hidden] { display: none; }
:host .area-map { position: relative; margin: var(--gap, 14px) 0 0; border: 2px solid currentColor; border-radius: var(--r, 12px); overflow: hidden; line-height: 0; }
:host .area-map img { display: block; width: 100%; height: auto; }
:host .area-pin { position: absolute; width: 26px; height: 26px; margin: -26px 0 0 -13px; box-sizing: border-box; background: var(--accent); border: 3px solid var(--paper); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); transform-origin: 50% 50%; box-shadow: 0 2px 6px rgb(0 0 0 / 0.35); }
:host .area-pin::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--paper); }
:host .area-said.premises { font-size: 1rem; }
@media (max-width: 600px) {
  /* A phone: the notice is a strip along the foot of the screen, its choices side by side, so the page's top (the menu and its Sign in)
     stays clear and in reach. */
  :host .notice { inset: auto 8px max(8px, env(safe-area-inset-bottom)) 8px; padding: 10px 12px 6px; max-height: 55dvh; font-size: 15px; }
  :host .notice-title { font-size: 1rem; margin-bottom: 4px; }
  :host .notice p { margin-bottom: 8px; font-size: 15px; line-height: 1.4; }
  :host .notice .row { gap: 6px; flex-wrap: nowrap; }
  :host .notice .pick { flex: 1 1 0; min-width: 0; padding: 8px 6px; white-space: nowrap; font-size: 15px; }
  :host .notice .row.links { margin-top: 2px; flex-wrap: wrap; }
  :host dialog.designed, :host dialog.designed.sheet { margin: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; }
  :host dialog.designed .card, :host dialog.designed.sheet .card {
    border-radius: 0; min-height: 100dvh; max-height: 100dvh; box-shadow: none;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  }
  :host dialog.designed.small { margin: auto; width: calc(100vw - 32px); max-width: calc(100vw - 32px); height: auto; max-height: calc(100dvh - 32px); }
  :host dialog.designed.small .card { border-radius: calc(var(--r) * 1.4); min-height: 0; max-height: calc(100dvh - 32px); box-shadow: 0 18px 50px rgb(0 0 0 / 0.3); padding: 20px 18px 22px; }
}
@media (prefers-reduced-motion: reduce) { :host * { transition: none !important; animation: none !important; } }
