/* ==========================================================================
   Page blocks (app/Views/site/blocks/_*.php, App\Support\Blocks)

   Loaded on every page built from blocks (site/pages/show.php), after
   site.css, whose tokens it uses throughout - so every colour scheme reaches
   the blocks with nothing written here per scheme. Mobile first: the
   columns appear as the screen widens.
   ========================================================================== */

/* A content block that continues the band before it (text after text):
   one column of reading, not two sections. */
.block-joined { padding-top: 0; }

/* Text at full width when the editor or the template asks for it. */
.prose-wide { max-width: none; }

/* Quill's alignment and indent classes - the only classes rich text keeps
   (App\Support\Html). */
.prose .ql-align-center { text-align: center; }
.prose .ql-align-right { text-align: right; }
.prose .ql-align-justify { text-align: justify; }
.prose .ql-indent-1 { padding-left: 2em; }
.prose .ql-indent-2 { padding-left: 4em; }
.prose .ql-indent-3 { padding-left: 6em; }
.prose .ql-indent-4, .prose .ql-indent-5, .prose .ql-indent-6,
.prose .ql-indent-7, .prose .ql-indent-8 { padding-left: 8em; }
.prose h4 { font-size: var(--t-lg); margin-top: var(--space-3); }
.prose img { height: auto; }
.prose figure { margin: var(--space-3) 0; }
.prose figcaption { font-size: var(--t-sm); color: var(--muted); margin-top: var(--space-1); }
.prose a { color: var(--link, currentColor); }
.prose > :last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- image */
.block-figure { margin-block: 0; }
figure.block-figure:not(.container) { margin-inline: 0; }
.block-figure img { width: 100%; border-radius: var(--corner, 0); }
.block-figure figcaption { font-size: var(--t-sm); color: var(--muted); margin-top: var(--space-1); }
.block-image--full .block-figure img { max-height: 85vh; object-fit: cover; }
/* A size and place of its own (T.8): the picture and its caption at that
   width, never wider than the space, the height following. */
.block-image-frame { max-width: min(100%, var(--img-w, 100%)); }
.block-image-frame--centre { margin-inline: auto; }
.block-image-frame--right { margin-left: auto; }
.block-image-frame img { height: auto; }
/* Shapes: cropped to their proportions, the point chosen kept in view. */
img:is(.shape-square, .shape-circle) { aspect-ratio: 1; object-fit: cover; }
img.shape-landscape { aspect-ratio: 4 / 3; object-fit: cover; }
img.shape-photo { aspect-ratio: 3 / 2; object-fit: cover; }
img.shape-wide { aspect-ratio: 16 / 9; object-fit: cover; }
img.shape-portrait { aspect-ratio: 4 / 5; object-fit: cover; }
img.shape-tall { aspect-ratio: 2 / 3; object-fit: cover; }
.block-figure img:is(.shape-square, .shape-circle, .shape-landscape, .shape-photo, .shape-wide, .shape-portrait, .shape-tall) { height: auto; max-height: none; }
img.shape-circle { border-radius: 50% !important; }
img.focal-top-left { object-position: 0 0; }
img.focal-top { object-position: 50% 0; }
img.focal-top-right { object-position: 100% 0; }
img.focal-left { object-position: 0 50%; }
img.focal-right { object-position: 100% 50%; }
img.focal-bottom-left { object-position: 0 100%; }
img.focal-bottom { object-position: 50% 100%; }
img.focal-bottom-right { object-position: 100% 100%; }

/* -------------------------------------------------------- image and text */
.media-text { display: grid; gap: var(--space-3); align-items: center; }
.media-text-body h2 { margin-bottom: var(--space-2); }
.media-text-body .prose { color: var(--text-2); }
.media-text-media { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); order: -1; border-radius: var(--corner, 0); }
.media-text-media img { width: 100%; height: 100%; object-fit: cover; }
.media-text-media--original { aspect-ratio: auto; }
.media-text-media--original img { height: auto; }
.media-text-media--square { aspect-ratio: 1; }
.media-text-media--photo { aspect-ratio: 3 / 2; }
.media-text-media--wide { aspect-ratio: 16 / 9; }
.media-text-media--portrait { aspect-ratio: 4 / 5; }
.media-text-media--tall { aspect-ratio: 2 / 3; }

@media (min-width: 900px) {
    .media-text.has-image { gap: var(--space-5); }
    .media-text-media { order: 0; }
    /* Picture on the right: words first. The ratio is the picture's share. */
    .media-text--right.media-text--half { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
    .media-text--right.media-text--third { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
    .media-text--right.media-text--large { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
    .media-text--left.media-text--half { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
    .media-text--left.media-text--third { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
    .media-text--left.media-text--large { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
    .media-text--left .media-text-media { order: -1; }
}

/* ---------------------------------------------------------------- cards */
.feature-cards { list-style: none; margin: 0; padding: 0; gap: var(--space-4) var(--space-3); }
.feature-card { display: grid; gap: var(--space-1); align-content: start; }
.feature-card .card-media { margin-bottom: var(--space-1); }
.feature-icon { width: 40px; height: 40px; color: var(--heading, var(--text)); margin-bottom: var(--space-1); }
.feature-title { font-size: var(--t-lg); margin: 0; }
.feature-text { color: var(--text-2); margin: 0; }
.feature-card .link-arrow { margin-top: var(--space-1); justify-self: start; }

/* ---------------------------------------------------- call to action */
.section-accent .eyebrow,
.section-accent .lede { color: inherit; opacity: .85; }
/* On the button colour's own band, what is drawn in the button colour (a
   tick, a bar's fill, a picked plan, a button) takes its label colour
   instead, or it would vanish into the band; the band keeps its colour. */
.section-accent { background: var(--page-accent); color: var(--page-accent-ink);
    --accent: var(--page-accent-ink); --accent-ink: var(--page-accent); --accent-hover: color-mix(in srgb, var(--page-accent-ink) 82%, var(--page-accent));
    --btn-fill: var(--btn-on-accent); --btn-text: var(--btn-on-accent-text); }
.section-accent .btn-light { --btn-bg: var(--page-accent-ink); --btn-fg: var(--page-accent); --btn-border: var(--page-accent-ink); }
.section-accent .btn-light:hover { --btn-bg: transparent; --btn-fg: var(--page-accent-ink); --btn-border: var(--page-accent-ink); }
.section-accent .btn-ghost-light { --btn-fg: var(--page-accent-ink); --btn-border: currentColor; }
.section-accent .btn-ghost-light:hover { --btn-bg: var(--page-accent-ink); --btn-fg: var(--page-accent); --btn-border: var(--page-accent-ink); }
.section-accent :focus-visible { --focus: var(--page-accent-ink); }

/* --------------------------------------------------------- testimonials */
.testimonials { list-style: none; margin: 0; padding: 0; gap: var(--space-3); }
.testimonial figure { margin: 0; height: 100%; display: grid; gap: var(--space-2); align-content: space-between;
    padding: var(--space-3); background: var(--bg); border: 1px solid var(--line); border-radius: var(--corner, 0); }
/* The scheme's page colour, not the fixed paper: on Charcoal the card would
   be light under light text. */
.section-stone .testimonial figure { background: var(--bg); }
.testimonial blockquote { margin: 0; font-family: var(--font-display); font-size: var(--t-lg); line-height: 1.45; }
.testimonial blockquote p { margin: 0; }
.testimonial blockquote p::before { content: "\201C"; }
.testimonial blockquote p::after { content: "\201D"; }
.testimonial-by { display: flex; align-items: center; gap: var(--space-2); font-size: var(--t-sm); }
.testimonial-by strong { display: block; }
.testimonial-by small { display: block; color: var(--muted); font-size: var(--t-sm); }
.testimonial-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
/* A customer's own rating (Website -> Testimonials): stars only when they gave one. */
.entry-stars { margin: 0; display: flex; gap: .15rem; font-size: 1.05rem; line-height: 1; color: var(--faint); }
.entry-stars .is-on { color: var(--text); }
/* The block as a strip to swipe through. */
.testimonials-carousel .carousel-item { width: min(82vw, 380px); display: grid; }
.testimonials-carousel .carousel-item figure { height: 100%; }
/* Each testimonial's own layout (the layout round, L.4; site/partials/
   testimonial.php), in the block, a Content list and a service's page. */
figure.testimonial-style--photo { text-align: center; justify-items: center; align-content: start; }
.testimonial-style--photo .testimonial-face .testimonial-photo { width: 80px; height: 80px; }
.testimonial-style--photo .testimonial-by { justify-content: center; text-align: center; }
.testimonial-style--photo .entry-stars { justify-content: center; }
figure.testimonial-style--featured blockquote { font-size: var(--t-xl); line-height: 1.35; }
figure.testimonial-style--featured { border-color: var(--line-strong); }
/* A featured one takes two columns, where they are in columns; the others
   fill the gaps it would leave. */
:is(.testimonials.grid, .entry-grid--grid):has(> li > .testimonial-style--featured) { grid-auto-flow: dense; }
@media (min-width: 641px) {
    :is(.testimonials.grid, .entry-grid--grid) > li:has(> .testimonial-style--featured) { grid-column: span 2; }
    :is(.testimonials.grid, .entry-grid--grid) > li > figure.testimonial-style--featured blockquote { font-size: var(--t-2xl); line-height: 1.3; }
}
@container (max-width: 640px) {
    :is(.row-col, .popup-body) :is(.testimonials.grid, .entry-grid--grid) > li:has(> .testimonial-style--featured) { grid-column: auto; }
    :is(.row-col, .popup-body) figure.testimonial-style--featured blockquote,
    :is(.row-col, .popup-body) :is(.testimonials.grid, .entry-grid--grid) > li > figure.testimonial-style--featured blockquote { font-size: var(--t-lg); line-height: 1.45; }
}
/* A wall: columns, each testimonial at its own height. */
.testimonials--masonry { display: block; columns: 3 17rem; column-gap: var(--space-3); }
.testimonials--masonry > .testimonial { break-inside: avoid; margin-bottom: var(--space-3); }
.testimonials--masonry .testimonial figure { height: auto; }

/* --------------------------------------------------- columns (a row) */
/* Mobile first: one column under another; the layout from 641px, as the
   site's grids. Three columns go two by two below 900px, four two by two
   below 1024px. */
.row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--row-gap, var(--space-4)); align-items: start; }
.row-gap-none { --row-gap: 0px; }
.row-gap-s { --row-gap: var(--space-3); }
.row-gap-l { --row-gap: var(--space-5); }
.row-valign-middle { align-items: center; }
.row-valign-bottom { align-items: end; }
.row-valign-stretch { align-items: stretch; }
.row-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); align-content: start; min-width: 0; }
.row-col > * { min-width: 0; }
/* A strip to swipe through in a column stays in the column (no page gutters to bleed into). */
.row-col .carousel-track { margin-inline: 0; padding-inline: 0; scroll-padding-inline: 0; }
@media (max-width: 640px) {
    .row-reverse { display: flex; flex-direction: column-reverse; align-items: stretch; }
}
@media (min-width: 641px) {
    .row--50-50, .row--33-33-33, .row--25-50-25, .row--25-25-25-25 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .row--33-67 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
    .row--67-33 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
    .row--40-60 { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
    .row--60-40 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
}
@media (min-width: 900px) {
    .row--33-33-33 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .row--25-50-25 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); }
}
@media (min-width: 1024px) {
    .row--25-25-25-25 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Five and six (T.12): two by two from 641px, three from 900px, all from 1024px. */
@media (min-width: 641px) {
    .row--20-20-20-20-20, .row--17-17-17-17-16-16 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .row--custom { grid-template-columns: var(--row-cols); }
}
@media (min-width: 900px) {
    .row--20-20-20-20-20, .row--17-17-17-17-16-16 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .row--20-20-20-20-20 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .row--17-17-17-17-16-16 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
/* When they stack (T.12): on phones and tablets (below 1024px), or never -
   side by side at their widths on every screen. */
@media (max-width: 1023px) {
    .row.row-stack-tablet { grid-template-columns: minmax(0, 1fr); }
    .row-stack-tablet.row-reverse { display: flex; flex-direction: column-reverse; align-items: stretch; }
}
.row.row-stack-never { grid-template-columns: var(--row-cols); }
/* A column's own placing of its content (its Height settings), with or without a height. */
.row-col:is(.content-middle, .content-bottom) { display: flex; flex-direction: column; }
/* A block in a column fills it: no band of its own, no page gutters. One
   with a background of its own is a panel (BlockStyle). :where() keeps
   these below the space the owner chose (.pad-t-*). */
.row-col > :where(.block:not(.block-spacer)) { padding-block: 0; }
.row-col > :where(.block) .container { max-width: none; padding-inline: 0; margin-inline: 0; }
.row-col .prose { max-width: none; }
.row-col > :where(.block:is(.has-bg, .has-shade)), .row-col:where(.has-bg, .has-shade) { padding: var(--space-3); }
/* A block's own layouts follow its column's width, not the screen's: side
   by side only where the column has room for it. */
.row-col { container-type: inline-size; }
@container (max-width: 640px) {
    .row-col :is(.split, .contact-layout, .faq-layout) { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
    .row-col .media-text:is(.media-text--left, .media-text--right) { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
    .row-col .media-text-media { order: -1; }
    .row-col .split-aside { position: static; }
    .row-col :is(.grid-3, .grid-4) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .row-col .entry-grid:is(.entry-grid--cols-3, .entry-grid--cols-4) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .row-col .form-grid { grid-template-columns: minmax(0, 1fr); }
    .row-col .form-grid .span-2 { grid-column: auto; }
}
@container (max-width: 420px) {
    .row-col :is(.grid-2, .grid-3, .grid-4) { grid-template-columns: minmax(0, 1fr); }
    .row-col .entry-grid:is(.entry-grid--cols-2, .entry-grid--cols-3, .entry-grid--cols-4) { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------- block styles (BlockStyle) */
/* Backgrounds the owner chose. The tints, the button colour and the dark
   band are the scheme's (site.css); a picture is shaded so light text
   reads over it; a colour of their own carries its text colour inline. */
.section-stone-2 { background: var(--surface-2); }
.bg-image { background-size: var(--bg-size, cover); background-position: var(--bg-at, center); background-repeat: no-repeat; }
/* Where it is held, its size and how it moves (T.7). Fixed only where it
   can be: a pointer that hovers, a wide screen, motion welcome (phones and
   tablets cannot hold a background still, and draw it badly). */
.bg-at-top-left { --bg-at: left top; }
.bg-at-top { --bg-at: center top; }
.bg-at-top-right { --bg-at: right top; }
.bg-at-left { --bg-at: left center; }
.bg-at-right { --bg-at: right center; }
.bg-at-bottom-left { --bg-at: left bottom; }
.bg-at-bottom { --bg-at: center bottom; }
.bg-at-bottom-right { --bg-at: right bottom; }
.bg-contain { --bg-size: contain; }
@media (hover: hover) and (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
    .bg-fixed { background-attachment: fixed; }
}
/* Parallax: blocks.js marks it (data-parallax) and moves a layer a little
   taller than the block (--parallax). Without the script, or with less
   motion asked for, it is a still picture like any other. */
.bg-parallax { overflow: hidden; }
.bg-parallax[data-parallax] { background-image: none !important; }
.bg-parallax[data-parallax]::after {
    content: ""; position: absolute; inset: -15% 0; z-index: -2; pointer-events: none;
    background: var(--bg-img) var(--bg-at, center) / var(--bg-size, cover) no-repeat;
    transform: translate3d(0, var(--parallax, 0px), 0); will-change: transform;
}
.bg-colour { --heading: currentColor; --link: currentColor; --text: currentColor; --text-2: currentColor; --muted: currentColor; }
/* A band at an opacity of the owner's (BlockStyle `background_opacity`):
   its colour mixed with what is behind it, the page or a row's picture.
   A colour of their own carries its opacity inline. */
.bg-alpha.bg-a-surface { background: color-mix(in srgb, var(--surface) calc(var(--bg-alpha, 1) * 100%), transparent); }
.bg-alpha.bg-a-stone { background: color-mix(in srgb, var(--surface-2) calc(var(--bg-alpha, 1) * 100%), transparent); }
.bg-alpha.bg-a-accent { background: color-mix(in srgb, var(--page-accent) calc(var(--bg-alpha, 1) * 100%), transparent); }
.bg-alpha.bg-a-dark { background: color-mix(in srgb, var(--band) calc(var(--bg-alpha, 1) * 100%), transparent); }

/* Shading between a background and the words (BlockStyle::shade(), T.4):
   a layer under the content, over the background - a picture's (medium,
   as designed), a band's or a colour's. Its strength, its colour (black as
   designed; the scheme's dark and button colour as custom properties; white
   or the owner's own inline as --shade-colour) and, fading, the side it is
   strongest on. */
:is(.bg-image, .has-shade) { position: relative; isolation: isolate; }
:is(.bg-image, .has-shade)::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: var(--shade-colour, #000); opacity: var(--shade, .5);
}
.bg-image.overlay-none::before { display: none; }
.overlay-s { --shade: .3; }
.overlay-m { --shade: .5; }
.overlay-l { --shade: .7; }
.overlay-xl { --shade: .85; }
.overlay-c-dark { --shade-colour: var(--band); }
.overlay-c-accent { --shade-colour: var(--page-accent); }
.overlay-to-bottom::before { background: linear-gradient(to bottom, transparent, var(--shade-colour, #000)); }
.overlay-to-top::before { background: linear-gradient(to top, transparent, var(--shade-colour, #000)); }
.overlay-to-left::before { background: linear-gradient(to left, transparent, var(--shade-colour, #000)); }
.overlay-to-right::before { background: linear-gradient(to right, transparent, var(--shade-colour, #000)); }
/* The words a shading turns: light over a dark one on a light ground
   (on-dark, the dark band's type without its background), near black over
   a light one on a dark ground (on-light). */
.on-dark { color: var(--on-dark); --heading: currentColor; --link: currentColor; --focus: var(--on-dark);
    --accent: var(--band-accent); --accent-ink: var(--band-accent-ink); }
.on-dark .eyebrow { color: rgb(var(--on-dark-rgb) / .62); }
.on-dark .lede { color: rgb(var(--on-dark-rgb) / .78); }
.on-dark :focus-visible { --focus: var(--on-dark); }
.on-light { color: #111110; --heading: currentColor; --link: currentColor; --focus: #111110;
    --accent: var(--page-accent); --accent-ink: var(--page-accent-ink); --btn-fill: var(--page-btn-fill); --btn-text: var(--page-btn-text); }
.on-light :is(.eyebrow, .lede) { color: inherit; opacity: .8; }
.on-light :focus-visible { --focus: #111110; }

/* A light ground inside a dark one - a tinted block in a dark column, a
   light column in a dark row - has the page's type again, not the dark
   band's it sits in. The page's heading and link colours are taken at the
   root, before any band changes them. */
:root {
    --page-heading: var(--heading); --page-link: var(--link);
    --page-text: var(--text); --page-text-2: var(--text-2); --page-muted: var(--muted);
    --page-line: var(--line); --page-line-strong: var(--line-strong);
    --page-bg: var(--bg); --page-surface: var(--surface); --page-surface-2: var(--surface-2);
    --page-accent: var(--accent); --page-accent-ink: var(--accent-ink);
    --page-btn-fill: var(--btn-fill); --page-btn-text: var(--btn-text);
}
/* On a dark band - dark, the button colour, a picture, a dark column - the
   blocks' quieter type, their rules and their panels are drawn from the
   band's own colour: a card, a tab, a table or a control reads on it as it
   does on the page, instead of light type on a light card. */
:is(.section-ink, .section-accent, .on-dark, .on-light) {
    --text: currentColor;
    --text-2: color-mix(in srgb, currentColor 82%, transparent);
    --muted: color-mix(in srgb, currentColor 66%, transparent);
    --line: color-mix(in srgb, currentColor 22%, transparent);
    --line-strong: color-mix(in srgb, currentColor 40%, transparent);
    --bg: transparent;
    --surface: color-mix(in srgb, currentColor 8%, transparent);
    --surface-2: color-mix(in srgb, currentColor 14%, transparent);
}
/* The button colour's touches (a tick, a rule, a picked plan) on a dark
   band: the scheme's own where it shows there, else the light type
   (SiteTheme, --band-accent). Buttons keep their own colours. */
.section-ink { --accent: var(--band-accent); --accent-ink: var(--band-accent-ink); }
/* ...unless a light shading turned its words dark (on-light): the page's own. */
:is(.section-ink, .section-accent).on-light { --accent: var(--page-accent); --accent-ink: var(--page-accent-ink); --btn-fill: var(--page-btn-fill); --btn-text: var(--page-btn-text); }
:is(.section-ink, .section-accent, .on-dark) :is(.section-stone, .section-stone-2) {
    --text: var(--page-text); --text-2: var(--page-text-2); --muted: var(--page-muted);
    --line: var(--page-line); --line-strong: var(--page-line-strong);
    --bg: var(--page-bg); --surface: var(--page-surface); --surface-2: var(--page-surface-2);
    color: var(--page-text); --heading: var(--page-heading); --link: var(--page-link); --focus: var(--page-text);
    --accent: var(--page-accent); --accent-ink: var(--page-accent-ink); --btn-fill: var(--page-btn-fill); --btn-text: var(--page-btn-text);
}
:is(.section-ink, .section-accent, .on-dark) :is(.section-stone, .section-stone-2) .eyebrow { color: var(--muted); }
:is(.section-ink, .section-accent, .on-dark) :is(.section-stone, .section-stone-2) .lede { color: var(--text-2); opacity: 1; }
:is(.section-ink, .section-accent, .on-dark) :is(.section-stone, .section-stone-2) :focus-visible { --focus: var(--text); }
:is(.section-ink, .section-accent) .bg-colour:not(.section-ink) :is(.eyebrow, .lede) { color: inherit; }
:is(.section-ink, .section-accent) .bg-colour:not(.section-ink) :focus-visible { --focus: currentColor; }

/* Space above and below. */
:is(.block, .row-col).pad-t-none { padding-top: 0; }
:is(.block, .row-col).pad-t-s { padding-top: var(--space-3); }
:is(.block, .row-col).pad-t-m { padding-top: var(--section-y-tight); }
:is(.block, .row-col).pad-t-l { padding-top: var(--section-y); }
:is(.block, .row-col).pad-t-xl { padding-top: calc(var(--section-y) * 1.5); }
:is(.block, .row-col).pad-b-none { padding-bottom: 0; }
:is(.block, .row-col).pad-b-s { padding-bottom: var(--space-3); }
:is(.block, .row-col).pad-b-m { padding-bottom: var(--section-y-tight); }
:is(.block, .row-col).pad-b-l { padding-bottom: var(--section-y); }
:is(.block, .row-col).pad-b-xl { padding-bottom: calc(var(--section-y) * 1.5); }

/* Spacing in pixels (the Advanced tab, BlockStyle::spacing(), T.5): only
   the sides set, each from its custom property. After the columns' panel
   padding, which a side set replaces. On phones the sides are held in, so
   the words keep their width. */
.sp-pl { padding-left: var(--p-l); }
.sp-pr { padding-right: var(--p-r); }
.sp-mt { margin-top: var(--m-t); }
.sp-mr { margin-right: var(--m-r); }
.sp-mb { margin-bottom: var(--m-b); }
.sp-ml { margin-left: var(--m-l); }
@media (max-width: 640px) {
    .sp-pl { padding-left: min(var(--p-l), 16px); }
    .sp-pr { padding-right: min(var(--p-r), 16px); }
    .sp-mr { margin-right: min(var(--m-r), 16px); }
    .sp-ml { margin-left: min(var(--m-l), 16px); }
}

/* A height of its own (BlockStyle::height(), T.6): at least so tall, its
   content at the top, in the middle or at the bottom. Taller content still
   fits. */
:is(.block, .row-col):is(.h-s, .h-m, .h-l, .h-screen, .h-custom) { display: flex; flex-direction: column; justify-content: flex-start; }
:is(.h-s, .h-m, .h-l, .h-screen, .h-custom) > * { flex: none; }
.h-s { min-height: 240px; }
.h-m { min-height: 400px; }
.h-l { min-height: 600px; }
.h-screen { min-height: 100vh; min-height: 100svh; }
.h-custom { min-height: var(--block-h, 400px); }
:is(.block, .row-col).content-middle { justify-content: center; }
:is(.block, .row-col).content-bottom { justify-content: flex-end; }

/* Width, on the page (in a column the column decides). */
.w-narrow .container { max-width: 760px; }
.w-normal .container { max-width: 920px; }
.w-wide .container { max-width: var(--max); }
.w-full .container { max-width: none; }
:is(.w-wide, .w-full) .prose { max-width: none; }

/* Text alignment. */
.align-left { text-align: left; }
.align-centre { text-align: center; }
.align-right { text-align: right; }
.align-centre :is(h1, h2, h3, .lede, .section-head, .prose) { margin-inline: auto; }
.align-right :is(h1, h2, h3, .lede, .section-head, .prose) { margin-left: auto; }
.align-centre :is(.cta-actions, .section-head-split) { justify-content: center; }
.align-right .cta-actions { justify-content: flex-end; }

/* The devices it shows on: phones are 640px and narrower. */
@media (max-width: 640px) { .show-desktop { display: none !important; } }
@media (min-width: 641px) { .show-phone { display: none !important; } }

/* Coming into view. "As designed" is each block's own (its parts marked
   .reveal); any other choice moves the whole block, or nothing, instead.
   Reduced motion stills every .reveal (site.css). */
:is(.entrance-own, .entrance-none) .reveal { opacity: 1; transform: none; transition: none; }
.reveal.reveal-fade { transform: none; }

/* Looks a type offers (its `variants`). "Follow the design" adds the design's Look for the type (Designs::variant()), else none. */
.variant-bordered .feature-card,
.variant-shadow .feature-card,
.variant-panel .feature-card { padding: var(--space-3); border-radius: var(--corner, 0); }
.variant-bordered .feature-card { border: 1px solid var(--line); }
.variant-shadow .feature-card { background: var(--bg); box-shadow: 0 1px 3px rgb(0 0 0 / .08), 0 10px 28px rgb(0 0 0 / .08); }
.variant-panel .feature-card { background: var(--surface); }
.variant-panel:is(.section-stone, .section-stone-2) .feature-card { background: var(--bg); }
.variant-centred .feature-card { justify-items: center; text-align: center; }
.variant-centred .feature-card .link-arrow { justify-self: center; }
/* Soft and rounded (the Clinic design's): a tinted panel with round corners. */
.variant-soft .feature-card { padding: var(--space-4); background: var(--surface); border-radius: max(var(--corner, 0px), 1.25rem); }
.variant-soft:is(.section-stone, .section-stone-2) .feature-card { background: var(--bg); }
/* Numbered, in bold (the Agency design's): each card's number large in the
   heading font, a heavy rule above it. */
.variant-numbered .feature-cards { counter-reset: feature-card; }
.variant-numbered .feature-card { counter-increment: feature-card; padding-top: var(--space-3); border-top: 3px solid var(--heading, var(--text)); }
.variant-numbered .feature-card::before {
    content: counter(feature-card, decimal-leading-zero); color: var(--heading, var(--text));
    font: 700 clamp(2.25rem, 4vw, 3rem)/1 var(--font-display, inherit); letter-spacing: -.02em;
}
.variant-shadow .testimonial figure { border-color: transparent; box-shadow: 0 1px 3px rgb(0 0 0 / .08), 0 10px 28px rgb(0 0 0 / .08); }
.variant-plain .testimonial figure { padding: 0; border: 0; background: none; }

/* --------------------------------------------------------------- spacer */
.block-spacer { padding-block: var(--space-3); }
.block-spacer--s { padding-block: var(--space-2); }
.block-spacer--l { padding-block: var(--space-5); }
.block-spacer--xl { padding-block: var(--space-6); }
@media (max-width: 640px) {
    .block-spacer--phone-none { padding-block: 0; }
    .block-spacer--phone-none .block-rule { display: none; }
    .block-spacer--phone-s { padding-block: var(--space-2); }
    .block-spacer--phone-m { padding-block: var(--space-3); }
    .block-spacer--phone-l { padding-block: var(--space-5); }
}
.block-rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ----------------------------------------------------- video and map */
.embed-figure { margin-block: 0; }
.embed-figure figcaption { font-size: var(--t-sm); color: var(--muted); margin-top: var(--space-1); }
.embed { position: relative; aspect-ratio: 16 / 9; background: var(--ink); color: var(--on-dark); overflow: hidden; border-radius: var(--corner, 0);
    --heading: currentColor; --link: currentColor; }
.embed--standard { aspect-ratio: 4 / 3; }
.embed--square { aspect-ratio: 1 / 1; }
.embed--tall { aspect-ratio: 9 / 16; max-height: 80vh; margin-inline: auto; }
/* SoundCloud and Spotify: a player's height, not a picture's. */
.embed--sound { aspect-ratio: auto; height: 232px; }
.embed--sound .embed-consent { padding: var(--space-2); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-consent { position: absolute; inset: 0; display: grid; place-content: center; gap: var(--space-1);
    padding: var(--space-3); text-align: center; }
.embed-consent p { margin: 0; }
.embed-what { font-family: var(--font-display); font-size: var(--t-lg); }
.embed-note { font-size: var(--t-sm); color: rgb(var(--on-dark-rgb) / .72); max-width: 42ch; margin-inline: auto !important; }
.embed-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; justify-content: center; margin-top: var(--space-1) !important; }
.embed-link { color: var(--on-dark); font-size: var(--t-sm); text-underline-offset: .2em; }
.embed :focus-visible { --focus: var(--on-dark); }
/* A video before it plays: its picture (its own thumbnail unless one is
   given), a play button over the whole of it, and a link to watch it on
   YouTube or Vimeo. Without a picture, the dark panel. */
.embed-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.embed-heading { position: absolute; z-index: 2; inset: 0 0 auto; margin: 0; padding: var(--space-2) var(--space-3) var(--space-5); pointer-events: none;
    font-family: var(--font-display); font-size: var(--t-lg); font-weight: var(--heading-weight, 500); line-height: 1.2; color: var(--on-dark); text-align: start;
    background: linear-gradient(rgb(var(--scrim) / .6), rgb(var(--scrim) / 0)); }
.embed-play { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; color: var(--on-dark); text-decoration: none; }
.embed-play:focus-visible { outline-offset: -5px; }
.embed-play-icon { width: 80px; height: 80px; display: grid; place-items: center; border-radius: 50%;
    background: rgb(var(--scrim) / .55); border: 1px solid rgb(var(--on-dark-rgb) / .7); transition: transform .25s var(--ease), background-color .25s, border-color .25s; }
.embed-play-icon svg { width: 38px; height: 38px; fill: currentColor; margin-left: 4px; }
.embed-play:is(:hover, :focus-visible) .embed-play-icon { transform: scale(1.06); background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.embed-watch { position: absolute; z-index: 2; left: var(--space-2); bottom: var(--space-2); padding: .45rem .85rem; border-radius: 999px;
    background: rgb(var(--scrim) / .72); color: var(--on-dark); font-size: var(--t-sm); line-height: 1.2; text-decoration: none; }
.embed-watch:hover { background: rgb(var(--scrim) / .9); text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 480px) {
    .embed--wide:not(.embed--video) { aspect-ratio: 4 / 3; }
    .embed-note { display: none; }
    .embed-heading { font-size: var(--t-base); padding: var(--space-1) var(--space-2) var(--space-4); }
    .embed-play-icon { width: 60px; height: 60px; }
    .embed-play-icon svg { width: 28px; height: 28px; margin-left: 3px; }
    .embed-watch { left: var(--space-1); bottom: var(--space-1); }
}
.embed--tall { width: auto; }

/* ------------------------------------------- gallery block: carousel */
.carousel { position: relative; }
.carousel-track {
    list-style: none; margin: 0; padding: 0 0 var(--space-1);
    display: flex; gap: var(--space-2); overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: 0; scrollbar-width: thin;
}
.carousel-item { flex: 0 0 auto; scroll-snap-align: start; }
.carousel-item .gallery-zoom { display: block; height: clamp(220px, 32vw, 380px); }
.carousel-item .gallery-zoom img { height: 100%; width: auto; max-width: none; aspect-ratio: var(--r, 1.5); object-fit: cover; }
.carousel-track:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.carousel-controls { display: flex; gap: var(--space-1); justify-content: flex-end; margin-top: var(--space-2); }
.carousel-btn {
    width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer;
    background: transparent; color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--btn-radius);
}
.carousel-btn:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.carousel-btn:disabled { opacity: .35; cursor: default; background: transparent; color: var(--text); border-color: var(--line-strong); }
.carousel-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
@media (max-width: 640px) {
    .carousel-track { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
    .carousel-item .gallery-zoom { height: 220px; }
    .carousel-item .gallery-zoom img { max-width: 82vw; }
}

/* ------------------------------------------------------- contact block */
.block-contact .contact-form-wrap > .muted { margin-top: calc(var(--space-1) * -1); }

/* --------------------------------------------------------- page header */
.page-template-default .page-hero h1,
.page-template-full-width .page-hero h1 { max-width: 22ch; }

/* ==========================================================================
   The block library (4.3, 4.4): what every page may need. Each other new
   block's styles are a file of its own in css/blocks/, linked only where
   it is drawn (Blocks, `css`).
   ========================================================================== */

/* ----------------------------------------------------------------- HTML */
.block-html-body > :first-child { margin-top: 0; }
.block-html-body > :last-child { margin-bottom: 0; }
.block-html-body img { height: auto; }
.block-html-body table { width: 100%; border-collapse: collapse; }
.block-html-body :is(th, td) { padding: .6rem .75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.block-html-body th { font-weight: 600; }

/* ----------------------------------------------------------- Embed code */
.embed-code-frame { display: block; width: 100%; border: 0; background: transparent; transition: height .2s var(--ease); }

/* --------------------------------------------------- latest posts block */
.posts-carousel .carousel-item { width: min(82vw, 360px); display: grid; }
.posts-carousel .carousel-item .card { height: 100%; }
.posts-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
/* .post-card--row: site.css (the blog's lists use it too). */

/* ==========================================================================
   Every block, every width (the testing round, T.14): what the sweep found.
   ========================================================================== */

/* Form controls and share buttons keep the page's own colours on a dark or
   coloured ground: white fields with the band's light type were unreadable. */
:is(.section-ink, .section-accent, .on-dark, .on-light, .bg-colour) :is(.input, .select, .textarea, .choice, .share-list a, .share-copy) {
    --text: var(--page-text); --text-2: var(--page-text-2); --muted: var(--page-muted);
    --line: var(--page-line); --line-strong: var(--page-line-strong); --bg: var(--page-bg);
    --accent: var(--page-accent); --accent-ink: var(--page-accent-ink); color: var(--page-text);
}

/* A call to action with its own dark ground, in a column, is a panel. */
.row-col > .block-cta:is(.section-ink, .section-accent, .section-stone, .has-bg) { padding: var(--space-3); }
/* ...and follows the Style tab's alignment: words and buttons together. */
.align-centre .cta-band { flex-direction: column; align-items: center; text-align: center; }
.align-right .cta-band { flex-direction: column; align-items: flex-end; text-align: right; }

/* "Edge to edge" in the Style tab: pictures, videos and maps to the very
   edges, their captions kept off them. */
.w-full:is(.block-image, .block-video, .block-map, .block-slideshow, .block-before-after) .container { padding-inline: 0; }
.w-full:is(.block-image, .block-video, .block-map, .block-slideshow, .block-before-after) :is(figcaption, .section-head) { padding-inline: var(--gutter); }
/* The Image block's own "Edge to edge" gives way to a width the Style tab sets. */
.block-image--full:is(.w-narrow, .w-normal, .w-wide) figure.block-figure:not(.container) { margin-inline: auto; padding-inline: var(--gutter); }
.block-image--full.w-narrow figure.block-figure:not(.container) { max-width: 760px; }
.block-image--full.w-normal figure.block-figure:not(.container) { max-width: 920px; }
.block-image--full.w-wide figure.block-figure:not(.container) { max-width: var(--max); }
.block-image--full:is(.w-narrow, .w-normal, .w-wide) figcaption.container { padding-inline: 0; }

/* Widths the Style tab sets, for blocks with a measure of their own. */
:is(.w-normal, .w-wide, .w-full) .hours { max-width: none; }
.w-normal .quote-form { max-width: 920px; }
:is(.w-wide, .w-full) .quote-form { max-width: none; }
:is(.w-narrow, .w-normal) .contact-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }

/* Text alignment reaching each block's own rows of things. */
.align-centre :is(.buttons-row, .social-links, .share-list, .logos--row, [role="tablist"]) { justify-content: center; }
.align-right :is(.buttons-row, .social-links, .share-list, .logos--row, [role="tablist"]) { justify-content: flex-end; }
.align-centre :is(.icon-list-item, .testimonial-by, .review-by, .plan-price, .hours-head) { justify-content: center; }
.align-right :is(.icon-list-item, .testimonial-by, .review-by, .plan-price, .hours-head) { justify-content: flex-end; }
.align-centre :is(.feature-card, .step) { justify-items: center; }
.align-right :is(.feature-card, .step) { justify-items: end; }
/* A notice and a contact card's lines: the icon above its words. */
:is(.align-centre, .align-right) .notice-block { flex-direction: column; }
.align-centre .notice-block { align-items: center; }
.align-right .notice-block { align-items: flex-end; }
:is(.align-centre, .align-right) .contact-card-item { grid-template-columns: minmax(0, 1fr); }
:is(.align-centre, .align-right) .contact-card-icon { grid-row: auto; }
.align-centre :is(.notice-block-body, .contact-card-item) { justify-items: center; }
.align-right :is(.notice-block-body, .contact-card-item) { justify-items: end; }
.align-centre :is(.notice-block .link-arrow, .contact-card-directions) { justify-self: center; }
.align-right :is(.notice-block .link-arrow, .contact-card-directions) { justify-self: end; }
.align-centre :is(.hours, .quote-form, .heading-block-below, .reviews-summary) { margin-inline: auto; }
.align-right :is(.hours, .quote-form, .heading-block-below) { margin-left: auto; }
.align-centre .reviews-summary, .align-centre .reviews-source { justify-content: center; }
.align-centre .plan-features li, .align-right .plan-features li { padding-left: 0; }
.align-centre .plan-features li::before, .align-right .plan-features li::before { position: static; display: inline-block; margin-right: .5rem; vertical-align: .2em; }
/* A timeline keeps its own sides, whatever the alignment. */
:is(.align-centre, .align-right) .timeline { text-align: left; }
:is(.align-centre, .align-right) .timeline-title { margin-inline: 0; }
.align-centre .section-head-split, .align-right .section-head-split { flex-direction: column; align-items: inherit; }
.align-centre .section-head-split { align-items: center; }
.align-right .section-head-split { align-items: flex-end; }

/* In a narrow column (its own width, not the screen's). */
@container (max-width: 480px) {
    .row-col :is(.nl-fields, .nl-fields--name) { grid-template-columns: minmax(0, 1fr); }
    .row-col .nl-submit { width: 100%; }
    .row-col .choice-grid { grid-template-columns: minmax(0, 1fr); }
    .row-col .contact-list > div { grid-template-columns: minmax(0, 1fr); gap: .4rem; }
    .row-col .hours-table { width: 100%; }
    .row-col .hours-table :is(th, td) { padding-inline: .25rem; }
    /* A map or sound waiting for its button: as tall as its words need (a video keeps its shape). */
    .row-col .embed:not(.embed--video, :has(iframe)) { aspect-ratio: auto; min-height: 13rem; }
    .row-col .embed-play-icon { width: 56px; height: 56px; }
    .row-col .embed-play-icon svg { width: 26px; height: 26px; margin-left: 3px; }
    .row-col .embed-heading { font-size: var(--t-base); }
    .row-col .embed-note { display: none; }
}

