@atomic-ui/blocks 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +201 -7
- package/dist/{chunk-WGDMORWT.js → chunk-EGNQHWY6.js} +3 -1
- package/dist/chunk-EGNQHWY6.js.map +1 -0
- package/dist/{chunk-XNRFZCNB.js → chunk-JIITZUGI.js} +10 -7
- package/dist/chunk-JIITZUGI.js.map +1 -0
- package/dist/{chunk-7X4WGV6K.js → chunk-KDDXCGEZ.js} +4 -2
- package/dist/{chunk-7X4WGV6K.js.map → chunk-KDDXCGEZ.js.map} +1 -1
- package/dist/{chunk-SYTQIQT2.js → chunk-KOYQRJKY.js} +24 -5
- package/dist/chunk-KOYQRJKY.js.map +1 -0
- package/dist/{chunk-PIUPEB4I.js → chunk-VXQS5TAN.js} +4 -2
- package/dist/chunk-VXQS5TAN.js.map +1 -0
- package/dist/{chunk-2URXTXNQ.js → chunk-W3MK3EEO.js} +8 -6
- package/dist/chunk-W3MK3EEO.js.map +1 -0
- package/dist/chunk-X3U2SOVV.js +461 -0
- package/dist/chunk-X3U2SOVV.js.map +1 -0
- package/dist/components/changelog.js +1 -1
- package/dist/components/g2-case.js +2 -2
- package/dist/components/g2-shared.d.ts +2 -0
- package/dist/components/g2-shared.js +3 -1
- package/dist/components/g2-site.js +2 -2
- package/dist/components/g2-tools.js +2 -2
- package/dist/components/journey.d.ts +85 -16
- package/dist/components/journey.js +7 -3
- package/dist/components/site.js +1 -1
- package/dist/index.js +7 -7
- package/dist/standalone/atomic-ui-blocks.js +1069 -1019
- package/dist/standalone/atomic-ui-blocks.js.map +3 -3
- package/package.json +3 -3
- package/dist/chunk-2URXTXNQ.js.map +0 -1
- package/dist/chunk-GRKPKJZH.js +0 -275
- package/dist/chunk-GRKPKJZH.js.map +0 -1
- package/dist/chunk-PIUPEB4I.js.map +0 -1
- package/dist/chunk-SYTQIQT2.js.map +0 -1
- package/dist/chunk-WGDMORWT.js.map +0 -1
- package/dist/chunk-XNRFZCNB.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts", "../../src/components/marketing.ts", "../../src/components/card-grid.ts", "../../src/components/journey.ts", "../../src/components/studio.ts", "../../src/components/organisms.ts", "../../src/components/property.ts", "../../src/components/selling.ts", "../../src/components/estimator.ts", "../../src/components/site.ts", "../../src/components/scene.ts", "../../src/components/scrubber.ts", "../../src/components/changelog.ts", "../../src/components/g2-site.ts", "../../src/components/g2-shared.ts", "../../src/components/g2-case.ts", "../../src/components/g2-tools.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * @atomic-ui/blocks \u2014 the section blocks Impakt sites are built from: marketing blocks,\n * property and selling tools, the site frame and the changelog blocks. Standard\n * custom elements in Lit, styled only from design tokens, built to WCAG 2.2 AA.\n *\n * Importing this module defines every block. It imports `@atomic-ui/ui` first,\n * which defines the product components the blocks draw inside themselves, such\n * as `impakt-button`, `impakt-nav` and `impakt-select`, and gives them their\n * base class, tokens and style fragments.\n */\nimport '@atomic-ui/ui';\n\nexport {\n ImpaktHero,\n ImpaktFeatureList,\n ImpaktQuote,\n ImpaktStat,\n ImpaktAnnouncement,\n ImpaktSearchBar,\n type FeatureItem,\n type SearchField,\n} from './components/marketing';\nexport { ImpaktCardGrid, type CardItem } from './components/card-grid';\nexport { ImpaktJourneyButton, JOURNEY_STAGES, type JourneyStage } from './components/journey';\nexport {\n ImpaktWorkList,\n ImpaktStatRow,\n ImpaktFaq,\n ImpaktSiteMenu,\n ImpaktOffer,\n ImpaktPostCard,\n ImpaktHighlight,\n type WorkItem,\n type StatRowItem,\n type FaqItem,\n} from './components/studio';\nexport {\n ImpaktCarousel,\n ImpaktGallery,\n ImpaktLogoCloud,\n ImpaktSteps,\n ImpaktMediaSplit,\n ImpaktCtaBanner,\n ImpaktReviews,\n ImpaktNewsletter,\n gallerySpan,\n type GalleryItem,\n type LogoItem,\n type StepItem,\n type ReviewItem,\n} from './components/organisms';\nexport {\n ImpaktSitePlan,\n ImpaktMortgageCalculator,\n ImpaktBeforeAfter,\n ImpaktStickyBar,\n ImpaktLocationCard,\n monthlyPayment,\n type SitePlot,\n type NearbyItem,\n} from './components/property';\nexport {\n ImpaktPlanComparison,\n ImpaktVideo,\n ImpaktRegulatoryNotice,\n ImpaktStampDutyCalculator,\n ImpaktAffordabilityCalculator,\n ImpaktContactBlock,\n stampDuty,\n embedOf,\n SDLT,\n type PlanItem,\n type PlanRow,\n} from './components/selling';\nexport {\n ImpaktEstimator,\n estimate,\n phaseWeeks,\n type EstimatorQuestion,\n type EstimatorChoice,\n type EstimatorBand,\n type EstimatorPhase,\n type EstimateResult,\n} from './components/estimator';\nexport { ImpaktSiteHeader, ImpaktSiteFooter, ImpaktWordmark, type FooterLogLine, type FooterColumn } from './components/site';\nexport { ImpaktScene, type SceneDrive, type SceneLayout } from './components/scene';\nexport { ImpaktScrubber, type ScrubberStop } from './components/scrubber';\nexport {\n ImpaktReleaseCard,\n ImpaktReleaseList,\n ImpaktBranchList,\n ImpaktCheckList,\n ImpaktBranchTimeline,\n type DiffLine,\n type ReleaseItem,\n type Branch,\n type CheckItem,\n type TimelineLane,\n type TimelineMark,\n} from './components/changelog';\nexport {\n ImpaktStageTag,\n ImpaktSectionHead,\n ImpaktServiceCard,\n ImpaktCursor,\n ImpaktHandNote,\n ImpaktFacts,\n ImpaktNumberedList,\n ImpaktColumnList,\n ImpaktOfficeCard,\n STAGE_WORDS,\n type StageName,\n type FactItem,\n type NumberedItem,\n type ColumnListColumn,\n} from './components/g2-site';\nexport {\n ImpaktProcessLine,\n ImpaktWeekStrip,\n ImpaktCallout,\n ImpaktHypothesisCard,\n ImpaktBrowserFrame,\n type ProcessNode,\n type WeekDay,\n} from './components/g2-case';\nexport { ImpaktFlow, type FlowStep } from './components/g2-tools';\n", "import { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement, fontSize, fontWeight, lineHeight, space, spaceAround, t, token, type, iconSvg } from '@atomic-ui/ui';\n\n/** A heading at a level the author chose, drawn at a size the component chose. */\nconst heading = (level: number, text: string | TemplateResult, cls: string): TemplateResult =>\n html`<div class=${cls} role=\"heading\" aria-level=${level}>${text}</div>`;\n\nconst headingStyles = css`\n .h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; line-height: ${lineHeight('tight')}; }\n .eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${t.brand})); ${type('sm')} font-size: var(--impakt-font-size-eyebrow, var(--impakt-font-size-sm, 0.875rem)); font-family: ${t.fontEyebrow}; font-weight: var(--impakt-font-weight-eyebrow, ${fontWeight('semibold')}); letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .body { margin: 0; line-height: ${lineHeight('normal')}; max-inline-size: 65ch; }\n`;\n\n/**\n * The opening of a page: a short label, a big heading, a line of text, the\n * page's main actions and, beside them, a picture.\n *\n * Put the buttons in the `actions` slot. The picture goes beside the words on\n * a wide screen and below them on a phone, so the heading is always the first\n * thing read.\n *\n * @category layout\n * @icon hero\n * @role heading\n * A heading with more than words in it, such as a word picked out with\n * `impakt-highlight`, is slotted as `heading`; it stays the hero's heading at\n * its `level`, and `heading` is then only the fallback.\n *\n * @slot heading - The heading's words, when they hold more than text, such as an `impakt-highlight`.\n * @slot actions - The page's main buttons and links.\n * @slot search - A search bar across the bottom of a full-picture hero.\n */\nexport class ImpaktHero extends ImpaktElement {\n static properties = {\n eyebrow: { type: String },\n heading: { type: String },\n lead: { type: String },\n level: { type: Number, reflect: true },\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n treatment: { type: String, reflect: true },\n ratingText: { type: String, attribute: 'rating-text' },\n eyebrowIcon: { type: String, attribute: 'eyebrow-icon' },\n align: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A short label above the heading, such as the name of the development. */\n declare eyebrow: string;\n declare heading: string;\n /** A sentence or two under the heading. */\n declare lead: string;\n /** The heading's level in the page. A page's hero is usually its only level 1. */\n declare level: 1 | 2;\n declare imageSrc: string;\n /** What the picture shows. Leave empty only when it is decoration. */\n declare imageAlt: string;\n /** The picture beside the words, or filling the whole block with the words over it. */\n declare treatment: 'split' | 'cover';\n /** A short line of proof on the picture, such as \"4.8 from 312 buyers\". */\n declare ratingText: string;\n /** A small picture before the eyebrow on a full-picture hero. */\n declare eyebrowIcon:\n | 'none'\n | 'arrow-right'\n | 'arrow-left'\n | 'chevron-right'\n | 'chevron-down'\n | 'check'\n | 'close'\n | 'menu'\n | 'plus'\n | 'minus'\n | 'search'\n | 'external'\n | 'download'\n | 'home'\n | 'phone'\n | 'mail'\n | 'map-pin'\n | 'calendar'\n | 'clock'\n | 'user'\n | 'star'\n | 'heart'\n | 'shield'\n | 'leaf'\n | 'sun'\n | 'bolt'\n | 'key'\n | 'info'\n | 'warning'\n | 'document'\n | 'pound'\n | 'chat';\n /** Where the words sit. Centred heroes have no picture beside them. */\n declare align: 'start' | 'center';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.eyebrow = '';\n this.heading = '';\n this.lead = '';\n this.level = 1;\n this.imageSrc = '';\n this.imageAlt = '';\n this.treatment = 'split';\n this.ratingText = '';\n this.eyebrowIcon = 'none';\n this.align = 'start';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n .hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: ${space(8)}; align-items: center; }\n .hero.pictured { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }\n .words { display: flex; flex-direction: column; gap: ${space(4)}; }\n :host([align='center']) .words { align-items: center; text-align: center; margin-inline: auto; max-inline-size: 48rem; }\n .h { ${type('5xl')} letter-spacing: ${t.trackingTight}; text-wrap: balance; }\n .body { ${type('lg')} color: ${t.textMuted}; text-wrap: pretty; }\n @container (max-width: 40rem) { .h { ${type('4xl')} } }\n .actions { display: flex; flex-wrap: wrap; gap: ${space(3)} ${space(4)}; align-items: center; margin-block-start: ${space(2)}; }\n :host([align='center']) .actions { justify-content: center; }\n img { display: block; inline-size: 100%; block-size: auto; border-radius: ${t.radius2xl}; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: ${t.shadowLg}; }\n @container (max-width: 48rem) { .hero.pictured { grid-template-columns: minmax(0, 1fr); } }\n /* Cover: the picture fills the block edge to edge, a scrim keeps the words readable (1.4.3). */\n .cover { position: relative; display: flex; flex-direction: column; justify-content: center; min-block-size: clamp(44rem, 61vw, 55rem); margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); padding: ${space(32)} max(${space(8)}, calc(var(--impakt-bleed, 1) * (50vw - 50%))) ${space(24)}; overflow: hidden; color: #fff; --impakt-color-text-heading: #fff; }\n .cover img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }\n .cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(18 31 26 / 0.82) 0%, rgb(18 31 26 / 0.42) 55%, rgb(18 31 26 / 0.05) 100%); }\n .cover .words { position: relative; z-index: 1; max-inline-size: 48rem; }\n .cover .eyebrow { display: inline-flex; align-items: center; gap: ${space(2)}; align-self: flex-start; padding: ${space(2)} ${space(3.5)}; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); text-transform: none; letter-spacing: 0; }\n .chip-line { position: relative; z-index: 1; block-size: 0; }\n .chip { position: absolute; inset-block-start: ${space(14)}; inset-inline-end: ${space(9)}; display: inline-flex; align-items: center; gap: ${space(2.5)}; padding: ${space(3)} ${space(4.5)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; white-space: nowrap; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: ${t.radiusXl}; }\n .finder { position: relative; z-index: 1; margin-block-start: ${space(12)}; }\n .cover .h { font-size: clamp(3rem, 6.4vw, 5.75rem); line-height: 1; }\n .cover .body { color: rgb(255 255 255 / 0.92); max-inline-size: 40rem; }\n @container (max-width: 64rem) { .chip { display: none; } }\n @container (max-width: 30rem) { .finder { display: none; } }\n @container (max-width: 48rem) { .finder { margin-block-start: ${space(6)}; } .cover { justify-content: flex-end; min-block-size: 43.75rem; padding-block: ${space(32)} ${space(10)}; } .cover::after { background: linear-gradient(180deg, rgb(18 31 26 / 0.1) 0%, rgb(18 31 26 / 0.3) 42%, rgb(18 31 26 / 0.86) 100%); } .cover .h { font-size: 3rem; } }\n `,\n ];\n\n render(): TemplateResult {\n if (this.treatment === 'cover' && this.imageSrc) {\n return html`<div class=\"cover\" part=\"hero\">\n ${this.ratingText ? html`<div class=\"chip-line\"><div class=\"chip\">${iconSvg('star', '20px')}${this.ratingText}</div></div>` : nothing}\n <img src=${this.imageSrc} alt=${this.imageAlt} part=\"image\" />\n <div class=\"words\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrowIcon !== 'none' ? iconSvg(this.eyebrowIcon, '16px') : nothing}${this.eyebrow}</p>` : nothing}\n ${heading(this.level, html`<slot name=\"heading\">${this.heading}</slot>`, 'h')}\n ${this.lead ? html`<p class=\"body\">${this.lead}</p>` : nothing}\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>\n <div class=\"finder\"><slot name=\"search\"></slot></div>\n </div>`;\n }\n const pictured = Boolean(this.imageSrc) && this.align !== 'center';\n return html`<div class=\"hero ${pictured ? 'pictured' : ''}\" part=\"hero\">\n <div class=\"words\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n ${heading(this.level, html`<slot name=\"heading\">${this.heading}</slot>`, 'h')}\n ${this.lead ? html`<p class=\"body\">${this.lead}</p>` : nothing}\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>\n ${pictured ? html`<img src=${this.imageSrc} alt=${this.imageAlt} part=\"image\" />` : nothing}\n </div>`;\n }\n}\n\n/** One benefit or feature in a list of them. */\nexport interface FeatureItem {\n id?: string;\n icon?: string;\n heading: string;\n text?: string;\n /**\n * With `look=\"numbered\"`: a word or two read with the item when it is the\n * one that needs attention, such as \"Needs your attention\". Its dot then\n * turns to the accent; the word is what carries it to a screen reader.\n */\n attention?: string;\n}\n\n/**\n * Benefits or features side by side, each with an icon, a short heading and a\n * line of text: \"Ten years of cover\", \"Lower bills from day one\".\n *\n * The icons are decoration, because each heading already says what it is.\n * The items are a list, so a screen reader says how many there are.\n *\n * `look=\"ruled\"` draws each item under a 1px ink rule with no icon, the\n * heading at 24px and the text muted. `look=\"numbered\"` draws each as a card\n * with a 1px ink border, its number in monospace at the top left and a status\n * dot at the top right: ink, or the accent for the one item given\n * `attention`. The numbers and dots are decoration.\n *\n * @category content\n * @icon features\n */\nexport class ImpaktFeatureList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n columns: { type: String, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n layout: { type: String, reflect: true },\n look: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: FeatureItem[];\n declare columns: 'two' | 'three' | 'four';\n /** The level of each item's heading. One below the heading above the list. */\n declare headingLevel: 2 | 3 | 4;\n /** Icons above the words, or beside them. */\n declare layout: 'stacked' | 'inline';\n /** `icons` draws each item's icon. `ruled` sets each under a 1px ink rule. `numbered` sets each in a bordered card with its number and a status dot. */\n declare look: 'icons' | 'ruled' | 'numbered';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.columns = 'three';\n this.headingLevel = 3;\n this.layout = 'stacked';\n this.look = 'icons';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(8)} ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }\n :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n :host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }\n li { display: flex; flex-direction: column; gap: ${space(2)}; }\n :host([layout='inline']) li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: ${space(4)}; align-items: start; }\n :host([layout='inline']) .words { display: flex; flex-direction: column; gap: ${space(1)}; }\n .icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 48px; block-size: 48px; border-radius: ${t.radiusLg}; background: ${t.brandSubtle}; color: ${t.brand}; margin-block-end: ${space(2)}; }\n :host([layout='inline']) .icon { margin: 0; }\n .h { font-size: ${fontSize('lg')}; }\n .body { color: ${t.text}; }\n /* Ruled: a 1px ink rule above each item, no icon, the heading at 24px and the words muted. */\n :host([look='ruled']) li { gap: ${space(3)}; padding-block-start: ${space(5)}; border-block-start: ${t.borderThin} solid ${t.text}; }\n :host(:is([look='ruled'], [look='numbered'])) .icon { display: none; }\n :host(:is([look='ruled'], [look='numbered'])) .h { font-size: clamp(1.25rem, 3cqi, 1.5rem); font-weight: ${fontWeight('semibold')}; letter-spacing: -0.02em; line-height: 1.2; }\n :host(:is([look='ruled'], [look='numbered'])) .body { color: ${t.textMuted}; }\n :host(:is([look='ruled'], [look='numbered'])) .words { display: flex; flex-direction: column; gap: ${space(3)}; }\n /* Numbered: a card with a 1px ink border, its number at the top left and a status dot at the top right. */\n :host([look='numbered']) ul { gap: ${space(3)}; }\n :host([look='numbered']) li { gap: ${space(4)}; padding: ${space(6)}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusSm}; }\n .top { display: flex; align-items: center; justify-content: space-between; font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; color: ${t.text}; }\n .dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: ${t.text}; }\n .dot.attention { background: ${token('color.accent.default', '#ffd43b')}; box-shadow: inset 0 0 0 1px ${t.text}; }\n .sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n @media (forced-colors: active) { .dot { background: CanvasText; } .dot.attention { background: Highlight; } :host([look='numbered']) li { border-color: CanvasText; } }\n @container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n @container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n render(): TemplateResult {\n const numbered = this.look === 'numbered';\n return html`<ul part=\"list\">${(this.items ?? []).map(\n (item, index) => html`<li part=\"item\">\n ${numbered ? html`<div class=\"top\" aria-hidden=\"true\"><span>${String(index + 1).padStart(2, '0')}</span><span class=${item.attention ? 'dot attention' : 'dot'}></span></div>` : nothing}\n ${item.icon && this.look !== 'ruled' && !numbered ? html`<span class=\"icon\">${iconSvg(item.icon, '24px')}</span>` : nothing}\n <div class=\"words\">${heading(this.headingLevel, html`${item.heading}${numbered && item.attention ? html`<span class=\"sr\"> (${item.attention})</span>` : nothing}`, 'h')}${item.text ? html`<p class=\"body\">${item.text}</p>` : nothing}</div>\n </li>`,\n )}</ul>`;\n }\n}\n\n/**\n * Something a customer said, and who said it.\n *\n * It is a `blockquote` with a `figcaption`, so the words and the person are\n * tied together for a screen reader as well as on the screen.\n *\n * @category content\n * @icon quote\n */\nexport class ImpaktQuote extends ImpaktElement {\n static properties = {\n quote: { type: String },\n person: { type: String },\n about: { type: String },\n imageSrc: { type: String, attribute: 'image-src' },\n size: { type: String, reflect: true },\n align: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The words they said, without quotation marks. */\n declare quote: string;\n /** Who said it. */\n declare person: string;\n /** Who they are, such as \"Bought at Larkfield Meadows, 2025\". */\n declare about: string;\n /** A photo of them. It is decoration, because their name is beside it. */\n declare imageSrc: string;\n declare size: 'md' | 'lg';\n declare align: 'start' | 'center';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.quote = '';\n this.person = '';\n this.about = '';\n this.imageSrc = '';\n this.size = 'md';\n this.align = 'start';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; }\n figure { margin: 0; display: flex; flex-direction: column; gap: ${space(4)}; max-inline-size: 48rem; }\n :host([align='center']) figure { margin-inline: auto; align-items: center; text-align: center; }\n blockquote { margin: 0; font-family: ${t.fontHeading}; font-size: ${fontSize('lg')}; line-height: ${lineHeight('normal')}; color: inherit; }\n :host([size='lg']) blockquote { font-size: ${fontSize('2xl')}; line-height: ${lineHeight('tight')}; }\n blockquote::before { content: '\\\\201C'; } blockquote::after { content: '\\\\201D'; }\n figcaption { display: flex; align-items: center; gap: ${space(3)}; }\n img { inline-size: 48px; block-size: 48px; border-radius: 50%; object-fit: cover; }\n .name { font-weight: ${fontWeight('semibold')}; }\n .detail { color: ${t.textMuted}; font-size: ${fontSize('sm')}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<figure part=\"figure\">\n <blockquote part=\"quote\">${this.quote}</blockquote>\n ${this.person ? html`<figcaption>${this.imageSrc ? html`<img src=${this.imageSrc} alt=\"\" />` : nothing}<span><span class=\"name\">${this.person}</span>${this.about ? html`<br /><span class=\"detail\">${this.about}</span>` : nothing}</span></figcaption>` : nothing}\n </figure>`;\n }\n}\n\n/**\n * A number that makes a point, with what it counts beneath it: \"36 years\",\n * \"Building in Kent since 1987\".\n *\n * @category content\n * @icon stat\n */\nexport class ImpaktStat extends ImpaktElement {\n static properties = {\n figure: { type: String },\n label: { type: String },\n note: { type: String },\n size: { type: String, reflect: true },\n align: { type: String, reflect: true },\n };\n /** How large the number is drawn. */\n declare size: 'md' | 'lg' | 'xl';\n /** The number, written as it should appear, such as \"36\" or \"\u00A3280k\". */\n declare figure: string;\n /** What the number counts. */\n declare label: string;\n /** A line more, if the label needs it. */\n declare note: string;\n declare align: 'start' | 'center';\n\n constructor() {\n super();\n this.figure = '';\n this.label = '';\n this.note = '';\n this.size = 'md';\n this.align = 'start';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; }\n .stat { display: flex; flex-direction: column; gap: ${space(1)}; }\n :host([align='center']) .stat { align-items: center; text-align: center; }\n .value { font-family: ${t.fontHeading}; font-size: ${fontSize('3xl')}; font-weight: ${fontWeight('bold')}; line-height: 1; color: ${t.textHeading}; }\n :host([size='lg']) .value { font-size: ${fontSize('5xl')}; }\n :host([size='xl']) .value { font-size: clamp(2.75rem, 6vw, 4rem); }\n .label { font-weight: ${fontWeight('semibold')}; }\n .detail { color: ${t.textMuted}; font-size: ${fontSize('sm')}; }\n `,\n ];\n\n render(): TemplateResult {\n // Read as one phrase, \"36 years\", rather than a bare number and then a label.\n return html`<p class=\"stat\" part=\"stat\" style=\"margin:0\"><span class=\"value\">${this.figure}</span> <span class=\"label\">${this.label}</span>${this.note ? html` <span class=\"detail\">${this.note}</span>` : nothing}</p>`;\n }\n}\n\n/**\n * A thin line of news across the top of a page: a launch, a change to opening\n * hours. Keep it to one short sentence.\n *\n * @category feedback\n * @icon alert\n */\nexport class ImpaktAnnouncement extends ImpaktElement {\n static properties = {\n message: { type: String },\n linkText: { type: String, attribute: 'link-text' },\n href: { type: String },\n };\n declare message: string;\n declare linkText: string;\n declare href: string;\n\n constructor() {\n super();\n this.message = '';\n this.linkText = '';\n this.href = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; }\n .bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: ${space(2)} ${space(3)}; padding: ${space(2.5)} ${space(5)}; ${type('sm')} text-align: center; color: ${t.onBrand}; background: ${t.brand}; }\n :host { margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); }\n a { display: inline-flex; align-items: center; gap: ${space(1)}; min-block-size: ${t.targetMin}; color: inherit; font-weight: ${fontWeight('semibold')}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"bar\" part=\"bar\"><span>${this.message}</span>${this.linkText && this.href ? html`<a href=${this.href}>${this.linkText}${iconSvg('arrow-right', '14px')}</a>` : nothing}</div>`;\n }\n}\n\n/** One choice in a search bar. */\nexport interface SearchField {\n id?: string;\n /** The name it sends, such as \"bedrooms\". */\n name?: string;\n label: string;\n /** What it shows before anything is chosen. */\n placeholder?: string;\n /** The other choices, separated by commas. */\n options?: string;\n}\n\n/**\n * A row of choices and one button that finds what fits: where, how many\n * bedrooms, up to what budget.\n *\n * Each choice is a native select with a real label. It sends the visitor to\n * `action` with their choices in the address, so it works as a plain link can.\n *\n * @category form\n * @icon search\n * @fires {CustomEvent<{ values: Record<string, string> }>} impakt-submit - When the search is run. The choices are in detail.values.\n */\nexport class ImpaktSearchBar extends ImpaktElement {\n static properties = {\n items: { type: Array },\n buttonText: { type: String, attribute: 'button-text' },\n action: { type: String },\n label: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: SearchField[];\n declare buttonText: string;\n /** Where the search goes. Leave empty to handle it in the app. */\n declare action: string;\n /** What the search is called for a screen reader. */\n declare label: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.buttonText = 'Search';\n this.action = '';\n this.label = 'Search';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n form { display: flex; align-items: center; padding: ${space(3)}; background: ${t.surfaceCard}; color: ${t.text}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowXl}; }\n .field { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${space(1)}; padding: ${space(1.5)} ${space(5)}; }\n label { ${type('sm')} color: ${t.textMuted}; }\n select { inline-size: 100%; min-block-size: 28px; padding: 0; font: inherit; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.text}; background: transparent; border: 0; border-radius: ${t.radiusSm}; cursor: pointer; }\n select:focus-visible, button:focus-visible { outline: 2px solid ${t.brand}; outline-offset: 2px; }\n button { flex: none; min-block-size: 48px; padding: ${space(3)} ${space(6)}; font: inherit; font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; background: ${t.brand}; border: 0; border-radius: ${t.radiusLg}; cursor: pointer; }\n button:hover { background: ${t.brandHover}; }\n @container (max-width: 56rem) { form { flex-wrap: wrap; } .field { flex: 1 1 40%; } button { inline-size: 100%; } }\n @container (max-width: 30rem) { form { flex-direction: column; align-items: stretch; gap: ${space(2)}; } .field { flex: none; } }\n `,\n ];\n\n private submit(event: SubmitEvent): void {\n const data = new FormData(event.currentTarget as HTMLFormElement);\n const values: Record<string, string> = {};\n data.forEach((value, key) => {\n if (value !== '') values[key] = String(value);\n });\n this.dispatchEvent(new CustomEvent('impakt-submit', { detail: { values }, bubbles: true, composed: true }));\n if (!this.action) event.preventDefault();\n }\n\n render(): TemplateResult {\n return html`<form role=\"search\" aria-label=${this.label} method=\"get\" action=${this.action || nothing} @submit=${this.submit} part=\"form\">\n ${(this.items ?? []).map((field, i) => {\n const id = this.id_(`field-${i}`);\n const choices = String(field.options ?? '')\n .split(',')\n .map((o) => o.trim())\n .filter(Boolean);\n return html`<div class=\"field\"><label for=${id}>${field.label}</label><select id=${id} name=${field.name || field.label.toLowerCase().replace(/[^a-z0-9]+/g, '-')}>\n <option value=\"\">${field.placeholder || 'Any'}</option>${choices.map((c) => html`<option value=${c}>${c}</option>`)}\n </select></div>`;\n })}\n <button type=\"submit\">${this.buttonText}</button>\n </form>`;\n }\n}\n\ncustomElements.define('impakt-search-bar', ImpaktSearchBar);\ncustomElements.define('impakt-announcement', ImpaktAnnouncement);\ncustomElements.define('impakt-hero', ImpaktHero);\ncustomElements.define('impakt-feature-list', ImpaktFeatureList);\ncustomElements.define('impakt-quote', ImpaktQuote);\ncustomElements.define('impakt-stat', ImpaktStat);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-hero': ImpaktHero;\n 'impakt-feature-list': ImpaktFeatureList;\n 'impakt-quote': ImpaktQuote;\n 'impakt-stat': ImpaktStat;\n }\n}\n", "/**\n * A row of linked cards.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement, focusRing, fontSize, fontWeight, lineHeight, space, spaceAround, t, iconSvg } from '@atomic-ui/ui';\n\n/** One card in a row of them. */\nexport interface CardItem {\n id?: string;\n heading: string;\n text?: string;\n imageSrc?: string;\n imageAlt?: string;\n href?: string;\n badge?: string;\n}\n\n/**\n * A row of cards, each a picture, a heading, a line of text and a link: the\n * developments on a developments page, or the house types at one of them.\n *\n * **The whole card is the link's target, and the heading is its name.** The\n * link is on the heading, so a screen reader hears \"Larkfield Meadows, link\"\n * once rather than the whole card read out as one long link, and a pointer\n * can still press anywhere on the card.\n *\n * @category content\n * @icon cards\n */\nexport class ImpaktCardGrid extends ImpaktElement {\n static properties = {\n items: { type: Array },\n columns: { type: String, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n ratio: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: CardItem[];\n declare columns: 'two' | 'three' | 'four';\n /** The level of each card's heading. One below the heading above the cards. */\n declare headingLevel: 2 | 3 | 4;\n /** The shape of each card's picture. */\n declare ratio: '16:9' | '4:3' | '3:2' | '1:1';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.columns = 'three';\n this.headingLevel = 3;\n this.ratio = '4:3';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; --ratio: 4 / 3; }\n :host([ratio='16:9']) { --ratio: 16 / 9; }\n :host([ratio='3:2']) { --ratio: 3 / 2; }\n :host([ratio='1:1']) { --ratio: 1 / 1; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }\n :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n :host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }\n /* A card is drawn as impakt-card is: a 1px border in the text colour and no shadow. */\n li { position: relative; display: flex; flex-direction: column; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusXl}; box-shadow: none; overflow: hidden; }\n img { border-block-end: ${t.borderThin} solid ${t.text}; }\n img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; }\n .words { display: flex; flex-direction: column; gap: ${space(2)}; padding: ${space(5)}; flex: 1; }\n .h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-size: ${fontSize('lg')}; font-weight: ${fontWeight('bold')}; line-height: ${lineHeight('tight')}; }\n .h a { color: inherit; text-decoration: none; border-radius: ${t.radiusSm}; }\n .h a::after { content: ''; position: absolute; inset: 0; }\n li.linked:hover .h a { text-decoration: underline; text-underline-offset: 0.2em; }\n .body { margin: 0; line-height: ${lineHeight('normal')}; }\n /* A marketing badge: monospace capitals at 11px in a 1px outline. */\n .badge { align-self: flex-start; padding: 2px ${space(2)}; border-radius: ${t.radiusSm}; font-family: ${t.fontMono}; font-size: 0.6875rem; font-weight: ${fontWeight('medium')}; line-height: 1.4; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.text}; background: transparent; border: ${t.borderThin} solid ${t.text}; }\n @media (forced-colors: active) { li, img, .badge { border-color: CanvasText; } }\n .more { margin-block-start: auto; display: inline-flex; align-items: center; gap: ${space(1)}; color: ${t.link}; font-weight: ${fontWeight('semibold')}; }\n @container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n @container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<ul part=\"list\">${(this.items ?? []).map(\n (card) => html`<li class=${card.href ? 'linked' : ''} part=\"card\">\n ${card.imageSrc ? html`<img src=${card.imageSrc} alt=${card.imageAlt ?? ''} loading=\"lazy\" />` : nothing}\n <div class=\"words\">\n ${card.badge ? html`<span class=\"badge\">${card.badge}</span>` : nothing}\n <div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${card.href ? html`<a href=${card.href}>${card.heading}</a>` : card.heading}</div>\n ${card.text ? html`<p class=\"body\">${card.text}</p>` : nothing}\n ${card.href ? html`<span class=\"more\" aria-hidden=\"true\">${iconSvg('arrow-right', '1em')}</span>` : nothing}\n </div>\n </li>`,\n )}</ul>`;\n }\n}\n\ncustomElements.define('impakt-card-grid', ImpaktCardGrid);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-card-grid': ImpaktCardGrid;\n }\n}\n", "/**\n * The journey button: a site's one call to action, drawn at the stage a\n * section of the page is about.\n */\nimport { css, html, nothing, unsafeCSS, type TemplateResult } from 'lit';\nimport { ImpaktElement, focusRing, fontWeight, say, space, t, token } from '@atomic-ui/ui';\n\n/** The stages a button passes through on its way to being live, in order. */\nexport const JOURNEY_STAGES = ['note', 'wireframe', 'component', 'code', 'live'] as const;\nexport type JourneyStage = (typeof JOURNEY_STAGES)[number];\n\nconst isStage = (value: unknown): value is JourneyStage => (JOURNEY_STAGES as readonly string[]).includes(value as string);\nconst indexOf = (stage: JourneyStage): number => JOURNEY_STAGES.indexOf(stage);\n\n/** The arrow after the words. Drawn, so no font has to hold the glyph. */\nconst arrow = html`<svg class=\"arrow\" viewBox=\"0 0 20 12\" width=\"20\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M0 6h18M13 1l5 5-5 5\" />\n</svg>`;\n\n/** A pointer, drawn at the live button when the annotations are on. */\nconst pointer = html`<svg class=\"pointer\" viewBox=\"0 0 16 20\" width=\"16\" height=\"20\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M1 1v16l4.2-4 2.9 6.2 2.6-1.2-2.9-6.1H14Z\" stroke-width=\"1.2\" stroke-linejoin=\"round\" />\n</svg>`;\n\n/** One move of the motion spec, read from its tokens with the spec's values as the fallback. */\nconst move = (name: string, ms: number, easing: string) =>\n unsafeCSS(`--jt: var(--impakt-motion-journey-${name}-duration, ${ms}ms); --je: var(--impakt-motion-journey-${name}-easing, ${easing});`);\n\n/**\n * How much of a plate shows while the page is scrubbed: 1 at its own stage,\n * fading to 0 one stage either side. `--jp` is the stage as a number, 0 to 4.\n */\nconst showAt = (k: number) => `clamp(0, min(calc(1 + var(--jp) - ${k}), calc(1 - var(--jp) + ${k})), 1)`;\n\n/**\n * A call to action drawn as the thing it once was: a sticky note from a\n * workshop, a wireframe box, a designed component, the code that renders it,\n * and at last the live button. A page shows it at the stage each section is\n * about, so the same button is seen being made as the page is read.\n *\n * **It is the same link at every stage.** Whatever it is drawn as, it is one\n * `<a>` whose name is its words, so a screen reader and a keyboard meet an\n * ordinary link; the note, the wireframe cross, the measuring marks and the\n * lines of code around it are decoration and are hidden (1.3.1, 4.1.2). Its\n * target is at least 44px tall at every stage (2.5.8).\n *\n * **A page that shows it more than once sets `decorative` on the copies.** A\n * decorative one is a picture of the button, not a control: it has no link\n * and is hidden from a screen reader, so the page does not hold five links\n * that say the same thing (2.4.4).\n *\n * **It keeps its shape as it scales.** The drawing is about 14 wide to 9\n * tall at any width, 560 by 360 on a wide page and 347 by 223 on a phone, and\n * everything in it is sized from its own width.\n *\n * **One button can follow the page.** Give `track` a selector for the page's\n * sections, each carrying `data-journey-stage`, and the button takes the stage\n * of whichever section is across the middle of the screen; an\n * IntersectionObserver watches for that. Between two sections the move is\n * scrubbed by the scroll: the next stage fades in as the next section rises,\n * and is complete as it crosses the middle of the screen. The scroll is read\n * at most once a frame, and only while a tracked section is on screen.\n *\n * **Each move has its own timing**, from the motion spec: flatten 640ms, ink\n * in 560ms, compile 720ms, ship 600ms with an overshoot, lift 180ms on hover\n * and press 140ms. Each is read from `--impakt-motion-journey-<move>-duration`\n * and `-easing`. **Only transforms, opacity and colour move**, so a change of\n * stage costs no layout. With reduced motion asked for, a stage cuts straight\n * to the next, nothing is scrubbed, and pointing at the live button changes\n * its colour only (2.3.3).\n *\n * **`annotations` draws the design notes around it**, as the site's motion\n * frames show: the stage's caption above, a handwritten note in the margin at\n * the note stage, the width and height marks at the wireframe and component,\n * the spec tags under the component and a pointer at the live button. They\n * are decoration and are hidden from a screen reader. Leave it off when the\n * button is a plain call to action.\n *\n * The words on every fill are a pair the tokens already measured: the accent\n * with its own text colour, and the text colour with the card colour (1.4.3).\n * A brand whose ink is dark may colour the words in the code window by\n * setting `--impakt-journey-code-words`.\n *\n * @category action\n * @icon button\n * @fires {CustomEvent<{ stage: JourneyStage }>} impakt-journey-stage - When a tracked button changes stage as the page scrolls.\n */\nexport class ImpaktJourneyButton extends ImpaktElement {\n static properties = {\n stage: { type: String, reflect: true },\n label: { type: String },\n href: { type: String },\n decorative: { type: Boolean, reflect: true },\n track: { type: String },\n code: { type: Array },\n annotations: { type: Boolean, reflect: true },\n captions: { type: Array },\n marginNote: { type: String, attribute: 'margin-note' },\n specs: { type: Array },\n markWidth: { type: String, attribute: 'mark-width' },\n markHeight: { type: String, attribute: 'mark-height' },\n };\n /** What the button is drawn as. */\n declare stage: JourneyStage;\n /** The button's words, such as \"Book a 30-minute call\". */\n declare label: string;\n /** Where the button goes. */\n declare href: string;\n /** Draw it as a picture only, with no link, for a page that already has the real button. */\n declare decorative: boolean;\n /**\n * A selector for the sections of the page that each carry\n * `data-journey-stage`. The button then takes the stage of the section\n * across the middle of the screen. Leave empty to set `stage` by hand.\n */\n declare track: string;\n /**\n * Lines of code drawn around the words at the `code` stage, split where the\n * words go: the lines before, then the lines after. They are decoration and\n * are not read. A line that starts with `//` is drawn dimmer, as a comment.\n * Left empty, plain bars are drawn instead.\n */\n declare code: { before?: string[]; after?: string[] };\n /** Draw the design notes around the button: captions, marks, spec tags, a margin note and a pointer. */\n declare annotations: boolean;\n /** With `annotations`: the caption above each stage, in order, such as \"Note \u2014 Discover\". Numbered for you. */\n declare captions: string[];\n /** With `annotations`: the handwritten note beside the sticky note. */\n declare marginNote: string;\n /** With `annotations`: the tags under the component, such as \"Fill \u00B7 Accent/Signal\". */\n declare specs: string[];\n /** With `annotations`: the width written on the width mark, such as \"400\". */\n declare markWidth: string;\n /** With `annotations`: the height written on the height mark, such as \"96\". */\n declare markHeight: string;\n\n constructor() {\n super();\n this.stage = 'live';\n this.label = '';\n this.href = '';\n this.decorative = false;\n this.track = '';\n this.code = {};\n this.annotations = false;\n this.captions = [];\n this.marginNote = '';\n this.specs = [];\n this.markWidth = '400';\n this.markHeight = '96';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host {\n display: block; inline-size: min(100%, 35rem); container-type: inline-size;\n --impakt-journey-accent: ${token('color.accent.default', '#ffd43b')}; --impakt-journey-on-accent: ${token('color.accent.on', '#1a1a1a')};\n --hand: var(--impakt-font-family-hand, ${t.fontBody});\n ${move('flatten', 640, 'cubic-bezier(0.65, 0, 0.35, 1)')}\n }\n /* The move into a stage takes that move's timing; back out of it, the same move runs in reverse. */\n :host([stage='component']) { ${move('ink-in', 560, 'cubic-bezier(0.22, 1, 0.36, 1)')} }\n :host([stage='code']) { ${move('compile', 720, 'cubic-bezier(0.83, 0, 0.17, 1)')} }\n :host([stage='live']) { ${move('ship', 600, 'cubic-bezier(0.34, 1.56, 0.64, 1)')} }\n /* About 14 wide to 9 tall at any width. Every size inside is a share of the width (cqi). */\n .frame { position: relative; aspect-ratio: 14 / 9; }\n /* Each plate is one stage's shape. Only its opacity and transform ever change. */\n .plate { position: absolute; box-sizing: border-box; opacity: 0; pointer-events: none; transition: opacity var(--jt) var(--je), transform var(--jt) var(--je); }\n .bar { inset-inline-start: 14.29cqi; inline-size: 71.43cqi; inset-block-start: calc(50% - 8.57cqi); block-size: 17.14cqi; }\n .note { inset-inline-start: 22cqi; inset-block-start: 9cqi; inline-size: 46cqi; block-size: 46cqi; background: var(--impakt-journey-accent); box-shadow: 0 1.1rem 2.2rem rgb(0 0 0 / 0.18); transform: rotate(-4deg); }\n .wire { background: ${t.surfaceCard}; border: ${t.borderThin} dashed ${t.textMuted}; }\n .wire svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; color: ${t.rule}; }\n .solid { background: var(--impakt-journey-accent); transform: scale(0.92); }\n .shadow { box-shadow: 0 0.9rem 1.75rem rgb(0 0 0 / 0.22); transform: scale(0.9); }\n :host(:is([stage='component'], [stage='live'])) .solid, :host([stage='live']) .shadow { transform: none; }\n /* The code window is the raised ink and its muted words, a pair the theme measures, so it stays a dark window on paper and on an ink band alike. */\n .window { inset-inline: 14.29cqi; inset-block: 8cqi; padding: 4cqi; background: var(--impakt-color-surface-ink-raised, ${t.text}); border: ${t.borderThin} solid var(--impakt-color-line-inverse, transparent); border-radius: ${t.radius}; font-family: ${t.fontMono}; font-size: clamp(0.625rem, 2.15cqi, 0.8125rem); line-height: 1.6; color: var(--impakt-color-text-inverse-muted, color-mix(in srgb, ${t.surfaceCard} 78%, ${t.text})); white-space: pre; overflow: hidden; display: grid; grid-template-rows: minmax(0, 1fr) 44px minmax(0, 1fr); }\n /* On a small button the lines furthest from the words are cut off, so a line never runs under the words. */\n .window .before { align-self: end; display: flex; flex-direction: column; justify-content: flex-end; max-block-size: 100%; overflow: hidden; }\n .window .after { align-self: start; display: flex; flex-direction: column; max-block-size: 100%; overflow: hidden; }\n .window .comment { font-style: italic; }\n .window .rule { display: block; block-size: 0.5em; margin-block: 0.55em; background: currentColor; opacity: 0.35; }\n\n /* A stage that has passed shrinks toward the next shape as it fades; one still to come starts from the last. */\n /* The note flattens without growing wider, so a shape that is not showing never reaches past the block (1.4.10). */\n :host(:not([stage='note'])) .note { transform: rotate(0deg) scale(1, 0.45); }\n :host([stage='note']) .wire { transform: rotate(-4deg) scale(0.6, 1.9); }\n :host(:not([stage='code'])) .window { transform: scale(0.94, 0.5); }\n :host([stage='note']) .note, :host([stage='wireframe']) .wire, :host(:is([stage='component'], [stage='live'])) .solid, :host([stage='code']) .window, :host([stage='live']) .shadow { opacity: 1; }\n\n /* Scrubbed by the scroll, a plate's opacity follows the stage as a number, --jp, and only its shape still moves on its own. */\n :host([scrub]) .plate { transition-property: transform; }\n :host([scrub]) .note { opacity: ${unsafeCSS(showAt(0))}; }\n :host([scrub]) .wire { opacity: ${unsafeCSS(showAt(1))}; }\n :host([scrub]) .solid { opacity: max(${unsafeCSS(showAt(2))}, ${unsafeCSS(showAt(4))}); }\n :host([scrub]) .window { opacity: ${unsafeCSS(showAt(3))}; }\n :host([scrub]) .shadow { opacity: ${unsafeCSS(showAt(4))}; }\n\n /* The words. One element at every stage: a link, or a picture of one. */\n .words { position: absolute; inset-inline-start: 14.29cqi; inline-size: 71.43cqi; inset-block-start: calc(50% - 8.57cqi); box-sizing: border-box; min-block-size: max(44px, 17.14cqi); display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding-inline: 4.3cqi; font-family: ${t.fontBody}; font-size: clamp(0.9375rem, 3.57cqi, 1.25rem); font-weight: ${fontWeight('medium')}; line-height: 1.2; color: var(--impakt-journey-on-accent); text-decoration: none; transition: color var(--jt) var(--je), transform var(--jt) var(--je); }\n .arrow { flex: none; }\n /* At the note stage the words are handwritten, bold, with a line drawn under them. */\n :host([stage='note']) .words { inset-inline-start: 22cqi; inset-block-start: 9cqi; inline-size: 46cqi; min-block-size: 46cqi; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 4.5cqi; font-family: var(--hand); font-size: clamp(1.25rem, 5.4cqi, 2rem); font-weight: ${fontWeight('bold')}; line-height: 1.1; letter-spacing: -0.01em; transform: rotate(-4deg); }\n :host([stage='note']) .text::after { content: ''; display: block; block-size: 0.28em; margin-block-start: 0.12em; inline-size: 92%; background: currentColor; -webkit-mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6c30-4 60-5 98-3s66 3 98-1' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E\") center / 100% 100% no-repeat; mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6c30-4 60-5 98-3s66 3 98-1' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E\") center / 100% 100% no-repeat; }\n :host([stage='note']) .arrow { align-self: flex-end; }\n :host([stage='wireframe']) .words { justify-content: center; font-family: ${t.fontMono}; font-size: clamp(0.6875rem, 2.5cqi, 0.875rem); font-weight: ${fontWeight('regular')}; color: ${t.textMuted}; }\n :host([stage='code']) .words { inset-inline-start: 14.29cqi; inline-size: 71.43cqi; justify-content: flex-start; min-block-size: 44px; inset-block-start: calc(50% - 22px); padding-inline: calc(4cqi + 3ch) 4cqi; font-family: ${t.fontMono}; font-size: clamp(0.625rem, 2.15cqi, 0.8125rem); font-weight: ${fontWeight('regular')}; color: var(--impakt-journey-code-words, var(--ik-ink-inverse, ${t.surfaceCard})); }\n :host([stage='code']) .words .arrow { display: none; }\n /* Live, it answers a pointer: it lifts when pointed at and sits when pressed, and its fill deepens a little. */\n :host([stage='live']) .frame:has(a.words:hover) .solid { background: color-mix(in srgb, var(--impakt-journey-accent) 90%, ${t.text}); }\n :host([stage='live']) a.words:hover { transform: translateY(-2px); transition: color 180ms, transform var(--impakt-motion-journey-lift-duration, 180ms) var(--impakt-motion-journey-lift-easing, cubic-bezier(0.2, 0, 0, 1)); }\n :host([stage='live']) a.words:active { transform: translateY(1px); transition: color 140ms, transform var(--impakt-motion-journey-press-duration, 140ms) var(--impakt-motion-journey-press-easing, cubic-bezier(0.4, 0, 0.2, 1)); }\n a.words:focus-visible { outline: none; box-shadow: ${t.focusShadow}; }\n\n /* The design notes. Each shows at its own stages, and none is read. */\n .ann { position: absolute; opacity: 0; pointer-events: none; transition: opacity var(--jt) var(--je); color: ${t.text}; }\n .caption { inset-block-start: 0; inset-inline-start: 0; font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; white-space: nowrap; }\n .caption span { position: absolute; inset-block-start: 0; inset-inline-start: 0; opacity: 0; transition: opacity var(--jt) var(--je); }\n :host([stage='note']) .caption span:nth-child(1), :host([stage='wireframe']) .caption span:nth-child(2), :host([stage='component']) .caption span:nth-child(3), :host([stage='code']) .caption span:nth-child(4), :host([stage='live']) .caption span:nth-child(5) { opacity: 1; }\n .caption { opacity: 1; }\n .margin { inset-inline-start: 71cqi; inset-block-start: 10cqi; inline-size: 27cqi; font-family: var(--hand); font-size: clamp(0.75rem, 2.9cqi, 1rem); line-height: 1.25; transform: rotate(4deg); }\n .width { inset-inline-start: 14.29cqi; inline-size: 71.43cqi; inset-block-start: calc(50% - 8.57cqi - 5cqi); block-size: 2cqi; border-inline: 1px solid currentColor; }\n .width::before { content: ''; position: absolute; inset-inline: 0; inset-block-start: 50%; border-block-start: 1px solid currentColor; }\n .width b, .height b { position: absolute; font-family: ${t.fontMono}; font-size: 0.6875rem; font-weight: ${fontWeight('regular')}; line-height: 1; background: var(--impakt-journey-mark-ground, ${t.surfaceCard}); padding-inline: 0.4em; }\n .width b { inset-block-start: 50%; inset-inline-start: 50%; transform: translate(-50%, -50%); }\n .height { inset-inline-start: calc(14.29cqi + 71.43cqi + 2.5cqi); inline-size: 2cqi; inset-block-start: calc(50% - 8.57cqi); block-size: 17.14cqi; border-block: 1px solid currentColor; }\n .height::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 50%; border-inline-start: 1px solid currentColor; }\n .height b { inset-block-start: 50%; inset-inline-start: calc(100% + 0.2em); transform: translateY(-50%); background: none; }\n .specs { inset-inline-start: 14.29cqi; inset-block-start: calc(50% + 8.57cqi + 3cqi); display: flex; flex-wrap: wrap; gap: 1.5cqi; inline-size: 75cqi; }\n .specs span { padding: 0.15em 0.6em; font-family: ${t.fontMono}; font-size: clamp(0.5625rem, 1.9cqi, 0.6875rem); letter-spacing: ${t.trackingWide}; text-transform: uppercase; white-space: nowrap; border: 1px solid currentColor; background: ${t.surfaceCard}; }\n .cursor { inset-inline-start: calc(14.29cqi + 71.43cqi - 4cqi); inset-block-start: calc(50% + 8.57cqi - 4cqi); }\n .pointer { display: block; fill: ${t.text}; stroke: ${t.surfaceCard}; }\n :host([stage='note']) .margin, :host(:is([stage='wireframe'], [stage='component'])) :is(.width, .height), :host([stage='component']) .specs, :host([stage='live']) .cursor { opacity: 1; }\n\n @media (prefers-reduced-motion: reduce) {\n .plate, .words, .ann, .caption span { transition: none; }\n :host([stage='live']) a.words:hover, :host([stage='live']) a.words:active { transform: none; transition: none; }\n }\n @media (forced-colors: active) {\n .plate { forced-color-adjust: none; }\n .note, .solid { background: Highlight; }\n .window { background: Canvas; border: 1px solid CanvasText; color: CanvasText; }\n .wire { background: Canvas; border-color: CanvasText; }\n .words, :host([stage='wireframe']) .words, :host([stage='code']) .words { color: LinkText; forced-color-adjust: none; }\n :host(:is([stage='note'], [stage='component'], [stage='live'])) .words { color: HighlightText; }\n .ann { color: CanvasText; }\n }\n `,\n ];\n\n private observer?: IntersectionObserver;\n private sections: Element[] = [];\n private frame = 0;\n private readonly onScroll = (): void => {\n if (this.frame) return;\n this.frame = requestAnimationFrame(() => {\n this.frame = 0;\n this.scrub();\n });\n };\n\n connectedCallback(): void {\n super.connectedCallback();\n // The first render starts the watch; this is for a button taken off the page and put back.\n if (this.hasUpdated) this.watch();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.observer?.disconnect();\n this.observer = undefined;\n this.stopScrub();\n }\n\n protected willUpdate(changed: Map<string, unknown>): void {\n // A stage that is not one of the five would draw nothing at all, so it falls back to the finished button.\n if (changed.has('stage') && !isStage(this.stage)) this.stage = 'live';\n }\n\n protected updated(changed: Map<string, unknown>): void {\n if (changed.has('track')) this.watch();\n }\n\n /** Follow the sections named by `track`: the one across the middle of the screen sets the stage. */\n private watch(): void {\n this.observer?.disconnect();\n this.observer = undefined;\n this.stopScrub();\n this.sections = [];\n if (!this.track || !this.isConnected || typeof IntersectionObserver !== 'function') return;\n let sections: Element[];\n try {\n sections = Array.from(this.ownerDocument.querySelectorAll(this.track)).filter((el) => isStage(el.getAttribute('data-journey-stage')));\n } catch {\n // Not a selector: nothing to follow.\n return;\n }\n if (!sections.length) return;\n this.sections = sections;\n // A line across the middle of the screen. A section is \"current\" while it crosses that line.\n this.observer = new IntersectionObserver((entries) => this.crossed(entries), { rootMargin: '-50% 0px -50% 0px', threshold: 0 });\n for (const section of sections) this.observer.observe(section);\n this.startScrub();\n }\n\n private crossed(entries: IntersectionObserverEntry[]): void {\n const entry = entries.find((e) => e.isIntersecting);\n const stage = entry?.target.getAttribute('data-journey-stage');\n if (isStage(stage)) this.become(stage);\n }\n\n private become(stage: JourneyStage): void {\n if (stage === this.stage) return;\n this.stage = stage;\n this.dispatchEvent(new CustomEvent('impakt-journey-stage', { detail: { stage }, bubbles: true, composed: true }));\n }\n\n /** Scrub between stages with the scroll, unless reduced motion is asked for. */\n private startScrub(): void {\n const view = this.ownerDocument.defaultView;\n if (!view || typeof view.requestAnimationFrame !== 'function' || view.matchMedia?.('(prefers-reduced-motion: reduce)').matches) return;\n view.addEventListener('scroll', this.onScroll, { passive: true });\n view.addEventListener('resize', this.onScroll, { passive: true });\n // It starts where the button is; the first scroll takes it from there.\n this.style.setProperty('--jp', String(indexOf(this.stage)));\n this.toggleAttribute('scrub', true);\n }\n\n private stopScrub(): void {\n const view = this.ownerDocument?.defaultView;\n view?.removeEventListener('scroll', this.onScroll);\n view?.removeEventListener('resize', this.onScroll);\n if (this.frame) cancelAnimationFrame(this.frame);\n this.frame = 0;\n this.removeAttribute('scrub');\n this.style.removeProperty('--jp');\n }\n\n /**\n * The stage as a number. The section across the middle of the screen gives\n * the whole part; how far the next section has risen toward the middle gives\n * the rest, so the move is complete as the next section crosses it.\n */\n private scrub(): void {\n const view = this.ownerDocument.defaultView;\n if (!view || !this.sections.length) return;\n const middle = view.innerHeight / 2;\n const tops = this.sections.map((s) => s.getBoundingClientRect().top);\n let at = 0;\n tops.forEach((top, i) => {\n if (top <= middle) at = i;\n });\n const stageAt = (i: number) => indexOf(this.sections[i]!.getAttribute('data-journey-stage') as JourneyStage);\n const next = at + 1 < this.sections.length ? at + 1 : at;\n const span = tops[next]! - tops[at]!;\n const f = next === at || span <= 0 ? 0 : Math.min(1, Math.max(0, (middle - tops[at]!) / span));\n const p = stageAt(at) + f * (stageAt(next) - stageAt(at));\n this.style.setProperty('--jp', p.toFixed(3));\n this.become(JOURNEY_STAGES[Math.round(p)]!);\n }\n\n private lines(lines: string[] | undefined, fallback: number): TemplateResult[] {\n return lines?.length\n ? lines.map((line) => html`<span class=${line.trim().startsWith('//') ? 'comment' : ''}>${line}</span>`)\n : Array.from({ length: fallback }, (_, i) => html`<span class=\"rule\" style=${`inline-size:${[58, 72, 44][i % 3]}%`}></span>`);\n }\n\n /** The design notes around the button. All decoration. */\n private notes(): TemplateResult {\n const captions = this.captions?.length\n ? this.captions\n : [say('Note \u2014 Discover'), say('Wireframe \u2014 Design low-fi'), say('Component \u2014 Design hi-fi'), say('Code \u2014 Build'), say('Live \u2014 Launch')];\n const specs = this.specs?.length ? this.specs : [say('Fill \u00B7 Accent/Signal'), say('Radius \u00B7 0'), say('Type \u00B7 Archivo 20')];\n return html`<span class=\"ann caption\" part=\"caption\">${JOURNEY_STAGES.map((_, i) => html`<span>${String(i + 1).padStart(2, '0')} \u00B7 ${captions[i] ?? ''}</span>`)}</span>\n <span class=\"ann margin\" part=\"margin-note\">${this.marginNote || say('make it the biggest thing on the page')}</span>\n <span class=\"ann width\"><b>${this.markWidth}</b></span>\n <span class=\"ann height\"><b>${this.markHeight}</b></span>\n <span class=\"ann specs\" part=\"specs\">${specs.map((spec) => html`<span>${spec}</span>`)}</span>\n <span class=\"ann cursor\">${pointer}</span>`;\n }\n\n render(): TemplateResult {\n const words = html`<span class=\"text\">${this.label}</span>${arrow}`;\n return html`<div class=\"frame\" part=\"frame\" aria-hidden=${this.decorative ? 'true' : nothing}>\n <span class=\"plate note\" aria-hidden=\"true\"></span>\n <span class=\"plate bar wire\" aria-hidden=\"true\"><svg viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" fill=\"none\" stroke=\"currentColor\" focusable=\"false\"><path d=\"M0 0 100 100M0 100 100 0\" vector-effect=\"non-scaling-stroke\" /></svg></span>\n <span class=\"plate bar shadow\" aria-hidden=\"true\"></span>\n <span class=\"plate bar solid\" aria-hidden=\"true\"></span>\n <span class=\"plate window\" aria-hidden=\"true\"><span class=\"before\">${this.lines(this.code?.before, 3)}</span><span></span><span class=\"after\">${this.lines(this.code?.after, 2)}</span></span>\n ${this.annotations ? html`<span class=\"notes\" aria-hidden=\"true\">${this.notes()}</span>` : nothing}\n ${this.decorative || !this.href ? html`<span class=\"words\" part=\"button\">${words}</span>` : html`<a class=\"words\" part=\"button\" href=${this.href}>${words}</a>`}\n </div>`;\n }\n}\n\ncustomElements.define('impakt-journey-button', ImpaktJourneyButton);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-journey-button': ImpaktJourneyButton;\n }\n}\n", "/**\n * The blocks a studio's own site is built from: the numbered list of work, a\n * row of figures, and the questions at the foot of a page.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport {\n ImpaktElement,\n focusRing,\n fontSize,\n fontWeight,\n lineHeight,\n lockScroll,\n space,\n spaceAround,\n t,\n token,\n unlockScroll,\n type NavLink,\n} from '@atomic-ui/ui';\n\n/** One project in a list of work. */\nexport interface WorkItem {\n id?: string;\n /** The project's name, set large. */\n name: string;\n /** What it is and who it is for, such as \"Web platform \u00B7 Automotive\". */\n meta?: string;\n /** Where the row goes when it is pressed. Leave empty for a row that goes nowhere: it has no arrow and does not turn to ink. */\n href?: string;\n /** A sentence about it, in its own column, such as \"Audits a website against WCAG 2.2 and writes the fixes.\" */\n text?: string;\n /** A short status, set in capitals, such as \"Available now\" or \"Coming soon\". The word carries the status. */\n badge?: string;\n /** A price line under the badge, such as \"From \u00A359 a month\". */\n price?: string;\n /** Keep the row in ink, with the badge and the arrow in the accent: the one item the page wants seen first. */\n featured?: boolean;\n /** A picture shown, tilted, beside the pointer while the row is pointed at. It is decoration and is not read. */\n preview?: string;\n /** A small caption on the preview card, such as \"Harbour \u00B7 Cover \u00B7 4:3\". */\n previewLabel?: string;\n}\n\n/** The arrow at the end of a row that goes somewhere. Drawn, so no font has to hold the glyph. */\nconst arrow = html`<svg viewBox=\"0 0 22 22\" width=\"22\" height=\"22\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M5 17 17 5M8 5h9v9\" />\n</svg>`;\n\n/**\n * A numbered list of projects, each name set large: the work on a studio's\n * home page, or the index on its work page.\n *\n * **Each row is one link.** The link sits on the project's name, which is a\n * heading, and is stretched over the row, so the whole row can be pressed\n * while a screen reader meets one link with one name (2.4.4, 2.5.8). The\n * number and the arrow are decoration and are hidden from it; the list itself\n * says how many projects there are and which one this is (1.3.1).\n *\n * **Pointing at a row and focusing it look the same.** The row turns to the\n * text colour with the card colour on it, a pair every brand's tokens already\n * hold at 4.5:1, so the state never depends on a colour of its own (1.4.3,\n * 1.4.11). The focus ring is still drawn over it (2.4.7).\n *\n * The names shrink with the block's own width, not the window's, so the list\n * reads the same in a narrow column as on a phone (1.4.10).\n *\n * **A row can say more.** `text` adds a description column, `badge` a status\n * word in capitals and `price` a line under it, so the same list sets out a\n * studio's work or a shop of tools. A `featured` row stays in ink with its\n * badge and arrow in the accent. `columns` draws a line of column names above\n * the rows, such as \"No.\", \"Project\" and \"Type \u00B7 Sector\"; it is decoration,\n * since each row's own words already say what they are.\n *\n * **A row can show a picture as it is pointed at.** Give it `preview` and a\n * card with the picture follows the pointer, tilted. It is shown only to a\n * mouse, never on touch or with reduced motion asked for, and it is hidden\n * from a screen reader: the row's name already says what it is.\n *\n * @category content\n * @icon list\n */\nexport class ImpaktWorkList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n start: { type: Number },\n label: { type: String },\n columns: { type: Array },\n preview: { state: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The projects, in order. */\n declare items: WorkItem[];\n /** The heading level of each project's name. It depends on what is above the list on the page. */\n declare headingLevel: number;\n /** The number the first project is given. */\n declare start: number;\n /** A name for the list, so a screen reader can tell it from other lists on the page. Leave empty for none. */\n declare label: string;\n /**\n * Column names drawn above the rows, in monospace capitals: the first over\n * the numbers, the second over the names, and the rest, joined with \" \u00B7 \",\n * over the last column, such as `[\"No.\", \"Project\", \"Type \u00B7 Sector\"]`.\n * Leave empty for none.\n */\n declare columns: string[];\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n /** The preview being shown, with where the pointer is. */\n declare private preview: { src: string; label: string; x: number; y: number } | null;\n\n constructor() {\n super();\n this.items = [];\n this.headingLevel = 3;\n this.start = 1;\n this.label = '';\n this.columns = [];\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n this.preview = null;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; position: relative; container: impakt-work-list / inline-size; --impakt-work-accent: ${token('color.accent.default', '#ffd43b')}; --impakt-work-on-accent: ${token('color.accent.on', '#111111')}; }\n ol { list-style: none; margin: 0; padding: 0; border-block-start: ${t.borderThin} solid ${t.text}; }\n .columns + ol { border-block-start: 0; }\n li, .columns { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto 22px; align-items: center; column-gap: ${space(6)}; padding: ${space(5)} ${space(8)}; }\n .texts li, .texts.columns { grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 1fr) auto 22px; }\n li { position: relative; border-block-end: ${t.borderThin} solid ${t.text}; transition: background-color 140ms ease-out, color 140ms ease-out; }\n .columns { padding-block: ${space(3)}; border-block-end: ${t.borderThin} solid ${t.text}; font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; }\n .columns .last { grid-column: -3; text-align: end; }\n .number { font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; font-variant-numeric: tabular-nums; color: ${t.textMuted}; }\n .name { font-family: ${t.fontHeading}; font-size: clamp(2rem, 7cqi, 4.5rem); font-weight: ${fontWeight('semibold')}; line-height: 1; letter-spacing: -0.05em; color: ${t.text}; overflow-wrap: anywhere; }\n .texts .name { font-size: clamp(2rem, 5cqi, 3.5rem); }\n .name a { color: inherit; text-decoration: none; }\n /* The link is stretched over the row, so the row is one target. */\n .name a::after { content: ''; position: absolute; inset: 0; z-index: 1; }\n .name a:focus-visible { outline: none; }\n .name a:focus-visible::after { box-shadow: ${t.focusShadow}; }\n .text { margin: 0; font-size: ${fontSize('md')}; line-height: ${lineHeight('normal')}; color: ${t.textMuted}; }\n .side { display: flex; flex-direction: column; align-items: flex-end; gap: ${space(2)}; text-align: end; }\n .meta, .price { font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; }\n .price { font-size: 0.6875rem; }\n /* Marketing badges are monospace capitals at 11px. A row that goes somewhere has a solid one; one that does not yet has an outline. */\n .badge { display: inline-block; padding: ${space(1)} ${space(2.5)}; font-family: ${t.fontMono}; font-size: 0.6875rem; font-weight: ${fontWeight('medium')}; line-height: 1.4; letter-spacing: ${t.trackingWide}; text-transform: uppercase; white-space: nowrap; color: ${t.surfaceCard}; background: ${t.text}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusSm}; }\n li:not(:has(a)) .badge { color: ${t.text}; background: transparent; }\n .arrow { display: flex; color: ${t.text}; }\n /* Pointed at, focused or featured, the row turns to ink. The card colour on the text colour is a pair every brand already holds at 4.5:1. */\n li:has(a):hover, li:has(a:focus-visible), li.featured { background: ${t.text}; }\n li:has(a):hover .name, li:has(a:focus-visible) .name, li.featured .name { color: ${t.surfaceCard}; }\n li:has(a):hover :is(.number, .meta, .text, .price), li:has(a:focus-visible) :is(.number, .meta, .text, .price), li.featured :is(.number, .meta, .text, .price) { color: color-mix(in srgb, ${t.surfaceCard} 78%, ${t.text}); }\n li:has(a):hover .badge, li:has(a:focus-visible) .badge { color: ${t.text}; background: ${t.surfaceCard}; border-color: ${t.surfaceCard}; }\n li:has(a):hover .arrow, li:has(a:focus-visible) .arrow, li.featured .arrow { color: var(--impakt-work-accent); }\n li.featured .badge { color: var(--impakt-work-on-accent); background: var(--impakt-work-accent); border-color: var(--impakt-work-accent); }\n /* The preview card follows the pointer. Only its transform changes, so it costs no layout. */\n .preview { position: absolute; inset-block-start: 0; inset-inline-start: 0; z-index: 2; inline-size: 15rem; box-sizing: border-box; padding: ${space(2)}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; box-shadow: 0 16px 32px rgb(0 0 0 / 0.2); pointer-events: none; transform: translate(var(--x), var(--y)) translate(-50%, -50%) rotate(-3deg); }\n .preview img { display: block; inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; }\n .preview span { display: block; padding-block-end: ${space(2)}; font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; }\n @container impakt-work-list (max-width: 40rem) {\n li, .texts li { grid-template-columns: 2rem minmax(0, 1fr) auto; column-gap: ${space(3)}; padding-inline: ${space(4)}; }\n .text { grid-column: 2 / -1; grid-row: 2; margin-block-start: ${space(2)}; }\n .side { grid-column: 2 / -1; grid-row: 3; align-items: flex-start; text-align: start; margin-block-start: ${space(2)}; }\n li:not(:has(.text)) .side { grid-row: 2; }\n .arrow { grid-column: 3; grid-row: 1; }\n .columns { display: none; }\n }\n @media (prefers-reduced-motion: reduce) { li { transition: none; } .preview { display: none; } }\n @media (forced-colors: active) {\n li:has(a):hover, li:has(a:focus-visible), li.featured { background: Canvas; outline: 2px solid Highlight; outline-offset: -2px; }\n li:has(a):hover :is(.name, .number, .meta, .arrow, .text, .price), li:has(a:focus-visible) :is(.name, .number, .meta, .arrow, .text, .price), li.featured :is(.name, .number, .meta, .arrow, .text, .price) { color: CanvasText; }\n .badge, li.featured .badge { color: CanvasText; background: Canvas; border-color: CanvasText; }\n }\n `,\n ];\n\n /** Show a row's preview beside a mouse pointer. Touch and reduced motion get none. */\n private point(event: PointerEvent, item: WorkItem): void {\n if (!item.preview || event.pointerType !== 'mouse' || window.matchMedia?.('(prefers-reduced-motion: reduce)').matches) {\n if (this.preview) this.preview = null;\n return;\n }\n const box = this.getBoundingClientRect();\n this.preview = { src: item.preview, label: item.previewLabel ?? '', x: event.clientX - box.left, y: event.clientY - box.top };\n }\n\n private columnRow(texts: boolean): TemplateResult | typeof nothing {\n const columns = this.columns ?? [];\n if (!columns.length) return nothing;\n const [number, name, ...rest] = columns;\n // Decoration: each row's own words already say what they are.\n return html`<div class=${texts ? 'columns texts' : 'columns'} part=\"columns\" aria-hidden=\"true\">\n <span>${number ?? ''}</span><span>${name ?? ''}</span>${rest.length ? html`<span class=\"last\">${rest.join(' \u00B7 ')}</span>` : nothing}\n </div>`;\n }\n\n render(): TemplateResult {\n const items = this.items ?? [];\n const texts = items.some((item) => !!item.text);\n const preview = this.preview;\n // role=\"list\" is set by hand: a list with its markers removed is not announced as a list by every screen reader.\n return html`${this.columnRow(texts)}<ol role=\"list\" part=\"list\" class=${texts ? 'texts' : ''} aria-label=${this.label || nothing} @pointerleave=${() => (this.preview = null)}>\n ${items.map((item, index) => {\n const number = String(this.start + index).padStart(2, '0');\n const side = item.badge || item.price || item.meta;\n return html`<li part=\"row\" class=${item.featured ? 'featured' : ''} @pointermove=${(event: PointerEvent) => this.point(event, item)}>\n <span class=\"number\" aria-hidden=\"true\">${number}</span>\n <div class=\"name\" part=\"name\" role=\"heading\" aria-level=${this.headingLevel}>\n ${item.href ? html`<a href=${item.href} part=\"link\">${item.name}</a>` : item.name}\n </div>\n ${texts ? html`<p class=\"text\" part=\"text\">${item.text ?? ''}</p>` : nothing}\n ${\n side\n ? html`<span class=\"side\">\n ${item.badge ? html`<span class=\"badge\" part=\"badge\">${item.badge}</span>` : nothing}\n ${item.price ? html`<span class=\"price\" part=\"price\">${item.price}</span>` : nothing}\n ${item.meta ? html`<span class=\"meta\" part=\"meta\">${item.meta}</span>` : nothing}\n </span>`\n : html`<span></span>`\n }\n ${item.href ? html`<span class=\"arrow\">${arrow}</span>` : html`<span></span>`}\n </li>`;\n })}\n </ol>${\n preview\n ? html`<div class=\"preview\" part=\"preview\" aria-hidden=\"true\" style=${`--x:${preview.x}px;--y:${preview.y}px`}>\n ${preview.label ? html`<span>${preview.label}</span>` : nothing}<img src=${preview.src} alt=\"\" />\n </div>`\n : nothing\n }`;\n }\n}\n\n/** One figure in a row of them. */\nexport interface StatRowItem {\n /** The number, written as it should appear, such as \"161 ms\" or \"4\". */\n figure: string;\n /** What the number counts. */\n label: string;\n /** A line more, if the label needs it. */\n note?: string;\n}\n\n/**\n * A row of figures under a rule, each with what it counts: \"4 live products\",\n * \"161 ms response time\".\n *\n * The figures are a list, so a screen reader says how many there are, and each\n * is read as one phrase, \"161 ms response time\", not a bare number followed\n * some way off by its label (1.3.1). The row wraps by its own width: four\n * across, then two (a phone 350px wide shows two by two), then one, with\n * nothing to scroll sideways at 320px (1.4.10).\n *\n * @category content\n * @icon stat\n */\nexport class ImpaktStatRow extends ImpaktElement {\n static properties = {\n items: { type: Array },\n label: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The figures, in order. Four fit a row on a wide page. */\n declare items: StatRowItem[];\n /** A name for the row, such as \"Live products\", read before the figures. Leave empty for none. */\n declare label: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.label = '';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container: impakt-stat-row / inline-size; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: ${space(6)}; }\n li { border-block-start: ${t.borderThin} solid ${t.rule}; padding-block-start: ${space(5)}; }\n p { margin: 0; display: flex; flex-direction: column; gap: ${space(2)}; }\n .value { font-family: ${t.fontHeading}; font-size: clamp(2.25rem, 6cqi, 3.25rem); font-weight: ${fontWeight('semibold')}; line-height: 1; letter-spacing: -0.04em; color: ${t.textHeading}; }\n .label { font-size: ${fontSize('sm')}; line-height: ${lineHeight('normal')}; color: ${t.textMuted}; }\n /* The note is meta: monospace capitals at 11px. */\n .note { font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<ul role=\"list\" part=\"list\" aria-label=${this.label || nothing}>\n ${this.items.map(\n (item) =>\n html`<li part=\"stat\">\n <p><span class=\"value\" part=\"value\">${item.figure}</span> <span class=\"label\" part=\"label\">${item.label}</span>${item.note ? html` <span class=\"note\">${item.note}</span>` : nothing}</p>\n </li>`,\n )}\n </ul>`;\n }\n}\n\n/** One question and its answer. */\nexport interface FaqItem {\n id: string;\n /** The question. */\n heading: string;\n /** The answer, as plain text. An answer with links or a list is slotted as `panel-<id>` instead. */\n body: string;\n}\n\n/**\n * The questions at the foot of a page, under a heading: a title, a line of\n * introduction, and the questions as sections that open.\n *\n * It is `impakt-accordion` with the heading a page always writes above it, so\n * the levels cannot drift: the questions are always one level below the\n * block's own heading (1.3.1). With a heading, the block is a region named by\n * it, so a screen reader can jump straight to the questions (2.4.1).\n *\n * An answer that is more than words is slotted as `panel-<id>`, exactly as\n * on the accordion, and is passed through to it.\n *\n * @category content\n * @icon accordion\n */\nexport class ImpaktFaq extends ImpaktElement {\n static properties = {\n eyebrow: { type: String },\n heading: { type: String },\n lead: { type: String },\n items: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n open: { type: Array },\n multiple: { type: Boolean },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The small line above the heading, such as \"Questions\". */\n declare eyebrow: string;\n /** The block's heading, such as \"Questions founders ask us first.\" */\n declare heading: string;\n /** A line under the heading. */\n declare lead: string;\n /** The questions, in order. */\n declare items: FaqItem[];\n /** The level of the block's heading. The questions are one level below it. */\n declare headingLevel: number;\n /** The ids of the questions that start open. */\n declare open: string[];\n /** Let more than one answer be open at once. */\n declare multiple: boolean;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.eyebrow = '';\n this.heading = '';\n this.lead = '';\n this.items = [];\n this.headingLevel = 2;\n this.open = [];\n this.multiple = true;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container: impakt-faq / inline-size; }\n .head { display: flex; flex-direction: column; gap: ${space(4)}; margin-block-end: ${space(10)}; max-inline-size: 44rem; }\n .eyebrow { margin: 0; font-family: ${t.fontEyebrow}; font-size: ${fontSize('sm')}; color: var(--impakt-eyebrow, ${t.textMuted}); }\n .heading { font-family: ${t.fontHeading}; font-size: clamp(2rem, 6cqi, 3.25rem); font-weight: ${fontWeight('semibold')}; line-height: 1.04; letter-spacing: -0.04em; color: ${t.textHeading}; }\n .lead { margin: 0; font-size: ${fontSize('md')}; line-height: ${lineHeight('normal')}; color: ${t.textMuted}; }\n /* The questions sit between 1px ink rules, the first one included, each a row about 92px tall set at heading size S. */\n impakt-accordion { border-block-start: ${t.borderThin} solid ${t.text}; }\n impakt-accordion::part(item) { border-block-end: ${t.borderThin} solid ${t.text}; }\n impakt-accordion::part(header) { min-block-size: 5.75rem; padding-block: ${space(5)}; font-family: ${t.fontHeading}; font-size: clamp(1.25rem, 3.2cqi, 1.5rem); font-weight: ${fontWeight('semibold')}; line-height: 1.2; letter-spacing: -0.02em; }\n impakt-accordion::part(panel) { max-inline-size: 44rem; color: ${t.textMuted}; line-height: ${lineHeight('normal')}; }\n @media (forced-colors: active) { impakt-accordion, impakt-accordion::part(item) { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const headingId = this.id_('heading');\n const level = Math.min(Math.max(this.headingLevel, 1), 5);\n const head =\n this.eyebrow || this.heading || this.lead\n ? html`<div class=\"head\" part=\"head\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n ${this.heading ? html`<div id=${headingId} class=\"heading\" part=\"heading\" role=\"heading\" aria-level=${level}>${this.heading}</div>` : nothing}\n ${this.lead ? html`<p class=\"lead\" part=\"lead\">${this.lead}</p>` : nothing}\n </div>`\n : nothing;\n // Each answer's slot is passed through to the accordion, with the plain answer as what shows when nothing is slotted.\n const accordion = html`<impakt-accordion part=\"questions\" marker=\"plus\" .items=${this.items} .headingLevel=${level + 1} .open=${this.open} .multiple=${this.multiple}>\n ${this.items.map((item) => html`<slot name=${`panel-${item.id}`} slot=${`panel-${item.id}`}>${item.body}</slot>`)}\n </impakt-accordion>`;\n return this.heading ? html`<section aria-labelledby=${headingId}>${head}${accordion}</section>` : html`<div>${head}${accordion}</div>`;\n }\n}\n\n/**\n * A site's menu as a whole screen: a few large links, for a phone or for a\n * site with only a handful of pages.\n *\n * **It is a native `<dialog>` opened with `showModal()`**, as the drawer is, so\n * the focus trap, Escape, the inert page behind it and the return of focus to\n * the button that opened it all come from the browser (2.1.2, 2.4.3). The page\n * behind does not scroll while it is open. The button that opens it is the\n * page's own; set `open` from it and listen for `impakt-close`.\n *\n * **The links are a navigation landmark with a name**, and the page the reader\n * is on carries `aria-current=\"page\"` and is marked with a square, so the mark\n * does not depend on colour (1.4.1). Set `current-text`, such as \"Current\",\n * and the words \"Current \u00B7 01\" stand in its number instead of the square. A\n * brand whose ink is dark may also colour it, by setting\n * `--impakt-site-menu-current`.\n *\n * The menu is drawn in ink: the text colour as the background with the card\n * colour on it, a pair every brand already holds at 4.5:1. A component slotted\n * at its foot takes the same colours through its tokens; a plain link there\n * keeps the page's own link colour, so slot `impakt-link` instead.\n *\n * @category navigation\n * @icon menu\n * @slot footer - Under the links: a call to action, an email address.\n * @fires {CustomEvent<null>} impakt-close - When the menu is closed, by its button, by Escape or by following a link.\n */\nexport class ImpaktSiteMenu extends ImpaktElement {\n static properties = {\n open: { type: Boolean, reflect: true },\n links: { type: Array },\n current: { type: String },\n brand: { type: String },\n mark: { type: String },\n home: { type: String },\n label: { type: String },\n closeText: { type: String, attribute: 'close-text' },\n currentText: { type: String, attribute: 'current-text' },\n };\n /** Whether the menu is showing. */\n declare open: boolean;\n /** The pages, in order. */\n declare links: NavLink[];\n /** The `href` of the page the reader is on, so its link is marked. */\n declare current: string;\n /** The site's name, at the top. */\n declare brand: string;\n /** A letter in a small square before the name, such as \"i\", as the site header's canvas look draws it. */\n declare mark: string;\n /** Where the site's name goes. */\n declare home: string;\n /** The menu's name, read when it opens and as the name of its links. */\n declare label: string;\n /** The words on the button that closes it. */\n declare closeText: string;\n /**\n * A word shown with the current page's number, such as \"Current\", so it\n * reads \"Current \u00B7 01\". It then marks the page in place of the square.\n * Leave empty for the square.\n */\n declare currentText: string;\n\n constructor() {\n super();\n this.open = false;\n this.links = [];\n this.current = '';\n this.brand = '';\n this.mark = '';\n this.home = '/';\n this.label = 'Menu';\n this.closeText = 'Close';\n this.currentText = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n /* The ink colours are taken on the host, because the dialog repaints the text colour for what is inside it. */\n :host { --impakt-menu: ${t.text}; --impakt-menu-on: ${t.surfaceCard}; --impakt-menu-muted: color-mix(in srgb, ${t.surfaceCard} 78%, ${t.text}); --impakt-menu-rule: color-mix(in srgb, ${t.surfaceCard} 18%, ${t.text}); }\n dialog { box-sizing: border-box; display: none; flex-direction: column; inline-size: 100vw; max-inline-size: 100vw; block-size: 100dvh; max-block-size: 100dvh; margin: 0; padding: 0; border: 0; overflow: auto; background: var(--impakt-menu); color: var(--impakt-menu-on); }\n dialog[open] { display: flex; }\n dialog::backdrop { background: var(--impakt-menu); }\n .bar { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding: ${space(2)} ${space(4)}; border-block-end: ${t.borderThin} solid var(--impakt-menu-rule); }\n .brand { color: inherit; text-decoration: none; font-family: ${t.fontHeading}; font-size: ${fontSize('md')}; font-weight: ${fontWeight('semibold')}; border-radius: ${t.radiusSm}; }\n .brand.marked { display: inline-flex; align-items: center; gap: ${space(3)}; min-block-size: 44px; font-weight: ${fontWeight('medium')}; }\n .mark { display: inline-grid; place-items: center; inline-size: 28px; block-size: 28px; flex: none; background: var(--impakt-menu-on); color: var(--impakt-menu); font-size: ${fontSize('sm')}; }\n .close { display: inline-flex; align-items: center; gap: ${space(2)}; min-block-size: 44px; padding: 0 ${space(4)}; font: inherit; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('medium')}; color: var(--impakt-menu); background: var(--impakt-menu-on); border: 0; border-radius: ${t.radius}; cursor: pointer; }\n nav { flex: 1; padding: ${space(6)} ${space(5)} 0; }\n ol { list-style: none; margin: 0; padding: 0; }\n li { border-block-end: ${t.borderThin} solid var(--impakt-menu-rule); }\n li a { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding-block: ${space(4)}; color: inherit; text-decoration: none; font-family: ${t.fontHeading}; font-size: clamp(2.25rem, 12vw, 3.5rem); font-weight: ${fontWeight('semibold')}; line-height: 1; letter-spacing: -0.05em; }\n li a:hover .words { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }\n .number { font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('regular')}; letter-spacing: 0; color: var(--impakt-menu-muted); }\n /*\n * The current page is marked with a square. Its colour stays the menu's own text colour unless a brand sets\n * --impakt-site-menu-current, because an accent is only readable on ink when the brand's ink is dark (1.4.3).\n */\n a[aria-current] { color: var(--impakt-site-menu-current, var(--impakt-menu-on)); }\n a[aria-current] .number { color: var(--impakt-site-menu-current, var(--impakt-menu-on)); }\n a[aria-current]:not(.worded) .words::before { content: ''; display: inline-block; inline-size: 0.28em; block-size: 0.28em; margin-inline-end: 0.22em; vertical-align: 0.18em; background: currentColor; }\n .foot { display: flex; flex-direction: column; gap: ${space(4)}; padding: ${space(8)} ${space(5)} calc(${space(8)} + env(safe-area-inset-bottom)); }\n .foot[hidden] { display: none; }\n /* What is slotted at the foot is read on ink too. */\n ::slotted(*) { --impakt-color-text-default: var(--impakt-menu-on); --impakt-color-text-heading: var(--impakt-menu-on); --impakt-color-text-muted: var(--impakt-menu-muted); --impakt-color-text-link: var(--impakt-menu-on); --impakt-color-text-link-hover: var(--impakt-menu-on); color: var(--impakt-menu-on); }\n @media (forced-colors: active) { dialog { border: 1px solid CanvasText; } .close { border: 1px solid ButtonText; } }\n `,\n ];\n\n private hasFooter = false;\n\n private get dialog(): HTMLDialogElement | null {\n return this.renderRoot.querySelector('dialog');\n }\n\n updated(changed: Map<string, unknown>): void {\n if (!changed.has('open')) return;\n const dialog = this.dialog;\n if (!dialog) return;\n if (this.open) {\n if (typeof dialog.showModal === 'function') dialog.showModal();\n else dialog.setAttribute('open', '');\n lockScroll(this);\n } else {\n if (typeof dialog.close === 'function' && dialog.open) dialog.close();\n else dialog.removeAttribute('open');\n unlockScroll(this);\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n unlockScroll(this);\n }\n\n private close(): void {\n if (!this.open) return;\n this.open = false;\n this.dispatchEvent(new CustomEvent('impakt-close', { bubbles: true, composed: true }));\n }\n\n private footerChanged(event: Event): void {\n this.hasFooter = (event.target as HTMLSlotElement).assignedNodes().length > 0;\n this.requestUpdate();\n }\n\n render(): TemplateResult {\n return html`<dialog part=\"dialog\" aria-label=${this.label} @cancel=${() => this.close()} @close=${() => this.close()}>\n <div class=\"bar\" part=\"bar\">\n ${\n this.brand\n ? html`<a class=${this.mark ? 'brand marked' : 'brand'} href=${this.home || '/'} part=\"brand\">${this.mark ? html`<span class=\"mark\" part=\"mark\" aria-hidden=\"true\">${this.mark}</span>` : nothing}${this.brand}</a>`\n : html`<span></span>`\n }\n <button class=\"close\" type=\"button\" part=\"close\" @click=${() => this.close()}>\n <span>${this.closeText}</span>\n <svg viewBox=\"0 0 12 12\" width=\"12\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M1 1l10 10M11 1 1 11\" /></svg>\n </button>\n </div>\n <nav aria-label=${this.label} part=\"nav\">\n <ol role=\"list\">\n ${(this.links ?? []).map((link, index) => {\n const current = !!this.current && link.href === this.current;\n const number = String(index + 1).padStart(2, '0');\n const worded = current && !!this.currentText;\n // Following a link closes the menu, so a link to a place on the same page does not leave it open over that place.\n return html`<li>\n <a href=${link.href} class=${worded ? 'worded' : ''} aria-current=${current ? 'page' : nothing} part=\"link\" @click=${() => this.close()}>\n <span class=\"words\">${link.label}</span><span class=\"number\" aria-hidden=\"true\">${worded ? `${this.currentText} \u00B7 ${number}` : number}</span>\n </a>\n </li>`;\n })}\n </ol>\n </nav>\n <div class=\"foot\" part=\"footer\" ?hidden=${!this.hasFooter}><slot name=\"footer\" @slotchange=${this.footerChanged}></slot></div>\n </dialog>`;\n }\n}\n\n/**\n * An offer, set out in two halves: what it is, with one action, and a short\n * numbered list of what you get.\n *\n * It draws no background of its own. Put it in `impakt-section` with the\n * `accent` or `ink` tone and it takes that band's colours, so the words on it\n * are always the colour the tokens measured against the band (1.4.3).\n *\n * The points are an ordered list, so a screen reader says how many there are;\n * the numbers drawn beside them are decoration (1.3.1). The halves stack by\n * the block's own width, and on a narrow screen the action comes after the\n * points, so it is the last thing read before the next section (1.4.10).\n *\n * @category content\n * @icon megaphone\n * @slot actions - The action: one button.\n */\nexport class ImpaktOffer extends ImpaktElement {\n static properties = {\n eyebrow: { type: String },\n heading: { type: String },\n lead: { type: String },\n points: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The small line above the heading, such as \"Free for founders and product owners\". */\n declare eyebrow: string;\n /** What is offered, such as \"Get a 48-hour product teardown.\" */\n declare heading: string;\n /** A sentence or two more. */\n declare lead: string;\n /** What you get, one short line each. */\n declare points: string[];\n declare headingLevel: number;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.eyebrow = '';\n this.heading = '';\n this.lead = '';\n this.points = [];\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container: impakt-offer / inline-size; }\n .offer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: 'copy points' 'actions points'; grid-template-rows: auto 1fr; column-gap: ${space(12)}; row-gap: ${space(5)}; align-items: start; }\n .copy { grid-area: copy; }\n .actions { grid-area: actions; }\n ol { grid-area: points; }\n .copy { display: flex; flex-direction: column; align-items: flex-start; gap: ${space(5)}; }\n .eyebrow { margin: 0; font-family: ${t.fontEyebrow}; font-size: ${fontSize('sm')}; color: var(--impakt-eyebrow, ${t.textMuted}); }\n .heading { font-family: ${t.fontHeading}; font-size: clamp(2rem, 7cqi, 4rem); font-weight: ${fontWeight('semibold')}; line-height: 1; letter-spacing: -0.04em; color: ${t.textHeading}; }\n .lead { margin: 0; max-inline-size: 32rem; font-size: ${fontSize('md')}; line-height: ${lineHeight('normal')}; color: ${t.text}; }\n ol { list-style: none; margin: 0; padding: 0; }\n li { display: flex; gap: ${space(5)}; padding-block: ${space(5)}; border-block-start: ${t.borderThin} solid ${t.text}; font-size: ${fontSize('lg')}; font-weight: ${fontWeight('medium')}; line-height: 1.2; color: ${t.text}; }\n .number { flex: none; font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('regular')}; line-height: 1.6; }\n @container impakt-offer (max-width: 44rem) { .offer { grid-template-columns: 1fr; grid-template-areas: 'copy' 'points' 'actions'; grid-template-rows: auto; row-gap: ${space(8)}; } }\n `,\n ];\n\n render(): TemplateResult {\n const level = Math.min(Math.max(this.headingLevel, 1), 6);\n return html`<div class=\"offer\" part=\"offer\">\n <div class=\"copy\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n ${this.heading ? html`<div class=\"heading\" part=\"heading\" role=\"heading\" aria-level=${level}>${this.heading}</div>` : nothing}\n ${this.lead ? html`<p class=\"lead\" part=\"lead\">${this.lead}</p>` : nothing}\n </div>\n <div class=\"actions\" part=\"actions\"><slot name=\"actions\"></slot></div>\n ${\n (this.points ?? []).length\n ? html`<ol role=\"list\" part=\"points\">\n ${this.points.map((point, index) => html`<li><span class=\"number\" aria-hidden=\"true\">${String(index + 1).padStart(2, '0')}</span><span>${point}</span></li>`)}\n </ol>`\n : nothing\n }\n </div>`;\n }\n}\n\n/**\n * A card for one article: what it is filed under, its title and a line about\n * it.\n *\n * **The card is one link.** The link sits on the title, which is a heading,\n * and is stretched over the card, so the whole card can be pressed while a\n * screen reader meets one link named by the title, not a \"Read more\" that says\n * nothing out of context (2.4.4). `link-text` adds a visible line such as\n * \"Read\"; it is decoration and is hidden from a screen reader, which already\n * has the title.\n *\n * @category content\n * @icon card\n */\nexport class ImpaktPostCard extends ImpaktElement {\n static properties = {\n heading: { type: String },\n text: { type: String },\n meta: { type: String },\n href: { type: String },\n linkText: { type: String, attribute: 'link-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n };\n /** The article's title. */\n declare heading: string;\n /** A line about it. */\n declare text: string;\n /** What it is filed under and how long it is, such as \"Pricing \u00B7 7 min read\". */\n declare meta: string;\n /** Where the card goes. */\n declare href: string;\n /** A visible line at the foot of the card, such as \"Read\". Leave empty for none. */\n declare linkText: string;\n declare headingLevel: number;\n\n constructor() {\n super();\n this.heading = '';\n this.text = '';\n this.meta = '';\n this.href = '';\n this.linkText = '';\n this.headingLevel = 3;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; block-size: 100%; }\n article { position: relative; box-sizing: border-box; block-size: 100%; display: flex; flex-direction: column; gap: ${space(4)}; padding: ${space(6)}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radius}; transition: background-color 140ms ease-out; }\n .meta { margin: 0; font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; }\n .heading { font-family: ${t.fontHeading}; font-size: ${fontSize('xl')}; font-weight: ${fontWeight('semibold')}; line-height: 1.15; letter-spacing: -0.025em; color: ${t.text}; }\n .heading a { color: inherit; text-decoration: none; }\n .heading a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }\n .heading a:focus-visible { outline: none; }\n .heading a:focus-visible::after { box-shadow: ${t.focusShadow}; }\n article:has(a):hover .heading { text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }\n .text { margin: 0; font-size: ${fontSize('sm')}; line-height: ${lineHeight('normal')}; color: ${t.textMuted}; }\n .more { margin-block-start: auto; font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.text}; }\n @media (forced-colors: active) { article { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const level = Math.min(Math.max(this.headingLevel, 1), 6);\n return html`<article part=\"card\">\n ${this.meta ? html`<p class=\"meta\" part=\"meta\">${this.meta}</p>` : nothing}\n <div class=\"heading\" part=\"heading\" role=\"heading\" aria-level=${level}>${this.href ? html`<a href=${this.href} part=\"link\">${this.heading}</a>` : this.heading}</div>\n ${this.text ? html`<p class=\"text\" part=\"text\">${this.text}</p>` : nothing}\n ${this.linkText && this.href ? html`<span class=\"more\" aria-hidden=\"true\">${this.linkText} \u2192</span>` : nothing}\n </article>`;\n }\n}\n\n/**\n * A word or two of a heading picked out as if selected in a design tool: the\n * accent colour behind it, an outline and four handles.\n *\n * It is decoration round real text. The words stay in the heading, in the\n * page, so they are read, found and translated as the rest of it is; the\n * handles and the optional label are hidden from a screen reader (1.3.1).\n * The words on the accent are the colour the tokens measured against it\n * (1.4.3). Nothing moves, so there is nothing to stop for reduced motion.\n *\n * `cursor` draws a pointer at the bottom-right handle, as if someone in the\n * file had just picked the words; its value, if any, is the name tag beside\n * it. `hide-label-on=\"phone\"` leaves the label out on a phone, where it would\n * crowd the line below.\n *\n * @category content\n * @icon text\n * @slot - The words to pick out.\n */\nexport class ImpaktHighlight extends ImpaktElement {\n static properties = {\n label: { type: String },\n cursor: { type: String },\n hideLabelOn: { type: String, reflect: true, attribute: 'hide-label-on' },\n };\n /** A small tag under the words, such as \"Design \u00B7 H1 / 120\". It is decoration and is not read. */\n declare label: string;\n /**\n * Draw a pointer at the bottom-right handle. Its value is a name tag beside\n * the pointer, such as \"Maria\"; an empty value draws the pointer alone. Leave\n * the attribute off for no pointer. Decoration, not read.\n */\n declare cursor: string | null;\n /** Leave the label out on a phone (`phone`). */\n declare hideLabelOn: '' | 'phone';\n\n constructor() {\n super();\n this.label = '';\n this.cursor = null;\n this.hideLabelOn = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: inline-block; position: relative; padding-inline: 0.1em; margin-inline: -0.02em; background: ${token('color.accent.default', '#ffd43b')}; color: ${token('color.accent.on', '#1a1a1a')}; outline: 1.5px solid ${token('color.accent.on', '#1a1a1a')}; outline-offset: -1px; }\n .handle { position: absolute; inline-size: 6px; block-size: 6px; box-sizing: border-box; background: ${t.surfaceCard}; border: 1px solid ${token('color.accent.on', '#1a1a1a')}; }\n .handle:nth-of-type(1) { inset-block-start: -3px; inset-inline-start: -3px; }\n .handle:nth-of-type(2) { inset-block-start: -3px; inset-inline-end: -3px; }\n .handle:nth-of-type(3) { inset-block-end: -3px; inset-inline-start: -3px; }\n .handle:nth-of-type(4) { inset-block-end: -3px; inset-inline-end: -3px; }\n /* The label is meta: monospace capitals at 11px, square. */\n .label { position: absolute; inset-block-start: calc(100% + 8px); inset-inline-start: 0; padding: 3px 7px; white-space: nowrap; font-family: ${t.fontMono}; font-size: 0.6875rem; font-weight: ${fontWeight('medium')}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${t.surfaceCard}; background: ${t.text}; border-radius: ${t.radiusSm}; }\n @media (max-width: 40rem) { :host([hide-label-on='phone']) .label { display: none; } }\n /* The pointer's tip sits on the bottom-right handle. */\n .cursor { position: absolute; inset-block-start: calc(100% - 1px); inset-inline-start: calc(100% - 1px); display: flex; align-items: flex-start; gap: 2px; pointer-events: none; line-height: 1; }\n .cursor svg { display: block; flex: none; color: ${t.text}; stroke: ${t.surfaceCard}; }\n .tag { margin-block-start: 14px; padding: 3px 6px; white-space: nowrap; font-family: ${t.fontMono}; font-size: 0.6875rem; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${t.surfaceCard}; background: ${t.text}; }\n @media (forced-colors: active) { :host { forced-color-adjust: none; background: Highlight; color: HighlightText; outline-color: HighlightText; } .handle { border-color: HighlightText; background: Canvas; } .label, .tag { background: CanvasText; color: Canvas; } .cursor svg { color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<slot></slot><span class=\"handle\" aria-hidden=\"true\"></span><span class=\"handle\" aria-hidden=\"true\"></span><span class=\"handle\" aria-hidden=\"true\"></span><span class=\"handle\" aria-hidden=\"true\"></span>${\n this.label ? html`<span class=\"label\" part=\"label\" aria-hidden=\"true\">${this.label}</span>` : nothing\n }${\n this.cursor != null\n ? html`<span class=\"cursor\" part=\"cursor\" aria-hidden=\"true\"\n ><svg viewBox=\"0 0 16 20\" width=\"16\" height=\"20\" focusable=\"false\"><path d=\"M1 1v16l4.2-4 2.9 6.2 2.6-1.2-2.9-6.1H14Z\" fill=\"currentColor\" stroke-width=\"1.2\" stroke-linejoin=\"round\" /></svg\n >${this.cursor ? html`<span class=\"tag\">${this.cursor}</span>` : nothing}</span\n >`\n : nothing\n }`;\n }\n}\n\ncustomElements.define('impakt-work-list', ImpaktWorkList);\ncustomElements.define('impakt-stat-row', ImpaktStatRow);\ncustomElements.define('impakt-faq', ImpaktFaq);\ncustomElements.define('impakt-site-menu', ImpaktSiteMenu);\ncustomElements.define('impakt-offer', ImpaktOffer);\ncustomElements.define('impakt-post-card', ImpaktPostCard);\ncustomElements.define('impakt-highlight', ImpaktHighlight);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-work-list': ImpaktWorkList;\n 'impakt-stat-row': ImpaktStatRow;\n 'impakt-faq': ImpaktFaq;\n 'impakt-site-menu': ImpaktSiteMenu;\n 'impakt-offer': ImpaktOffer;\n 'impakt-post-card': ImpaktPostCard;\n 'impakt-highlight': ImpaktHighlight;\n }\n}\n", "import { css, html, nothing, type TemplateResult } from 'lit';\nimport { say, ImpaktElement, focusRing, targetSize, visuallyHidden, fontWeight, lineHeight, space, spaceAround, t, token, type, iconSvg } from '@atomic-ui/ui';\n\nconst token_accent = token('color.accent.default', '#c8a15a');\n\nconst reducedMotion = (): boolean => typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;\n\n/** A round control laid over or beside content: previous, next, close. */\nconst roundButton = css`\n .round { ${targetSize} display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; padding: 0; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.rule}; border-radius: 50%; box-shadow: ${t.shadowSm}; cursor: pointer; transition: box-shadow 120ms ease-in-out, background-color 120ms ease-in-out; }\n .round:hover:not(:disabled) { box-shadow: ${t.shadowMd}; }\n .round:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }\n`;\n\nconst headingStyles = css`\n .eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${t.brand})); ${type('sm')} font-size: var(--impakt-font-size-eyebrow, var(--impakt-font-size-sm, 0.875rem)); font-family: ${t.fontEyebrow}; font-weight: var(--impakt-font-weight-eyebrow, ${fontWeight('semibold')}); letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; letter-spacing: ${t.trackingTight}; text-wrap: balance; }\n .lead { margin: 0; color: ${t.textMuted}; text-wrap: pretty; }\n`;\n\n/**\n * Slides that move sideways: house types, reviews, the rooms of a show home.\n * Put anything in it, one child to a slide.\n *\n * It follows the ARIA carousel pattern. Each slide is named \"2 of 6\", a live\n * region says where you are, and it can be moved with the buttons, the dots,\n * the arrow keys, a swipe or a scroll.\n *\n * **It moves only when asked.** Autoplay is off by default. Turned on, it has a\n * Pause button, stops while pointed at or focused, and never runs for someone\n * who has asked for reduced motion (2.2.2).\n *\n * @category content\n * @icon carousel\n * @slot - The slides, one child to each.\n */\nexport class ImpaktCarousel extends ImpaktElement {\n static properties = {\n label: { type: String },\n perView: { type: String, reflect: true, attribute: 'per-view' },\n arrows: { type: String, reflect: true },\n autoplay: { type: Boolean, reflect: true },\n seconds: { type: Number },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** What the slides are, for a screen reader, such as \"House types\". */\n declare label: string;\n /** How many slides show at once on a wide screen. A tablet shows at most two, and a phone one. */\n declare perView: '1' | '2' | '3';\n /** Where the arrows sit: under the slides, or level with the heading above them. */\n declare arrows: 'below' | 'top';\n /** Move on by itself. People can pause it, and it never runs for those who ask for less motion. */\n declare autoplay: boolean;\n /** How long each slide stays, when it moves by itself. */\n declare seconds: number;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private index = 0;\n private count = 0;\n /** How many slides fit right now, which the width decides. */\n private visible: number | null = null;\n /** Where a button or dot is taking the row. Until it arrives, the scroll position is not the truth. */\n private heading: number | null = null;\n private settle: ReturnType<typeof setTimeout> | undefined;\n private observer: ResizeObserver | undefined;\n private paused = false;\n private held = false;\n private timer: ReturnType<typeof setInterval> | undefined;\n\n constructor() {\n super();\n this.label = 'Slides';\n this.perView = '1';\n this.arrows = 'below';\n this.autoplay = false;\n this.seconds = 6;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n roundButton,\n css`\n :host { display: block; container-type: inline-size; --most: 1; --gap: ${space(6)}; }\n :host([per-view='2']) { --most: 2; }\n :host([per-view='3']) { --most: 3; }\n .track { --per: var(--most); display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: ${space(1)} ${space(2)}; border-radius: ${t.radiusLg}; }\n .track::-webkit-scrollbar { display: none; }\n ::slotted(*) { flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per)); min-inline-size: 0; scroll-snap-align: start; box-sizing: border-box; }\n /* Whole slides only: a slice of the next one reads as content spilling out of the page. */\n @container (max-width: 60rem) { .track { --per: min(var(--most), 2); } }\n @container (max-width: 40rem) { .track { --per: 1; --gap: ${space(4)}; } }\n .controls { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; margin-block-start: ${space(4)}; }\n .dots { display: flex; flex-wrap: wrap; gap: ${space(1)}; }\n .dot { ${targetSize} display: inline-flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 0; cursor: pointer; border-radius: ${t.radiusSm}; }\n .dot span { display: block; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${t.rule}; transition: inline-size 150ms ease-in-out, background-color 150ms ease-in-out; }\n .dot[aria-current='true'] span { inline-size: 24px; background: ${t.brand}; }\n .buttons { display: flex; gap: ${space(2)}; }\n section { position: relative; }\n @container (min-width: 40.01rem) { :host([arrows='top']) .buttons { position: absolute; inset-block-end: calc(100% + ${space(4)}); inset-inline-end: 0; } }\n .sr-only { ${visuallyHidden} }\n @media (forced-colors: active) { .dot span { background: CanvasText; } .dot[aria-current='true'] span { background: Highlight; } }\n `,\n ];\n\n private get track(): HTMLElement | null {\n return this.renderRoot.querySelector('.track');\n }\n\n private get slides(): HTMLElement[] {\n return Array.from(this.children) as HTMLElement[];\n }\n\n /** The last slide that can sit at the start of the row. */\n private get last(): number {\n return Math.max(0, this.count - (this.visible ?? Number(this.perView || 1)));\n }\n\n /** Count what actually fits, and keep the row on a real stop when that changes. */\n private measure(): void {\n const track = this.track;\n const first = this.slides[0];\n if (!track || !first) return;\n const width = first.getBoundingClientRect().width;\n if (width <= 0) return;\n const gap = Number.parseFloat(getComputedStyle(track).columnGap) || 0;\n const fits = Math.max(1, Math.round((track.clientWidth + gap) / (width + gap)));\n if (fits === this.visible) return;\n this.visible = fits;\n this.index = Math.min(this.index, this.last);\n const slide = this.slides[this.index];\n if (slide && typeof track.scrollTo === 'function') track.scrollTo({ left: slide.offsetLeft - track.offsetLeft, behavior: 'auto' });\n this.requestUpdate();\n }\n\n private onSlots(): void {\n const slides = this.slides;\n this.count = slides.length;\n slides.forEach((slide, i) => {\n slide.setAttribute('role', 'group');\n slide.setAttribute('aria-roledescription', say('slide'));\n slide.setAttribute('aria-label', say('{slide} of {slides}', { slide: i + 1, slides: slides.length }));\n });\n this.measure();\n this.requestUpdate();\n }\n\n private go(to: number): void {\n const target = Math.min(this.last, Math.max(0, to));\n this.index = target;\n this.heading = target;\n clearTimeout(this.settle);\n // If the row has not got there by now (a tab in the background, say), put it there.\n this.settle = setTimeout(() => {\n const arrived = this.heading === null;\n this.heading = null;\n const track = this.track;\n const slide = this.slides[this.index];\n if (!arrived && track && slide && typeof track.scrollTo === 'function') track.scrollTo({ left: slide.offsetLeft - track.offsetLeft, behavior: 'auto' });\n }, 900);\n this.requestUpdate();\n const track = this.track;\n const slide = this.slides[target];\n if (track && slide && typeof track.scrollTo === 'function') {\n track.scrollTo({ left: slide.offsetLeft - track.offsetLeft, behavior: reducedMotion() ? 'auto' : 'smooth' });\n }\n }\n\n private onScroll(): void {\n const track = this.track;\n const slides = this.slides;\n if (!track || !slides.length) return;\n let nearest = 0;\n let distance = Infinity;\n slides.forEach((slide, i) => {\n const d = Math.abs(slide.offsetLeft - track.offsetLeft - track.scrollLeft);\n if (d < distance) {\n distance = d;\n nearest = i;\n }\n });\n if (this.heading !== null) {\n if (nearest === this.heading && distance < 2) {\n this.heading = null;\n clearTimeout(this.settle);\n }\n return;\n }\n if (nearest !== this.index) {\n this.index = Math.min(nearest, this.last);\n this.requestUpdate();\n }\n }\n\n private onKey(event: KeyboardEvent): void {\n if (event.key === 'ArrowRight') {\n event.preventDefault();\n this.go(this.index + 1);\n }\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n this.go(this.index - 1);\n }\n }\n\n private get canPlay(): boolean {\n return this.autoplay && !reducedMotion();\n }\n\n private restart(): void {\n clearInterval(this.timer);\n this.timer = undefined;\n if (!this.canPlay || this.paused || this.held) return;\n this.timer = setInterval(() => this.go(this.index >= this.last ? 0 : this.index + 1), Math.max(2, this.seconds) * 1000);\n }\n\n private hold(held: boolean): void {\n this.held = held;\n this.restart();\n }\n\n private togglePause(): void {\n this.paused = !this.paused;\n this.restart();\n this.requestUpdate();\n }\n\n protected firstUpdated(): void {\n if (typeof ResizeObserver === 'function' && this.track) {\n this.observer = new ResizeObserver(() => this.measure());\n this.observer.observe(this.track);\n }\n }\n\n protected updated(changed: Map<string, unknown>): void {\n if (changed.has('autoplay') || changed.has('seconds')) this.restart();\n if (changed.has('perView')) this.measure();\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n if (this.track) this.observer?.observe(this.track);\n this.restart();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.observer?.disconnect();\n clearInterval(this.timer);\n clearTimeout(this.settle);\n }\n\n render(): TemplateResult {\n const stops = Array.from({ length: this.last + 1 }, (_, i) => i);\n return html`<section aria-roledescription=${say('carousel')} aria-label=${this.label} part=\"carousel\" @keydown=${this.onKey}\n @mouseenter=${() => this.hold(true)} @mouseleave=${() => this.hold(false)} @focusin=${() => this.hold(true)} @focusout=${() => this.hold(false)}>\n <div class=\"track\" part=\"track\" tabindex=\"0\" @scroll=${this.onScroll}><slot @slotchange=${this.onSlots}></slot></div>\n <div class=\"controls\" part=\"controls\">\n <div class=\"dots\">${stops.length > 1 ? stops.map((i) => html`<button class=\"dot\" type=\"button\" aria-label=${say('Go to slide {slide}', { slide: i + 1 })} aria-current=${i === this.index ? 'true' : 'false'} @click=${() => this.go(i)}><span></span></button>`) : nothing}</div>\n <div class=\"buttons\">\n ${this.canPlay ? html`<button class=\"round\" type=\"button\" aria-label=${say(this.paused ? 'Play the slides' : 'Pause the slides')} @click=${this.togglePause}>${this.paused ? iconSvg('arrow-right', '18px') : html`<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\"><rect x=\"6\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\"/><rect x=\"14\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\"/></svg>`}</button>` : nothing}\n <button class=\"round\" type=\"button\" aria-label=${say('Previous slide')} ?disabled=${this.index === 0} @click=${() => this.go(this.index - 1)}>${iconSvg('arrow-left', '18px')}</button>\n <button class=\"round\" type=\"button\" aria-label=${say('Next slide')} ?disabled=${this.index >= this.last} @click=${() => this.go(this.index + 1)}>${iconSvg('arrow-right', '18px')}</button>\n </div>\n </div>\n <p class=\"sr-only\" aria-live=\"polite\">${say('Slide {slide} of {slides}', { slide: this.index + 1, slides: this.count })}</p>\n </section>`;\n }\n}\n\n/** One picture in a gallery. */\nexport interface GalleryItem {\n id?: string;\n src: string;\n alt: string;\n caption?: string;\n}\n\n/**\n * How far a gallery picture stretches so that no row ends in a gap, on a wide\n * container and on a narrow one. The large first picture keeps its own size.\n */\nexport function gallerySpan(index: number, count: number, layout: 'feature' | 'grid'): { wide: number; narrow: number; rows: number } {\n const last = index === count - 1;\n const span = { wide: 1, narrow: 1, rows: 1 };\n if (layout === 'grid') {\n if (last) {\n span.wide = count % 3 ? 4 - (count % 3) : 1;\n span.narrow = count % 2 ? 2 : 1;\n }\n return span;\n }\n if (index === 0) return span;\n if (count === 2) return { wide: 2, narrow: 2, rows: 2 };\n if (count === 3) return { ...span, wide: 2 };\n if (last) {\n const extra = (count - 5) % 4;\n span.wide = count === 4 ? 2 : count > 5 && extra ? 5 - extra : 1;\n span.narrow = count % 2 ? 1 : 2;\n }\n return span;\n}\n\n/**\n * A set of pictures, with the first shown large, that open full screen one at\n * a time: the rooms of a show home, or views of a development.\n *\n * Each picture is a button. The full-screen view is a real modal dialog, so\n * focus stays inside it, Escape closes it and focus returns to the picture that\n * opened it. The arrow keys move between pictures.\n *\n * @category media\n * @icon gallery\n */\nexport class ImpaktGallery extends ImpaktElement {\n static properties = {\n items: { type: Array },\n layout: { type: String, reflect: true },\n label: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: GalleryItem[];\n /** One large picture with smaller ones beside it, or an even grid. */\n declare layout: 'feature' | 'grid';\n /** What the pictures are of, for a screen reader. */\n declare label: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private shown = -1;\n private opener: HTMLElement | null = null;\n\n constructor() {\n super();\n this.items = [];\n this.layout = 'feature';\n this.label = 'Gallery';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n roundButton,\n css`\n :host { display: block; container-type: inline-size; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(3)}; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 180px; }\n :host([layout='grid']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 220px; }\n li { grid-column: span var(--span-wide, 1); grid-row: span var(--span-rows, 1); }\n :host([layout='feature']) li:first-child { grid-column: span 2; grid-row: span 2; }\n .open { position: relative; display: block; inline-size: 100%; block-size: 100%; padding: 0; border: 0; background: ${t.surfaceInset}; border-radius: ${t.radiusXl}; overflow: hidden; cursor: zoom-in; }\n .open img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 300ms ease-out; }\n .open:hover img { transform: scale(1.03); }\n @container (max-width: 40rem) { ul, :host([layout='grid']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 130px; } li { grid-column: span var(--span-narrow, 1); } }\n dialog { padding: 0; border: 0; background: transparent; max-inline-size: none; max-block-size: none; inline-size: 100vw; block-size: 100dvh; }\n dialog::backdrop { background: rgb(10 14 12 / 0.9); }\n .stage { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; block-size: 100%; box-sizing: border-box; padding: ${space(4)}; gap: ${space(3)}; color: #fff; }\n .bar { display: flex; align-items: center; justify-content: space-between; ${type('sm')} }\n .middle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: ${space(3)}; min-block-size: 0; }\n .middle img { display: block; margin: auto; max-inline-size: 100%; max-block-size: 100%; object-fit: contain; border-radius: ${t.radiusLg}; }\n figure { margin: 0; display: flex; min-block-size: 0; block-size: 100%; }\n .caption { margin: 0; text-align: center; ${type('sm')} }\n `,\n ];\n\n private get dialog(): HTMLDialogElement | null {\n return this.renderRoot.querySelector('dialog');\n }\n\n private open(index: number, event: Event): void {\n this.opener = event.currentTarget as HTMLElement;\n this.shown = index;\n this.requestUpdate();\n void this.updateComplete.then(() => {\n const d = this.dialog;\n if (d && !d.open) {\n if (typeof d.showModal === 'function') d.showModal();\n else d.setAttribute('open', '');\n }\n });\n }\n\n private close(): void {\n const d = this.dialog;\n if (d?.open) {\n if (typeof d.close === 'function') d.close();\n else d.removeAttribute('open');\n }\n this.onClosed();\n }\n\n private onClosed(): void {\n if (this.shown === -1) return;\n this.shown = -1;\n this.requestUpdate();\n this.opener?.focus();\n }\n\n private step(by: number): void {\n const n = (this.items ?? []).length;\n if (!n || this.shown < 0) return;\n this.shown = (this.shown + by + n) % n;\n this.requestUpdate();\n }\n\n private onKey(event: KeyboardEvent): void {\n if (event.key === 'ArrowRight') {\n event.preventDefault();\n this.step(1);\n }\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n this.step(-1);\n }\n }\n\n render(): TemplateResult {\n const items = this.items ?? [];\n const current = this.shown >= 0 ? items[this.shown] : undefined;\n return html`<ul aria-label=${this.label} part=\"list\">${items.map((item, i) => {\n const span = gallerySpan(i, items.length, this.layout);\n return html`<li style=${`--span-wide:${span.wide};--span-narrow:${span.narrow};--span-rows:${span.rows}`}>\n <button class=\"open\" type=\"button\" aria-label=${say('View larger: {picture}', { picture: item.alt })} @click=${(e: Event) => this.open(i, e)}><img src=${item.src} alt=${item.alt} loading=\"lazy\" /></button>\n </li>`;\n })}</ul>\n <dialog aria-label=${this.label} @keydown=${this.onKey} @close=${this.onClosed}>\n ${\n current\n ? html`<div class=\"stage\">\n <div class=\"bar\"><span>${this.shown + 1} of ${items.length}</span><button class=\"round\" type=\"button\" aria-label=${say('Close')} @click=${this.close}>${iconSvg('close', '18px')}</button></div>\n <div class=\"middle\">\n <button class=\"round\" type=\"button\" aria-label=${say('Previous picture')} @click=${() => this.step(-1)}>${iconSvg('arrow-left', '18px')}</button>\n <figure><img src=${current.src} alt=${current.alt} /></figure>\n <button class=\"round\" type=\"button\" aria-label=${say('Next picture')} @click=${() => this.step(1)}>${iconSvg('arrow-right', '18px')}</button>\n </div>\n <p class=\"caption\">${current.caption ?? current.alt}</p>\n </div>`\n : nothing\n }\n </dialog>`;\n }\n}\n\n/** One accreditation or partner. */\nexport interface LogoItem {\n id?: string;\n src: string;\n alt: string;\n href?: string;\n}\n\n/**\n * A row of logos that lends trust: accreditations, awards, lenders, partners.\n *\n * The logos are drawn quietly so they do not fight the page, and come to full\n * colour when pointed at. Each one is named by its alt text.\n *\n * @category content\n * @icon logos\n */\nexport class ImpaktLogoCloud extends ImpaktElement {\n static properties = {\n heading: { type: String },\n items: { type: Array },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A line above the logos, such as \"Accredited by\". */\n declare heading: string;\n declare items: LogoItem[];\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = '';\n this.items = [];\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; }\n p { margin: 0 0 ${space(6)}; text-align: center; color: ${t.textMuted}; ${type('sm')} font-weight: ${fontWeight('medium')}; }\n ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: ${space(8)} ${space(12)}; }\n img { display: block; block-size: 40px; inline-size: auto; max-inline-size: 160px; object-fit: contain; filter: grayscale(1); opacity: 0.7; transition: filter 200ms ease-in-out, opacity 200ms ease-in-out; }\n li:hover img { filter: none; opacity: 1; }\n a { display: block; border-radius: ${t.radiusSm}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`${this.heading ? html`<p part=\"heading\">${this.heading}</p>` : nothing}\n <ul part=\"list\">${(this.items ?? []).map((logo) => html`<li>${logo.href ? html`<a href=${logo.href}><img src=${logo.src} alt=${logo.alt} /></a>` : html`<img src=${logo.src} alt=${logo.alt} />`}</li>`)}</ul>`;\n }\n}\n\n/** One step in a process. */\nexport interface StepItem {\n id?: string;\n heading: string;\n text?: string;\n /** A short line above the heading, such as how long the step takes. */\n meta?: string;\n}\n\n/**\n * A process, in order, joined by a line: how buying a home works, what happens\n * after you apply.\n *\n * It is an ordered list, so a screen reader says the number and how many there\n * are. The numbers are drawn from the list, not typed in.\n *\n * @category content\n * @icon steps\n */\nexport class ImpaktSteps extends ImpaktElement {\n static properties = {\n items: { type: Array },\n orientation: { type: String, reflect: true },\n look: { type: String, reflect: true },\n tones: { type: Boolean, reflect: true },\n current: { type: Number },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: StepItem[];\n /** Across the page, or down it. Across becomes down on a narrow screen. */\n declare orientation: 'horizontal' | 'vertical';\n /**\n * `numbered` joins numbered circles with a line. `ruled` gives each step a\n * 1px rule along its top in the band's text colour, with its number and\n * meta in monospace capitals (\"01 \u00B7 1 TO 2 WEEKS\"), as a project plan's\n * phases are drawn; on a phone the steps hang off a rail down the left. The\n * steps are an ordered list either way.\n */\n declare look: 'numbered' | 'ruled';\n /**\n * With `ruled`: colour each step's rule in the brand's chart colours, and on\n * a phone draw the steps as a coloured branch graph, for a brand that wants\n * colour there.\n */\n declare tones: boolean;\n /**\n * The index of the step the project is at, from 0, or -1 for none. It is\n * marked `aria-current=\"step\"`, its rule is drawn heavier and its meta and\n * rule take `--impakt-steps-current`, which a dark band sets to the accent.\n */\n declare current: number;\n /** The level of each step's heading. One below the heading above the steps. */\n declare headingLevel: 2 | 3 | 4;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.orientation = 'horizontal';\n this.look = 'numbered';\n this.tones = false;\n this.current = -1;\n this.headingLevel = 3;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: ${space(6)}; }\n li { position: relative; counter-increment: step; display: flex; flex-direction: column; gap: ${space(2)}; }\n li::before { content: counter(step); display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; border-radius: 50%; background: ${t.brand}; color: ${t.onBrand}; ${type('sm')} font-weight: ${fontWeight('bold')}; position: relative; z-index: 1; margin-block-end: ${space(2)}; }\n li:not(:last-child)::after { content: ''; position: absolute; inset-block-start: 20px; inset-inline-start: 48px; inset-inline-end: calc(-1 * ${space(6)} + 8px); block-size: 2px; background: ${t.rule}; }\n .h { ${type('lg')} letter-spacing: 0; }\n .meta { margin: 0; ${type('sm')} color: ${t.textMuted}; font-family: ${t.fontMono}; letter-spacing: 0.02em; }\n .body { margin: 0; color: ${t.textMuted}; line-height: ${lineHeight('normal')}; text-wrap: pretty; }\n :host([orientation='vertical']) ol { grid-auto-flow: row; }\n :host([orientation='vertical']) li { padding-inline-start: 56px; min-block-size: 56px; }\n :host([orientation='vertical']) li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }\n :host([orientation='vertical']) li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${space(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }\n @container (max-width: 40rem) {\n ol { grid-auto-flow: row; }\n li { padding-inline-start: 56px; min-block-size: 56px; }\n li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }\n li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${space(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }\n }\n /* Ruled: a 1px rule in the band's text colour, or in the chart colours with tones. */\n :host([look='ruled']) li { --rule: currentColor; padding-block-start: ${space(5)}; border-block-start: 1px solid var(--rule); }\n :host([look='ruled'][tones]) li { --rule: var(--chart); border-block-start-width: 3px; }\n :host([look='ruled']:not([tones])) .meta { font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n :host([look='ruled']:not([tones])) .meta::before { content: counter(step, decimal-leading-zero) ' \u00B7 '; }\n :host([look='ruled']:not([tones])) li[aria-current] { --rule: var(--impakt-steps-current, currentColor); border-block-start-width: 2px; padding-block-start: calc(${space(5)} - 1px); }\n :host([look='ruled']:not([tones])) li[aria-current] .meta { color: var(--impakt-steps-current, currentColor); }\n :host([look='ruled']) li::before, :host([look='ruled']) li::after { display: none; }\n :host([look='ruled']) ol { gap: ${space(5)}; }\n /* On a phone the ruled steps hang off a rail: a 1.5px line down the left and a hollow 10px ring at each step, the current one filled. */\n @container (max-width: 40rem) {\n :host([look='ruled']) ol { gap: 0; }\n :host([look='ruled']) li, :host([look='ruled']:not([tones])) li[aria-current] { padding-inline-start: 40px; padding-block: ${space(6)}; min-block-size: 0; border-block-start: 0; }\n :host([look='ruled']) li::before { display: block; content: ''; position: absolute; inset-block: 0; inset-inline-start: 4px; inline-size: 1.5px; block-size: auto; border-radius: 0; margin: 0; background: currentColor; }\n :host([look='ruled']) li::after { display: block; content: ''; position: absolute; inset-block-start: calc(${space(6)} + 2px); inset-inline-start: 0; inline-size: 10px; block-size: 10px; box-sizing: border-box; border: 1px solid currentColor; border-radius: 50%; background: ${t.surfaceCard}; }\n :host([look='ruled']) li:first-child::before { inset-block-start: calc(${space(6)} + 7px); }\n :host([look='ruled']) li:last-child::before { inset-block-end: auto; block-size: calc(${space(6)} + 7px); }\n :host([look='ruled']:not([tones])) li[aria-current]::after { background: var(--impakt-steps-current, currentColor); }\n /* With tones: a branch graph, one trunk down the left and each step a coloured branch off it with a dot. */\n :host([look='ruled'][tones]) li::before { inset-block: 0; inset-inline-start: 0; inline-size: 2px; block-size: auto; background: ${t.text}; }\n :host([look='ruled'][tones]) li::after { inset-block: ${space(3)}; inset-inline-start: 2px; inline-size: 12px; block-size: auto; background: radial-gradient(circle at 100% 34px, var(--rule) 4px, transparent 4.5px); border: 2px solid var(--rule); border-inline-start: 0; border-radius: 0 14px 14px 0; }\n }\n @media (forced-colors: active) { li::before { border: 1px solid CanvasText; } li:not(:last-child)::after { background: CanvasText; } :host([look='ruled']) li { border-block-start-color: CanvasText; } :host([look='ruled']) li[aria-current]::after { background: Highlight; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<ol part=\"list\">${(this.items ?? []).map(\n (\n step,\n i,\n ) => html`<li part=\"step\" aria-current=${i === this.current ? 'step' : nothing} style=${this.look === 'ruled' ? `--chart:var(--impakt-color-chart-${(i % 5) + 1}, ${'var(--impakt-color-brand-default, #1f4ed8)'})` : nothing}>\n ${step.meta ? html`<p class=\"meta\">${step.meta}</p>` : nothing}\n <div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${step.heading}</div>\n ${step.text ? html`<p class=\"body\">${step.text}</p>` : nothing}\n </li>`,\n )}</ol>`;\n }\n}\n\n/**\n * A picture beside words, the working section of a marketing page: a heading,\n * a line of text, a short list of points and an action.\n *\n * On a phone the words come first, whichever side the picture is on, so the\n * reading order never depends on the layout.\n *\n * @category layout\n * @icon split\n * @role heading\n * @slot actions - Buttons and links under the words.\n */\nexport class ImpaktMediaSplit extends ImpaktElement {\n static properties = {\n eyebrow: { type: String },\n heading: { type: String },\n lead: { type: String },\n points: { type: Array },\n level: { type: Number, reflect: true },\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n imageSide: { type: String, reflect: true, attribute: 'image-side' },\n insetSrc: { type: String, attribute: 'inset-src' },\n insetAlt: { type: String, attribute: 'inset-alt' },\n ratio: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare eyebrow: string;\n declare heading: string;\n /** A sentence or two under the heading. */\n declare lead: string;\n /** Short points, each drawn with a tick. */\n declare points: string[];\n /** The heading's level in the page. */\n declare level: 2 | 3;\n declare imageSrc: string;\n /** What the picture shows. Leave empty only when it is decoration. */\n declare imageAlt: string;\n /** A smaller picture overlapping the corner of the main one. */\n declare insetSrc: string;\n declare insetAlt: string;\n /** Which side the picture sits on, on a wide screen. */\n declare imageSide: 'start' | 'end';\n /** The picture's shape. */\n declare ratio: '4:3' | '1:1' | '3:2' | '16:9';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.eyebrow = '';\n this.heading = '';\n this.lead = '';\n this.points = [];\n this.level = 2;\n this.imageSrc = '';\n this.imageAlt = '';\n this.imageSide = 'end';\n this.insetSrc = '';\n this.insetAlt = '';\n this.ratio = '4:3';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; --ratio: 4 / 3; }\n :host([ratio='1:1']) { --ratio: 1 / 1; }\n :host([ratio='3:2']) { --ratio: 3 / 2; }\n :host([ratio='16:9']) { --ratio: 16 / 9; }\n .split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(16)}; align-items: center; }\n :host([image-side='start']) .picture { order: -1; }\n .words { display: flex; flex-direction: column; gap: ${space(4)}; }\n .h { ${type('4xl')} }\n .lead { ${type('lg')} }\n ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: ${space(3)}; }\n li { display: flex; gap: ${space(3)}; align-items: flex-start; line-height: ${lineHeight('normal')}; }\n .tick { flex: none; display: inline-flex; align-items: center; justify-content: center; inline-size: 24px; block-size: 24px; border-radius: 50%; background: ${t.brandSubtle}; color: ${t.brand}; }\n .actions { display: flex; flex-wrap: wrap; gap: ${space(3)} ${space(4)}; align-items: center; margin-block-start: ${space(2)}; }\n img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowXl}; }\n .picture { position: relative; }\n .picture.has-inset { padding-block-end: 8%; padding-inline-end: 4%; }\n .inset { position: absolute; inset-block-end: 0; inset-inline-end: 0; inline-size: 42%; aspect-ratio: 10 / 7; border: 6px solid ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-sizing: border-box; }\n @container (max-width: 48rem) {\n .split { grid-template-columns: minmax(0, 1fr); gap: ${space(8)}; }\n :host([image-side='start']) .picture { order: 0; }\n .h { ${type('3xl')} }\n }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"split\" part=\"split\">\n <div class=\"words\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n <div class=\"h\" role=\"heading\" aria-level=${this.level}>${this.heading}</div>\n ${this.lead ? html`<p class=\"lead\">${this.lead}</p>` : nothing}\n ${this.points?.length ? html`<ul>${this.points.map((p) => html`<li><span class=\"tick\">${iconSvg('check', '14px')}</span><span>${p}</span></li>`)}</ul>` : nothing}\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>\n ${this.imageSrc ? html`<div class=\"picture ${this.insetSrc ? 'has-inset' : ''}\"><img src=${this.imageSrc} alt=${this.imageAlt} loading=\"lazy\" part=\"image\" />${this.insetSrc ? html`<img class=\"inset\" src=${this.insetSrc} alt=${this.insetAlt} loading=\"lazy\" />` : nothing}</div>` : nothing}\n </div>`;\n }\n}\n\n/**\n * The closing push of a page: a rounded panel with a heading, a line of text\n * and the page's main action, set apart from everything above it.\n *\n * @category layout\n * @icon banner\n * @slot actions - The buttons.\n */\nexport class ImpaktCtaBanner extends ImpaktElement {\n static properties = {\n heading: { type: String },\n lead: { type: String },\n tone: { type: String, reflect: true },\n align: { type: String, reflect: true },\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare lead: string;\n /** The panel's colour. */\n declare tone: 'brand' | 'subtle' | 'card';\n /** Words beside the action, centred above it, or above it on the left. */\n declare align: 'split' | 'center' | 'stacked';\n /** A photo behind the words, with a scrim so they stay readable. */\n declare imageSrc: string;\n declare imageAlt: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = '';\n this.lead = '';\n this.tone = 'brand';\n this.align = 'split';\n this.imageSrc = '';\n this.imageAlt = '';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n .panel { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: ${space(8)}; padding: ${space(16)}; border-radius: ${t.radius2xl}; background: ${t.surfaceCard}; box-shadow: ${t.shadowSm}, inset 0 0 0 1px ${t.hairline}; }\n :host([tone='subtle']) .panel { background: ${t.surfaceSubtle}; box-shadow: none; }\n :host([tone='brand']) .panel { background: ${t.brand}; color: ${t.onBrand}; box-shadow: ${t.shadowMd};\n /* A primary button on the brand panel turns over, as it does on an ink band, so it keeps an edge against the panel. */\n --impakt-button-primary: ${t.onBrand}; --impakt-button-on-primary: ${t.brand}; --impakt-button-primary-hover: color-mix(in srgb, ${t.onBrand} 86%, ${t.brand}); --impakt-color-text-inverse: ${t.brand}; }\n /* Only the words take the light colours: a button in the actions keeps its own. */\n :host([tone='brand']) .words { --impakt-color-text-heading: ${t.onBrand}; --impakt-color-text-default: ${t.onBrand}; --impakt-color-text-muted: ${t.onBrand}; --impakt-color-text-link: ${t.onBrand}; }\n /* A soft glow in the corner, so a flat colour has some depth. Decoration only. */\n :host([tone='brand']) .panel::before { content: ''; position: absolute; inset-block-start: -40%; inset-inline-end: -10%; inline-size: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, ${t.onBrand} 18%, transparent), transparent); pointer-events: none; }\n .photo { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }\n .panel.pictured { min-block-size: 26rem; color: #fff; background: #12211a; --impakt-color-text-heading: #fff; }\n .panel.pictured::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(18 31 26 / 0.8) 0%, rgb(18 31 26 / 0.1) 75%); }\n .panel.pictured .words, .panel.pictured .actions { z-index: 1; }\n @container (max-width: 48rem) { .panel.pictured { justify-content: flex-end; } .panel.pictured::after { background: linear-gradient(180deg, rgb(18 31 26 / 0.15) 0%, rgb(18 31 26 / 0.85) 100%); } }\n .words { position: relative; display: flex; flex-direction: column; gap: ${space(3)}; max-inline-size: 40rem; }\n .h { ${type('4xl')} }\n .lead { ${type('lg')} }\n .actions { position: relative; flex: none; display: flex; flex-wrap: wrap; gap: ${space(3)}; }\n :host([align='stacked']) .panel { flex-direction: column; align-items: flex-start; justify-content: center; }\n :host([align='center']) .panel { flex-direction: column; text-align: center; }\n :host([align='center']) .words { align-items: center; }\n @container (max-width: 48rem) { .panel { flex-direction: column; align-items: flex-start; padding: ${space(8)} ${space(6)}; } .h { ${type('3xl')} } :host([align='center']) .panel { align-items: center; } }\n @media (forced-colors: active) { .panel { border: 1px solid CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"panel ${this.imageSrc ? 'pictured' : ''}\" part=\"panel\">\n ${this.imageSrc ? html`<img class=\"photo\" src=${this.imageSrc} alt=${this.imageAlt} />` : nothing}\n <div class=\"words\">\n <div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>\n ${this.lead ? html`<p class=\"lead\">${this.lead}</p>` : nothing}\n </div>\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>`;\n }\n}\n\n/** One review. */\nexport interface ReviewItem {\n id?: string;\n quote: string;\n person: string;\n about?: string;\n rating?: number;\n avatarSrc?: string;\n}\n\nconst stars = (rating: number): TemplateResult =>\n html`<span class=\"stars\" role=\"img\" aria-label=${say('Rated {rating} out of 5', { rating })}>${[1, 2, 3, 4, 5].map((n) => html`<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" fill=${n <= rating ? 'currentColor' : 'none'} stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linejoin=\"round\"><path d=\"M12 3.5l2.6 5.4 5.9.7-4.4 4 1.2 5.8L12 16.5l-5.3 2.9 1.2-5.8-4.4-4 5.9-.7z\"/></svg>`)}</span>`;\n\nconst initials = (name: string): string =>\n name\n .split(/\\s+/)\n .filter((w) => /^[A-Za-z]/.test(w) && w.toLowerCase() !== 'and')\n .slice(0, 2)\n .map((w) => w[0]!.toUpperCase())\n .join('');\n\n/**\n * What customers say, in cards, with their rating and a face or their\n * initials, and a summary line above them.\n *\n * A rating is said in words as well as drawn in stars.\n *\n * @category content\n * @icon reviews\n */\nexport class ImpaktReviews extends ImpaktElement {\n static properties = {\n summary: { type: String },\n rating: { type: Number },\n items: { type: Array },\n columns: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A line above the reviews, such as \"4.8 from 312 buyers\". */\n declare summary: string;\n /** The overall rating out of 5, drawn beside the summary. */\n declare rating: number | undefined;\n declare items: ReviewItem[];\n declare columns: 'two' | 'three';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.summary = '';\n this.rating = undefined;\n this.items = [];\n this.columns = 'three';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n .top { display: flex; align-items: center; gap: ${space(3)}; margin-block-end: ${space(6)}; ${type('sm')} font-weight: ${fontWeight('medium')}; }\n .stars { display: inline-flex; gap: 2px; color: ${token_accent}; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }\n :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n li { display: flex; flex-direction: column; gap: ${space(4)}; padding: ${space(6)}; background: ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowSm}, inset 0 0 0 1px ${t.hairline}; }\n blockquote { margin: 0; flex: 1; ${type('md')} text-wrap: pretty; }\n .who { display: flex; align-items: center; gap: ${space(3)}; }\n .face { flex: none; display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; border-radius: 50%; overflow: hidden; background: ${t.brandSubtle}; color: ${t.brand}; ${type('sm')} font-weight: ${fontWeight('bold')}; }\n .face img { inline-size: 100%; block-size: 100%; object-fit: cover; }\n .name { font-weight: ${fontWeight('semibold')}; ${type('sm')} }\n .about { color: ${t.textMuted}; ${type('sm')} }\n @container (max-width: 56rem) { ul, :host([columns='two']) ul { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n render(): TemplateResult {\n return html`${this.summary || this.rating ? html`<p class=\"top\" part=\"summary\" style=\"margin-block-start:0\">${this.rating ? stars(Math.round(this.rating)) : nothing}<span>${this.summary}</span></p>` : nothing}\n <ul part=\"list\">${(this.items ?? []).map(\n (r) => html`<li part=\"review\">\n ${r.rating ? stars(r.rating) : nothing}\n <blockquote>${r.quote}</blockquote>\n <div class=\"who\"><span class=\"face\" aria-hidden=\"true\">${r.avatarSrc ? html`<img src=${r.avatarSrc} alt=\"\" />` : initials(r.person)}</span><span><span class=\"name\">${r.person}</span>${r.about ? html`<br /><span class=\"about\">${r.about}</span>` : nothing}</span></div>\n </li>`,\n )}</ul>`;\n }\n}\n\n/**\n * An email sign-up in one line: release dates, price lists, launch news.\n *\n * The field has a real label, the browser checks the address, and what happens\n * with the address is said beside the button. The app receives the address and\n * says when it is done.\n *\n * @category form\n * @icon mail\n * @fires {CustomEvent<{ email: string }>} impakt-submit - When a valid address is sent. The address is in detail.email.\n */\nexport class ImpaktNewsletter extends ImpaktElement {\n static properties = {\n heading: { type: String },\n lead: { type: String },\n label: { type: String },\n buttonText: { type: String, attribute: 'button-text' },\n smallPrint: { type: String, attribute: 'small-print' },\n doneText: { type: String, attribute: 'done-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare lead: string;\n /** The field's label. */\n declare label: string;\n declare buttonText: string;\n /** What happens with the address, such as how to stop the emails. */\n declare smallPrint: string;\n /** What is said once the address is sent. */\n declare doneText: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private done = false;\n\n constructor() {\n super();\n this.heading = '';\n this.lead = '';\n this.label = 'Email address';\n this.buttonText = 'Sign up';\n this.smallPrint = '';\n this.doneText = 'Thank you. You\u2019re on the list.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(8)}; align-items: center; }\n .words { display: flex; flex-direction: column; gap: ${space(2)}; }\n .h { ${type('2xl')} }\n form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: ${space(1)} ${space(3)}; }\n label { grid-column: 1 / -1; ${type('sm')} font-weight: ${fontWeight('semibold')}; }\n input { min-block-size: 44px; box-sizing: border-box; inline-size: 100%; padding: ${space(2.5)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; box-shadow: ${t.shadowXs}; }\n button { ${targetSize} min-block-size: 44px; padding: ${space(2)} ${space(5)}; font: inherit; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; background: ${t.brand}; border: 0; border-radius: ${t.radiusLg}; box-shadow: ${t.shadowXs}; cursor: pointer; }\n button:hover { background: ${t.brandHover}; }\n .note { grid-column: 1 / -1; margin: ${space(1)} 0 0; color: ${t.textMuted}; ${type('sm')} }\n .done { margin: 0; ${type('md')} font-weight: ${fontWeight('semibold')}; }\n @container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n private submit(event: SubmitEvent): void {\n event.preventDefault();\n const form = event.currentTarget as HTMLFormElement;\n if (typeof form.reportValidity === 'function' && !form.reportValidity()) return;\n const email = (form.querySelector('input') as HTMLInputElement).value.trim();\n this.dispatchEvent(new CustomEvent('impakt-submit', { detail: { email }, bubbles: true, composed: true }));\n this.done = true;\n this.requestUpdate();\n }\n\n render(): TemplateResult {\n const field = this.id_('email');\n return html`<div class=\"wrap\" part=\"wrap\">\n <div class=\"words\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${this.lead ? html`<p class=\"lead\">${this.lead}</p>` : nothing}\n </div>\n <div aria-live=\"polite\">${\n this.done\n ? html`<p class=\"done\">${this.doneText}</p>`\n : html`<form @submit=${this.submit}>\n <label for=${field}>${this.label}</label>\n <input id=${field} type=\"email\" name=\"email\" autocomplete=\"email\" required />\n <button type=\"submit\">${this.buttonText}</button>\n ${this.smallPrint ? html`<p class=\"note\">${this.smallPrint}</p>` : nothing}\n </form>`\n }</div>\n </div>`;\n }\n}\n\ncustomElements.define('impakt-carousel', ImpaktCarousel);\ncustomElements.define('impakt-gallery', ImpaktGallery);\ncustomElements.define('impakt-logo-cloud', ImpaktLogoCloud);\ncustomElements.define('impakt-steps', ImpaktSteps);\ncustomElements.define('impakt-media-split', ImpaktMediaSplit);\ncustomElements.define('impakt-cta-banner', ImpaktCtaBanner);\ncustomElements.define('impakt-reviews', ImpaktReviews);\ncustomElements.define('impakt-newsletter', ImpaktNewsletter);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-carousel': ImpaktCarousel;\n 'impakt-gallery': ImpaktGallery;\n 'impakt-logo-cloud': ImpaktLogoCloud;\n 'impakt-steps': ImpaktSteps;\n 'impakt-media-split': ImpaktMediaSplit;\n 'impakt-cta-banner': ImpaktCtaBanner;\n 'impakt-reviews': ImpaktReviews;\n 'impakt-newsletter': ImpaktNewsletter;\n }\n}\n", "import { css, html, nothing, type TemplateResult } from 'lit';\nimport { say, pageLocale, ImpaktElement, focusRing, targetSize, fontWeight, space, spaceAround, t, type, iconSvg } from '@atomic-ui/ui';\n\nexport interface SitePlot {\n id?: string;\n /** What is printed on the pin, such as 14. */\n number: string;\n /** The house type, such as The Hawthorn. */\n name?: string;\n status: 'available' | 'reserved' | 'sold';\n price?: string;\n beds?: string;\n /** How far across the plan the pin sits, from 0 to 100. */\n x: number | string;\n /** How far down the plan the pin sits, from 0 to 100. */\n y: number | string;\n href?: string;\n}\n\n/**\n * A drawing of the development with a pin on every plot. Choose a pin to see\n * whether it is available, what it costs and where to go next.\n *\n * Every pin is a button named in full, such as \"Plot 14, The Hawthorn,\n * Available, \u00A3385,000\". Status is shown by the pin's shape as well as its\n * colour, so it does not rely on colour alone (1.4.1).\n *\n * @category content\n * @icon map\n * @fires {CustomEvent<{ plot: SitePlot }>} impakt-select - When a plot is chosen. The plot is in detail.plot.\n */\nexport class ImpaktSitePlan extends ImpaktElement {\n static properties = {\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n plots: { type: Array },\n hint: { type: String },\n selectedPlot: { type: String, attribute: 'selected-plot' },\n panel: { type: String, reflect: true },\n plotWord: { type: String, attribute: 'plot-word' },\n actionText: { type: String, attribute: 'action-text' },\n availableText: { type: String, attribute: 'available-text' },\n reservedText: { type: String, attribute: 'reserved-text' },\n soldText: { type: String, attribute: 'sold-text' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare imageSrc: string;\n declare imageAlt: string;\n declare plots: SitePlot[];\n /** The number of the plot shown first. */\n declare selectedPlot: string;\n /** The details beside the plan, or floating over it. */\n declare panel: 'beside' | 'over';\n /** What is said before a plot is chosen. */\n declare hint: string;\n declare plotWord: string;\n declare actionText: string;\n declare availableText: string;\n declare reservedText: string;\n declare soldText: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private chosen: SitePlot | undefined;\n\n constructor() {\n super();\n this.imageSrc = '';\n this.imageAlt = '';\n this.plots = [];\n this.hint = 'Choose a plot to see its price and availability.';\n this.selectedPlot = '';\n this.panel = 'beside';\n this.plotWord = 'Plot';\n this.actionText = 'View this home';\n this.availableText = 'Available';\n this.reservedText = 'Reserved';\n this.soldText = 'Sold';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: ${space(6)}; align-items: start; }\n .plan { position: relative; overflow: hidden; border-radius: ${t.radius2xl}; background: ${t.surfaceSubtle}; box-shadow: ${t.shadowMd}; line-height: 0; }\n .plan img { inline-size: 100%; block-size: auto; }\n .pin { position: absolute; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; inline-size: 34px; block-size: 34px; margin: -17px 0 0 -17px; padding: 0; font: inherit; ${type('xs')} line-height: 1; font-weight: ${fontWeight('bold')}; color: ${t.onBrand}; background: ${t.brand}; border: 2px solid ${t.surfaceCard}; border-radius: 50%; box-shadow: ${t.shadowMd}; cursor: pointer; transition: transform 120ms ease-in-out; }\n .pin:hover { transform: scale(1.12); }\n .pin.reserved { color: ${t.text}; background: ${t.warningSubtle}; border-color: ${t.warning}; border-style: dashed; }\n .pin.sold { color: ${t.textMuted}; background: ${t.surfaceCard}; border-color: ${t.border}; border-radius: ${t.radius}; }\n .pin[aria-pressed='true'] { transform: scale(1.22); box-shadow: ${t.shadowLg}, 0 0 0 3px ${t.brand}; }\n .panel { display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(6)}; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowSm}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }\n .hint { margin: 0; color: ${t.textMuted}; }\n .name { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .sub { margin: 0; color: ${t.textMuted}; }\n .price { margin: 0; ${type('xl')} font-weight: ${fontWeight('semibold')}; }\n .status { align-self: flex-start; padding: ${space(0.5)} ${space(2.5)}; ${type('xs')} font-weight: ${fontWeight('semibold')}; color: ${t.successText}; background: ${t.successSubtle}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); }\n .status.reserved { color: ${t.warningText}; background: ${t.warningSubtle}; }\n .status.sold { color: ${t.text}; background: ${t.surfaceSubtle}; }\n .go { ${targetSize} display: inline-flex; align-items: center; justify-content: center; gap: ${space(2)}; padding: ${space(2)} ${space(4)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border-radius: ${t.radiusLg}; }\n .go:hover { background: ${t.brandHover}; }\n .legend { display: flex; flex-wrap: wrap; gap: ${space(4)}; margin: ${space(3)} 0 0; padding: 0; list-style: none; ${type('sm')} color: ${t.textMuted}; }\n .legend li { display: inline-flex; align-items: center; gap: ${space(2)}; }\n .key { box-sizing: border-box; inline-size: 14px; block-size: 14px; background: ${t.brand}; border: 2px solid ${t.surfaceCard}; border-radius: 50%; outline: 1px solid color-mix(in srgb, currentColor 55%, transparent); }\n .key.reserved { background: ${t.warningSubtle}; border: 2px dashed ${t.warning}; }\n .key.sold { background: ${t.surfaceCard}; border: 2px solid ${t.border}; border-radius: 3px; }\n :host { --plan-card: var(--impakt-solid-card, ${t.surfaceCard}); --plan-text: var(--impakt-solid-text, ${t.text}); --plan-heading: var(--impakt-solid-heading, ${t.text}); --plan-muted: var(--impakt-solid-muted, ${t.textMuted}); }\n :host([panel='over']) .panel { background: var(--plan-card); color: var(--plan-text); --impakt-color-surface-card: var(--plan-card); --impakt-color-text-default: var(--plan-text); --impakt-color-text-heading: var(--plan-heading); --impakt-color-text-muted: var(--plan-muted); }\n @container (min-width: 44.01rem) { :host([panel='over']) .wrap { position: relative; grid-template-columns: minmax(0, 1fr); } :host([panel='over']) .panel { position: absolute; inset-block-start: 32%; inset-inline-end: ${space(8)}; inline-size: 22.5rem; box-sizing: border-box; box-shadow: ${t.shadowXl}; } }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n willUpdate(changed: Map<string, unknown>): void {\n if ((changed.has('selectedPlot') || changed.has('plots')) && this.selectedPlot && !this.chosen)\n this.chosen = this.plots.find((p) => String(p.number) === this.selectedPlot);\n }\n\n private word(status: string): string {\n return status === 'sold' ? this.soldText : status === 'reserved' ? this.reservedText : this.availableText;\n }\n\n private choose(plot: SitePlot): void {\n this.chosen = plot;\n this.requestUpdate();\n this.dispatchEvent(new CustomEvent('impakt-select', { detail: { plot }, bubbles: true, composed: true }));\n }\n\n private renderPanel(): TemplateResult {\n const plot = this.chosen;\n if (!plot) return html`<p class=\"hint\">${this.hint}</p>`;\n const status = plot.status ?? 'available';\n return html`<span class=\"status ${status}\">${this.word(status)}</span>\n <p class=\"name\">${this.plotWord} ${plot.number}</p>\n ${plot.name || plot.beds ? html`<p class=\"sub\">${[plot.name, plot.beds].filter(Boolean).join(' \u00B7 ')}</p>` : nothing}\n ${plot.price ? html`<p class=\"price\">${plot.price}</p>` : nothing}\n ${plot.href && status !== 'sold' ? html`<a class=\"go\" href=${plot.href}>${this.actionText}${iconSvg('arrow-right', '16px')}</a>` : nothing}`;\n }\n\n render(): TemplateResult {\n return html`<div class=\"wrap\" part=\"wrap\">\n <div>\n <div class=\"plan\" part=\"plan\">\n <img src=${this.imageSrc} alt=${this.imageAlt} />\n ${this.plots.map((plot) => {\n const status = plot.status ?? 'available';\n const name = [`${this.plotWord} ${plot.number}`, plot.name, this.word(status), plot.price].filter(Boolean).join(', ');\n return html`<button class=\"pin ${status}\" type=\"button\" style=\"left:${Number(plot.x)}%;top:${Number(plot.y)}%\" aria-label=${name} aria-pressed=${String(this.chosen === plot)} @click=${() => this.choose(plot)}>${plot.number}</button>`;\n })}\n </div>\n <ul class=\"legend\">\n <li><span class=\"key\"></span>${this.availableText}</li>\n <li><span class=\"key reserved\"></span>${this.reservedText}</li>\n <li><span class=\"key sold\"></span>${this.soldText}</li>\n </ul>\n </div>\n <div class=\"panel\" part=\"panel\" aria-live=\"polite\">${this.renderPanel()}</div>\n </div>`;\n }\n}\n\n/** The monthly repayment on a loan. A rate of nothing is the loan split evenly. */\nexport function monthlyPayment(loan: number, annualRate: number, years: number): number {\n const months = years * 12;\n if (loan <= 0 || months <= 0) return 0;\n const rate = annualRate / 100 / 12;\n return rate === 0 ? loan / months : (loan * rate) / (1 - (1 + rate) ** -months);\n}\n\n/**\n * What a home would cost each month, worked out as the sliders move.\n *\n * The result is an estimate and the warning under it is on by default, because\n * UK rules expect it wherever repayments are shown. Change the words for other\n * markets, but check with whoever signs off your financial promotions first.\n *\n * @category form\n * @icon pound\n */\nexport class ImpaktMortgageCalculator extends ImpaktElement {\n static properties = {\n heading: { type: String },\n price: { type: Number },\n depositPercent: { type: Number, attribute: 'deposit-percent' },\n rate: { type: Number },\n years: { type: Number },\n currency: { type: String },\n smallPrint: { type: String, attribute: 'small-print' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare price: number;\n declare depositPercent: number;\n declare rate: number;\n declare years: number;\n /** The three-letter currency code, such as GBP. */\n declare currency: string;\n declare smallPrint: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = 'What would it cost each month?';\n this.price = 385000;\n this.depositPercent = 10;\n this.rate = 4.5;\n this.years = 30;\n this.currency = 'GBP';\n this.smallPrint = 'This is an estimate, not a mortgage offer. Your home may be repossessed if you do not keep up repayments on your mortgage.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowMd}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }\n .inputs { display: flex; flex-direction: column; gap: ${space(5)}; padding: ${space(8)}; }\n .h { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n label { display: flex; justify-content: space-between; gap: ${space(3)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; margin-block-end: ${space(1.5)}; }\n .read { font-weight: ${fontWeight('regular')}; color: ${t.textMuted}; }\n input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${space(2)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; }\n input[type='range'] { inline-size: 100%; min-block-size: 24px; margin: 0; accent-color: ${t.brand}; }\n .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(4)}; }\n .result { display: flex; flex-direction: column; justify-content: center; gap: ${space(2)}; padding: ${space(8)}; color: ${t.onBrand}; background: ${t.brand}; }\n .caption { margin: 0; ${type('sm')} opacity: 0.85; }\n output { display: block; font-family: ${t.fontHeading}; ${type('4xl')} font-weight: ${fontWeight('bold')}; }\n dl { display: grid; gap: ${space(2)}; margin: ${space(4)} 0 0; padding-block-start: ${space(4)}; border-block-start: 1px solid color-mix(in srgb, ${t.onBrand} 25%, transparent); ${type('sm')} }\n dl div { display: flex; justify-content: space-between; gap: ${space(3)}; }\n dt { opacity: 0.85; }\n dd { margin: 0; font-weight: ${fontWeight('semibold')}; }\n /* Muted text is proved against the card colour, not this band, so the small print here is in the text colour (1.4.3). */\n .small { grid-column: 1 / -1; margin: 0; padding: ${space(4)} ${space(8)}; ${type('xs')} color: ${t.text}; background: ${t.surfaceSubtle}; }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${space(5)}; } .small { padding: ${space(4)} ${space(5)}; } }\n `,\n ];\n\n private money(amount: number): string {\n try {\n return new Intl.NumberFormat(pageLocale(this), { style: 'currency', currency: this.currency, maximumFractionDigits: 0 }).format(amount);\n } catch {\n return String(Math.round(amount));\n }\n }\n\n private field(key: 'price' | 'depositPercent' | 'rate' | 'years'): (event: Event) => void {\n return (event) => {\n this[key] = Number((event.target as HTMLInputElement).value) || 0;\n };\n }\n\n render(): TemplateResult {\n const deposit = (this.price * this.depositPercent) / 100;\n const loan = Math.max(this.price - deposit, 0);\n const monthly = monthlyPayment(loan, this.rate, this.years);\n return html`<div class=\"wrap\" part=\"wrap\">\n <div class=\"inputs\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n <div><label for=${this.id_('price')}>${say('Home price')}</label><input id=${this.id_('price')} type=\"number\" min=\"0\" step=\"1000\" inputmode=\"numeric\" .value=${String(this.price)} @input=${this.field('price')} /></div>\n <div><label for=${this.id_('deposit')}>${say('Deposit')} <span class=\"read\">${this.depositPercent}% \u00B7 ${this.money(deposit)}</span></label><input id=${this.id_('deposit')} type=\"range\" min=\"5\" max=\"60\" step=\"1\" .value=${String(this.depositPercent)} @input=${this.field('depositPercent')} /></div>\n <div class=\"two\">\n <div><label for=${this.id_('years')}>${say('Term')} <span class=\"read\">${say('{years} years', { years: this.years })}</span></label><input id=${this.id_('years')} type=\"range\" min=\"5\" max=\"40\" step=\"1\" .value=${String(this.years)} @input=${this.field('years')} /></div>\n <div><label for=${this.id_('rate')}>${say('Interest rate (%)')}</label><input id=${this.id_('rate')} type=\"number\" min=\"0\" max=\"20\" step=\"0.05\" inputmode=\"decimal\" .value=${String(this.rate)} @input=${this.field('rate')} /></div>\n </div>\n </div>\n <div class=\"result\">\n <p class=\"caption\">${say('Estimated monthly repayment')}</p>\n <output for=${`${this.id_('price')} ${this.id_('deposit')} ${this.id_('years')} ${this.id_('rate')}`}>${this.money(monthly)}</output>\n <dl>\n <div><dt>${say('You would borrow')}</dt><dd>${this.money(loan)}</dd></div>\n <div><dt>${say('Total repayable')}</dt><dd>${this.money(monthly * this.years * 12)}</dd></div>\n </dl>\n </div>\n ${this.smallPrint ? html`<p class=\"small\">${this.smallPrint}</p>` : nothing}\n </div>`;\n }\n}\n\n/**\n * Two pictures of one place with a handle to drag between them: a bare plot\n * and the finished street, a shell and the fitted kitchen.\n *\n * The handle is a native range control, so it works with a finger, a mouse and\n * the arrow keys, and a screen reader hears how far across it is. Both pictures\n * need descriptions, because they are the content.\n *\n * @category content\n * @icon image\n */\nexport class ImpaktBeforeAfter extends ImpaktElement {\n static properties = {\n beforeSrc: { type: String, attribute: 'before-src' },\n beforeAlt: { type: String, attribute: 'before-alt' },\n afterSrc: { type: String, attribute: 'after-src' },\n afterAlt: { type: String, attribute: 'after-alt' },\n beforeLabel: { type: String, attribute: 'before-label' },\n afterLabel: { type: String, attribute: 'after-label' },\n label: { type: String },\n position: { type: Number },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare beforeSrc: string;\n declare beforeAlt: string;\n declare afterSrc: string;\n declare afterAlt: string;\n declare beforeLabel: string;\n declare afterLabel: string;\n /** The name of the handle for a screen reader. */\n declare label: string;\n /** How far across the handle starts, from 0 to 100. */\n declare position: number;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.beforeSrc = '';\n this.beforeAlt = '';\n this.afterSrc = '';\n this.afterAlt = '';\n this.beforeLabel = 'Before';\n this.afterLabel = 'After';\n this.label = 'Compare the two pictures';\n this.position = 50;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n .frame { position: relative; overflow: hidden; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowLg}; line-height: 0; --at: 50%; }\n img { display: block; inline-size: 100%; block-size: auto; }\n .after { position: absolute; inset: 0; block-size: 100%; object-fit: cover; clip-path: inset(0 0 0 var(--at)); }\n .tag { position: absolute; inset-block-start: ${space(3)}; padding: ${space(1)} ${space(3)}; ${type('xs')} line-height: 1.4; font-weight: ${fontWeight('semibold')}; color: ${t.text}; background: ${t.surfaceCard}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); box-shadow: ${t.shadowSm}; }\n .tag.b { inset-inline-start: ${space(3)}; }\n .tag.a { inset-inline-end: ${space(3)}; }\n .line { position: absolute; inset-block: 0; inset-inline-start: var(--at); inline-size: 2px; margin-inline-start: -1px; background: ${t.surfaceCard}; pointer-events: none; }\n .grip { position: absolute; inset-block-start: 50%; inset-inline-start: 50%; display: flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; margin: -22px 0 0 -22px; color: ${t.text}; background: ${t.surfaceCard}; border-radius: 50%; box-shadow: ${t.shadowMd}; }\n input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }\n .frame:has(input:focus-visible) .grip { box-shadow: ${t.focusShadow}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"frame\" part=\"frame\" style=\"--at:${this.position}%\">\n <img src=${this.beforeSrc} alt=${this.beforeAlt} />\n <img class=\"after\" src=${this.afterSrc} alt=${this.afterAlt} />\n <span class=\"tag b\" aria-hidden=\"true\">${this.beforeLabel}</span>\n <span class=\"tag a\" aria-hidden=\"true\">${this.afterLabel}</span>\n <span class=\"line\"><span class=\"grip\">${iconSvg('arrow-left', '14px')}${iconSvg('arrow-right', '14px')}</span></span>\n <input type=\"range\" min=\"0\" max=\"100\" aria-label=${this.label} .value=${String(this.position)} @input=${(e: Event) => {\n this.position = Number((e.target as HTMLInputElement).value);\n }} />\n </div>`;\n }\n}\n\n/**\n * A bar fixed to the bottom of the screen that keeps the one thing to do in\n * reach, such as booking a viewing.\n *\n * It appears once the visitor has scrolled, keeps a space for itself at the end\n * of the page, and tells the browser to scroll focused controls clear of it so\n * it never covers what the keyboard is on (2.4.11).\n *\n * @category navigation\n * @icon bar\n * @slot actions - The button or link to keep in reach.\n */\nexport class ImpaktStickyBar extends ImpaktElement {\n static properties = {\n label: { type: String },\n heading: { type: String },\n lead: { type: String },\n showOn: { type: String, reflect: true, attribute: 'show-on' },\n revealAfter: { type: Number, attribute: 'reveal-after' },\n };\n /** The name of this region for a screen reader. */\n declare label: string;\n declare heading: string;\n declare lead: string;\n declare showOn: 'phones' | 'all';\n /** How many pixels the visitor scrolls before it appears. */\n declare revealAfter: number;\n\n private shown = false;\n\n constructor() {\n super();\n this.label = 'Quick actions';\n this.heading = '';\n this.lead = '';\n this.showOn = 'phones';\n this.revealAfter = 400;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; }\n .bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding: ${space(3)} ${space(4)} calc(${space(3)} + env(safe-area-inset-bottom)); background: ${t.surfaceCard}; box-shadow: ${t.shadowXl}, 0 -1px 0 color-mix(in srgb, ${t.text} 8%, transparent); transform: translateY(110%); visibility: hidden; transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 220ms; }\n .bar.on { transform: none; visibility: visible; }\n .spacer { block-size: 5rem; }\n .h { font-family: ${t.fontHeading}; ${type('md')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .t { ${type('xs')} color: ${t.textMuted}; }\n .words { min-inline-size: 0; }\n .actions { display: flex; flex: none; gap: ${space(2)}; }\n @media (min-width: 48rem) { :host([show-on='phones']) { display: none; } }\n `,\n ];\n\n private check = (): void => {\n const shown = window.scrollY >= this.revealAfter;\n if (shown === this.shown) return;\n this.shown = shown;\n this.requestUpdate();\n this.clearance(shown);\n };\n\n /** Leaves room for the bar when the browser scrolls something into view. */\n private clearance(on: boolean): void {\n const visible = on && getComputedStyle(this).display !== 'none';\n const height = visible ? `${this.renderRoot.querySelector('.bar')?.getBoundingClientRect().height ?? 80}px` : '';\n const root = document.documentElement.style;\n root.scrollPaddingBlockEnd = height;\n // The toast reads this to sit above the bar rather than on its button.\n if (height) root.setProperty('--impakt-bottom-bar', height);\n else root.removeProperty('--impakt-bottom-bar');\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n window.addEventListener('scroll', this.check, { passive: true });\n this.check();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener('scroll', this.check);\n this.clearance(false);\n }\n\n render(): TemplateResult {\n return html`<div class=\"spacer\"></div>\n <section class=\"bar ${this.shown ? 'on' : ''}\" part=\"bar\" aria-label=${this.label}>\n <div class=\"words\">\n ${this.heading ? html`<div class=\"h\">${this.heading}</div>` : nothing}\n ${this.lead ? html`<div class=\"t\">${this.lead}</div>` : nothing}\n </div>\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </section>`;\n }\n}\n\nexport interface NearbyItem {\n id?: string;\n place: string;\n /** How far, in words: 8 minutes by train. */\n distance: string;\n}\n\n/**\n * Where a place is and how to get there: a map picture, the address, opening\n * hours, travel times and a link for directions.\n *\n * The map is a picture you supply, not an embedded map. An embed loads a third\n * party's cookies before the visitor has agreed to anything.\n *\n * @category content\n * @icon map-pin\n * @role heading\n */\nexport class ImpaktLocationCard extends ImpaktElement {\n static properties = {\n heading: { type: String },\n address: { type: String },\n hours: { type: String },\n phone: { type: String },\n mapSrc: { type: String, attribute: 'map-src' },\n mapAlt: { type: String, attribute: 'map-alt' },\n directionsText: { type: String, attribute: 'directions-text' },\n directionsHref: { type: String, attribute: 'directions-href' },\n nearby: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare address: string;\n declare hours: string;\n declare phone: string;\n declare mapSrc: string;\n declare mapAlt: string;\n declare directionsText: string;\n /** Leave empty and the link searches a map for the address. */\n declare directionsHref: string;\n declare nearby: NearbyItem[];\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = '';\n this.address = '';\n this.hours = '';\n this.phone = '';\n this.mapSrc = '';\n this.mapAlt = '';\n this.directionsText = 'Get directions';\n this.directionsHref = '';\n this.nearby = [];\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowMd}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }\n .wrap.solo { grid-template-columns: minmax(0, 1fr); }\n .map { min-block-size: 16rem; background: ${t.surfaceSubtle}; }\n .map img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }\n .info { display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(8)}; }\n .h { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .row { display: flex; gap: ${space(3)}; margin: 0; white-space: pre-line; }\n .row svg { flex: none; margin-block-start: ${space(0.5)}; color: ${t.brand}; }\n .row a { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; margin-block-start: -2px; }\n a { color: ${t.link}; }\n ul { display: grid; gap: ${space(1.5)}; margin: ${space(1)} 0; padding: ${space(3)} 0 0; list-style: none; border-block-start: 1px solid color-mix(in srgb, ${t.text} 10%, transparent); ${type('sm')} }\n li { display: flex; justify-content: space-between; gap: ${space(3)}; }\n li span:last-child { color: ${t.textMuted}; text-align: end; }\n .go { ${targetSize} align-self: flex-start; display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(2)} ${space(4)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border-radius: ${t.radiusLg}; }\n .go:hover { background: ${t.brandHover}; }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .info { padding: ${space(5)}; } }\n `,\n ];\n\n render(): TemplateResult {\n const directions = this.directionsHref || (this.address ? `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(this.address)}` : '');\n return html`<div class=\"wrap ${this.mapSrc ? '' : 'solo'}\" part=\"wrap\">\n ${this.mapSrc ? html`<div class=\"map\"><img src=${this.mapSrc} alt=${this.mapAlt} /></div>` : nothing}\n <div class=\"info\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${this.address ? html`<p class=\"row\">${iconSvg('map-pin', '20px')}<span>${this.address}</span></p>` : nothing}\n ${this.hours ? html`<p class=\"row\">${iconSvg('clock', '20px')}<span>${this.hours}</span></p>` : nothing}\n ${this.phone ? html`<p class=\"row\">${iconSvg('phone', '20px')}<a href=${`tel:${this.phone.replace(/\\s+/g, '')}`}>${this.phone}</a></p>` : nothing}\n ${this.nearby.length ? html`<ul>${this.nearby.map((item) => html`<li><span>${item.place}</span><span>${item.distance}</span></li>`)}</ul>` : nothing}\n ${directions ? html`<a class=\"go\" href=${directions}>${this.directionsText}${iconSvg('arrow-right', '16px')}</a>` : nothing}\n </div>\n </div>`;\n }\n}\n\ncustomElements.define('impakt-site-plan', ImpaktSitePlan);\ncustomElements.define('impakt-mortgage-calculator', ImpaktMortgageCalculator);\ncustomElements.define('impakt-before-after', ImpaktBeforeAfter);\ncustomElements.define('impakt-sticky-bar', ImpaktStickyBar);\ncustomElements.define('impakt-location-card', ImpaktLocationCard);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-site-plan': ImpaktSitePlan;\n 'impakt-mortgage-calculator': ImpaktMortgageCalculator;\n 'impakt-before-after': ImpaktBeforeAfter;\n 'impakt-sticky-bar': ImpaktStickyBar;\n 'impakt-location-card': ImpaktLocationCard;\n }\n}\n", "import { css, html, nothing, type TemplateResult } from 'lit';\nimport { say, pageLocale, ImpaktElement, focusRing, targetSize, visuallyHidden, fontWeight, space, spaceAround, t, token, type } from '@atomic-ui/ui';\n\ntype Space = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\nconst card = css`\n .card { background: ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowSm}, 0 0 0 1px ${t.hairline}; }\n .h { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .btn { display: inline-flex; justify-content: center; align-items: center; min-block-size: 44px; padding: ${space(2.5)} ${space(5)}; font: inherit; font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border: 0; border-radius: ${t.radiusLg}; cursor: pointer; }\n .btn:hover { background: ${t.brandHover}; }\n .btn.quiet { color: ${t.link}; background: transparent; box-shadow: inset 0 0 0 ${t.borderThin} ${t.border}; }\n .small { margin: 0; ${type('xs')} color: ${t.textMuted}; }\n .visually-hidden { ${visuallyHidden} }\n`;\n\nconst money = (amount: number, currency = 'GBP', digits = 0) => {\n try {\n return new Intl.NumberFormat(pageLocale(), { style: 'currency', currency, maximumFractionDigits: digits, minimumFractionDigits: digits }).format(amount);\n } catch {\n return String(Math.round(amount));\n }\n};\n\n/** The arrow after a button's words. Drawn, so no font has to hold the glyph. */\nconst arrow = html`<svg viewBox=\"0 0 20 12\" width=\"20\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M0 6h18M13 1l5 5-5 5\" /></svg>`;\n\n/** One plan in a comparison. */\nexport interface PlanItem {\n id: string;\n name: string;\n /** The price as shown, such as \u00A312. */\n price: string;\n /** What the price is for, such as `a month`. */\n period?: string;\n note?: string;\n /** The rows this plan has, by their words, separated by commas. */\n includes: string;\n href?: string;\n /** A label such as `Most popular`, which also makes the plan stand out. */\n badge?: string;\n}\n\n/** One line a comparison checks every plan against. */\nexport interface PlanRow {\n id: string;\n label: string;\n}\n\n/**\n * Cover levels side by side, with a tick or a cross for each thing they\n * include and a button under each.\n *\n * A tick is never colour alone: each one says \"Included\" or \"Not included\" to\n * a screen reader, and a line a plan does not have also says \"\u00B7 not included\"\n * in muted words on the screen. On a narrow screen the plans stack, each with\n * its own list.\n *\n * Each plan is a card with a 1px border in the text colour and no shadow. The\n * plan with a `badge` is filled with the text colour, its badge in monospace\n * capitals and its price, ticks and button in the accent, a pair the tokens\n * already hold at 4.5:1 on ink (1.4.3).\n *\n * @fires {CustomEvent<{ plan: PlanItem }>} impakt-select - When a plan is chosen. Cancel it to stay on the page.\n * @category content\n * @icon table\n */\nexport class ImpaktPlanComparison extends ImpaktElement {\n static properties = {\n heading: { type: String },\n plans: { type: Array },\n rows: { type: Array },\n buttonText: { type: String, attribute: 'button-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare plans: PlanItem[];\n declare rows: PlanRow[];\n declare buttonText: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'Compare cover';\n this.plans = [];\n this.rows = [];\n this.buttonText = 'Choose';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n targetSize,\n spaceAround,\n card,\n css`\n :host { display: block; container-type: inline-size; }\n .h { margin-block-end: ${space(5)}; }\n .grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: ${space(4)}; }\n .plan { --plan-accent: ${token('color.accent.default', '#ffd43b')}; --plan-on-accent: ${token('color.accent.on', '#111111')}; position: relative; display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(6)}; color: ${t.text}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusSm}; box-shadow: none; }\n /* The featured plan is filled with ink: the card colour on it, and the accent for its badge, price, ticks and button. */\n .plan.top { background: ${t.text}; color: ${t.surfaceCard}; --plan-muted: color-mix(in srgb, ${t.surfaceCard} 72%, ${t.text}); }\n .badge { align-self: flex-start; padding: 2px ${space(2)}; font-family: ${t.fontMono}; font-size: 0.6875rem; font-weight: ${fontWeight('medium')}; line-height: 1.4; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: var(--plan-on-accent); background: var(--plan-accent); white-space: nowrap; }\n .name { margin: 0; ${type('lg')} font-weight: ${fontWeight('medium')}; color: inherit; }\n .price { margin: 0; font-family: ${t.fontHeading}; ${type('4xl')} font-weight: ${fontWeight('bold')}; letter-spacing: -0.03em; color: inherit; }\n /* Accent words on ink only where the theme says the pair reads: in light. In dark the ink turns to paper and the price keeps the card's words. */\n .top .price { color: var(--impakt-color-accent-on-ink, var(--impakt-site-menu-current, currentColor)); }\n .period { margin-inline-start: ${space(1)}; font-family: ${t.fontMono}; font-size: 0.8125rem; font-weight: ${fontWeight('regular')}; letter-spacing: 0; color: var(--plan-muted, ${t.textMuted}); }\n .note { margin: 0; ${type('sm')} color: var(--plan-muted, ${t.textMuted}); }\n ul { flex: 1; margin: 0; padding: ${space(3)} 0 0; list-style: none; display: grid; gap: ${space(2)}; align-content: start; }\n li { display: flex; gap: ${space(2)}; ${type('sm')} }\n li[data-has='false'] { color: var(--plan-muted, ${t.textMuted}); }\n .mark { flex-shrink: 0; inline-size: 1em; text-align: start; }\n .top li[data-has='true'] .mark { color: var(--plan-accent); }\n .plan .btn { justify-content: space-between; gap: ${space(4)}; color: ${t.surfaceCard}; background: ${t.text}; border-radius: ${t.radiusSm}; box-shadow: none; }\n .plan .btn:hover { background: ${t.brandHover}; }\n .plan.top .btn { color: var(--plan-on-accent); background: var(--plan-accent); }\n .plan.top .btn:hover { background: color-mix(in srgb, var(--plan-accent) 88%, ${t.surfaceCard}); }\n @media (forced-colors: active) { .plan { border-color: CanvasText; } .badge { border: 1px solid CanvasText; } }\n @container (max-width: 40rem) { .grid { grid-template-columns: minmax(0, 1fr); gap: ${space(6)}; } }\n `,\n ];\n\n private has(plan: PlanItem, row: PlanRow): boolean {\n return plan.includes\n .split(',')\n .map((s) => s.trim().toLowerCase())\n .includes(row.label.trim().toLowerCase());\n }\n\n private choose(plan: PlanItem, event: Event): void {\n const go = this.dispatchEvent(new CustomEvent('impakt-select', { detail: { plan }, bubbles: true, composed: true, cancelable: true }));\n if (!go) event.preventDefault();\n }\n\n render(): TemplateResult {\n return html`\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n <div class=\"grid\" style=${`--cols: ${Math.max(1, this.plans.length)}`}>\n ${this.plans.map(\n (p) => html`<section class=\"card plan ${p.badge ? 'top' : ''}\" aria-labelledby=${this.id_(`n-${p.id}`)}>\n ${p.badge ? html`<span class=\"badge\">${p.badge}</span>` : nothing}\n <h3 class=\"name\" id=${this.id_(`n-${p.id}`)}>${p.name}</h3>\n <p class=\"price\">${p.price}${p.period ? html` <span class=\"period\">${p.period}</span>` : nothing}</p>\n ${p.note ? html`<p class=\"note\">${p.note}</p>` : nothing}\n <ul>${this.rows.map((r) => {\n const has = this.has(p, r);\n // A line the plan has is ticked and says so to a screen reader; one it lacks says \"not included\" on the screen too.\n return html`<li data-has=${String(has)}><span class=\"mark\" aria-hidden=\"true\">${has ? '\u221A' : '\u2013'}</span><span>${r.label}${\n has ? html`<span class=\"visually-hidden\">: ${say('included')}</span>` : html`<span class=\"not\"> \u00B7 ${say('not included')}</span>`\n }</span></li>`;\n })}</ul>\n ${\n p.href\n ? html`<a class=\"btn\" href=${p.href} @click=${(e: Event) => this.choose(p, e)}><span>${this.buttonText}<span class=\"visually-hidden\"> ${p.name}</span></span>${arrow}</a>`\n : html`<button class=\"btn\" type=\"button\" @click=${(e: Event) => this.choose(p, e)}><span>${this.buttonText}<span class=\"visually-hidden\"> ${p.name}</span></span>${arrow}</button>`\n }\n </section>`,\n )}\n </div>`;\n }\n}\n\n/** A YouTube or Vimeo address as its privacy-friendly embed, or null for a plain video file. */\nexport function embedOf(src: string, locale?: string): string | null {\n const yt = /(?:youtube\\.com\\/(?:watch\\?v=|embed\\/|shorts\\/)|youtu\\.be\\/)([\\w-]{6,})/.exec(src);\n // The player's own controls and captions in the page's language (ADR 0026).\n const hl =\n locale && !/^en\\b/i.test(locale) ? `&hl=${encodeURIComponent(locale.split('-')[0]!)}&cc_lang_pref=${encodeURIComponent(locale.split('-')[0]!)}` : '';\n if (yt) return `https://www.youtube-nocookie.com/embed/${yt[1]}?autoplay=1&rel=0${hl}`;\n const vimeo = /vimeo\\.com\\/(?:video\\/)?(\\d+)/.exec(src);\n if (vimeo) return `https://player.vimeo.com/video/${vimeo[1]}?autoplay=1&dnt=1`;\n return null;\n}\n\n/**\n * A video, with its title, captions and a transcript link.\n *\n * A YouTube or Vimeo video shows its poster and a Play button first, and only\n * loads the player when pressed, so the page stays fast and nothing is sent to\n * the video site until someone chooses to watch. A video file plays in the\n * browser's own player, with captions from `captions-src`.\n *\n * `look=\"window\"` draws it in a window on an ink stage, as a product\n * walkthrough is shown: a bar with three dots and a caption in monospace\n * capitals, and an accent Play button with the video's length beside its\n * words. The stage stays ink in both themes. `transcript` puts what the video\n * shows on the page itself, in a section that opens under it, as an\n * alternative to a link to it (1.2.1, 1.2.3).\n *\n * @category media\n * @icon play\n */\nexport class ImpaktVideo extends ImpaktElement {\n static properties = {\n videoSrc: { type: String, attribute: 'video-src' },\n label: { type: String },\n posterSrc: { type: String, attribute: 'poster-src' },\n captionsSrc: { type: String, attribute: 'captions-src' },\n transcriptHref: { type: String, attribute: 'transcript-href' },\n playText: { type: String, attribute: 'play-text' },\n ratio: { type: String, reflect: true },\n look: { type: String, reflect: true },\n caption: { type: String },\n duration: { type: String },\n transcript: { type: String },\n transcriptText: { type: String, attribute: 'transcript-text' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A YouTube or Vimeo address, or a video file such as an .mp4. */\n declare videoSrc: string;\n /** What the video is, read out before it plays. */\n declare label: string;\n declare posterSrc: string;\n /** A captions file in WebVTT, for a video file. */\n declare captionsSrc: string;\n declare transcriptHref: string;\n declare playText: string;\n declare ratio: '16:9' | '4:3' | '1:1' | '9:16';\n /** `plain` is the video alone. `window` draws it in a window with a bar and a caption, on an ink stage. */\n declare look: 'plain' | 'window';\n /** With `window`: the words in the window's bar, such as \"Walkthrough video\". Decoration: `label` is what is read. */\n declare caption: string;\n /** How long the video is, such as \"2 min\", shown beside the Play button's words and read with them. */\n declare duration: string;\n /** What the video shows, as words, shown in a section that opens under it. Blank lines start a new paragraph. */\n declare transcript: string;\n /** The words on the line that opens the transcript, such as \"Read what the video shows\". */\n declare transcriptText: string;\n declare playing: boolean;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.videoSrc = '';\n this.label = 'Video';\n this.posterSrc = '';\n this.captionsSrc = '';\n this.transcriptHref = '';\n this.playText = 'Play video';\n this.ratio = '16:9';\n this.look = 'plain';\n this.caption = '';\n this.duration = '';\n this.transcript = '';\n this.transcriptText = '';\n this.playing = false;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n card,\n css`\n :host { display: block; }\n .frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: ${t.radiusXl}; background: #111; }\n :host([ratio='4:3']) .frame { aspect-ratio: 4 / 3; }\n :host([ratio='1:1']) .frame { aspect-ratio: 1; }\n :host([ratio='9:16']) .frame { aspect-ratio: 9 / 16; max-inline-size: 420px; }\n iframe, video, img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; border: 0; object-fit: cover; }\n .play { position: absolute; inset: 0; display: grid; place-items: center; inline-size: 100%; padding: 0; color: #fff; background: linear-gradient(transparent 40%, rgb(0 0 0 / 0.55)); border: 0; cursor: pointer; }\n .disc { display: grid; place-items: center; inline-size: 72px; block-size: 72px; border-radius: 50%; background: ${t.brand}; box-shadow: ${t.shadowLg}; }\n /* Held inside the frame at both edges, so loosened or long words wrap rather than run out of it (1.4.12). */\n .label { position: absolute; inset-inline: ${space(5)}; inset-block-end: ${space(4)}; ${type('lg')} font-weight: ${fontWeight('semibold')}; text-align: start; }\n .foot { margin: ${space(2)} 0 0; ${type('sm')} }\n .foot a { color: ${t.link}; }\n .empty { display: grid; place-items: center; block-size: 100%; color: #ccc; }\n /* The window: a bar with three dots and a caption over an ink stage. It stays ink in both themes. */\n .window { --stage: var(--impakt-video-stage, #111111); --stage-on: var(--impakt-video-stage-on, #efefed); --stage-rule: color-mix(in srgb, var(--stage-on) 14%, var(--stage)); background: var(--stage); color: var(--stage-on); border: ${t.borderThin} solid var(--stage-rule); }\n .bar { display: flex; align-items: center; gap: ${space(1.5)}; padding: ${space(3)} ${space(4)}; border-block-end: ${t.borderThin} solid var(--stage-rule); background: color-mix(in srgb, var(--stage-on) 6%, var(--stage)); }\n .bar .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--stage-rule); }\n .bar .dot:first-child { background: ${token('color.accent.default', '#ffd43b')}; }\n .bar .caption { margin-inline-start: ${space(1.5)}; font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: color-mix(in srgb, var(--stage-on) 78%, var(--stage)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n :host([look='window']) .frame { border-radius: 0; background: var(--stage); }\n :host([look='window']) .play { background: none; color: inherit; }\n :host([look='window']) .disc { display: none; }\n :host([look='window']) .label { position: static; display: inline-flex; align-items: baseline; gap: ${space(3)}; max-inline-size: calc(100% - 2 * ${space(5)}); box-sizing: border-box; padding: ${space(3)} ${space(5)}; ${type('md')} font-weight: ${fontWeight('medium')}; color: ${token('color.accent.on', '#111111')}; background: ${token('color.accent.default', '#ffd43b')}; }\n :host([look='window']) .play:hover .label { background: color-mix(in srgb, ${token('color.accent.default', '#ffd43b')} 88%, #ffffff); }\n :host([look='window']) .play:focus-visible { outline: none; }\n :host([look='window']) .play:focus-visible .label { box-shadow: ${t.focusShadow}; }\n .length { font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .transcript { margin-block-start: ${space(3)}; border-block: ${t.borderThin} solid ${t.text}; }\n .transcript summary { ${targetSize} display: flex; align-items: center; gap: ${space(2)}; padding-block: ${space(3)}; cursor: pointer; font-weight: ${fontWeight('medium')}; list-style: none; }\n .transcript summary::-webkit-details-marker { display: none; }\n .transcript summary::before { content: '+'; inline-size: 1ch; font-family: ${t.fontMono}; }\n .transcript[open] summary::before { content: '\u2212'; }\n .transcript .words { padding-block-end: ${space(4)}; color: ${t.textMuted}; display: grid; gap: ${space(3)}; max-inline-size: 65ch; }\n .transcript p { margin: 0; }\n @media (forced-colors: active) { .window, .bar { border-color: CanvasText; } :host([look='window']) .label { border: 1px solid ButtonText; } }\n `,\n ];\n\n render(): TemplateResult {\n const embed = embedOf(this.videoSrc, pageLocale(this));\n let player: TemplateResult;\n if (!this.videoSrc) player = html`<div class=\"empty\">${say('Add a video address')}</div>`;\n else if (embed && this.playing)\n player = html`<iframe src=${embed} title=${this.label} allow=\"autoplay; encrypted-media; picture-in-picture; fullscreen\" allowfullscreen></iframe>`;\n else if (embed)\n player = html`${this.posterSrc ? html`<img src=${this.posterSrc} alt=\"\" />` : nothing}\n <button class=\"play\" type=\"button\" @click=${() => {\n this.playing = true;\n }}>\n <span class=\"disc\" aria-hidden=\"true\"><svg width=\"28\" height=\"28\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M8 5v14l11-7z\"/></svg></span>\n <span class=\"label\">${this.playText}${this.duration ? html` <span class=\"length\">${this.duration}</span>` : nothing}<span class=\"visually-hidden\">: ${this.label}</span></span>\n </button>`;\n else\n player = html`<video controls preload=\"metadata\" poster=${this.posterSrc || nothing} aria-label=${this.label}>\n <source src=${this.videoSrc} />\n ${this.captionsSrc ? html`<track kind=\"captions\" src=${this.captionsSrc} srclang=\"en\" label=\"English\" default />` : nothing}\n </video>`;\n const frame = html`<div class=\"frame\" part=\"frame\">${player}</div>`;\n const paragraphs = (this.transcript ?? '')\n .split(/\\n\\s*\\n/)\n .map((p) => p.trim())\n .filter(Boolean);\n return html`${\n this.look === 'window'\n ? html`<div class=\"window\" part=\"window\">\n <div class=\"bar\" aria-hidden=\"true\"><span class=\"dot\"></span><span class=\"dot\"></span><span class=\"dot\"></span>${this.caption ? html`<span class=\"caption\">${this.caption}</span>` : nothing}</div>\n ${frame}\n </div>`\n : frame\n }\n ${\n paragraphs.length\n ? html`<details class=\"transcript\" part=\"transcript\"><summary>${this.transcriptText || say('Read the transcript')}</summary><div class=\"words\">${paragraphs.map((p) => html`<p>${p}</p>`)}</div></details>`\n : nothing\n }\n ${this.transcriptHref ? html`<p class=\"foot\"><a href=${this.transcriptHref}>${say('Read the transcript')}<span class=\"visually-hidden\">${say(' of {video}', { video: this.label })}</span></a></p>` : nothing}`;\n }\n}\n\nconst NOTICE_WORDS: Record<string, { heading: string; text: string }> = {\n mortgage: { heading: 'Your home may be repossessed', text: 'Your home may be repossessed if you do not keep up repayments on your mortgage.' },\n 'secured-loan': {\n heading: 'Think carefully before securing other debts against your home',\n text: 'Your home may be repossessed if you do not keep up repayments on a mortgage or any other debt secured on it.',\n },\n investment: { heading: 'Capital at risk', text: 'The value of investments can go down as well as up, and you may get back less than you put in.' },\n insurance: { heading: 'Important information', text: 'Read the policy documents to check the cover suits your needs. Limits and exclusions apply.' },\n custom: { heading: '', text: '' },\n};\n\n/**\n * The warning and the regulator wording a financial page must carry, as a\n * block of its own so it is never left off.\n *\n * Pick the kind to start from the usual words, or `custom` to write your own.\n * Whatever it says, check it with whoever signs off your financial promotions.\n *\n * @category feedback\n * @icon shield\n */\nexport class ImpaktRegulatoryNotice extends ImpaktElement {\n static properties = {\n kind: { type: String, reflect: true },\n heading: { type: String },\n text: { type: String },\n firm: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare kind: 'mortgage' | 'secured-loan' | 'investment' | 'insurance' | 'custom';\n /** Leave empty to use the usual heading for the kind. */\n declare heading: string;\n /** Leave empty to use the usual warning for the kind. */\n declare text: string;\n /** Who you are and who regulates you, such as \"Acme Ltd is authorised and regulated by the Financial Conduct Authority (FRN 123456).\" */\n declare firm: string;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.kind = 'mortgage';\n this.heading = '';\n this.text = '';\n this.firm = '';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; }\n .box { padding: ${space(5)}; border-inline-start: 6px solid ${t.warning}; border-radius: ${t.radiusLg}; background: ${t.warningSubtle}; }\n :host([kind='insurance']) .box { border-color: ${t.info}; background: ${t.infoSubtle}; }\n strong { display: block; margin-block-end: ${space(1)}; ${type('md')} color: ${t.text}; }\n p { margin: 0; color: ${t.text}; }\n /* Muted text is proved against the card colour, not the notice's, so the firm's line is in the text colour (1.4.3). */\n .firm { margin-block-start: ${space(3)}; ${type('sm')} color: ${t.text}; }\n `,\n ];\n\n render(): TemplateResult {\n const preset = NOTICE_WORDS[this.kind] ?? NOTICE_WORDS.custom!;\n const heading = this.heading || (preset.heading ? say(preset.heading) : '');\n const text = this.text || (preset.text ? say(preset.text) : '');\n return html`<aside class=\"box\" part=\"box\" aria-label=${heading || say('Important information')}>\n ${heading ? html`<strong>${heading}</strong>` : nothing}\n ${text ? html`<p>${text}</p>` : nothing}\n ${this.firm ? html`<p class=\"firm\">${this.firm}</p>` : nothing}\n </aside>`;\n }\n}\n\n/** One band of a tax: everything above `from` and up to the next band's `from` is charged at `rate`. */\ninterface Band {\n from: number;\n rate: number;\n}\n\n/**\n * Stamp Duty Land Tax for England and Northern Ireland, from 1 April 2025.\n * Exported so the numbers can be checked, and changed in one place.\n */\nexport const SDLT = {\n standard: [\n { from: 0, rate: 0 },\n { from: 125000, rate: 2 },\n { from: 250000, rate: 5 },\n { from: 925000, rate: 10 },\n { from: 1500000, rate: 12 },\n ] as Band[],\n firstTime: [\n { from: 0, rate: 0 },\n { from: 300000, rate: 5 },\n ] as Band[],\n firstTimeLimit: 500000,\n additionalSurcharge: 5,\n};\n\nfunction taxOn(price: number, bands: Band[], extra = 0): number {\n let tax = 0;\n bands.forEach((band, i) => {\n const top = bands[i + 1]?.from ?? Infinity;\n if (price > band.from) tax += ((Math.min(price, top) - band.from) * (band.rate + extra)) / 100;\n });\n return Math.round(tax);\n}\n\n/** The stamp duty on a home, for a mover, a first-time buyer or a second home. */\nexport function stampDuty(price: number, buyer: 'mover' | 'first-time' | 'additional'): number {\n if (price <= 0) return 0;\n if (buyer === 'first-time' && price <= SDLT.firstTimeLimit) return taxOn(price, SDLT.firstTime);\n if (buyer === 'additional') return price < 40000 ? 0 : taxOn(price, SDLT.standard, SDLT.additionalSurcharge);\n return taxOn(price, SDLT.standard);\n}\n\nconst calcStyles = css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; }\n .inputs { display: flex; flex-direction: column; gap: ${space(5)}; padding: ${space(8)}; }\n label, legend { display: block; ${type('sm')} font-weight: ${fontWeight('semibold')}; margin-block-end: ${space(1.5)}; padding: 0; }\n fieldset { margin: 0; padding: 0; border: 0; }\n .choices { display: flex; flex-wrap: wrap; gap: ${space(2)}; }\n .choices label { display: inline-flex; align-items: center; gap: ${space(2)}; margin: 0; padding: ${space(2)} ${space(3)}; font-weight: ${fontWeight('regular')}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; cursor: pointer; }\n .choices input { accent-color: ${t.brand}; }\n input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${space(2)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; }\n .result { display: flex; flex-direction: column; justify-content: center; gap: ${space(2)}; padding: ${space(8)}; color: ${t.onBrand}; background: ${t.brand}; }\n .caption { margin: 0; ${type('sm')} opacity: 0.85; }\n output { display: block; font-family: ${t.fontHeading}; ${type('4xl')} font-weight: ${fontWeight('bold')}; }\n .line { margin: 0; ${type('sm')} }\n .foot { grid-column: 1 / -1; padding: ${space(4)} ${space(8)}; background: ${t.surfaceSubtle}; }\n /* Muted text is proved against the card colour, not this band, so the small print here is in the text colour (1.4.3). */\n .foot .small { color: ${t.text}; }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${space(5)}; } .foot { padding: ${space(4)} ${space(5)}; } }\n`;\n\n/**\n * How much stamp duty a home would cost, for a home mover, a first-time buyer\n * or a second home, worked out as the price is typed.\n *\n * The rates are England and Northern Ireland's from 1 April 2025. Scotland and\n * Wales have their own taxes, and rates change, so the small print says which\n * rates these are and points to GOV.UK.\n *\n * @category form\n * @icon pound\n */\nexport class ImpaktStampDutyCalculator extends ImpaktElement {\n static properties = {\n heading: { type: String },\n price: { type: Number },\n buyer: { type: String },\n smallPrint: { type: String, attribute: 'small-print' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare price: number;\n declare buyer: 'mover' | 'first-time' | 'additional';\n declare smallPrint: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'How much stamp duty would you pay?';\n this.price = 385000;\n this.buyer = 'first-time';\n this.smallPrint =\n 'Based on Stamp Duty Land Tax rates in England and Northern Ireland from 1 April 2025. Scotland and Wales have their own taxes. Check what you would pay on GOV.UK.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpaktElement.styles, focusRing, spaceAround, card, calcStyles];\n\n render(): TemplateResult {\n const duty = stampDuty(this.price, this.buyer);\n const rate = this.price > 0 ? (duty / this.price) * 100 : 0;\n const buyers: [typeof this.buyer, string][] = [\n ['first-time', say('First home')],\n ['mover', say('Moving home')],\n ['additional', say('Second home')],\n ];\n return html`<div class=\"card wrap\" part=\"wrap\">\n <div class=\"inputs\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n <div><label for=${this.id_('price')}>${say('Price of the home (\u00A3)')}</label>\n <input id=${this.id_('price')} type=\"number\" min=\"0\" step=\"1000\" inputmode=\"numeric\" .value=${String(this.price)} @input=${(e: Event) => {\n this.price = Number((e.target as HTMLInputElement).value) || 0;\n }} /></div>\n <fieldset><legend>${say('Are you buying')}</legend><div class=\"choices\">\n ${buyers.map(\n ([value, label]) =>\n html`<label><input type=\"radio\" name=${this.id_('buyer')} .checked=${this.buyer === value} @change=${() => {\n this.buyer = value;\n }} />${label}</label>`,\n )}\n </div></fieldset>\n </div>\n <div class=\"result\" aria-live=\"polite\">\n <p class=\"caption\">${say('Stamp duty to pay')}</p>\n <output for=${this.id_('price')}>${money(duty)}</output>\n <p class=\"line\">${duty ? say('About {rate}% of the price', { rate: rate.toFixed(1) }) : say('Nothing to pay at this price')}</p>\n ${this.buyer === 'first-time' && this.price > SDLT.firstTimeLimit ? html`<p class=\"line\">${say('First-time buyer relief stops above {limit}, so the usual rates apply.', { limit: money(SDLT.firstTimeLimit) })}</p>` : nothing}\n </div>\n ${this.smallPrint ? html`<div class=\"foot\"><p class=\"small\">${this.smallPrint}</p></div>` : nothing}\n </div>`;\n }\n}\n\n/**\n * Roughly how much someone could borrow, from what they earn, and the price\n * of home that buys with their deposit.\n *\n * Lenders usually lend four to four and a half times income; the multiple is\n * a setting. It is a guide, not an offer, and the small print says so.\n *\n * @category form\n * @icon pound\n */\nexport class ImpaktAffordabilityCalculator extends ImpaktElement {\n static properties = {\n heading: { type: String },\n income: { type: Number },\n secondIncome: { type: Number, attribute: 'second-income' },\n deposit: { type: Number },\n timesIncome: { type: Number, attribute: 'times-income' },\n smallPrint: { type: String, attribute: 'small-print' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare income: number;\n declare secondIncome: number;\n declare deposit: number;\n /** How many times income a lender would lend, such as 4.5. */\n declare timesIncome: number;\n declare smallPrint: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'How much could you borrow?';\n this.income = 45000;\n this.secondIncome = 0;\n this.deposit = 30000;\n this.timesIncome = 4.5;\n this.smallPrint =\n 'This is a guide, not a mortgage offer. What a lender offers depends on your circumstances. Your home may be repossessed if you do not keep up repayments on your mortgage.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpaktElement.styles, focusRing, spaceAround, card, calcStyles];\n\n private field(key: 'income' | 'secondIncome' | 'deposit'): (event: Event) => void {\n return (event) => {\n this[key] = Number((event.target as HTMLInputElement).value) || 0;\n };\n }\n\n render(): TemplateResult {\n const borrow = Math.max(0, (this.income + this.secondIncome) * this.timesIncome);\n const input = (key: 'income' | 'secondIncome' | 'deposit', label: string) => html`<div><label for=${this.id_(key)}>${label}</label>\n <input id=${this.id_(key)} type=\"number\" min=\"0\" step=\"1000\" inputmode=\"numeric\" .value=${String(this[key])} @input=${this.field(key)} /></div>`;\n return html`<div class=\"card wrap\" part=\"wrap\">\n <div class=\"inputs\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${input('income', say('Your yearly income before tax (\u00A3)'))}\n ${input('secondIncome', say('A second person\u2019s income, if buying together (\u00A3)'))}\n ${input('deposit', say('Your deposit (\u00A3)'))}\n </div>\n <div class=\"result\" aria-live=\"polite\">\n <p class=\"caption\">${say('You could borrow about')}</p>\n <output>${money(borrow)}</output>\n <p class=\"line\">${say('With your deposit, that\u2019s a home of about {amount}.', { amount: money(borrow + this.deposit) })}</p>\n </div>\n ${this.smallPrint ? html`<div class=\"foot\"><p class=\"small\">${this.smallPrint}</p></div>` : nothing}\n </div>`;\n }\n}\n\n/**\n * How to get in touch: a phone number, opening hours, an email address, and a\n * short form to ask for a call back.\n *\n * The form fires `impakt-submit` with the name, phone number and best time; the\n * app sends it on. Then the block thanks them in place.\n *\n * @fires {CustomEvent<{ name: string; phone: string; when: string }>} impakt-submit - When the form is sent.\n * @category content\n * @icon phone\n */\nexport class ImpaktContactBlock extends ImpaktElement {\n static properties = {\n heading: { type: String },\n phone: { type: String },\n hours: { type: String },\n email: { type: String },\n callbackHeading: { type: String, attribute: 'callback-heading' },\n buttonText: { type: String, attribute: 'button-text' },\n doneText: { type: String, attribute: 'done-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare phone: string;\n /** One line a day or range, such as \"Monday to Friday, 9am to 6pm\". */\n declare hours: string;\n declare email: string;\n /** Leave empty to show no call back form. */\n declare callbackHeading: string;\n declare buttonText: string;\n declare doneText: string;\n declare headingLevel: 2 | 3;\n declare sent: boolean;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'Talk to us';\n this.phone = '0800 000 0000';\n this.hours = 'Monday to Friday, 9am to 6pm\\nSaturday, 10am to 2pm';\n this.email = '';\n this.callbackHeading = 'Or we can call you';\n this.buttonText = 'Ask for a call back';\n this.doneText = 'Thanks. We\u2019ll call you at the time you chose.';\n this.headingLevel = 2;\n this.sent = false;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n card,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${space(6)}; padding: ${space(8)}; }\n .phone { display: inline-block; margin: ${space(3)} 0; font-family: ${t.fontHeading}; ${type('3xl')} font-weight: ${fontWeight('bold')}; color: ${t.link}; text-decoration: none; }\n .hours { margin: 0; white-space: pre-line; color: ${t.textMuted}; }\n .email { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; margin-block-start: ${space(3)}; color: ${t.link}; overflow-wrap: anywhere; }\n form { display: grid; gap: ${space(3)}; padding: ${space(5)}; border-radius: ${t.radiusLg}; background: ${t.surfaceInset}; }\n .sub { margin: 0; ${type('lg')} font-weight: ${fontWeight('bold')}; color: ${t.text}; }\n label { display: block; ${type('sm')} font-weight: ${fontWeight('semibold')}; margin-block-end: ${space(1)}; }\n input, select { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${space(2)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; }\n .done { margin: 0; padding: ${space(5)}; border-radius: ${t.radiusLg}; background: ${t.successSubtle}; color: ${t.successText}; font-weight: ${fontWeight('semibold')}; }\n @container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); padding: ${space(5)}; } }\n `,\n ];\n\n private submit(event: SubmitEvent): void {\n event.preventDefault();\n const form = new FormData(event.target as HTMLFormElement);\n const data = { name: String(form.get('name') ?? ''), phone: String(form.get('phone') ?? ''), when: String(form.get('when') ?? '') };\n this.dispatchEvent(new CustomEvent('impakt-submit', { detail: data, bubbles: true, composed: true }));\n this.sent = true;\n }\n\n render(): TemplateResult {\n return html`<div class=\"card wrap\" part=\"wrap\">\n <div>\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${this.phone ? html`<a class=\"phone\" href=${`tel:${this.phone.replace(/[^\\d+]/g, '')}`}>${this.phone}</a>` : nothing}\n ${this.hours ? html`<p class=\"hours\">${this.hours}</p>` : nothing}\n ${this.email ? html`<a class=\"email\" href=${`mailto:${this.email}`}>${this.email}</a>` : nothing}\n </div>\n ${\n !this.callbackHeading\n ? nothing\n : this.sent\n ? html`<p class=\"done\" role=\"status\">${this.doneText}</p>`\n : html`<form @submit=${this.submit} aria-labelledby=${this.id_('cb')}>\n <p class=\"sub\" id=${this.id_('cb')}>${this.callbackHeading}</p>\n <div><label for=${this.id_('name')}>${say('Your name')}</label><input id=${this.id_('name')} name=\"name\" autocomplete=\"name\" required /></div>\n <div><label for=${this.id_('tel')}>${say('Phone number')}</label><input id=${this.id_('tel')} name=\"phone\" type=\"tel\" autocomplete=\"tel\" required /></div>\n <div><label for=${this.id_('when')}>${say('Best time to call')}</label><select id=${this.id_('when')} name=\"when\"><option value=\"Morning\">${say('Morning')}</option><option value=\"Afternoon\">${say('Afternoon')}</option><option value=\"Evening\">${say('Evening')}</option></select></div>\n <button class=\"btn\" type=\"submit\">${this.buttonText}</button>\n </form>`\n }\n </div>`;\n }\n}\n\n// Working values, not settings: kept out of `properties` so the page designer does not offer them.\nImpaktVideo.createProperty('playing', { state: true });\nImpaktContactBlock.createProperty('sent', { state: true });\n\ncustomElements.define('impakt-plan-comparison', ImpaktPlanComparison);\ncustomElements.define('impakt-video', ImpaktVideo);\ncustomElements.define('impakt-regulatory-notice', ImpaktRegulatoryNotice);\ncustomElements.define('impakt-stamp-duty-calculator', ImpaktStampDutyCalculator);\ncustomElements.define('impakt-affordability-calculator', ImpaktAffordabilityCalculator);\ncustomElements.define('impakt-contact-block', ImpaktContactBlock);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-plan-comparison': ImpaktPlanComparison;\n 'impakt-video': ImpaktVideo;\n 'impakt-regulatory-notice': ImpaktRegulatoryNotice;\n 'impakt-stamp-duty-calculator': ImpaktStampDutyCalculator;\n 'impakt-affordability-calculator': ImpaktAffordabilityCalculator;\n 'impakt-contact-block': ImpaktContactBlock;\n }\n}\n", "/**\n * A cost estimator: a few questions, one at a time, with a budget beside them\n * that moves as the answers change, and then a result with a timeline, a team\n * and a way of working.\n *\n * Every number is content. Each choice says what it adds to the cost and the\n * weeks, or what it multiplies them by, and the bands say how big a team a\n * cost needs. The arithmetic lives here, in code, because a binding never\n * computes (ADR 0003): a studio changes its rates in the CMS, not the rules.\n */\nimport { css, html, nothing, unsafeCSS, type TemplateResult } from 'lit';\nimport {\n ImpaktElement,\n pageLocale,\n say,\n focusRing,\n targetSize,\n visuallyHidden,\n fontSize,\n fontWeight,\n space,\n spaceAround,\n t,\n token,\n type,\n toneOf,\n} from '@atomic-ui/ui';\n\n/** One answer to a question, and what it does to the estimate. */\nexport interface EstimatorChoice {\n id: string;\n label: string;\n /** A line under the label, such as \"iPhone and Android\". */\n hint?: string;\n /** Added to the cost, counted in units (see `unit`). */\n cost?: number;\n /** Added to the weeks. */\n weeks?: number;\n /** Multiplies the cost, such as 1.35 for a more polished first version. */\n costFactor?: number;\n /** Multiplies the weeks. */\n weeksFactor?: number;\n /** Engineers added to the team, such as one more to go faster. */\n engineers?: number;\n /** Shown beside the budget when it is picked. */\n tip?: string;\n /** How the summary names it, such as \"a SaaS platform\" or \"payments\". The label when left out. */\n phrase?: string;\n}\n\n/** One question. */\nexport interface EstimatorQuestion {\n id: string;\n heading: string;\n hint?: string;\n /** `one` picks one card, `many` picks any number, and `scale` is a slider across the choices in order. */\n kind: 'one' | 'many' | 'scale';\n choices: EstimatorChoice[];\n /** The choices picked at the start. A `one` or `scale` question takes the first id; with none, its first choice. */\n start?: string[];\n /** A short name for the question in the summary that is sent on, such as \"Polish\". Left out of it when there is none. */\n short?: string;\n /** For a `many` question, whether the summary lists what was picked, as in \"with payments and AI features\". Yes when left out. */\n inSummary?: boolean;\n}\n\n/** A band of cost: the first band whose `below` the cost is under applies, or the last one. */\nexport interface EstimatorBand {\n below?: number;\n /** For a team band, how many engineers. */\n engineers?: number;\n /** For a way-of-working band, what it is called. */\n text?: string;\n}\n\n/** One part of the timeline. The part with no share takes the weeks the others leave. */\nexport interface EstimatorPhase {\n label: string;\n /** Its share of the weeks, such as 0.1. At least one week either way. */\n share?: number;\n}\n\n/** What an estimate came to, as the `impakt-estimate` event carries it. */\nexport interface EstimateResult {\n low: number;\n high: number;\n weeks: number;\n engineers: number;\n way: string;\n summary: string;\n /** The ids picked for each question. */\n answers: Record<string, string[]>;\n}\n\nconst sum = (xs: number[]) => xs.reduce((a, b) => a + b, 0);\nconst bandFor = (bands: EstimatorBand[], cost: number): EstimatorBand | undefined =>\n bands.find((b) => typeof b.below === 'number' && cost < b.below) ?? bands.at(-1);\n\n/** The arithmetic, apart from the element so it can be checked on its own. */\nexport function estimate(\n questions: EstimatorQuestion[],\n answers: Record<string, string[]>,\n rules: { low: number; high: number; minWeeks: number; teams: EstimatorBand[]; ways: EstimatorBand[] },\n): { cost: number; low: number; high: number; weeks: number; engineers: number; way: string } {\n const chosen = questions.flatMap((q) => (answers[q.id] ?? []).flatMap((id) => q.choices.filter((c) => c.id === id)));\n let cost = sum(chosen.map((c) => c.cost ?? 0));\n let weeks = sum(chosen.map((c) => c.weeks ?? 0));\n for (const c of chosen) {\n cost *= c.costFactor ?? 1;\n weeks *= c.weeksFactor ?? 1;\n }\n const engineers = (bandFor(rules.teams, cost)?.engineers ?? 1) + sum(chosen.map((c) => c.engineers ?? 0));\n return {\n cost,\n low: Math.round(cost * rules.low),\n high: Math.round(cost * rules.high),\n weeks: Math.max(rules.minWeeks, Math.round(weeks)),\n engineers,\n way: bandFor(rules.ways, cost)?.text ?? '',\n };\n}\n\n/** The weeks each part of the timeline takes, adding up to the whole. */\nexport function phaseWeeks(phases: EstimatorPhase[], weeks: number): number[] {\n const fixed = phases.map((p) => (typeof p.share === 'number' ? Math.max(1, Math.round(weeks * p.share)) : 0));\n const rest = Math.max(1, weeks - sum(fixed));\n return phases.map((p, i) => (typeof p.share === 'number' ? fixed[i]! : rest));\n}\n\n/**\n * Asks a few questions one at a time and keeps a budget beside them that moves\n * with every answer, then shows the estimate: the range, the weeks, how long\n * each part takes, the team and the way of working. The visitor can send the\n * estimate on to a contact page, where a message box can start with it.\n *\n * **`layout=\"all\"` asks every question at once.** Each is a numbered row of\n * square chips (`impakt-chip-group`, radios for one answer and checkboxes for\n * several) under a monospace label such as \"01 \u00B7 What are you building?\", and\n * the result sits beside them as an ink panel: the budget in the accent, the\n * weeks to a first release, each part of the timeline as a row, a full-width\n * button to send it and the suggested way of working. The note goes under the\n * chips on a wide screen and under the panel on a phone, where the chips and\n * the panel stack with no gap. The wizard stays the default.\n *\n * @category form\n * @icon calculator\n * @fires {CustomEvent<EstimateResult>} impakt-estimate - When the estimate is sent on. The result is in detail.\n */\nexport class ImpaktEstimator extends ImpaktElement {\n static properties = {\n questions: { type: Array },\n teams: { type: Array },\n ways: { type: Array },\n phases: { type: Array },\n low: { type: Number },\n high: { type: Number },\n minWeeks: { type: Number, attribute: 'min-weeks' },\n currency: { type: String },\n unit: { type: Number },\n intro: { type: String },\n budgetLabel: { type: String, attribute: 'budget-label' },\n resultHeading: { type: String, attribute: 'result-heading' },\n teamText: { type: String, attribute: 'team-text' },\n teamTextOne: { type: String, attribute: 'team-text-one' },\n note: { type: String },\n contactHref: { type: String, attribute: 'contact-href' },\n sendLabel: { type: String, attribute: 'send-label' },\n layout: { type: String, reflect: true },\n wayLabel: { type: String, attribute: 'way-label' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n\n /** The questions, in the order they are asked. */\n declare questions: EstimatorQuestion[];\n /** How many engineers each band of cost needs. */\n declare teams: EstimatorBand[];\n /** The way of working for each band of cost. */\n declare ways: EstimatorBand[];\n /** The parts of the timeline, in order. */\n declare phases: EstimatorPhase[];\n /** The low end of the range, as a share of the cost. */\n declare low: number;\n /** The high end of the range, as a share of the cost. */\n declare high: number;\n /** The fewest weeks an estimate says. */\n declare minWeeks: number;\n /** The currency the cost is in, such as GBP. */\n declare currency: string;\n /** What one unit of cost is worth, such as 1000 when the costs are in thousands. */\n declare unit: number;\n /** Beside the budget before anything is picked, such as \"Start by telling us what you are building.\" */\n declare intro: string;\n declare budgetLabel: string;\n declare resultHeading: string;\n /** The team, with {n} for the number of engineers. */\n declare teamText: string;\n /** The team when it has one engineer. */\n declare teamTextOne: string;\n /** A line under the result, such as how accurate it is. */\n declare note: string;\n /** Where the estimate is sent on to. With none, there is no button to send it. */\n declare contactHref: string;\n declare sendLabel: string;\n /** `wizard` asks one question at a time. `all` asks every question at once, with the result beside them as an ink panel. */\n declare layout: 'wizard' | 'all';\n /** With `all`: the words before the way of working under the panel, such as \"Suggested way to work\". */\n declare wayLabel: string;\n /** The level of each question's heading. */\n declare headingLevel: number;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private at = 0;\n private answers: Record<string, string[]> = {};\n private tip = '';\n private copied = '';\n private started = false;\n\n constructor() {\n super();\n this.questions = [];\n this.teams = [];\n this.ways = [];\n this.phases = [];\n this.low = 0.85;\n this.high = 1.25;\n this.minWeeks = 1;\n this.currency = 'GBP';\n this.unit = 1;\n this.intro = '';\n this.budgetLabel = 'Indicative budget';\n this.resultHeading = 'Your estimate';\n this.teamText = '{n} engineers';\n this.teamTextOne = '1 engineer';\n this.note = '';\n this.contactHref = '';\n this.sendLabel = 'Send this to us';\n this.layout = 'wizard';\n this.wayLabel = '';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n focusRing,\n css`\n :host { display: block; container-type: inline-size; }\n [hidden] { display: none !important; }\n .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: ${space(10)}; align-items: start; }\n .mono { font-family: ${t.fontMono}; font-size: ${fontSize('xs')}; letter-spacing: 0.04em; text-transform: uppercase; color: ${t.textMuted}; margin: 0; }\n .sr-only { ${visuallyHidden} }\n\n .progress { display: grid; gap: ${space(2)}; margin-block-end: ${space(6)}; }\n .bar { block-size: 4px; border-radius: 2px; background: color-mix(in srgb, currentColor 12%, transparent); overflow: hidden; }\n .bar i { display: block; block-size: 100%; background: ${t.brand}; transition: inline-size 300ms ease; }\n\n fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }\n legend { padding: 0; margin-block-end: ${space(2)}; }\n .q { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; ${type('3xl')} letter-spacing: ${t.trackingTight}; color: ${t.textHeading}; outline: none; }\n .hint { margin: 0 0 ${space(6)}; color: ${t.textMuted}; }\n\n .choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(3)}; }\n .choices.many { grid-template-columns: repeat(3, minmax(0, 1fr)); }\n .choice { position: relative; display: grid; gap: ${space(1)}; align-content: start; padding: ${space(4)}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; background: ${t.surfaceCard}; cursor: pointer; transition: border-color 120ms ease, background 120ms ease; }\n .choice:hover { border-color: ${t.borderStrong}; }\n .choice input { ${visuallyHidden} }\n .choice:has(input:checked) { border-color: ${t.brand}; box-shadow: inset 0 0 0 1px ${t.brand}; background: ${t.brandSubtle}; }\n .choice:has(input:focus-visible) { box-shadow: ${t.focusShadow}; }\n .many .choice { padding: ${space(3)}; }\n .label { font-weight: ${fontWeight('semibold')}; }\n .small { ${type('sm')} color: ${t.textMuted}; }\n /* A tick for a picked feature, drawn in the corner. */\n .many .choice:has(input:checked)::after { content: '\u2713'; position: absolute; inset-block-start: ${space(2)}; inset-inline-end: ${space(3)}; color: ${t.brand}; font-weight: ${fontWeight('bold')}; }\n\n .scale { display: grid; gap: ${space(3)}; }\n .scale input { inline-size: 100%; accent-color: ${t.brand}; ${targetSize} }\n .ticks { display: flex; justify-content: space-between; ${type('sm')} color: ${t.textMuted}; }\n .ticks span[aria-current] { color: ${t.text}; font-weight: ${fontWeight('semibold')}; }\n .now { margin: 0; }\n\n .nav { display: flex; gap: ${space(3)}; margin-block-start: ${space(8)}; }\n button, .send { ${targetSize} display: inline-flex; align-items: center; justify-content: center; gap: ${space(2)}; padding: ${space(2.5)} ${space(5)}; border-radius: ${t.radiusLg}; font: inherit; font-weight: ${fontWeight('semibold')}; cursor: pointer; text-decoration: none; border: ${t.borderThin} solid transparent; }\n .primary, .send { background: ${t.brand}; color: ${t.onBrand}; }\n .primary:hover, .send:hover { background: ${t.brandHover}; }\n .secondary { background: transparent; color: ${t.text}; border-color: ${t.borderStrong}; }\n .secondary:hover { background: ${t.surfaceSubtle}; }\n\n .panel { position: sticky; inset-block-start: ${space(6)}; overflow: hidden; isolation: isolate; padding: ${space(8)}; border-radius: ${t.radiusXl}; background: ${t.surfaceCard}; box-shadow: ${t.shadowMd}; display: grid; gap: ${space(2)}; }\n /* The glow behind the budget grows as the product does. */\n .glow { position: absolute; z-index: -1; inset-block-start: -40%; inset-inline-end: -30%; inline-size: 120%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, ${unsafeCSS(toneOf(1, 0))} 45%, transparent), color-mix(in srgb, ${unsafeCSS(toneOf(2, 1))} 25%, transparent) 45%, transparent 70%); transform: scale(var(--s, 0.7)); transform-origin: 70% 30%; transition: transform 500ms cubic-bezier(.2, .8, .2, 1); pointer-events: none; }\n .range { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; font-size: ${fontSize('5xl')}; line-height: 1; letter-spacing: ${t.trackingTight}; color: ${t.textHeading}; }\n .weeks { margin: 0; ${type('lg')} }\n .tip { margin: ${space(4)} 0 0; padding-block-start: ${space(4)}; border-block-start: 1px solid color-mix(in srgb, currentColor 15%, transparent); color: ${t.textMuted}; }\n\n .result { display: grid; gap: ${space(6)}; }\n .summary { margin: 0; ${type('xl')} text-wrap: pretty; }\n .phases { display: flex; gap: 3px; block-size: 14px; border-radius: 7px; overflow: hidden; }\n .phases i { display: block; }\n .legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: ${space(2)} ${space(5)}; }\n .legend li { display: inline-flex; align-items: center; gap: ${space(2)}; }\n .legend li::before { content: ''; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--c); }\n dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(4)}; }\n dt { margin: 0 0 ${space(1)}; }\n dd { margin: 0; font-weight: ${fontWeight('semibold')}; }\n .actions { display: flex; flex-wrap: wrap; gap: ${space(3)}; }\n .note { margin: 0; ${type('sm')} color: ${t.textMuted}; }\n .status { margin: 0; ${type('sm')} }\n\n @container (max-width: 48rem) {\n .wrap { grid-template-columns: minmax(0, 1fr); gap: ${space(8)}; }\n /* Not sticky once the panel is under the questions, but still the glow's containing block, so the panel clips it\n and it never widens the page (1.4.10). */\n .panel { position: relative; inset-block-start: auto; }\n .choices.many { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n }\n @container (max-width: 30rem) {\n .choices { grid-template-columns: minmax(0, 1fr); }\n .range { font-size: ${fontSize('4xl')}; }\n }\n /* layout=\"all\": every question at once, and the result as an ink panel beside them. */\n .all { --accent: ${token('color.accent.default', '#ffd43b')}; --on-accent: ${token('color.accent.on', '#111111')}; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: 'questions panel' 'note panel'; grid-template-rows: auto 1fr; column-gap: ${space(2.5)}; align-items: stretch; }\n .all .questions { grid-area: questions; display: grid; gap: ${space(6)}; padding: ${space(8)} ${space(8)} ${space(4)}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-block-end: 0; }\n .all .foot { grid-area: note; padding: 0 ${space(8)} ${space(8)}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-block-start: 0; }\n .all .foot .note { ${type('md')} }\n .all .ink { grid-area: panel; display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(8)}; background: ${t.text}; color: ${t.surfaceCard}; --muted: color-mix(in srgb, ${t.surfaceCard} 72%, ${t.text}); --line: color-mix(in srgb, ${t.surfaceCard} 18%, ${t.text}); }\n .all .ink .mono { color: var(--muted); font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; }\n /* The accent on ink only where the theme says the pair reads; in dark the panel turns to paper and the range keeps its words. */\n .all .ink .range { color: var(--impakt-color-accent-on-ink, var(--impakt-site-menu-current, currentColor)); font-size: clamp(2.5rem, 7cqi, 3.5rem); letter-spacing: -0.04em; }\n .all .ink .weeks { font-size: 1.25rem; line-height: 1.3; padding-block-end: ${space(3)}; }\n .all .rows { list-style: none; margin: 0; padding: 0; }\n .all .rows li { display: flex; justify-content: space-between; align-items: baseline; gap: ${space(4)}; padding-block: ${space(3.5)}; border-block-start: ${t.borderThin} solid var(--line); }\n .all .rows .length { font-family: ${t.fontMono}; ${type('sm')} color: var(--muted); white-space: nowrap; }\n .all .cta { ${targetSize} display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; min-block-size: 44px; padding: ${space(3)} ${space(5)}; ${type('md')} font-weight: ${fontWeight('medium')}; color: var(--on-accent); background: var(--accent); text-decoration: none; }\n .all .cta:hover { background: color-mix(in srgb, var(--accent) 88%, #ffffff); }\n .all .cta:focus-visible { outline: none; box-shadow: 0 0 0 2px ${t.text}, 0 0 0 4px ${t.surfaceCard}; }\n .all .way { margin: 0; ${type('sm')} color: var(--muted); }\n @container (max-width: 48rem) {\n .all { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'questions' 'panel' 'note'; grid-template-rows: auto; column-gap: 0; }\n .all .questions { padding: ${space(6)} ${space(5)}; border-block-end: ${t.borderThin} solid ${t.text}; }\n .all .foot { padding: ${space(4)} 0 0; background: none; border: 0; }\n .all .ink { padding: ${space(6)} ${space(5)}; }\n }\n @media (forced-colors: active) {\n .all .ink { border: 1px solid CanvasText; }\n .all .cta { border: 1px solid ButtonText; }\n .choice:has(input:checked) { outline: 3px solid Highlight; }\n .bar i, .phases i, .legend li::before { background: CanvasText !important; }\n .glow { display: none; }\n }\n `,\n ];\n\n /** The answers each question starts with. */\n private reset(): void {\n this.answers = Object.fromEntries(\n (this.questions ?? []).map((q) => {\n const ids = (q.start ?? []).filter((id) => q.choices.some((c) => c.id === id));\n if (q.kind === 'many') return [q.id, ids];\n return [q.id, [ids[0] ?? q.choices[0]?.id].filter((x): x is string => Boolean(x))];\n }),\n );\n this.at = 0;\n this.tip = '';\n this.copied = '';\n }\n\n protected willUpdate(changed: Map<string, unknown>): void {\n if (changed.has('questions') || !this.started) {\n this.reset();\n this.started = true;\n }\n }\n\n private get rules() {\n return { low: this.low, high: this.high, minWeeks: this.minWeeks, teams: this.teams ?? [], ways: this.ways ?? [] };\n }\n\n private money(n: number): string {\n try {\n return new Intl.NumberFormat(pageLocale(this), {\n style: 'currency',\n currency: this.currency || 'GBP',\n notation: 'compact',\n maximumFractionDigits: 0,\n }).format(n * (this.unit || 1));\n } catch {\n return String(n * (this.unit || 1));\n }\n }\n\n private listOf(words: string[]): string {\n try {\n return new Intl.ListFormat(pageLocale(this), { type: 'conjunction' }).format(words);\n } catch {\n return words.join(', ');\n }\n }\n\n private weeksWord(n: number): string {\n return n === 1 ? say('{n} week', { n }) : say('{n} weeks', { n });\n }\n\n /** The largest the budget can be, so the glow is full size at it. */\n private get most(): number {\n const qs = this.questions ?? [];\n const answers = Object.fromEntries(\n qs.map((q) => {\n if (q.kind === 'many') return [q.id, q.choices.map((c) => c.id)];\n const best = [...q.choices].sort((a, b) => (b.cost ?? 0) * (b.costFactor ?? 1) - (a.cost ?? 0) * (a.costFactor ?? 1))[0];\n return [q.id, best ? [best.id] : []];\n }),\n );\n return estimate(qs, answers, this.rules).high || 1;\n }\n\n private summaryOf(r: ReturnType<typeof estimate>): string {\n const qs = this.questions ?? [];\n const one = qs.find((q) => q.kind === 'one');\n const thing = one ? one.choices.find((c) => c.id === this.answers[one.id]?.[0]) : undefined;\n const many = qs\n .filter((q) => q.kind === 'many' && q.inSummary !== false)\n .flatMap((q) =>\n (this.answers[q.id] ?? []).map((id) => {\n const c = q.choices.find((x) => x.id === id);\n return c ? c.phrase || c.label : id;\n }),\n );\n const name = thing ? thing.phrase || thing.label : '';\n const first = !name\n ? ''\n : many.length\n ? say('You are building {thing} with {list}.', { thing: name, list: this.listOf(many) })\n : say('You are building {thing}.', { thing: name });\n const rest = say('Expect {range} and about {weeks} to a first release.', { range: this.rangeOf(r), weeks: this.weeksWord(r.weeks) });\n return first ? `${first} ${rest}` : rest;\n }\n\n private rangeOf(r: { low: number; high: number }): string {\n return say('{low} to {high}', { low: this.money(r.low), high: this.money(r.high) });\n }\n private teamOf(n: number): string {\n return n === 1 ? this.teamTextOne : this.teamText.replace('{n}', String(n));\n }\n\n private pick(q: EstimatorQuestion, choice: EstimatorChoice, on: boolean): void {\n const now = this.answers[q.id] ?? [];\n this.answers = {\n ...this.answers,\n [q.id]: q.kind === 'many' ? (on ? [...now.filter((id) => id !== choice.id), choice.id] : now.filter((id) => id !== choice.id)) : [choice.id],\n };\n if (on && choice.tip) this.tip = choice.tip;\n this.requestUpdate();\n }\n\n private go(to: number): void {\n const last = (this.questions ?? []).length;\n this.at = Math.max(0, Math.min(last, to));\n this.copied = '';\n this.requestUpdate();\n void this.updateComplete.then(() => (this.renderRoot.querySelector('.current .q') as HTMLElement | null)?.focus({ preventScroll: true }));\n }\n\n private result(): EstimateResult {\n const r = estimate(this.questions ?? [], this.answers, this.rules);\n return {\n low: r.low * (this.unit || 1),\n high: r.high * (this.unit || 1),\n weeks: r.weeks,\n engineers: r.engineers,\n way: r.way,\n summary: this.textOf(r),\n answers: this.answers,\n };\n }\n\n /** The estimate as words to send or copy. */\n private textOf(r: ReturnType<typeof estimate>): string {\n const parts = [this.summaryOf(r), `${this.teamOf(r.engineers)}.`];\n if (r.way) parts.push(`${r.way}.`);\n const picked = (this.questions ?? [])\n .filter((q) => q.short && q.kind !== 'many')\n .map((q) => {\n const c = q.choices.find((x) => x.id === this.answers[q.id]?.[0]);\n return c ? `${q.short}: ${c.label}.` : '';\n })\n .filter(Boolean);\n const many = (this.questions ?? [])\n .filter((q) => q.short && q.kind === 'many' && q.inSummary === false)\n .map((q) => {\n const labels = (this.answers[q.id] ?? []).map((id) => q.choices.find((x) => x.id === id)?.label ?? id);\n return labels.length ? `${q.short}: ${this.listOf(labels)}.` : '';\n })\n .filter(Boolean);\n return [...parts, ...many, ...picked].join(' ');\n }\n\n private send(e: Event): void {\n const result = this.result();\n try {\n sessionStorage.setItem('impakt.estimate', result.summary);\n } catch {\n /* storage can be blocked; the link still goes */\n }\n const go = this.dispatchEvent(new CustomEvent('impakt-estimate', { detail: result, bubbles: true, composed: true, cancelable: true }));\n if (!go) e.preventDefault();\n }\n\n private async copy(): Promise<void> {\n const text = this.result().summary;\n try {\n await navigator.clipboard.writeText(text);\n this.copied = say('Summary copied.');\n } catch {\n this.copied = say('Copying is blocked here. Select the summary above instead.');\n }\n this.requestUpdate();\n }\n\n private heading(text: string): TemplateResult {\n const l = Math.min(Math.max(this.headingLevel || 2, 2), 6);\n return html`<div class=\"q\" role=\"heading\" aria-level=${l} tabindex=\"-1\">${text}</div>`;\n }\n\n private renderQuestion(q: EstimatorQuestion, i: number): TemplateResult {\n const picked = this.answers[q.id] ?? [];\n const current = i === this.at;\n if (q.kind === 'scale') {\n const index = Math.max(\n 0,\n q.choices.findIndex((c) => c.id === picked[0]),\n );\n const chosen = q.choices[index];\n return html`<fieldset class=${current ? 'current' : ''} ?hidden=${!current}>\n <legend>${this.heading(q.heading)}</legend>\n ${q.hint ? html`<p class=\"hint\">${q.hint}</p>` : nothing}\n <div class=\"scale\">\n <input type=\"range\" min=\"0\" max=${Math.max(0, q.choices.length - 1)} step=\"1\" .value=${String(index)} aria-label=${q.heading} aria-valuetext=${chosen?.label ?? ''}\n @input=${(e: Event) => {\n const c = q.choices[Number((e.target as HTMLInputElement).value)];\n if (c) this.pick(q, c, true);\n }}>\n <div class=\"ticks\" aria-hidden=\"true\">${q.choices.map((c, k) => html`<span aria-current=${k === index ? 'true' : nothing}>${c.label}</span>`)}</div>\n ${chosen?.hint ? html`<p class=\"now\">${chosen.hint}</p>` : nothing}\n </div>\n </fieldset>`;\n }\n const many = q.kind === 'many';\n return html`<fieldset class=${current ? 'current' : ''} ?hidden=${!current}>\n <legend>${this.heading(q.heading)}</legend>\n ${q.hint ? html`<p class=\"hint\">${q.hint}</p>` : nothing}\n <div class=\"choices ${many ? 'many' : ''}\">\n ${q.choices.map(\n (c) => html`<label class=\"choice\">\n <input type=${many ? 'checkbox' : 'radio'} name=${`${this.uid}-${q.id}`} value=${c.id} .checked=${picked.includes(c.id)}\n @change=${(e: Event) => this.pick(q, c, (e.target as HTMLInputElement).checked)}>\n <span class=\"label\">${c.label}</span>\n ${c.hint ? html`<span class=\"small\">${c.hint}</span>` : nothing}\n </label>`,\n )}\n </div>\n </fieldset>`;\n }\n\n private renderResult(r: ReturnType<typeof estimate>): TemplateResult {\n const weeks = phaseWeeks(this.phases ?? [], r.weeks);\n const current = this.at === (this.questions ?? []).length;\n return html`<div class=\"result ${current ? 'current' : ''}\" ?hidden=${!current}>\n ${this.heading(this.resultHeading)}\n <p class=\"summary\">${this.summaryOf(r)}</p>\n ${\n (this.phases ?? []).length\n ? html`\n <div class=\"phases\" aria-hidden=\"true\">${(this.phases ?? []).map((_, i) => html`<i style=${`flex-grow:${weeks[i]};background:${toneOf(undefined, i)}`}></i>`)}</div>\n <ul class=\"legend\">${(this.phases ?? []).map((p, i) => html`<li style=${`--c:${toneOf(undefined, i)}`}>${p.label} <b>${this.weeksWord(weeks[i]!)}</b></li>`)}</ul>`\n : nothing\n }\n <dl>\n <div><dt class=\"mono\">${say('Your team')}</dt><dd>${this.teamOf(r.engineers)}</dd></div>\n ${r.way ? html`<div><dt class=\"mono\">${say('Way of working')}</dt><dd>${r.way}</dd></div>` : nothing}\n </dl>\n <div class=\"actions\">\n ${this.contactHref ? html`<a class=\"send\" href=${this.contactHref} @click=${(e: Event) => this.send(e)}>${this.sendLabel} <span aria-hidden=\"true\">\u2192</span></a>` : nothing}\n <button type=\"button\" class=\"secondary\" @click=${() => this.copy()}>${say('Copy summary')}</button>\n <button type=\"button\" class=\"secondary\" @click=${() => {\n this.reset();\n this.go(0);\n }}>${say('Start again')}</button>\n </div>\n <p class=\"status\" role=\"status\">${this.copied}</p>\n ${this.note ? html`<p class=\"note\">${this.note}</p>` : nothing}\n </div>`;\n }\n\n /** Every question at once, as rows of chips, with the result beside them in ink. */\n private renderAll(r: ReturnType<typeof estimate>): TemplateResult {\n const qs = this.questions ?? [];\n const weeks = phaseWeeks(this.phases ?? [], r.weeks);\n const arrow = html`<svg viewBox=\"0 0 20 12\" width=\"20\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M0 6h18M13 1l5 5-5 5\" /></svg>`;\n return html`<div class=\"all\">\n <div class=\"questions\" part=\"questions\">\n ${qs.map((q, i) => {\n const picked = this.answers[q.id] ?? [];\n const many = q.kind === 'many';\n const options = q.choices.map((c) => ({ value: c.id, label: c.label }));\n return html`<impakt-chip-group look=\"site\" part=\"question\" .label=${`${String(i + 1).padStart(2, '0')} \u00B7 ${q.heading}`} .description=${q.hint ?? ''}\n .options=${options} ?multiple=${many} .values=${many ? picked : []} .value=${many ? '' : (picked[0] ?? '')}\n @impakt-change=${(e: CustomEvent<{ value: string }>) => this.chipsChanged(q, e)}></impakt-chip-group>`;\n })}\n </div>\n <aside class=\"ink\" part=\"panel\">\n <p class=\"mono\">${this.budgetLabel}</p>\n <p class=\"range\" aria-live=\"polite\" aria-atomic=\"true\">${this.rangeOf(r)}</p>\n <p class=\"weeks\">${say('About {weeks} to a first release', { weeks: this.weeksWord(r.weeks) })}</p>\n ${\n (this.phases ?? []).length\n ? html`<ul class=\"rows\" role=\"list\">${(this.phases ?? []).map((phase, i) => html`<li><span>${phase.label}</span><span class=\"length\">${this.weeksWord(weeks[i]!)}</span></li>`)}</ul>`\n : nothing\n }\n ${this.contactHref ? html`<a class=\"cta\" href=${this.contactHref} part=\"send\" @click=${(e: Event) => this.send(e)}><span>${this.sendLabel}</span>${arrow}</a>` : nothing}\n ${r.way ? html`<p class=\"way\">${this.wayLabel || say('Way of working')}: ${r.way}</p>` : nothing}\n </aside>\n ${this.note ? html`<div class=\"foot\"><p class=\"note\">${this.note}</p></div>` : nothing}\n </div>`;\n }\n\n /** A row of chips changed: one answer, or the set of them. */\n private chipsChanged(q: EstimatorQuestion, e: CustomEvent<{ value: string }>): void {\n const group = e.target as HTMLElement & { values?: string[] };\n const ids = q.kind === 'many' ? [...(group.values ?? [])] : [e.detail?.value].filter((x): x is string => Boolean(x));\n this.answers = { ...this.answers, [q.id]: ids };\n const last = ids.at(-1);\n const tip = q.choices.find((c) => c.id === last)?.tip;\n if (tip) this.tip = tip;\n this.requestUpdate();\n }\n\n render(): TemplateResult {\n const qs = this.questions ?? [];\n if (this.layout === 'all') return this.renderAll(estimate(qs, this.answers, this.rules));\n const total = qs.length;\n const r = estimate(qs, this.answers, this.rules);\n const done = this.at >= total;\n const scale = (0.6 + Math.min(1, r.high / this.most) * 1.1).toFixed(2);\n return html`<div class=\"wrap\">\n <div>\n <div class=\"progress\">\n <p class=\"mono\">${done ? this.resultHeading : say('Step {step} of {steps}', { step: this.at + 1, steps: total })}</p>\n <div class=\"bar\" aria-hidden=\"true\"><i style=${`inline-size:${total ? (done ? 100 : ((this.at + 1) / (total + 1)) * 100) : 0}%`}></i></div>\n </div>\n ${qs.map((q, i) => this.renderQuestion(q, i))}\n ${this.renderResult(r)}\n ${\n done\n ? nothing\n : html`<div class=\"nav\">\n ${this.at > 0 ? html`<button type=\"button\" class=\"secondary\" @click=${() => this.go(this.at - 1)}>${say('Back')}</button>` : nothing}\n <button type=\"button\" class=\"primary\" @click=${() => this.go(this.at + 1)}>${this.at === total - 1 ? say('See my estimate') : say('Next')} <span aria-hidden=\"true\">\u2192</span></button>\n </div>`\n }\n </div>\n <aside class=\"panel\" part=\"panel\" style=${`--s:${scale}`}>\n <div class=\"glow\" aria-hidden=\"true\"></div>\n <p class=\"mono\">${this.budgetLabel}</p>\n <p class=\"range\" aria-live=\"polite\" aria-atomic=\"true\">${this.rangeOf(r)}</p>\n <p class=\"weeks\">${say('About {weeks} to a first release', { weeks: this.weeksWord(r.weeks) })}</p>\n <p class=\"tip\" aria-live=\"polite\">${this.tip || this.intro}</p>\n </aside>\n </div>`;\n }\n}\n\ncustomElements.define('impakt-estimator', ImpaktEstimator);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-estimator': ImpaktEstimator;\n }\n}\n", "/**\n * A site's own header and footer, drawn as one piece each, for the layout's\n * header and footer slots, and the wordmark that starts a header.\n *\n * The chip that sits beside a wordmark is a product component, `impakt-chip`,\n * and comes from `@atomic-ui/ui`.\n *\n * The page frame (`impakt-page`) gives them their landmarks, so neither draws a\n * `<header>` or `<footer>` of its own: a second banner would be one a screen\n * reader announces twice.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\n// The base, the tokens and the nav and button these draw come from @atomic-ui/ui, which defines its elements on import.\nimport { ImpaktElement, focusRing, hideOn, fontSize, fontWeight, space, t, token, type, toneOf, type NavLink, type Tone } from '@atomic-ui/ui';\n\n/** The footer stripe's colours, left to right. */\n/** The stripe's segments take the brand's chart colours in order. */\nconst STRIPE = [0, 1, 2, 3, 4];\n\n/** Code-like labels: a branch, a hash, a commit message. */\nconst MONO = t.fontMono;\n\n// Quieter words are faded to 0.72, no further: that keeps them at 4.5:1 on the page and card colours (1.4.3).\n\n/**\n * The site header: the brand, the main links and one call to action, with an\n * optional chip beside the brand and a status before the action.\n *\n * The links fold behind a Menu button when they do not fit, as `impakt-nav`\n * does. The chip and the status are labels, not controls, and they are left\n * out on a phone so the brand, the menu and the action keep the row.\n *\n * **Build your own.** Place components in its three slots, start, middle and\n * end, and each slot that holds something replaces what the props draw there:\n * a wordmark and chips at the start, a nav in the middle, a status and a\n * button at the end, in any order. Give a component `hideOn: 'phone'` to leave\n * it out on a phone, so the phone's header is built from the same pieces.\n *\n * **A header for a studio's canvas.** `mark` draws a 28px ink square with a\n * letter in it before the name, `context` a path after it (\"/ home.canvas\"),\n * and `status-at=\"start\"` moves the status chip, a square with a dot and a\n * word such as \"Live\", up beside them. `nav-look=\"tabs\"` draws the links as\n * file tabs. `presence` draws a few small overlapping avatars of the people in\n * the file before the action; each is named for a screen reader.\n *\n * @category layout\n * @icon header\n * @slot start - The brand: a wordmark or logo, and any chips beside it.\n * @slot middle - The links, usually one nav.\n * @slot presence - Avatars of the people in the file, before the action. Replaces what `presence` draws.\n * @slot end - A status and the call to action.\n * @fires {CustomEvent<null>} impakt-action - When the call to action is pressed.\n */\nexport class ImpaktSiteHeader extends ImpaktElement {\n static properties = {\n brand: { type: String },\n logoSrc: { type: String, attribute: 'logo-src' },\n logoAlt: { type: String, attribute: 'logo-alt' },\n home: { type: String },\n badge: { type: String },\n meta: { type: String },\n links: { type: Array },\n label: { type: String },\n menuText: { type: String, attribute: 'menu-text' },\n status: { type: String },\n statusMeta: { type: String, attribute: 'status-meta' },\n statusTone: { type: String, attribute: 'status-tone' },\n actionText: { type: String, attribute: 'action-text' },\n actionHref: { type: String, attribute: 'action-href' },\n fold: { type: String, reflect: true },\n mark: { type: String },\n context: { type: String },\n statusAt: { type: String, reflect: true, attribute: 'status-at' },\n navLook: { type: String, attribute: 'nav-look' },\n current: { type: String },\n presence: { type: Array },\n };\n /** The site's name, set as a wordmark when there is no logo picture. */\n declare brand: string;\n /** A logo picture, used instead of the wordmark. */\n declare logoSrc: string;\n /** What the logo says. Leave empty to use the brand name. */\n declare logoAlt: string;\n /** Where the brand links to. */\n declare home: string;\n /** A short chip beside the brand, such as \"main\". */\n declare badge: string;\n /** A code-like line after the chip, such as a commit hash. */\n declare meta: string;\n declare links: NavLink[];\n /** The name of the links' landmark. */\n declare label: string;\n /** The words on the button that opens the links on a narrow screen. */\n declare menuText: string;\n /** A status before the action, such as the stage the site is at. */\n declare status: string;\n /** A code-like line in the status, such as a hash. */\n declare statusMeta: string;\n declare statusTone: Tone;\n declare actionText: string;\n declare actionHref: string;\n /**\n * How the links fold on a narrow screen. `measure` folds them when they do not fit, which needs\n * script. `narrow` folds them at 40rem in CSS: the Menu button then opens a whole-screen menu\n * with no script, and the header's action moves into that menu. Use `narrow` on a page that may\n * be shown without script.\n */\n declare fold: 'measure' | 'narrow';\n /** A letter or two in a 28px ink square before the name, such as \"i\". Decoration: the name is what is read. */\n declare mark: string;\n /** A path after the name, such as \"home.canvas\", drawn as \"/ home.canvas\". */\n declare context: string;\n /** Where the status sits: `end`, before the action, or `start`, after the name. */\n declare statusAt: 'start' | 'end';\n /** How the links are drawn, passed to `impakt-nav` as its `look`, such as `tabs` for file tabs. */\n declare navLook: string;\n /** The href of the link to mark as the page you are on, passed to the nav; unset, the nav works it out from the address. */\n declare current: string;\n /** The people in the file, drawn as small overlapping avatars. `accent` fills one in the accent. */\n declare presence: Array<{ name: string; initials?: string; accent?: boolean }>;\n\n constructor() {\n super();\n this.brand = '';\n this.logoSrc = '';\n this.logoAlt = '';\n this.home = '/';\n this.badge = '';\n this.meta = '';\n this.links = [];\n this.label = 'Main';\n this.menuText = 'Menu';\n this.status = '';\n this.statusMeta = '';\n this.statusTone = 'success';\n this.actionText = '';\n this.actionHref = '';\n this.fold = 'measure';\n this.mark = '';\n this.context = '';\n this.statusAt = 'end';\n this.navLook = '';\n this.current = '';\n this.presence = [];\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; container-type: inline-size; }\n /* With a mark, the name is set small beside it, as in the canvas header. */\n .brand.marked { gap: ${space(3)}; font-size: ${fontSize('md')}; letter-spacing: -0.01em; }\n .mark { display: inline-grid; place-items: center; inline-size: 28px; block-size: 28px; flex: none; background: ${t.text}; color: ${t.surfaceCard}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('medium')}; }\n .context { font-size: ${fontSize('sm')}; white-space: nowrap; }\n .context .slash { margin-inline-end: ${space(2)}; opacity: 0.72; }\n .presence { display: flex; }\n .presence .avatar { display: inline-grid; place-items: center; inline-size: 22px; block-size: 22px; box-sizing: border-box; margin-inline-start: -6px; border-radius: 50%; border: ${t.borderThin} solid ${t.text}; background: ${t.surfaceCard}; color: ${t.text}; font-family: ${MONO}; font-size: 0.625rem; line-height: 1; }\n .presence .avatar:first-child { margin-inline-start: 0; }\n .presence .avatar.accent { background: ${token('color.accent.default', '#ffd43b')}; color: ${token('color.accent.on', '#111111')}; }\n .bar { display: flex; align-items: center; gap: ${space(6)}; }\n .start { display: flex; align-items: center; gap: ${space(3)}; flex: none; }\n .middle { flex: 1 1 8rem; min-inline-size: 0; display: flex; align-items: center; justify-content: center; }\n .middle ::slotted(*) { flex: 1 1 auto; min-inline-size: 0; }\n slot { display: contents; }\n .brand { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; color: inherit; text-decoration: none; font-family: ${t.fontHeading}; font-weight: ${fontWeight('semibold')}; ${type('2xl')} letter-spacing: -0.02em; line-height: 1; border-radius: ${t.radiusSm}; }\n .brand img { display: block; block-size: 32px; inline-size: auto; }\n .chip { display: inline-flex; align-items: center; gap: ${space(1)}; padding: 2px ${space(2)}; border-radius: ${t.radius}; background: color-mix(in srgb, currentColor 7%, transparent); font-family: ${MONO}; font-size: ${fontSize('xs')}; }\n .chip svg { inline-size: 12px; block-size: 12px; }\n .meta { font-family: ${MONO}; font-size: ${fontSize('xs')}; opacity: 0.72; }\n .middle impakt-nav { flex: 1 1 8rem; }\n /* File tabs sit in one box as wide as the tabs, centred between the name and the action. */\n :host([fold='narrow']) .middle impakt-nav[look='tabs'] { flex: 0 1 auto; }\n .end { display: flex; align-items: center; gap: ${space(3)}; flex: none; }\n .end:empty, .start:empty { display: none; }\n .status { display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(1)} ${space(3)}; border: ${t.borderThin} solid ${t.border}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); background: ${t.surfaceCard}; font-family: ${MONO}; font-size: ${fontSize('xs')}; white-space: nowrap; }\n /* Beside the name it is a small square chip: an ink outline, a dot, and the word in monospace capitals. */\n .start .status { padding: 2px ${space(2)}; border-color: ${t.text}; border-radius: ${t.radius}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .start .status .dot { inline-size: 6px; block-size: 6px; }\n .status .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--tone); }\n .status .hash { opacity: 0.72; }\n @container (max-width: 22rem) { :host(:not([fold='narrow'])) .bar { flex-wrap: wrap; row-gap: ${space(2)}; } :host(:not([fold='narrow'])) .end { flex: 1 1 100%; } }\n @container (max-width: 56rem) { .chip, .meta, .status, .context, .presence { display: none; } .bar { gap: ${space(3)}; } }\n /* With no script the links cannot fold behind a Menu button. On a narrow screen they take a\n line of their own under the name and the action, and wrap there. */\n @container (max-width: 40rem) {\n :host(:not(:defined):not([fold='narrow'])) .bar { flex-wrap: wrap; row-gap: ${space(1)}; }\n :host(:not(:defined):not([fold='narrow'])) .start { flex: 1 1 auto; }\n :host(:not(:defined):not([fold='narrow'])) .middle { order: 3; flex: 1 1 100%; justify-content: flex-start; }\n /* fold=\"narrow\": the links are behind the Menu button, which sits at the end, and the action moves into the menu. */\n :host([fold='narrow']) .middle { justify-content: flex-end; }\n /* On the narrowest bars the action takes its own row, so the Menu button never spills over the brand. */\n :host(:not([fold='narrow'])) .middle { justify-content: flex-end; min-inline-size: max-content; }\n :host([fold='narrow']) .end > slot > impakt-button { display: none; }\n }\n `,\n ];\n\n private act(): void {\n this.dispatchEvent(new CustomEvent('impakt-action', { bubbles: true, composed: true }));\n }\n\n render(): TemplateResult {\n const wordmark = this.logoSrc ? html`<img src=${this.logoSrc} alt=${this.logoAlt || this.brand} />` : html`${this.brand}`;\n const status = this.status\n ? html`<span class=\"status\" part=\"status\" style=${`--tone:${toneOf(this.statusTone, 0)}`}><span class=\"dot\" aria-hidden=\"true\"></span>${this.status}${this.statusMeta ? html` <span class=\"hash\">${this.statusMeta}</span>` : nothing}</span>`\n : nothing;\n const presence = this.presence ?? [];\n // Each region shows what is placed in its slot, or, when nothing is, what the props describe.\n return html`<div class=\"bar\" part=\"bar\">\n <div class=\"start\"><slot name=\"start\">\n ${this.brand || this.logoSrc ? html`<a class=${this.mark ? 'brand marked' : 'brand'} href=${this.home || '/'} part=\"brand\">${this.mark ? html`<span class=\"mark\" part=\"mark\" aria-hidden=\"true\">${this.mark}</span>` : nothing}${wordmark}</a>` : nothing}\n ${this.context ? html`<span class=\"context\" part=\"context\"><span class=\"slash\" aria-hidden=\"true\">/</span>${this.context}</span>` : nothing}\n ${this.statusAt === 'start' ? status : nothing}\n ${this.badge ? html`<span class=\"chip\" part=\"badge\"><svg viewBox=\"0 0 14 14\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"><circle cx=\"3.5\" cy=\"3\" r=\"1.5\"/><circle cx=\"3.5\" cy=\"11\" r=\"1.5\"/><circle cx=\"10.5\" cy=\"4.5\" r=\"1.5\"/><path d=\"M3.5 4.5v5M10.5 6c0 2.5-3 2.5-6 4\"/></svg>${this.badge}</span>` : nothing}\n ${this.meta ? html`<span class=\"meta\" part=\"meta\">${this.meta}</span>` : nothing}\n </slot></div>\n <div class=\"middle\"><slot name=\"middle\">${(this.links ?? []).length ? html`<impakt-nav align=\"center\" size=\"sm\" fold=${this.fold} look=${this.navLook || nothing} .current=${this.current} .links=${this.links} .label=${this.label} .menuText=${this.menuText} .actionText=${this.fold === 'narrow' ? this.actionText : ''} .actionHref=${this.actionHref}></impakt-nav>` : nothing}</slot></div>\n <div class=\"end\"><slot name=\"presence\">${\n presence.length\n ? html`<span class=\"presence\" part=\"presence\">${presence.map(\n (person) =>\n html`<span class=${person.accent ? 'avatar accent' : 'avatar'} role=\"img\" aria-label=${person.name}>${person.initials ?? person.name.slice(0, 1).toUpperCase()}</span>`,\n )}</span>`\n : nothing\n }</slot><slot name=\"end\">\n ${this.statusAt === 'start' ? nothing : status}\n ${this.actionText ? html`<impakt-button variant=\"primary\" size=\"sm\" icon-after=\"arrow-right\" href=${this.actionHref || nothing} @click=${this.act}>${this.actionText}</impakt-button>` : nothing}\n </slot></div>\n </div>`;\n }\n}\n\n/**\n * The site's name as a wordmark, or its logo, linking home: the start of a\n * site header.\n *\n * @category layout\n * @icon logo\n */\nexport class ImpaktWordmark extends ImpaktElement {\n static properties = {\n text: { type: String },\n src: { type: String },\n alt: { type: String },\n href: { type: String },\n size: { type: String, reflect: true },\n hideOn: { type: String, reflect: true, attribute: 'hide-on' },\n };\n /** The name, set in the heading face. */\n declare text: string;\n /** A logo picture, used instead of the name. */\n declare src: string;\n /** What the logo says. Leave empty to use the name. */\n declare alt: string;\n declare href: string;\n /** Larger on a wide header, smaller on a phone's. */\n declare size: 'sm' | 'md' | 'lg';\n declare hideOn: 'never' | 'phone' | 'wide';\n\n constructor() {\n super();\n this.text = '';\n this.src = '';\n this.alt = '';\n this.href = '/';\n this.size = 'md';\n this.hideOn = 'never';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n hideOn,\n css`\n :host { display: inline-flex; align-items: center; flex: none; }\n a { color: inherit; text-decoration: none; font-family: ${t.fontHeading}; font-weight: ${fontWeight('semibold')}; letter-spacing: -0.02em; line-height: 1; border-radius: ${t.radiusSm}; }\n :host([size='sm']) a { ${type('xl')} } :host([size='md']) a { ${type('2xl')} } :host([size='lg']) a { ${type('3xl')} }\n img { display: block; block-size: 32px; inline-size: auto; }\n @media (max-width: 40rem) { :host([size='md']) a, :host([size='lg']) a { ${type('xl')} } }\n `,\n ];\n\n render(): TemplateResult {\n // The name arrives as the element's words when a page places it, or as `text` when it is set directly.\n return html`<a href=${this.href || '/'} part=\"link\">${this.src ? html`<img src=${this.src} alt=${this.alt || this.text || this.textContent?.trim() || ''} />` : html`<slot>${this.text}</slot>`}</a>`;\n }\n}\n\n/** One line of a footer's log: a code, what it says, and the colour of its dot. */\nexport interface FooterLogLine {\n meta?: string;\n text: string;\n tone?: Tone;\n}\n\n/** A column of footer links under a short heading. */\nexport interface FooterColumn {\n heading: string;\n links: NavLink[];\n}\n\n/**\n * The site footer: the footer band with the brand set large, an optional log of\n * lines beside it, columns of links, a legal line and a stripe of the brand's\n * colours along the foot.\n *\n * Each column is a list under its own heading, so a screen reader can move\n * from one to the next. The log is a list too; its dots are decoration.\n *\n * `action-text` and `action-href` put one outlined action at the end of the\n * columns' row, such as \"Back to top\". `tagline` sets a short line at the\n * other end of the legal line, such as \"Pixel to production\". On a phone the\n * columns sit two by two.\n *\n * @category layout\n * @icon footer\n */\nexport class ImpaktSiteFooter extends ImpaktElement {\n static properties = {\n brand: { type: String },\n brandSize: { type: String, reflect: true, attribute: 'brand-size' },\n log: { type: Array },\n columns: { type: Array },\n columnsOnPhone: { type: String, attribute: 'columns-on-phone', reflect: true },\n legal: { type: String },\n stripe: { type: Boolean, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n actionText: { type: String, attribute: 'action-text' },\n actionHref: { type: String, attribute: 'action-href' },\n tagline: { type: String },\n };\n /** The site's name, set large. */\n declare brand: string;\n /**\n * How large the name is set. `display` runs it the full width of the footer,\n * under the columns, sized by the footer's own width so it never spills at\n * 320px.\n */\n declare brandSize: 'lg' | 'display';\n /** Lines set in code type under the brand, newest first. The first is bright. */\n declare log: FooterLogLine[];\n declare columns: FooterColumn[];\n /** `hidden` leaves the link columns out on a phone, so the footer there is the name, the lines and the legal line. */\n declare columnsOnPhone: 'shown' | 'hidden';\n /** The line at the foot, such as the copyright. */\n declare legal: string;\n /** A stripe of the brand's colours along the bottom edge. */\n declare stripe: boolean;\n /** The level of each column's heading. */\n declare headingLevel: 2 | 3 | 4;\n /** The words on an outlined action at the end of the columns' row, such as \"Back to top\". */\n declare actionText: string;\n /** Where that action goes, such as \"#top\". */\n declare actionHref: string;\n /** A short line at the end of the legal line, such as \"Pixel to production\". */\n declare tagline: string;\n\n constructor() {\n super();\n this.brand = '';\n this.brandSize = 'lg';\n this.log = [];\n this.columns = [];\n this.columnsOnPhone = 'shown';\n this.legal = '';\n this.stripe = false;\n this.headingLevel = 2;\n this.actionText = '';\n this.actionHref = '';\n this.tagline = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n /* The page frame's footer band gives the colours; this sits flush with its foot so the stripe meets the edge. */\n :host { display: block; container-type: inline-size; position: relative; padding-block: ${space(8)} ${space(4)}; margin-block-end: calc(-1 * ${space(8)}); }\n .top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: ${space(10)}; }\n .brand { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.03em; }\n /* The name as a wordmark across the whole footer, under the columns. */\n :host([brand-size='display']) .top { grid-template-columns: 1fr; }\n :host([brand-size='display']) .top > div:first-child { order: 2; }\n :host([brand-size='display']) .brand { font-weight: ${fontWeight('semibold')}; font-size: clamp(3rem, 27cqi, 24rem); line-height: 0.9; letter-spacing: -0.06em; overflow-wrap: anywhere; }\n ul { list-style: none; margin: 0; padding: 0; }\n .log { margin-block-start: ${space(8)}; display: grid; gap: ${space(3)}; font-family: ${MONO}; font-size: ${fontSize('sm')}; }\n .log li { display: flex; align-items: center; gap: ${space(3)}; opacity: 0.72; }\n .log li:first-child { opacity: 1; }\n .log .dot { flex: none; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--tone); }\n .log .code { margin-inline-end: ${space(3)}; }\n .columns { display: grid; grid-template-columns: repeat(var(--count, 4), minmax(0, 1fr)); gap: ${space(8)}; }\n .h { margin: 0 0 ${space(4)}; font-family: ${MONO}; font-size: ${fontSize('xs')}; font-weight: ${fontWeight('medium')}; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.72; }\n .columns ul { display: grid; gap: ${space(3)}; }\n a { color: inherit; text-decoration: none; font-weight: ${fontWeight('medium')}; border-radius: ${t.radiusSm}; }\n a:hover { text-decoration: underline; text-underline-offset: 0.25em; }\n .legal { margin: ${space(16)} 0 0; font-family: ${MONO}; font-size: ${fontSize('xs')}; opacity: 0.72; }\n .foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: ${space(2)} ${space(6)}; margin-block-start: ${space(16)}; }\n .foot .legal { margin: 0; }\n .tagline { margin: 0; font-family: ${MONO}; font-size: ${fontSize('xs')}; opacity: 0.72; text-align: end; }\n .row { display: flex; align-items: flex-start; gap: ${space(8)}; }\n .row .columns { flex: 1; }\n .row impakt-button { flex: none; }\n .stripe { position: absolute; inset-inline: -100vmax; inset-block-end: 0; block-size: 6px; display: flex; }\n .stripe span { flex: 1; }\n @container (max-width: 48rem) { .top { grid-template-columns: 1fr; } .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } .row { flex-direction: column; } }\n @container (max-width: 40rem) { :host([columns-on-phone='hidden']) .columns { display: none; } }\n @media (forced-colors: active) { :host { border-block-start: 1px solid CanvasText; } .log .dot { border: 1px solid CanvasText; } }\n `,\n ];\n\n private heading(text: string): TemplateResult {\n const level = Math.min(Math.max(this.headingLevel || 2, 2), 4);\n return level === 3 ? html`<h3 class=\"h\">${text}</h3>` : level === 4 ? html`<h4 class=\"h\">${text}</h4>` : html`<h2 class=\"h\">${text}</h2>`;\n }\n\n render(): TemplateResult {\n const log = this.log ?? [];\n return html`<div part=\"footer\">\n <div class=\"top\">\n <div>\n ${this.brand ? html`<p class=\"brand\" part=\"brand\">${this.brand}</p>` : nothing}\n ${log.length ? html`<ul class=\"log\" part=\"log\">${log.map((line, i) => html`<li style=${`--tone:${toneOf(line.tone ?? (i === 0 ? 'success' : 'accent'), i)}`}><span class=\"dot\" aria-hidden=\"true\"></span><span>${line.meta ? html`<span class=\"code\">${line.meta}</span>` : nothing}${line.text}</span></li>`)}</ul>` : nothing}\n </div>\n <div class=\"row\">\n <div class=\"columns\" part=\"columns\" style=${`--count:${Math.max(1, (this.columns ?? []).length)}`}>\n ${(this.columns ?? []).map((column) => html`<div>${this.heading(column.heading)}<ul>${(column.links ?? []).map((link) => html`<li><a href=${link.href}>${link.label}</a></li>`)}</ul></div>`)}\n </div>\n ${this.actionText ? html`<impakt-button variant=\"outline\" icon-after=\"arrow-right\" href=${this.actionHref || nothing} part=\"action\">${this.actionText}</impakt-button>` : nothing}\n </div>\n </div>\n ${\n this.tagline\n ? html`<div class=\"foot\">${this.legal ? html`<p class=\"legal\" part=\"legal\">${this.legal}</p>` : html`<span></span>`}<p class=\"tagline\" part=\"tagline\">${this.tagline}</p></div>`\n : this.legal\n ? html`<p class=\"legal\" part=\"legal\">${this.legal}</p>`\n : nothing\n }\n ${this.stripe ? html`<div class=\"stripe\" aria-hidden=\"true\">${STRIPE.map((i) => html`<span style=${`background:${toneOf(undefined, i)}`}></span>`)}</div>` : nothing}\n </div>`;\n }\n}\n\ncustomElements.define('impakt-site-header', ImpaktSiteHeader);\ncustomElements.define('impakt-wordmark', ImpaktWordmark);\ncustomElements.define('impakt-site-footer', ImpaktSiteFooter);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-site-header': ImpaktSiteHeader;\n 'impakt-wordmark': ImpaktWordmark;\n 'impakt-site-footer': ImpaktSiteFooter;\n }\n}\n", "import { html, css, nothing, type TemplateResult, type PropertyValues } from 'lit';\nimport { say, ImpaktElement, fontSize, fontWeight, space, t, token } from '@atomic-ui/ui';\n\nexport type SceneDrive = 'view' | 'page' | 'loop' | 'scrubber';\nexport type SceneLayout = 'stage' | 'split';\n\nconst clamp = (n: number) => Math.min(1, Math.max(0, n));\n\n/**\n * A scene: a stage whose children move along a progress from 0 to 1.\n *\n * The children declare timelines in their `motion` block, and `@atomic-ui/motion`\n * compiles them to keyframes. This element owns only the progress, and where it\n * comes from is the `drive` (ADR 0027):\n *\n * - `view` \u2014 the scene's own passage through the viewport. The stage pins\n * while the scene scrolls past, for `length` screens, or beside the content\n * in the default slot when `layout` is `split`.\n * - `page` \u2014 the scroll position of the whole page.\n * - `loop` \u2014 time, over `duration` seconds, repeating. **It always shows a\n * pause button**, because anything that moves on its own for more than five\n * seconds must be pausable (WCAG 2.2.2), and a scene that could forget that\n * is one the gate would have to catch on every page.\n * - `scrubber` \u2014 an `impakt-scrubber` placed in the `controls` slot.\n *\n * Progress is published three ways: the `progress` property, the\n * `--impakt-scene-progress` custom property on the host, and an\n * `impakt-scene-progress` event. Engines with scroll-driven animations run `view`\n * and `page` scenes natively, and the runtime ignores the event for them.\n *\n * Under reduced motion a `loop` does not start, and nothing pins: the stage\n * and the content stack, so every state of the scene can be read in order.\n *\n * @category layout\n * @icon layers\n * @slot stage - What moves, layered one over another. Pinned while the scene plays,\n * beside the content in `split` layout, after it, so the words are read first.\n * @slot - Content that scrolls past the stage, such as chapters.\n * @slot controls - An `impakt-scrubber`, for a scene driven by one.\n * @fires {CustomEvent<{ progress: number }>} impakt-scene-progress - `{ progress }` whenever the progress changes.\n */\nexport class ImpaktScene extends ImpaktElement {\n static properties = {\n drive: { type: String, reflect: true },\n layout: { type: String, reflect: true },\n length: { type: Number },\n duration: { type: Number },\n label: { type: String },\n progress: { type: Number },\n controls: { type: String, reflect: true },\n bleed: { type: Boolean, reflect: true },\n hideOn: { type: String, reflect: true, attribute: 'hide-on' },\n };\n\n /** Where the progress comes from. */\n declare drive: 'view' | 'page' | 'loop' | 'scrubber';\n /** `stage` pins one full-width stage; `split` pins it beside the content. */\n declare layout: 'stage' | 'split';\n /** How many screens of scrolling a `view` scene lasts, in `stage` layout. */\n declare length: number;\n /** Seconds per cycle of a `loop` scene. */\n declare duration: number;\n /** The scene's accessible name. Also names its pause button. */\n declare label: string;\n /** From 0 to 1. Set it to seek a `scrubber` scene, or where one starts. */\n declare progress: number;\n /**\n * Where the controls sit: `below` the stage, or `over` its foot, floating\n * on what it shows, as a video's do. Under reduced motion they sit below.\n */\n declare controls: 'below' | 'over';\n /** Run the stage to the window's edges, past the page's margins, as a hero drawn edge to edge does. */\n declare bleed: boolean;\n /**\n * Leave it out on a phone, or on anything wider, for a picture drawn twice:\n * once for a wide screen and once for a narrow one. Never both.\n */\n declare hideOn: 'never' | 'phone' | 'wide';\n /**\n * Whether a loop is paused: the scene's own state, set by its pause button\n * or by `pause()`. A plain field rather than a property, so it is never one\n * of the settings an author is offered.\n */\n private paused = false;\n\n private frame = 0;\n private started = 0;\n private reduced = false;\n private seekFrom = 0;\n private seekTo = 0;\n private seekStart = 0;\n private seekMs = 0;\n\n constructor() {\n super();\n this.drive = 'view';\n this.layout = 'stage';\n this.length = 3;\n this.duration = 8;\n this.label = 'Animation';\n this.progress = 0;\n this.controls = 'below';\n this.bleed = false;\n this.hideOn = 'never';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host {\n display: block;\n position: relative;\n }\n :host([drive='view'][layout='stage']) {\n min-height: calc(var(--impakt-scene-length, 3) * 100svh);\n }\n .frame {\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n }\n :host([layout='split']) .frame {\n grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);\n gap: ${space(8)};\n }\n .stage {\n position: sticky;\n top: 0;\n height: 100svh;\n display: grid;\n place-items: center;\n overflow: clip;\n }\n /* What is on the stage is layered, as in a motion tool: each thing sits\n over the one before, so a later layer's timeline can reveal it over an\n earlier one. */\n .stage ::slotted(*) {\n grid-area: 1 / 1;\n max-width: 100%;\n }\n :host([drive='loop']) .stage,\n :host([drive='scrubber']) .stage {\n position: relative;\n height: auto;\n min-height: 60svh;\n }\n .controls {\n display: flex;\n gap: ${space(3)};\n align-items: center;\n justify-content: center;\n padding-block: ${space(3)};\n }\n :host([bleed]) { margin-inline: calc(50% - 50vw); }\n @media (max-width: 40rem) { :host([hide-on='phone']) { display: none; } }\n @media (min-width: 40.0625rem) { :host([hide-on='wide']) { display: none; } }\n /* Over the stage, the controls float at its foot, above the layers and clear of its edges. */\n .stage > .controls { position: absolute; inset-inline: ${space(6)}; inset-block-end: ${space(6)}; z-index: 2; padding: 0; }\n .stage > .controls ::slotted(*) { box-shadow: 0 12px 32px rgb(16 19 23 / 14%); border-radius: 16px; background: var(--impakt-color-surface-card, #fff); }\n /* A control takes the row, so a graph scrubber spans the stage; a narrower one centres itself. */\n .controls ::slotted(*) { flex: 1 1 auto; min-width: 0; }\n .pause {\n min-width: ${token('target.min', '24px')};\n min-height: ${token('target.min', '24px')};\n padding: ${space(2)} ${space(4)};\n border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999));\n border: 1px solid ${t.border};\n background: ${t.surfaceCard};\n color: ${t.text};\n font-size: ${fontSize('sm')};\n font-weight: ${fontWeight('medium')};\n cursor: pointer;\n }\n .pause:focus-visible {\n outline: none;\n box-shadow: ${token('focus.ring.shadow', '0 0 0 2px #fff, 0 0 0 4px #1a1a1a')};\n }\n @media (max-width: 48rem) {\n :host([layout='split']) .frame {\n grid-template-columns: minmax(0, 1fr);\n }\n :host([layout='split']) .stage {\n height: 50svh;\n z-index: 1;\n }\n }\n @media (prefers-reduced-motion: reduce) {\n :host {\n min-height: 0 !important;\n }\n .stage {\n position: relative;\n height: auto;\n gap: ${space(6)};\n }\n /* With less motion the layers are shown one after another, so every\n state the scene would have moved through can still be seen. */\n .stage ::slotted(*) {\n grid-area: auto;\n }\n }\n `,\n ];\n\n /** @ignore */\n connectedCallback(): void {\n super.connectedCallback();\n try {\n this.reduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n } catch {\n this.reduced = false;\n }\n window.addEventListener('scroll', this.onScroll, { passive: true, capture: true });\n window.addEventListener('resize', this.onScroll);\n this.schedule();\n }\n\n /** @ignore */\n disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener('scroll', this.onScroll, { capture: true });\n window.removeEventListener('resize', this.onScroll);\n if (this.frame) cancelAnimationFrame(this.frame);\n this.frame = 0;\n }\n\n /** @ignore */\n protected updated(changed: PropertyValues<this>): void {\n if (changed.has('length')) this.style.setProperty('--impakt-scene-length', String(this.length));\n if (changed.has('progress')) this.publish();\n if (changed.has('drive')) {\n this.started = 0;\n this.schedule();\n }\n }\n\n /**\n * Move to a progress. With `ms`, ease there; without, jump. A scrubber seeks\n * a scene to a named stop this way.\n */\n seek(to: number, ms = 0): void {\n if (ms <= 0 || this.reduced) {\n this.progress = clamp(to);\n return;\n }\n this.seekFrom = this.progress;\n this.seekTo = clamp(to);\n this.seekStart = 0;\n this.seekMs = ms;\n this.schedule();\n }\n\n private onScroll = () => {\n if (this.drive === 'view' || this.drive === 'page') this.schedule();\n };\n\n private schedule(): void {\n if (!this.frame && typeof requestAnimationFrame === 'function') this.frame = requestAnimationFrame(this.tick);\n }\n\n private tick = (now: number) => {\n this.frame = 0;\n if (this.seekMs) {\n if (!this.seekStart) this.seekStart = now;\n const p = Math.min(1, (now - this.seekStart) / this.seekMs);\n // ease-in-out, so a jump between stops reads as travel rather than a cut\n const e = p < 0.5 ? 4 * p * p * p : 1 - Math.pow(-2 * p + 2, 3) / 2;\n this.progress = this.seekFrom + (this.seekTo - this.seekFrom) * e;\n if (p < 1) this.schedule();\n else this.seekMs = 0;\n return;\n }\n if (this.drive === 'view') {\n const r = this.getBoundingClientRect();\n const vh = window.innerHeight || 1;\n this.progress = clamp(-r.top / Math.max(1, r.height - vh));\n } else if (this.drive === 'page') {\n const doc = document.documentElement;\n this.progress = clamp(window.scrollY / Math.max(1, doc.scrollHeight - (window.innerHeight || 0)));\n } else if (this.drive === 'loop' && !this.paused && !this.reduced) {\n if (!this.started) this.started = now - this.progress * this.duration * 1000;\n this.progress = ((now - this.started) / (this.duration * 1000)) % 1;\n this.schedule();\n }\n };\n\n private publish(): void {\n this.style.setProperty('--impakt-scene-progress', this.progress.toFixed(4));\n this.dispatchEvent(new CustomEvent('impakt-scene-progress', { detail: { progress: this.progress }, bubbles: true, composed: true }));\n }\n\n private setPaused(paused: boolean): void {\n if (this.paused === paused) return;\n this.paused = paused;\n this.started = 0;\n this.schedule();\n this.requestUpdate();\n }\n\n private togglePause = () => this.setPaused(!this.paused);\n\n /** Stop a loop where it is, as its pause button does. An editor scrubbing the scene calls it. */\n pause(): void {\n this.setPaused(true);\n }\n\n render(): TemplateResult {\n const loop = this.drive === 'loop';\n const over = this.controls === 'over' && !this.reduced;\n const controls = html`<div class=\"controls\" part=\"controls\">\n <slot name=\"controls\"></slot>\n ${\n loop && !this.reduced\n ? html`<button class=\"pause\" type=\"button\" aria-pressed=${this.paused ? 'true' : 'false'} @click=${this.togglePause}>\n ${this.paused ? say('Play {name}', { name: this.label }) : say('Pause {name}', { name: this.label })}\n </button>`\n : nothing\n }\n </div>`;\n const stage = html`<div class=\"stage\" part=\"stage\"><slot name=\"stage\"></slot>${over ? controls : nothing}</div>`;\n return html`\n <div class=\"frame\" part=\"frame\" role=\"region\" aria-label=${this.label}>\n ${\n this.layout === 'split'\n ? html`<div class=\"content\" part=\"content\"><slot></slot></div>${stage}`\n : html`${stage}<div class=\"content\" part=\"content\"><slot></slot></div>`\n }\n </div>\n ${over ? nothing : controls}\n `;\n }\n}\n\ncustomElements.define('impakt-scene', ImpaktScene);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-scene': ImpaktScene;\n }\n}\n", "import { html, css, type TemplateResult } from 'lit';\nimport { say, ImpaktElement, visuallyHidden, fontSize, fontWeight, space, t, token } from '@atomic-ui/ui';\nimport type { ImpaktScene } from './scene';\n\nexport interface ScrubberStop {\n /** Where the stop sits on the scene's progress, from 0 to 1. */\n at: number;\n label: string;\n /** A short code beside it in the graph look, such as a commit hash. */\n meta?: string;\n /** A line under the code in the graph look, such as a commit message. */\n note?: string;\n /**\n * The colour of the line up to this stop, in the graph look: a named tone,\n * or 1 to 5 for the brand's chart colours, as a project's phases are drawn.\n */\n tone?: 'brand' | 'accent' | 'info' | 'success' | 'warning' | 'danger' | 1 | 2 | 3 | 4 | 5;\n}\n\nconst TONES = {\n brand: 'var(--impakt-color-brand-default, #1f4ed8)',\n accent: 'var(--impakt-color-accent-default, #c8a15a)',\n info: 'var(--impakt-color-status-info-default, #1f4ed8)',\n success: 'var(--impakt-color-status-success-default, #047857)',\n warning: 'var(--impakt-color-status-warning-default, #b45309)',\n danger: 'var(--impakt-color-status-danger-default, #c8102e)',\n} as const;\n\n/**\n * Drives the scene it sits in, by hand.\n *\n * Place it in an `impakt-scene`'s `controls` slot and set that scene's `drive`\n * to `scrubber`. Dragging moves through the scene; a named stop seeks to it\n * with an eased move rather than a cut, which is what makes the Commit-style\n * \"time travel\" read as travel.\n *\n * **It is a native range input.** A slider built from divs has to recreate\n * arrow keys, Page Up and Down, Home and End, the value announcement and touch\n * handling, and every one of those is a place to get it wrong. The input\n * already does all of it. The stops are buttons beside it, so a keyboard or\n * switch user reaches each named moment in one action instead of nudging a\n * thumb to find it (2.5.7, dragging movements).\n *\n * @category action\n * @icon adjustments-horizontal\n */\nexport class ImpaktScrubber extends ImpaktElement {\n static properties = {\n label: { type: String },\n stops: { type: Array },\n look: { type: String, reflect: true },\n hint: { type: String },\n value: { type: Number, state: true },\n };\n\n /** The slider's accessible name. */\n declare label: string;\n declare stops: ScrubberStop[];\n /**\n * `buttons` lists the stops as buttons under the slider. `graph` draws them\n * as commits on a line that fills in each stop's colour as it is dragged,\n * with the current one's code and note beside it.\n */\n declare look: 'buttons' | 'graph';\n /** A word of help in the graph look, such as \"drag to time-travel\". */\n declare hint: string;\n declare value: number;\n\n private scene: ImpaktScene | null = null;\n\n constructor() {\n super();\n this.label = 'Scene progress';\n this.stops = [];\n this.look = 'buttons';\n this.hint = '';\n this.value = 0;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host {\n display: block;\n width: 100%;\n max-width: 48rem;\n margin-inline: auto;\n }\n .wrap {\n display: grid;\n gap: ${space(2)};\n padding: ${space(3)} ${space(4)};\n border-radius: ${token('radius.xl', '16px')};\n background: ${t.surfaceCard};\n box-shadow: ${token('shadow.lg', '0 10px 15px -3px rgba(0,0,0,.1)')};\n border: 1px solid ${t.border};\n }\n input {\n width: 100%;\n min-height: ${token('target.min', '24px')};\n accent-color: ${t.brand};\n margin: 0;\n }\n .stops {\n position: relative;\n display: flex;\n flex-wrap: wrap;\n gap: ${space(2)};\n list-style: none;\n margin: 0;\n padding: 0;\n }\n button {\n min-height: ${token('target.min', '24px')};\n padding: ${space(1)} ${space(3)};\n border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999));\n border: 1px solid ${t.border};\n background: transparent;\n color: ${t.textMuted};\n font-size: ${fontSize('xs')};\n font-weight: ${fontWeight('medium')};\n cursor: pointer;\n }\n button[aria-current='true'] {\n color: ${t.text};\n border-color: ${t.text};\n }\n .sr-only {\n ${visuallyHidden}\n }\n /* The graph look: the code of where you are, the line of stops, where you are. */\n :host([look='graph']) { max-width: none; }\n .graph { display: grid; grid-template-columns: minmax(8rem, auto) minmax(0, 1fr) auto; gap: ${space(6)}; align-items: center; padding: ${space(4)} ${space(6)}; border-radius: ${token('radius.xl', '16px')}; background: ${t.surfaceCard}; box-shadow: ${token('shadow.lg', '0 10px 15px -3px rgba(0,0,0,.1)')}; border: 1px solid ${t.border}; }\n .mono { font-family: ${t.fontMono}; font-size: ${fontSize('xs')}; letter-spacing: 0.04em; }\n .head { display: grid; gap: 2px; }\n .head .k { color: ${t.textMuted}; text-transform: uppercase; }\n .head .code { font-size: ${fontSize('md')}; color: ${t.text}; }\n .head .note { color: ${t.textMuted}; }\n .line { position: relative; block-size: 48px; }\n .track, .fill { position: absolute; inset-inline: 0; inset-block-start: 14px; block-size: 3px; border-radius: 3px; background: ${t.border}; opacity: 0.5; }\n .fill { opacity: 1; background: none; display: flex; overflow: hidden; }\n .fill span { block-size: 100%; }\n .dot { position: absolute; inset-block-start: 15px; inline-size: 14px; block-size: 14px; translate: -50% -50%; border-radius: 50%; border: 2px solid var(--c); background: ${t.surfaceCard}; padding: 0; min-height: 0; cursor: pointer; }\n .dot[data-passed] { background: var(--c); }\n .dot[aria-current='true'] { inline-size: 24px; block-size: 24px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); }\n .dot-label { position: absolute; inset-block-start: 30px; translate: -50% 0; white-space: nowrap; color: ${t.textMuted}; text-transform: uppercase; pointer-events: none; }\n .dot-label[data-current] { color: ${t.text}; font-weight: ${fontWeight('bold')}; }\n .line input { position: absolute; inset: 0 0 auto; block-size: 30px; opacity: 0; cursor: grab; }\n .line input:focus-visible { opacity: 1; }\n .where { display: grid; gap: ${space(2)}; justify-items: end; }\n .chip { display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(1)} ${space(3)}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); border: 1px solid ${t.border}; color: ${t.text}; text-transform: uppercase; }\n .chip::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--c); }\n .hint { color: ${t.textMuted}; text-transform: uppercase; }\n /* Muted by colour, not opacity, so the code keeps its contrast (1.4.3). */\n .chip .meta { color: ${t.textMuted}; }\n @media (max-width: 48rem) {\n .graph { grid-template-columns: minmax(0, 1fr); }\n .where { justify-items: start; }\n .dot-label:not([data-current]) { display: none; }\n }\n button:focus-visible,\n input:focus-visible {\n outline: none;\n box-shadow: ${token('focus.ring.shadow', '0 0 0 2px #fff, 0 0 0 4px #1a1a1a')};\n }\n `,\n ];\n\n /** @ignore */\n connectedCallback(): void {\n super.connectedCallback();\n this.scene = this.closest('impakt-scene');\n this.scene?.addEventListener('impakt-scene-progress', this.onProgress);\n if (this.scene) this.value = this.scene.progress;\n }\n\n /** @ignore */\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.scene?.removeEventListener('impakt-scene-progress', this.onProgress);\n this.scene = null;\n }\n\n private onProgress = (e: Event) => {\n this.value = (e as CustomEvent<{ progress: number }>).detail.progress;\n };\n\n private onInput = (e: Event) => {\n const v = Number((e.target as HTMLInputElement).value) / 1000;\n this.value = v;\n this.scene?.seek(v);\n };\n\n private goTo(stop: ScrubberStop) {\n this.scene?.seek(stop.at, 600);\n }\n\n /** The stop nearest the current position, which the stop list marks as current. */\n private nearest(): number {\n let best = -1;\n let gap = Infinity;\n this.stops.forEach((s, i) => {\n const d = Math.abs(s.at - this.value);\n if (d < gap) {\n gap = d;\n best = i;\n }\n });\n return best;\n }\n\n private renderGraph(nearestIndex: number, valueText: string): TemplateResult {\n let current = nearestIndex;\n const stops = [...(this.stops ?? [])].sort((a, b) => a.at - b.at);\n // Where you are, among the stops in the order they are drawn.\n current = stops.indexOf(this.stops[current]!);\n const colour = (s: ScrubberStop | undefined) => {\n const tone = s?.tone ?? 'brand';\n return typeof tone === 'number' ? `var(--impakt-color-chart-${tone}, ${TONES.brand})` : (TONES[tone] ?? TONES.brand);\n };\n const now = stops[current] ?? stops[0];\n // The line fills in each stop's colour, from the stop before it to it, as far as the playhead.\n const segments = stops.map((s, i) => {\n const from = i === 0 ? 0 : stops[i - 1]!.at;\n const to = Math.min(s.at, this.value);\n return { width: Math.round(Math.max(0, to - from) * 10000) / 100, c: colour(s) };\n });\n return html`<div class=\"graph\" part=\"wrap\">\n <div class=\"head mono\" aria-hidden=\"true\">\n <span class=\"k\">HEAD</span>\n <span class=\"code\">${now?.meta ?? now?.label ?? ''}</span>\n ${now?.note ? html`<span class=\"note\">${now.note}</span>` : null}\n </div>\n <div class=\"line\">\n <div class=\"track\"></div>\n <div class=\"fill\" aria-hidden=\"true\">${segments.map((g) => html`<span style=${`width:${g.width}%;background:${g.c}`}></span>`)}</div>\n ${stops.map(\n (s, i) => html`\n <button type=\"button\" class=\"dot\" style=${`left:${s.at * 100}%;--c:${colour(s)}`} ?data-passed=${s.at <= this.value + 0.0001} aria-current=${i === current ? 'true' : 'false'} @click=${() => this.goTo(s)}>\n <span class=\"sr-only\">${say('Go to {name}', { name: s.label })}</span>\n </button>\n <span class=\"dot-label mono\" style=${`left:${s.at * 100}%`} ?data-current=${i === current} aria-hidden=\"true\">${s.label}</span>`,\n )}\n <input type=\"range\" min=\"0\" max=\"1000\" step=\"1\" .value=${String(Math.round(this.value * 1000))} aria-label=${this.label} aria-valuetext=${valueText} @input=${this.onInput} />\n </div>\n <div class=\"where\" aria-hidden=\"true\">\n ${now ? html`<span class=\"chip mono\" style=${`--c:${colour(now)}`}>${now.label}${now.meta ? html` <span class=\"meta\">${now.meta}</span>` : null}</span>` : null}\n ${this.hint ? html`<span class=\"hint mono\">${this.hint}</span>` : null}\n </div>\n </div>`;\n }\n\n render(): TemplateResult {\n const current = this.nearest();\n const valueText = current >= 0 ? this.stops[current].label : `${Math.round(this.value * 100)}%`;\n if (this.look === 'graph') return this.renderGraph(current, valueText);\n return html`\n <div class=\"wrap\" part=\"wrap\">\n <input\n type=\"range\"\n min=\"0\"\n max=\"1000\"\n step=\"1\"\n .value=${String(Math.round(this.value * 1000))}\n aria-label=${this.label}\n aria-valuetext=${valueText}\n @input=${this.onInput}\n />\n ${\n this.stops.length\n ? html`<ul class=\"stops\" part=\"stops\">\n ${this.stops.map(\n (s, i) => html`<li>\n <button type=\"button\" aria-current=${i === current ? 'true' : 'false'} @click=${() => this.goTo(s)}>\n <span aria-hidden=\"true\">${s.label}</span><span class=\"sr-only\">${say('Go to {name}', { name: s.label })}</span>\n </button>\n </li>`,\n )}\n </ul>`\n : null\n }\n </div>\n `;\n }\n}\n\ncustomElements.define('impakt-scrubber', ImpaktScrubber);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-scrubber': ImpaktScrubber;\n }\n}\n", "/**\n * Blocks that tell how software was made, in the language software is made\n * in: a release with what it added and removed, services as branches that\n * merge into one product, checks that passed, and a project drawn as a commit\n * graph. They came from building the Impakt site's Commit design in Strata, and\n * they are written for any studio, agency or product team that wants to show\n * its work this way.\n *\n * Every colour is a brand token. A lane's colour is a tone (brand, accent or\n * a status colour), never a hex value, so a partner's brand restyles them.\n */\nimport { css, html, nothing, svg, type TemplateResult } from 'lit';\nimport {\n say,\n ImpaktElement,\n focusRing,\n visuallyHidden,\n fontSize,\n fontWeight,\n space,\n spaceAround,\n t,\n token,\n type,\n iconSvg,\n toneOf,\n TONE,\n type Tone,\n} from '@atomic-ui/ui';\nimport './property';\n\n// The tones (`Tone`, `TONE`, `toneOf`) are shared with `impakt-chip`, so they live in @atomic-ui/ui.\n\n/**\n * Marks an element `shown` once a quarter of it is on screen, so it can draw\n * itself in (the Commit motion spec's branch draw, graph draw and checks run).\n * Where nothing can watch, it is shown at once; what draws in is decided by\n * CSS under `prefers-reduced-motion: no-preference`, so reduced motion never waits.\n */\nfunction revealOnView(el: HTMLElement, onShow?: () => void): () => void {\n const show = () => {\n el.setAttribute('shown', '');\n onShow?.();\n };\n if (typeof IntersectionObserver !== 'function') {\n show();\n return () => undefined;\n }\n const io = new IntersectionObserver(\n (entries) => {\n if (entries.some((e) => e.isIntersecting)) {\n show();\n io.disconnect();\n }\n },\n { threshold: 0.25 },\n );\n io.observe(el);\n return () => io.disconnect();\n}\nconst reduced = () => typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;\n\n/** Code-like labels: a branch name, a version, a hash. The brand has no code face, so the system's is used. */\nconst mono = css`.mono { font-family: ${t.fontMono}; font-size: ${fontSize('xs')}; letter-spacing: 0.04em; }`;\n\nconst heading = (level: number, text: string | TemplateResult, cls: string): TemplateResult => {\n const l = Math.min(Math.max(level || 3, 2), 6);\n switch (l) {\n case 2:\n return html`<h2 class=${cls}>${text}</h2>`;\n case 4:\n return html`<h4 class=${cls}>${text}</h4>`;\n case 5:\n return html`<h5 class=${cls}>${text}</h5>`;\n case 6:\n return html`<h6 class=${cls}>${text}</h6>`;\n default:\n return html`<h3 class=${cls}>${text}</h3>`;\n }\n};\n\nconst words = css`\n .h { margin: 0; color: var(--impakt-heading, ${t.textHeading}); font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; letter-spacing: ${t.trackingTight}; text-wrap: balance; }\n .body { margin: 0; color: inherit; opacity: 0.8; text-wrap: pretty; }\n .meta { margin: 0; color: inherit; opacity: 0.72; text-transform: uppercase; }\n .sr-only { ${visuallyHidden} }\n`;\n\n// \u2500\u2500 Release card \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** One line of what a release changed. */\nexport interface DiffLine {\n id?: string;\n /** Added, taken away, or kept as it was. */\n change: 'added' | 'removed' | 'same';\n text: string;\n}\n\n/**\n * A piece of work told as a release: what it looked like when it started and\n * what shipped, a version line, and a short diff of what it added and took\n * away.\n *\n * With both pictures it is a before-and-after comparison a visitor drags; with\n * one it is a picture. The diff is a list, each line saying \"Added\" or\n * \"Removed\" for a screen reader, since the + and \u2212 are only drawn.\n *\n * @category content\n * @icon git-commit\n */\nexport class ImpaktReleaseCard extends ImpaktElement {\n static properties = {\n label: { type: String },\n heading: { type: String },\n text: { type: String },\n beforeSrc: { type: String, attribute: 'before-src' },\n beforeAlt: { type: String, attribute: 'before-alt' },\n afterSrc: { type: String, attribute: 'after-src' },\n afterAlt: { type: String, attribute: 'after-alt' },\n items: { type: Array },\n href: { type: String },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A line above the heading, such as \"v1.0 \u00B7 Legal tech \u00B7 Property\". */\n declare label: string;\n declare heading: string;\n declare text: string;\n /** What it started as: a sketch or a wireframe. */\n declare beforeSrc: string;\n declare beforeAlt: string;\n /** What shipped. */\n declare afterSrc: string;\n declare afterAlt: string;\n /** What the release added, took away or kept. */\n declare items: DiffLine[];\n /** Where the heading links to, such as the case study. */\n declare href: string;\n declare headingLevel: 2 | 3 | 4;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.label = '';\n this.heading = '';\n this.text = '';\n this.beforeSrc = '';\n this.beforeAlt = '';\n this.afterSrc = '';\n this.afterAlt = '';\n this.items = [];\n this.href = '';\n this.headingLevel = 3;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n mono,\n words,\n css`\n :host { display: block; }\n article { display: flex; flex-direction: column; gap: ${space(3)}; }\n .media { border-radius: ${t.radiusXl}; overflow: clip; background: ${t.surfaceInset}; }\n .media img { display: block; inline-size: 100%; aspect-ratio: 5 / 3; object-fit: cover; }\n impakt-before-after { display: block; }\n .h { font-size: ${fontSize('3xl')}; }\n .h a { color: inherit; text-decoration: none; }\n .h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }\n .h a:focus-visible { outline: none; box-shadow: ${t.focusShadow}; border-radius: ${t.radiusSm}; }\n ul { list-style: none; margin: ${space(1)} 0 0; padding: 0; display: grid; gap: ${space(1)}; }\n li { display: grid; grid-template-columns: 1.25em minmax(0, 1fr); gap: ${space(2)}; padding: ${space(1)} ${space(3)}; border-radius: ${t.radius}; }\n li[data-change='added'] { background: ${t.successSubtle}; color: ${t.successText}; }\n li[data-change='removed'] { background: ${t.dangerSubtle}; color: ${t.dangerText}; }\n li[data-change='same'] { color: ${t.textMuted}; }\n .sign { font-weight: ${fontWeight('bold')}; }\n `,\n ];\n\n private raf = 0;\n\n /** Sweep the seam, as Commit's release wipe does: off the screenshot on hover, back on leaving. */\n private wipe(to: number): void {\n const ba = this.renderRoot.querySelector('impakt-before-after') as (HTMLElement & { position: number }) | null;\n if (!ba) return;\n cancelAnimationFrame(this.raf);\n if (reduced()) {\n ba.position = to;\n return;\n }\n const from = ba.position ?? SEAM;\n const start = performance.now();\n // cubic-bezier(.65, 0, .35, 1), near enough: an ease-in-out.\n const ease = (k: number) => (k < 0.5 ? 4 * k * k * k : 1 - Math.pow(-2 * k + 2, 3) / 2);\n const step = (now: number) => {\n const k = Math.min(1, (now - start) / 450);\n ba.position = from + (to - from) * ease(k);\n if (k < 1) this.raf = requestAnimationFrame(step);\n };\n this.raf = requestAnimationFrame(step);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n cancelAnimationFrame(this.raf);\n }\n\n render(): TemplateResult {\n const both = this.beforeSrc && this.afterSrc;\n const title = this.href ? html`<a href=${this.href}>${this.heading}</a>` : this.heading;\n const SIGN = { added: '+', removed: '\u2212', same: ' ' } as const;\n const SAID = { added: say('Added'), removed: say('Removed'), same: say('Kept') } as const;\n return html`<article part=\"card\">\n ${\n both\n ? html`<div class=\"media\" @pointerenter=${(e: PointerEvent) => e.pointerType === 'mouse' && this.wipe(0)} @pointerleave=${(e: PointerEvent) => e.pointerType === 'mouse' && this.wipe(SEAM)}><impakt-before-after .position=${SEAM} .beforeSrc=${this.beforeSrc} .beforeAlt=${this.beforeAlt} .afterSrc=${this.afterSrc} .afterAlt=${this.afterAlt} .beforeLabel=${say('Before')} .afterLabel=${say('Shipped')} .label=${say('Compare {name} before and after', { name: this.heading })}></impakt-before-after></div>`\n : this.afterSrc || this.beforeSrc\n ? html`<div class=\"media\"><img src=${this.afterSrc || this.beforeSrc} alt=${this.afterSrc ? this.afterAlt : this.beforeAlt} loading=\"lazy\" /></div>`\n : nothing\n }\n ${this.label ? html`<p class=\"meta mono\">${this.label}</p>` : nothing}\n ${this.heading ? headingWith(this.headingLevel, title) : nothing}\n ${this.text ? html`<p class=\"body\">${this.text}</p>` : nothing}\n ${(this.items ?? []).length ? html`<ul class=\"mono\" part=\"diff\">${this.items.map((line) => html`<li data-change=${line.change}><span class=\"sign\" aria-hidden=\"true\">${SIGN[line.change] ?? ' '}</span><span><span class=\"sr-only\">${SAID[line.change] ?? ''}: </span>${line.text}</span></li>`)}</ul>` : nothing}\n </article>`;\n }\n}\n\n// \u2500\u2500 Release list \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/**\n * One release in a list: a release card's props. `title` is read when there is\n * no `heading`, because that is what a collection's entry carries (ADR 0028).\n */\nexport interface ReleaseItem {\n label?: string;\n heading?: string;\n title?: string;\n text?: string;\n beforeSrc?: string;\n beforeAlt?: string;\n afterSrc?: string;\n afterAlt?: string;\n items?: DiffLine[];\n href?: string;\n}\n\n/**\n * Releases side by side, two to a row: a changelog of case studies.\n *\n * Bind `items` to a collection's entries and the list follows them: a new case\n * study appears here when it is published. The release for the page being\n * read is left out, so a case study's \"more work\" does not offer itself.\n *\n * @category content\n * @icon git-commit\n */\nexport class ImpaktReleaseList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n columns: { type: String, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: ReleaseItem[];\n /** Releases in a row on a wide screen. One on a phone. */\n declare columns: 'one' | 'two' | 'three';\n declare headingLevel: 2 | 3 | 4;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.columns = 'two';\n this.headingLevel = 3;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(12)} ${space(10)}; }\n :host([columns='one']) ul { grid-template-columns: minmax(0, 1fr); }\n :host([columns='three']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }\n @container (max-width: 44rem) { ul, :host([columns='three']) ul { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n render(): TemplateResult {\n const here = typeof location === 'undefined' ? '' : location.pathname.replace(/\\/$/, '');\n const shown = (this.items ?? []).filter((item) => !item.href || item.href.replace(/\\/$/, '') !== here);\n return html`<ul part=\"list\">${shown.map((item) => {\n const heading = item.heading ?? item.title ?? '';\n return html`<li><impakt-release-card\n .label=${item.label ?? ''} .heading=${heading} .text=${item.text ?? ''} .href=${item.href ?? ''}\n .beforeSrc=${item.beforeSrc ?? ''} .beforeAlt=${item.beforeAlt || say('{name} as a wireframe', { name: heading })}\n .afterSrc=${item.afterSrc ?? ''} .afterAlt=${item.afterAlt || say('{name} as it shipped', { name: heading })}\n .items=${item.items ?? []} .headingLevel=${this.headingLevel}></impakt-release-card></li>`;\n })}</ul>`;\n }\n}\n\n/** Where the seam rests: the wireframe covers the left of the screenshot until it is pointed at. */\nconst SEAM = 42;\n\n/** A heading holding a template, such as a link. */\nfunction headingWith(level: number, content: TemplateResult | string): TemplateResult {\n const l = Math.min(Math.max(level || 3, 2), 6);\n if (l === 2) return html`<h2 class=\"h\">${content}</h2>`;\n if (l === 4) return html`<h4 class=\"h\">${content}</h4>`;\n if (l === 5) return html`<h5 class=\"h\">${content}</h5>`;\n if (l === 6) return html`<h6 class=\"h\">${content}</h6>`;\n return html`<h3 class=\"h\">${content}</h3>`;\n}\n\n// \u2500\u2500 Branch list \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** One branch: a service, a team, a line of work. */\nexport interface Branch {\n id?: string;\n /** A short code-like name, such as \"feature/mobile-apps\". */\n path?: string;\n heading: string;\n text?: string;\n /** A few words below the text, such as the tools it uses. */\n tags?: string[];\n tone?: Tone;\n /** Where the heading links to, such as the service's own page. */\n href?: string;\n}\n\n/**\n * Several lines of work that come together into one: each item branches off a\n * main line on the left and merges back into it, and the line ends in what\n * they make together.\n *\n * The lines are drawn; the items are a list with headings, so a screen reader\n * reads the work, not the drawing.\n *\n * `look=\"mono\"` draws it in thin ink lines with no chart colours: hollow\n * rings for the branches, one filled with the accent for the `current` item,\n * a hairline under each row, the paths in monospace capitals, and the main\n * line ending in a small ink dot beside the `trunk` words. The tags are left\n * out on a phone in that look. Which item is current is also said in words to\n * a screen reader, so it never rests on the colour alone (1.4.1).\n *\n * @category content\n * @icon git-merge\n */\nexport class ImpaktBranchList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n trunk: { type: String },\n look: { type: String, reflect: true },\n current: { type: Number },\n currentText: { type: String, attribute: 'current-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: Branch[];\n /** What the main line ends in, such as \"main \u2190 one team owns the result\". */\n declare trunk: string;\n /** `tones` draws each branch in a chart colour. `mono` draws thin ink lines with hollow rings, as the Noire site does. */\n declare look: 'tones' | 'mono';\n /** The index of the item to mark as current, from 0: its ring is filled with the accent. -1 for none. */\n declare current: number;\n /** What a screen reader hears after the current item's heading, such as \"current\". Set it with `current`, so the mark is not colour alone. */\n declare currentText: string;\n declare headingLevel: 2 | 3 | 4;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.trunk = '';\n this.look = 'tones';\n this.current = -1;\n this.currentText = '';\n this.headingLevel = 3;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n mono,\n words,\n css`\n :host { display: block; container-type: inline-size; --trunk: color-mix(in srgb, currentColor 70%, transparent); }\n ul { list-style: none; margin: 0; padding: 0; position: relative; }\n ul::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 11px; inline-size: 3px; border-radius: 3px; background: var(--trunk); }\n li { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); padding-block: ${space(6)}; }\n .graph { position: relative; }\n .graph svg { position: absolute; inset-block-start: -${space(6)}; inset-inline-start: 0; inline-size: 96px; block-size: calc(100% + ${space(12)}); overflow: visible; }\n .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${space(4)} ${space(10)}; align-items: start; }\n .path { margin: 0 0 ${space(2)}; opacity: 0.72; }\n .h { font-size: ${fontSize('3xl')}; line-height: 1.05; }\n .h a { color: inherit; text-decoration: none; }\n .h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }\n .h a:focus-visible { outline: none; box-shadow: ${t.focusShadow}; border-radius: ${t.radiusSm}; }\n .detail { display: flex; flex-direction: column; gap: ${space(3)}; padding-block-start: ${space(1)}; }\n .tags { margin: 0; opacity: 0.7; text-transform: uppercase; }\n .end { position: relative; display: flex; align-items: center; gap: ${space(3)}; padding-block-start: ${space(4)}; }\n .end::before { content: ''; inline-size: 16px; block-size: 16px; margin-inline-start: 5px; border-radius: 50%; background: currentColor; }\n @container (max-width: 44rem) {\n li { grid-template-columns: 56px minmax(0, 1fr); }\n .graph svg { inline-size: 56px; }\n .row { grid-template-columns: minmax(0, 1fr); }\n .h { font-size: ${fontSize('2xl')}; }\n }\n /* The mono look: thin ink lines, hollow rings, a hairline under each row and monospace capitals. */\n :host([look='mono']) { --trunk: currentColor; --gx: 60px; }\n :host([look='mono']) ul::before { inline-size: 1px; border-radius: 0; }\n :host([look='mono']) .graph svg path { stroke-width: 1.5; }\n :host([look='mono']) .ring { position: absolute; inset-inline-start: calc(var(--gx) - 5px); inset-block-start: calc(-1 * ${space(6)} + 0.43 * (100% + 2 * ${space(6)}) - 5px); inline-size: 10px; block-size: 10px; box-sizing: border-box; border-radius: 50%; border: 1px solid currentColor; background: ${t.surfaceCard}; }\n :host([look='mono']) .ring.current { background: ${token('color.accent.default', '#ffd43b')}; }\n :host([look='mono']) .text { padding-block-end: ${space(6)}; border-block-end: ${t.borderThin} solid ${t.rule}; }\n :host([look='mono']) li { padding-block-end: 0; }\n :host([look='mono']) .path { font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; opacity: 1; color: ${t.textMuted}; }\n :host([look='mono']) .h { font-size: clamp(1.5rem, 4cqi, 2rem); font-weight: ${fontWeight('semibold')}; letter-spacing: -0.03em; }\n :host([look='mono']) .tags { font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; opacity: 1; color: ${t.textMuted}; }\n :host([look='mono']) .body { color: ${t.textMuted}; opacity: 1; }\n :host([look='mono']) .end { font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n /* The trunk runs on into its end dot, which sits on the trunk; the words line up with the rows' words. */\n :host([look='mono']) .end::before { flex: none; inline-size: 8px; block-size: 8px; margin-inline: 7.5px calc(96px - 15.5px - ${space(3)}); }\n :host([look='mono']) .end::after { content: ''; position: absolute; inset-block-start: 0; inset-inline-start: 11px; inline-size: 1px; block-size: calc(${space(4)} + (100% - ${space(4)}) / 2); background: var(--trunk); }\n @container (max-width: 44rem) {\n /* Set on the list, since a container query cannot restyle the container itself. */\n :host([look='mono']) ul { --gx: 35px; }\n :host([look='mono']) .tags { display: none; }\n :host([look='mono']) .end::before { margin-inline-end: calc(56px - 15.5px - ${space(3)}); }\n }\n @media (forced-colors: active) { :host([look='mono']) .ring.current { background: Highlight; } }\n /* Branch draw: each branch opens down from the trunk, 120 ms after the one above, then its dot pops. */\n @media (prefers-reduced-motion: no-preference) {\n .graph svg { clip-path: inset(0 0 100% 0); transition: clip-path 700ms cubic-bezier(.25, 1, .5, 1) calc(var(--i, 0) * 120ms); }\n .graph circle, .ring { transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform 200ms ease-out calc(var(--i, 0) * 120ms + 500ms); }\n :host([shown]) .graph svg { clip-path: inset(0); }\n :host([shown]) .graph circle, :host([shown]) .ring { transform: scale(1); }\n }\n `,\n ];\n\n private unwatch: () => void = () => undefined;\n connectedCallback(): void {\n super.connectedCallback();\n this.unwatch = revealOnView(this);\n }\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.unwatch();\n }\n\n render(): TemplateResult {\n // Each branch leaves the trunk, swings out to its dot level with the\n // heading, and returns: drawn in a 96-wide box, scaled down on phones.\n // The mono look draws its rings in HTML, so they stay round however tall the row is.\n const mono = this.look === 'mono';\n const branch = (colour: string) => svg`<svg viewBox=\"0 0 96 200\" preserveAspectRatio=\"none\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M12 0 C12 40 60 30 60 70 L60 120 C60 160 12 160 12 200\" fill=\"none\" stroke=${colour} stroke-width=\"3\" vector-effect=\"non-scaling-stroke\" />\n ${mono ? nothing : svg`<circle cx=\"60\" cy=\"86\" r=\"8\" fill=${colour} />`}\n </svg>`;\n return html`<ul part=\"list\">${(this.items ?? []).map((item, i) => {\n const current = i === this.current;\n const words = html`${item.heading}${current && this.currentText ? html`<span class=\"sr-only\"> (${this.currentText})</span>` : nothing}`;\n return html`<li part=\"item\" style=${`--i:${i}`}>\n <div class=\"graph\">${branch(mono ? 'currentColor' : toneOf(item.tone, i))}${mono ? html`<span class=${current ? 'ring current' : 'ring'} aria-hidden=\"true\"></span>` : nothing}</div>\n <div class=\"text\">\n ${item.path ? html`<p class=\"path mono\">${item.path}</p>` : nothing}\n <div class=\"row\">\n ${heading(this.headingLevel, item.href ? html`<a href=${item.href}>${words}</a>` : words, 'h')}\n <div class=\"detail\">\n ${item.text ? html`<p class=\"body\">${item.text}</p>` : nothing}\n ${item.tags?.length ? html`<p class=\"tags mono\">${item.tags.join(' \u00B7 ')}</p>` : nothing}\n </div>\n </div>\n </div>\n </li>`;\n })}</ul>\n ${this.trunk ? html`<p class=\"end mono\" part=\"trunk\">${this.trunk}</p>` : nothing}`;\n }\n}\n\n// \u2500\u2500 Check list \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** One check that passed: a figure and what it measures. */\nexport interface CheckItem {\n id?: string;\n figure: string;\n label: string;\n /** A word at the end of the row, such as \"passed\". */\n status?: string;\n}\n\n/**\n * Proof as a list of passing checks: a large figure, what it measures, and its\n * status, each row ticked. It reads its colours from the band it sits on, so\n * it works on a dark section as well as a light one.\n *\n * @category content\n * @icon list-check\n */\nexport class ImpaktCheckList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n summary: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: CheckItem[];\n /** A line above the list, such as \"All 4 checks passed\". */\n declare summary: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.summary = '';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n mono,\n words,\n css`\n :host { display: block; container-type: inline-size; }\n .summary { display: inline-flex; align-items: center; gap: ${space(2)}; margin: 0 0 ${space(6)}; padding: ${space(1)} ${space(3)}; border-radius: ${t.radiusXl}; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); }\n .summary::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${t.success}; }\n /* The rows share one grid, so the figure column fits the widest figure and every row lines up. */\n ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 32px max-content minmax(0, 1fr) auto; column-gap: ${space(6)}; }\n li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; padding-block: ${space(5)}; border-block-end: 1px solid color-mix(in srgb, currentColor 18%, transparent); }\n /* Checks run: each tick pops in, 150 ms after the one above. */\n @media (prefers-reduced-motion: no-preference) {\n .tick { transform: scale(0); transition: transform 600ms cubic-bezier(.34, 1.56, .64, 1) calc(var(--i, 0) * 150ms); }\n :host([shown]) .tick { transform: scale(1); }\n }\n .sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n /* A passed check is a filled disc with a tick cut out of it, as a CI run shows one. */\n .tick { display: inline-flex; align-items: center; justify-content: center; inline-size: 26px; block-size: 26px; border-radius: 50%; background: ${t.success}; color: var(--impakt-color-status-success-on, #fff); }\n .figure { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; font-size: ${fontSize('5xl')}; line-height: 1; letter-spacing: ${t.trackingTight}; white-space: nowrap; }\n .label { margin: 0; ${type('xl')} }\n .status { margin: 0; opacity: 0.72; }\n @container (max-width: 40rem) {\n ul { grid-template-columns: 28px minmax(0, 1fr); }\n li { row-gap: ${space(1)}; }\n .label, .status { grid-column: 2; }\n .figure { font-size: ${fontSize('4xl')}; }\n }\n `,\n ];\n\n private unwatch: () => void = () => undefined;\n /** How far each figure has counted up, from 0 to 1, while the checks run. */\n private counted: number[] | null = null;\n connectedCallback(): void {\n super.connectedCallback();\n this.unwatch = revealOnView(this, () => this.run());\n }\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.unwatch();\n }\n\n /** Checks run: each figure counts up over 1200 ms, 150 ms after the one above. */\n private run(): void {\n if (reduced()) return;\n const items = this.items ?? [];\n const start = performance.now();\n const step = (now: number) => {\n this.counted = items.map((_, i) => Math.min(1, Math.max(0, (now - start - i * 150) / 1200)));\n this.requestUpdate();\n if (this.counted.some((k) => k < 1)) requestAnimationFrame(step);\n else this.counted = null;\n };\n requestAnimationFrame(step);\n }\n\n render(): TemplateResult {\n // While counting, the drawn figure is hidden from screen readers and the final one is read instead.\n const shownFigure = (figure: string, i: number) => {\n const k = this.counted?.[i];\n const m = /^(\\d+)(.*)$/.exec(figure);\n if (k === undefined || k >= 1 || !m) return html`${figure}`;\n const eased = 1 - Math.pow(1 - k, 3);\n return html`<span aria-hidden=\"true\">${Math.round(Number(m[1]) * eased)}${m[2]}</span><span class=\"sr-only\">${figure}</span>`;\n };\n return html`${this.summary ? html`<p class=\"summary mono\" part=\"summary\">${this.summary}</p>` : nothing}\n <ul part=\"list\">${(this.items ?? []).map(\n (item, i) => html`<li part=\"item\" style=${`--i:${i}`}>\n <span class=\"tick\" aria-hidden=\"true\">${iconSvg('check', '16px')}</span>\n <p class=\"figure\">${shownFigure(item.figure, i)}</p>\n <p class=\"label\">${item.label}</p>\n ${item.status ? html`<p class=\"status mono\">${item.status}</p>` : html`<span></span>`}\n </li>`,\n )}</ul>`;\n }\n}\n\n// \u2500\u2500 Branch timeline \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** One stretch of work, drawn as a branch off the main line. */\nexport interface TimelineLane {\n id?: string;\n label: string;\n /** Where it starts and ends, in the timeline's units (weeks, say). */\n from: number;\n to: number;\n tone?: Tone;\n}\n\n/** A moment on a lane, such as a demo. */\nexport interface TimelineMark {\n id?: string;\n label: string;\n at: number;\n}\n\n/**\n * A project drawn as a commit graph: a main line along a scale of weeks, each\n * phase branching off it and merging back, moments marked on the way, and a\n * release tag where it ships.\n *\n * It is a picture, so it carries a text alternative that says the same in\n * words: each phase and when it runs. The steps that explain the phases go\n * beside it as their own block.\n *\n * @category content\n * @icon git-branch\n */\nexport class ImpaktBranchTimeline extends ImpaktElement {\n static properties = {\n lanes: { type: Array },\n marks: { type: Array },\n span: { type: Number },\n unit: { type: String },\n every: { type: Number },\n release: { type: String },\n releaseAt: { type: Number, attribute: 'release-at' },\n label: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare lanes: TimelineLane[];\n declare marks: TimelineMark[];\n /** How long the whole timeline is, in its units. */\n declare span: number;\n /** The unit's short name on the scale, such as \"wk\". */\n declare unit: string;\n /** How often the scale is labelled. */\n declare every: number;\n /** The tag where it ships, such as \"v1.0 \u00B7 launch\". */\n declare release: string;\n declare releaseAt: number;\n /** What the picture shows, for a screen reader. */\n declare label: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.lanes = [];\n this.marks = [];\n this.span = 20;\n this.unit = '';\n this.every = 2;\n this.release = '';\n this.releaseAt = 0;\n this.label = '';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n mono,\n words,\n css`\n :host { display: block; }\n /* On a narrow screen the graph scrolls sideways, so the scroller takes focus and the arrow keys move it (2.1.1). */\n figure { margin: 0; overflow-x: auto; border-radius: ${t.radiusSm}; }\n svg { display: block; inline-size: 100%; min-inline-size: 640px; block-size: auto; overflow: visible; }\n text { font-family: ${t.fontMono}; font-size: 12px; fill: currentColor; }\n .faint { opacity: 0.5; }\n /* A lane's label keeps a band of the page colour around it, so a line crossing it stays legible. */\n .halo { paint-order: stroke; stroke: var(--impakt-color-surface-card, #fff); stroke-width: 5px; stroke-linejoin: round; }\n /* Graph draw: the graph opens left to right, so each demo appears as the line reaches it. */\n @media (prefers-reduced-motion: no-preference) {\n svg { clip-path: inset(0 100% 0 0); transition: clip-path 1400ms cubic-bezier(.25, 1, .5, 1); }\n :host([shown]) svg { clip-path: inset(0 -40px 0 0); }\n }\n `,\n ];\n\n private unwatch: () => void = () => undefined;\n connectedCallback(): void {\n super.connectedCallback();\n this.unwatch = revealOnView(this);\n }\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.unwatch();\n }\n\n render(): TemplateResult {\n const W = 1200;\n const left = 24;\n const right = W - 60;\n const span = this.span > 0 ? this.span : 20;\n const x = (v: number) => left + (Math.min(Math.max(v, 0), span) / span) * (right - left);\n const lanes = this.lanes ?? [];\n const rowH = 52;\n const H = 40 + (lanes.length + 1) * rowH + 40;\n const mainY = 40;\n const laneY = (i: number) => mainY + (i + 1) * rowH;\n const ticks: number[] = [];\n for (let v = 0; v <= span; v += Math.max(1, this.every || 2)) ticks.push(v);\n const laneOf = (at: number) => lanes.findIndex((l) => at >= l.from && at <= l.to);\n // A lane's label goes under it, out of the way of the curves, unless its marks are labelled there.\n const marked = (i: number) => (this.marks ?? []).some((m) => laneOf(m.at) === i);\n const unit = this.unit || say('wk');\n const label = this.label || say('Project timeline');\n const described = lanes.map((l) => `${l.label}: ${say('{unit} {from} to {to}', { unit, from: l.from, to: l.to })}`).join('; ');\n return html`<figure part=\"figure\" tabindex=\"0\">\n <svg viewBox=\"0 0 ${W} ${H}\" role=\"img\" aria-label=${`${label}. ${described}${this.release ? `. ${say('{name} at {unit} {at}', { name: this.release, unit, at: this.releaseAt })}` : ''}`}>\n <line x1=${left} y1=${mainY} x2=${right + 40} y2=${mainY} stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" />\n <path d=\"M${right + 28} ${mainY - 7} L${right + 40} ${mainY} L${right + 28} ${mainY + 7}\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" />\n ${lanes.map((l, i) => {\n const c = toneOf(l.tone, i);\n const y = laneY(i);\n const a = x(l.from);\n const b = x(l.to);\n const bend = Math.min(36, (b - a) / 3);\n return svg`<g>\n <path d=\"M${a} ${mainY} C${a} ${(mainY + y) / 2} ${a + bend} ${y} ${a + bend * 1.6} ${y} L${b - bend * 1.6} ${y} C${b - bend} ${y} ${b} ${(mainY + y) / 2} ${b} ${mainY}\" fill=\"none\" stroke=${c} stroke-width=\"3\" />\n <circle cx=${a} cy=${mainY} r=\"7\" fill=${c} />\n <text x=${a + bend * 1.6} y=${marked(i) ? y - 10 : y + 20} class=\"halo\" style=${`fill:${c}`}>${l.label}</text>\n </g>`;\n })}\n ${(this.marks ?? []).map((m) => {\n const i = laneOf(m.at);\n const y = i >= 0 ? laneY(i) : mainY;\n const c = i >= 0 ? toneOf(lanes[i]!.tone, i) : 'currentColor';\n return svg`<g><circle cx=${x(m.at)} cy=${y} r=\"6\" fill=\"var(--impakt-color-surface-card, #fff)\" stroke=${c} stroke-width=\"3\" /><text x=${x(m.at)} y=${y + 22} text-anchor=\"middle\" class=\"faint\">${m.label}</text></g>`;\n })}\n ${\n this.release\n ? svg`<g>\n <circle cx=${x(this.releaseAt)} cy=${mainY} r=\"10\" fill=${TONE.success} />\n <rect x=${x(this.releaseAt) - 8} y=${mainY - 36} rx=\"4\" width=${this.release.length * 7.6 + 16} height=\"22\" fill=${TONE.success} />\n <text x=${x(this.releaseAt)} y=${mainY - 21} style=\"fill:var(--impakt-color-surface-card, #fff)\">${this.release}</text>\n </g>`\n : nothing\n }\n ${ticks.map((v) => svg`<text x=${x(v)} y=${H - 10} text-anchor=\"middle\" class=\"faint\">${unit} ${v}</text>`)}\n </svg>\n </figure>`;\n }\n}\n\ncustomElements.define('impakt-release-card', ImpaktReleaseCard);\ncustomElements.define('impakt-release-list', ImpaktReleaseList);\ncustomElements.define('impakt-branch-list', ImpaktBranchList);\ncustomElements.define('impakt-check-list', ImpaktCheckList);\ncustomElements.define('impakt-branch-timeline', ImpaktBranchTimeline);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-release-card': ImpaktReleaseCard;\n 'impakt-release-list': ImpaktReleaseList;\n 'impakt-branch-list': ImpaktBranchList;\n 'impakt-check-list': ImpaktCheckList;\n 'impakt-branch-timeline': ImpaktBranchTimeline;\n }\n}\n", "/**\n * The G2 Noire site blocks: the stage tag and section head every section starts\n * with, the service card, the cursors and hand notes on the hero, the facts,\n * numbered and column lists, and the office card.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement, focusRing, fontWeight, say, space, spaceAround, t } from '@atomic-ui/ui';\nimport { accent, accentOn, ink, inkLine, inkMuted, inkRaised, levelOf, monoLabel, pad, paper } from './g2-shared';\n\n/** The five stages of a project, as the stage tags name them. */\nexport type StageName = 'note' | 'wireframe' | 'component' | 'code' | 'live';\n\n/** Each stage's number, phase and name, in English; `say` puts them in the page's language. */\nexport const STAGE_WORDS: Record<StageName, readonly [string, string, string]> = {\n note: ['01', 'Discover', 'Note'],\n wireframe: ['02', 'Design low-fi', 'Wireframe'],\n component: ['03', 'Design hi-fi', 'Component'],\n code: ['04', 'Build', 'Code'],\n live: ['05', 'Launch', 'Live'],\n};\n\n/**\n * A small square mono tag that says which stage of a project a section shows,\n * such as \"01 Discover Note\": the number in the accent, the phase in paper and\n * the stage's name quieter, on ink.\n *\n * Set `stage` for one of the five stages, or `index`, `phase` and `label` for\n * your own words; each one set wins over the stage's. On an ink band, set\n * `on-ink`: the tag is raised off the band with a line round it.\n *\n * **It is decoration.** The section's heading says what the section is, so the\n * tag is hidden from a screen reader unless `announce` is set (1.3.1). The tag\n * stays ink in both themes, so the yellow on it stays readable (1.4.3).\n *\n * @category content\n * @icon tag\n */\nexport class ImpaktStageTag extends ImpaktElement {\n static properties = {\n stage: { type: String, reflect: true },\n index: { type: String },\n phase: { type: String },\n label: { type: String },\n onInk: { type: Boolean, reflect: true, attribute: 'on-ink' },\n announce: { type: Boolean },\n };\n /** One of the five stages, which fills in the words. Leave empty to give them yourself. */\n declare stage: StageName | '';\n /** The number, such as \"01\". */\n declare index: string;\n /** The phase, such as \"Discover\". */\n declare phase: string;\n /** The stage's name, such as \"Note\". */\n declare label: string;\n /** Raise the tag off an ink band, with a line round it. */\n declare onInk: boolean;\n /** Let a screen reader read the tag. Leave off when the heading beside it says the same. */\n declare announce: boolean;\n\n constructor() {\n super();\n this.stage = '';\n this.index = '';\n this.phase = '';\n this.label = '';\n this.onInk = false;\n this.announce = false;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: inline-block; vertical-align: middle; }\n .tag { display: inline-flex; align-items: baseline; gap: 0.6em; padding: 6px 10px; background: ${ink}; border: 1px solid ${ink}; ${monoLabel}; font-size: 0.75rem; font-weight: ${fontWeight('medium')}; white-space: nowrap; }\n :host([on-ink]) .tag { background: ${inkRaised}; border-color: ${inkLine}; }\n .index { color: ${accent}; }\n .phase { color: ${paper}; }\n .label { color: ${inkMuted}; }\n @media (prefers-color-scheme: dark) { .tag { border-color: ${inkLine}; } }\n @media (forced-colors: active) { .tag { border-color: CanvasText; } .index, .phase, .label { color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const words = this.stage && this.stage in STAGE_WORDS ? STAGE_WORDS[this.stage] : undefined;\n const index = this.index || words?.[0] || '';\n const phase = this.phase || (words ? say(words[1]) : '');\n const label = this.label || (words ? say(words[2]) : '');\n if (!index && !phase && !label) return html``;\n return html`<span class=\"tag\" part=\"tag\" aria-hidden=${this.announce ? nothing : 'true'}\n >${index ? html`<span class=\"index\" part=\"index\">${index}</span>` : nothing}${phase ? html`<span class=\"phase\" part=\"phase\">${phase}</span>` : nothing}${\n label ? html`<span class=\"label\" part=\"label\">${label}</span>` : nothing\n }</span\n >`;\n }\n}\n\n/**\n * The head of a section: a mono label such as \"# Services\" with an optional\n * stage tag on the right, then a display heading and a lead.\n *\n * `size` sets the heading: `xl` (120px) for a page's hero, `l` (64px), and `m`\n * (52px) for a section. Give the heading as `heading`, or in the `heading` slot\n * when part of it is picked out with `impakt-highlight` or an accent word. The\n * lead goes under the heading, or with `lead-position=\"side\"` at the foot of a\n * 340px column on the right. The `aside` slot holds a picture on the right,\n * such as a journey object at 448 by 288.\n *\n * **One heading, at the level the page needs.** `level` is 1 for a page's hero\n * and 2 for a section (1.3.1, 2.4.6). The \"#\" before the label is decoration.\n *\n * **It stacks in a narrow column**, measured against its own width: the label\n * row, the heading, the lead and the aside, in reading order (1.4.10). It takes\n * its colours from the band it is on, so it reads on paper, ink and accent.\n *\n * @category layout\n * @icon heading\n * @role heading\n * @slot heading - The heading, when it holds more than words, such as an `impakt-highlight`. Replaces `heading`.\n * @slot lead - The lead, when it holds more than words. Replaces `lead`.\n * @slot tag - Something on the right of the label row, in place of the stage tag.\n * @slot aside - A picture on the right of the heading, such as a journey object.\n */\nexport class ImpaktSectionHead extends ImpaktElement {\n static properties = {\n label: { type: String },\n heading: { type: String },\n lead: { type: String },\n size: { type: String, reflect: true },\n level: { type: Number, reflect: true },\n leadPosition: { type: String, reflect: true, attribute: 'lead-position' },\n stage: { type: String },\n stageOnInk: { type: Boolean, attribute: 'stage-on-ink' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The mono label above the heading, such as \"Services\". A \"#\" is drawn before it. */\n declare label: string;\n declare heading: string;\n /** A sentence or two about the section. */\n declare lead: string;\n /** How large the heading is: `xl` 120px, `l` 64px, `m` 52px. */\n declare size: 'xl' | 'l' | 'm';\n /** The heading's level: 1 for a page's hero, 2 for a section. */\n declare level: 1 | 2;\n /** Where the lead goes: under the heading, or at the foot of a column on the right. */\n declare leadPosition: 'below' | 'side';\n /** A stage tag on the right of the label row. Leave empty for none. */\n declare stage: StageName | '';\n /** Draw the stage tag for an ink band. */\n declare stageOnInk: boolean;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.label = '';\n this.heading = '';\n this.lead = '';\n this.size = 'm';\n this.level = 2;\n this.leadPosition = 'below';\n this.stage = '';\n this.stageOnInk = false;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; color: ${t.text}; }\n .top { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; min-block-size: 29px; }\n .label { margin: 0; font-family: ${t.fontMono}; font-size: 0.875rem; line-height: 1.4; color: ${t.textMuted}; }\n .body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: ${space(10)}; row-gap: ${space(6)}; align-items: end; margin-block-start: ${space(6)}; }\n .heading { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('semibold')}; color: var(--impakt-color-text-heading, ${t.text}); text-wrap: balance; overflow-wrap: anywhere; }\n :host([size='m']) .heading { font-size: clamp(2.25rem, 1.2rem + 4cqi, 3.25rem); line-height: 1; letter-spacing: -0.04em; max-inline-size: 11.5em; }\n :host([size='l']) .heading { font-size: clamp(2.5rem, 1.2rem + 5cqi, 4rem); line-height: 1; letter-spacing: -0.04em; max-inline-size: 11.5em; }\n :host([size='xl']) .heading { font-size: clamp(3rem, 0.8rem + 10cqi, 7.5rem); line-height: 0.95; letter-spacing: -0.05em; }\n .lead { margin: ${space(5)} 0 0; max-inline-size: 36rem; font-size: 1rem; line-height: 1.55; color: ${t.textMuted}; }\n .side { display: grid; gap: ${space(6)}; justify-items: end; }\n /* Beside a picture in the aside, such as the journey button, the heading sits level with the middle of it. */\n .body.aside { align-items: center; }\n .side .lead { margin: 0; max-inline-size: 340px; inline-size: 340px; }\n .side:not(:has(.lead)) { align-self: center; }\n ::slotted([slot='aside']) { display: block; max-inline-size: 100%; }\n @container (max-width: 47.99rem) {\n .body { grid-template-columns: minmax(0, 1fr); }\n .side { justify-items: stretch; }\n .side .lead { inline-size: auto; }\n }\n `,\n ];\n\n render(): TemplateResult {\n const lead = html`<p class=\"lead\" part=\"lead\"><slot name=\"lead\">${this.lead}</slot></p>`;\n const showLead = Boolean(this.lead) || this.hasSlot('lead');\n const inner = html`<slot name=\"heading\">${this.heading}</slot>`;\n const heading = Number(this.level) === 1 ? html`<h1 class=\"heading\" part=\"heading\">${inner}</h1>` : html`<h2 class=\"heading\" part=\"heading\">${inner}</h2>`;\n const side = this.leadPosition === 'side';\n return html`<header part=\"head\">\n <div class=\"top\">\n ${this.label ? html`<p class=\"label\" part=\"label\"><span aria-hidden=\"true\"># </span>${this.label}</p>` : html`<span></span>`}\n <slot name=\"tag\">${this.stage ? html`<impakt-stage-tag stage=${this.stage} ?on-ink=${this.stageOnInk}></impakt-stage-tag>` : nothing}</slot>\n </div>\n <div class=${this.hasSlot('aside') ? 'body aside' : 'body'}>\n <div class=\"main\">${heading}${showLead && !side ? lead : nothing}</div>\n <div class=\"side\">${showLead && side ? lead : nothing}<slot name=\"aside\"></slot></div>\n </div>\n </header>`;\n }\n\n /** Whether a child is in the named slot. On a server, where there are no children, only the attribute counts. */\n private hasSlot(name: string): boolean {\n const children = (this as unknown as { children?: HTMLCollection }).children;\n if (!children) return false;\n return Array.from(children).some((c) => c.getAttribute('slot') === name);\n }\n}\n\n/**\n * A service on the services grid: a number and a dot at the top, then at the\n * foot its name, a line about it, mono tags such as \"React Native \u00B7 Expo\" and\n * \"Learn more\".\n *\n * **The card is one link.** The link is on the service's name, a heading, and\n * stretched over the card (2.4.4, 2.5.8). The number, dot and \"Learn more\"\n * line are decoration. Pointing at the card and focusing it look the same: it\n * turns to ink with paper words and the dot and \"Learn more\" in the accent,\n * which holds 4.5:1 on ink, and the focus ring is drawn round it (2.4.7).\n *\n * `featured` draws a card inked all the time, as it is when pointed at, for\n * the one service a page picks out or a sheet that shows the state.\n *\n * Put cards in a four-column grid with a 10px gap. On a phone the words sit at\n * the top and the card is as tall as they are.\n *\n * @category content\n * @icon card\n */\nexport class ImpaktServiceCard extends ImpaktElement {\n static properties = {\n number: { type: String },\n heading: { type: String },\n text: { type: String },\n tags: { type: String },\n href: { type: String },\n linkText: { type: String, attribute: 'link-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n featured: { type: Boolean, reflect: true },\n };\n /** The number at the top, such as \"01\". */\n declare number: string;\n /** The service's name. */\n declare heading: string;\n /** A line about it. */\n declare text: string;\n /** What it uses or includes, such as \"React Native \u00B7 Expo \u00B7 Store launch\". Set in mono capitals. */\n declare tags: string;\n /** Where the card goes. Leave empty for a card that goes nowhere. */\n declare href: string;\n /** The line at the foot of a card that goes somewhere. */\n declare linkText: string;\n declare headingLevel: number;\n /** Draw the card inked, as when it is pointed at. */\n declare featured: boolean;\n\n constructor() {\n super();\n this.featured = false;\n this.number = '';\n this.heading = '';\n this.text = '';\n this.tags = '';\n this.href = '';\n this.linkText = 'Learn more';\n this.headingLevel = 3;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; block-size: 100%; }\n article { position: relative; box-sizing: border-box; block-size: 100%; min-block-size: 330px; display: flex; flex-direction: column; justify-content: space-between; gap: ${space(6)}; padding: ${space(6)}; background: ${t.surfaceCard}; color: ${t.text}; border: 1px solid ${t.text}; transition: background-color 140ms ease-out, color 140ms ease-out; }\n .top { display: flex; align-items: center; justify-content: space-between; }\n .number { font-family: ${t.fontMono}; font-size: 0.75rem; letter-spacing: 0.06em; }\n .dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: currentColor; }\n .foot { display: grid; gap: ${space(3)}; }\n .heading { margin: 0; font-family: ${t.fontHeading}; font-size: 1.5rem; font-weight: ${fontWeight('semibold')}; line-height: 1.15; letter-spacing: -0.02em; }\n .heading a { color: inherit; text-decoration: none; }\n .heading a::after { content: ''; position: absolute; inset: 0; }\n .heading a:focus-visible { outline: none; }\n .heading a:focus-visible::after { box-shadow: ${t.focusShadow}; }\n .text { margin: 0; font-size: 0.9375rem; line-height: 1.5; color: ${t.textMuted}; }\n .tags { margin: ${space(1)} 0 0; ${monoLabel}; color: ${t.textMuted}; }\n .more { margin-block-start: ${space(2)}; ${monoLabel}; font-weight: ${fontWeight('medium')}; }\n article:has(a):hover, article:focus-within, :host([featured]) article { background: ${ink}; color: ${paper}; border-color: ${ink}; }\n article:has(a):hover :is(.text, .tags), article:focus-within :is(.text, .tags), :host([featured]) :is(.text, .tags) { color: ${inkMuted}; }\n article:has(a):hover :is(.dot, .more), article:focus-within :is(.dot, .more), :host([featured]) :is(.dot, .more) { color: ${accent}; }\n @media (max-width: 47.99rem) { article { min-block-size: 0; justify-content: flex-start; } }\n @media (forced-colors: active) { article { border-color: CanvasText; } .dot { background: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const level = levelOf(this.headingLevel);\n return html`<article part=\"card\">\n <div class=\"top\" aria-hidden=\"true\">\n <span class=\"number\" part=\"number\">${this.number}</span>\n <span class=\"dot\" part=\"dot\"></span>\n </div>\n <div class=\"foot\">\n <div class=\"heading\" part=\"heading\" role=\"heading\" aria-level=${level}>\n ${this.href ? html`<a href=${this.href} part=\"link\">${this.heading}</a>` : this.heading}\n </div>\n ${this.text ? html`<p class=\"text\" part=\"text\">${this.text}</p>` : nothing}\n ${this.tags ? html`<p class=\"tags\" part=\"tags\">${this.tags}</p>` : nothing}\n ${this.href && this.linkText ? html`<span class=\"more\" part=\"more\" aria-hidden=\"true\">${this.linkText} \u2192</span>` : nothing}\n </div>\n </article>`;\n }\n}\n\n/**\n * A pointer with a name beside it, as if someone were working on the page with\n * you: the cursors round a hero's heading.\n *\n * The name is on ink, outlined, or on the accent. With `drift` it moves a few\n * pixels to and fro, slowly; it stays still for anyone who asks for less\n * motion (2.3.3), and it never moves more than 5 seconds without a way to stop\n * it mattering, because it carries nothing (2.2.2).\n *\n * **It is decoration**, hidden from a screen reader (1.3.1).\n *\n * @category media\n * @icon pointer\n */\nexport class ImpaktCursor extends ImpaktElement {\n static properties = {\n name: { type: String },\n variant: { type: String, reflect: true },\n drift: { type: Boolean, reflect: true },\n };\n /** The name beside the pointer, such as \"Client\". */\n declare name: string;\n /** How the name is drawn: on ink, outlined, or on the accent. */\n declare variant: 'ink' | 'outline' | 'accent';\n /** Move slowly to and fro. Still for anyone who asks for less motion. */\n declare drift: boolean;\n\n constructor() {\n super();\n this.name = '';\n this.variant = 'ink';\n this.drift = false;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: inline-block; position: relative; pointer-events: none; }\n .cursor { display: inline-flex; align-items: flex-start; }\n svg { display: block; flex: none; }\n .arrow { fill: ${ink}; stroke: ${paper}; }\n .name { margin: 16px 0 0 -2px; padding: 4px 7px; ${monoLabel}; font-weight: ${fontWeight('medium')}; white-space: nowrap; background: ${ink}; color: ${paper}; border: 1px solid ${ink}; }\n :host([variant='outline']) .name { background: ${t.surfaceCard}; color: ${t.text}; border-color: ${t.text}; }\n :host([variant='accent']) .name { background: ${accent}; color: ${accentOn}; border-color: ${accentOn}; }\n :host([drift]) .cursor { animation: drift 7s ease-in-out infinite alternate; }\n @keyframes drift { 0% { transform: translate(0, 0); } 50% { transform: translate(6px, -3px); } 100% { transform: translate(-3px, 4px); } }\n @media (prefers-reduced-motion: reduce) { :host([drift]) .cursor { animation: none; } }\n @media (forced-colors: active) { .arrow { fill: CanvasText; stroke: Canvas; } .name { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<span class=\"cursor\" part=\"cursor\" aria-hidden=\"true\">\n <svg viewBox=\"0 0 16 22\" width=\"16\" height=\"22\" focusable=\"false\"><path class=\"arrow\" d=\"M1.5 1.5v16.2l4.3-4.1 3 6.6 2.6-1.2-3-6.5h6z\" stroke-width=\"1.25\" stroke-linejoin=\"round\" /></svg>\n ${this.name ? html`<span class=\"name\" part=\"name\">${this.name}</span>` : nothing}\n </span>`;\n }\n}\n\n/**\n * A short note in handwriting, with an arrow if it points at something, such\n * as \"keep scrolling, this note becomes the real button.\"\n *\n * The face is `--impakt-font-family-hand` (Kalam in the G2 designs), and the\n * body face until a brand sets it. The note is real text and is read, unless\n * `decorative` is set because it repeats something said elsewhere (1.3.1).\n * The arrow is always decoration.\n *\n * @category content\n * @icon pen\n * @slot - The note, when it holds more than words. Replaces `text`.\n */\nexport class ImpaktHandNote extends ImpaktElement {\n static properties = {\n text: { type: String },\n arrow: { type: String, reflect: true },\n decorative: { type: Boolean, reflect: true },\n };\n /** The note. */\n declare text: string;\n /** Where an arrow points from the note. */\n declare arrow: 'none' | 'left' | 'right' | 'down' | 'up';\n /** Hide the note from a screen reader, when it repeats something said elsewhere. */\n declare decorative: boolean;\n\n constructor() {\n super();\n this.text = '';\n this.arrow = 'none';\n this.decorative = false;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: inline-block; max-inline-size: 18rem; }\n .note { display: inline-flex; align-items: center; gap: ${space(2)}; }\n :host(:is([arrow='down'], [arrow='up'])) .note { flex-direction: column; align-items: flex-start; }\n :host(:is([arrow='left'], [arrow='up'])) svg { order: -1; }\n p { margin: 0; font-family: var(--impakt-font-family-hand, ${t.fontBody}); font-size: 1.25rem; line-height: 1.2; color: ${t.textMuted}; }\n svg { flex: none; color: ${t.textMuted}; }\n :host([arrow='left']) svg { transform: scaleX(-1); }\n :host([arrow='down']) svg { transform: rotate(90deg); }\n :host([arrow='up']) svg { transform: rotate(-90deg); }\n @media (forced-colors: active) { p, svg { color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const arrow =\n this.arrow && this.arrow !== 'none'\n ? html`<svg viewBox=\"0 0 40 24\" width=\"40\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M2 16c8-10 20-12 34-6M30 4l6 6-7 4\" /></svg>`\n : nothing;\n return html`<div class=\"note\" part=\"note\" aria-hidden=${this.decorative ? 'true' : nothing}><p part=\"text\"><slot>${this.text}</slot></p>${arrow}</div>`;\n }\n}\n\n/** One fact: a label and its value. */\nexport interface FactItem {\n /** What it is, such as \"Client\". Set in mono capitals. */\n label: string;\n /** The fact, such as \"Vehicle importer \u00B7 UK \u2192 Cyprus\". */\n value: string;\n /** Make the value a link, such as `mailto:` for an email address. */\n href?: string;\n /** This value's size, in place of the block's. */\n size?: 'sm' | 'md' | 'lg' | 'xl';\n}\n\n/**\n * A few facts, each a mono label over its value: a case study's client, role,\n * platform and stack in four columns under an ink rule, or contact details\n * stacked with the email set large.\n *\n * A description list, so each value is read with its label (1.3.1). Columns\n * wrap to fit their width, so they stack on a phone (1.4.10).\n *\n * @category content\n * @icon list\n */\nexport class ImpaktFacts extends ImpaktElement {\n static properties = {\n items: { type: Array },\n layout: { type: String, reflect: true },\n size: { type: String, reflect: true },\n label: { type: String },\n };\n /** The facts, in order. */\n declare items: FactItem[];\n /** Side by side under a rule each, or stacked. */\n declare layout: 'columns' | 'stacked';\n /** The values' size: `sm` 16px, `md` 18px, `lg` 24px, `xl` 32px. An item can set its own. */\n declare size: 'sm' | 'md' | 'lg' | 'xl';\n /** A name for the list, for a screen reader. Leave empty for none. */\n declare label: string;\n\n constructor() {\n super();\n this.items = [];\n this.layout = 'columns';\n this.size = 'md';\n this.label = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; color: ${t.text}; }\n dl { margin: 0; display: grid; gap: ${space(5)}; }\n :host([layout='columns']) dl { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); column-gap: ${space(5)}; row-gap: ${space(6)}; }\n :host([layout='columns']) .fact { border-block-start: 1px solid ${t.text}; padding-block-start: ${space(4)}; }\n dt { ${monoLabel}; color: ${t.textMuted}; }\n dd { margin: ${space(2)} 0 0; font-family: ${t.fontBody}; line-height: 1.3; overflow-wrap: anywhere; }\n :host([layout='columns']) dd { margin-block-start: ${space(3)}; }\n .sm { font-size: 1rem; }\n .md { font-size: 1.125rem; }\n .lg { font-size: 1.5rem; letter-spacing: -0.01em; }\n .xl { font-size: clamp(1.5rem, 1rem + 2vw, 2rem); letter-spacing: -0.02em; }\n a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }\n a:hover { text-decoration-thickness: 2px; }\n @media (forced-colors: active) { :host([layout='columns']) .fact { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n if (!this.items.length) return html``;\n return html`<dl part=\"list\" aria-label=${this.label || nothing}>\n ${this.items.map(\n (item) => html`<div class=\"fact\" part=\"fact\">\n <dt part=\"label\">${item.label}</dt>\n <dd part=\"value\" class=${item.size ?? this.size}>${item.href ? html`<a href=${item.href}>${item.value}</a>` : item.value}</dd>\n </div>`,\n )}\n </dl>`;\n }\n}\n\n/** One row of a numbered list. */\nexport interface NumberedItem {\n heading: string;\n text?: string;\n}\n\n/**\n * A numbered list under an ink rule, each row split by a hairline: the number,\n * a heading and a line of quieter text in three columns. \"Three rules we don't\n * break\", the steps of a project, a tool's features.\n *\n * An ordered list, so a screen reader says how many rows there are and which\n * one this is, and the drawn numbers are hidden from it (1.3.1). Each heading\n * is at the level the page asks for. It stacks in a narrow column, measured\n * against its own width (1.4.10), and takes its colours from its band.\n *\n * @category content\n * @icon list-ordered\n */\nexport class ImpaktNumberedList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n start: { type: Number },\n headingLevel: { type: Number, attribute: 'heading-level' },\n label: { type: String },\n };\n declare items: NumberedItem[];\n /** The number the first row is given. */\n declare start: number;\n declare headingLevel: number;\n /** A name for the list, for a screen reader. Leave empty for none. */\n declare label: string;\n\n constructor() {\n super();\n this.items = [];\n this.start = 1;\n this.headingLevel = 3;\n this.label = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; container-type: inline-size; color: ${t.text}; }\n ol { margin: 0; padding: 0; list-style: none; border-block-start: 1px solid ${t.text}; }\n li { display: grid; grid-template-columns: 60px minmax(0, 520fr) minmax(0, 420fr); column-gap: ${space(10)}; align-items: center; padding-block: ${space(6)}; border-block-end: 1px solid ${t.rule}; }\n .n { font-family: ${t.fontMono}; font-size: 0.75rem; letter-spacing: 0.06em; color: ${t.textMuted}; }\n .heading { margin: 0; font-family: ${t.fontHeading}; font-size: clamp(1.5rem, 1rem + 2cqi, 2rem); font-weight: ${fontWeight('semibold')}; line-height: 1.15; letter-spacing: -0.025em; }\n .text { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: ${t.textMuted}; }\n @container (max-width: 47.99rem) {\n li { grid-template-columns: minmax(0, 1fr); row-gap: ${space(2)}; }\n }\n @media (forced-colors: active) { ol { border-color: CanvasText; } li { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n if (!this.items.length) return html``;\n const level = levelOf(this.headingLevel);\n const start = Number.isFinite(Number(this.start)) ? Number(this.start) : 1;\n return html`<ol part=\"list\" role=\"list\" start=${start} aria-label=${this.label || nothing}>\n ${this.items.map(\n (item, i) => html`<li part=\"item\">\n <span class=\"n\" aria-hidden=\"true\">${pad(start + i)}</span>\n <div class=\"heading\" role=\"heading\" aria-level=${level} part=\"heading\">${item.heading}</div>\n ${item.text ? html`<p class=\"text\" part=\"text\">${item.text}</p>` : html`<span></span>`}\n </li>`,\n )}\n </ol>`;\n }\n}\n\n/** One column of a column list. */\nexport interface ColumnListColumn {\n /** The column's heading, such as \"Design\". Set in mono capitals. */\n heading: string;\n /** What is in it, each a line set large. */\n items: string[];\n}\n\n/**\n * What a studio does, in four columns: each under an ink rule, with a mono\n * heading such as \"Engineering\" and a stack of what it covers set large. The\n * items are words, not links.\n *\n * Each column's heading is a heading at the level the page asks for, and its\n * items a list (1.3.1). The columns wrap to fit their width (1.4.10).\n *\n * @category content\n * @icon columns\n */\nexport class ImpaktColumnList extends ImpaktElement {\n static properties = {\n columns: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n };\n declare columns: ColumnListColumn[];\n declare headingLevel: number;\n\n constructor() {\n super();\n this.columns = [];\n this.headingLevel = 3;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; color: ${t.text}; }\n .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: ${space(8)} ${space(5)}; }\n section { border-block-start: 1px solid ${t.text}; padding-block-start: ${space(4)}; }\n .heading { margin: 0; ${monoLabel}; color: ${t.textMuted}; }\n ul { margin: ${space(3)} 0 0; padding: 0; list-style: none; display: grid; gap: ${space(2)}; }\n li { font-family: ${t.fontHeading}; font-size: 1.5rem; font-weight: ${fontWeight('semibold')}; line-height: 1.2; letter-spacing: -0.02em; }\n @media (forced-colors: active) { section { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n if (!this.columns.length) return html``;\n const level = levelOf(this.headingLevel);\n return html`<div class=\"grid\" part=\"grid\">\n ${this.columns.map(\n (col) => html`<section part=\"column\">\n <div class=\"heading\" role=\"heading\" aria-level=${level} part=\"heading\">${col.heading}</div>\n <ul role=\"list\" part=\"list\">${(col.items ?? []).map((item) => html`<li part=\"item\">${item}</li>`)}</ul>\n </section>`,\n )}\n </div>`;\n }\n}\n\n/**\n * An office: a mono line with its time zone and hours, its name set large, the\n * region under it and a line about it, on a white card with an ink border. An\n * accent tag at the top right can say how its hours meet another office's,\n * such as \"+2h \u00B7 same working day\".\n *\n * The name is a heading at the level the page asks for (1.3.1). The tag is\n * text and is read; on a narrow card it moves above the name (1.4.10).\n *\n * @category content\n * @icon map-pin\n */\nexport class ImpaktOfficeCard extends ImpaktElement {\n static properties = {\n hours: { type: String },\n name: { type: String },\n region: { type: String },\n text: { type: String },\n tag: { type: String },\n headingLevel: { type: Number, attribute: 'heading-level' },\n };\n /** The time zone and hours, such as \"GMT \u00B7 Mon\u2013Fri 9\u201318\". */\n declare hours: string;\n /** The office, such as \"UK\". */\n declare name: string;\n /** Where it is, such as \"United Kingdom\". */\n declare region: string;\n /** A line about it. */\n declare text: string;\n /** An accent tag at the top right, such as \"+2h \u00B7 same working day\". Leave empty for none. */\n declare tag: string;\n declare headingLevel: number;\n\n constructor() {\n super();\n this.hours = '';\n this.name = '';\n this.region = '';\n this.text = '';\n this.tag = '';\n this.headingLevel = 3;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; block-size: 100%; container-type: inline-size; }\n article { box-sizing: border-box; block-size: 100%; display: grid; align-content: start; gap: ${space(2)}; padding: ${space(8)}; background: ${t.surfaceCard}; color: ${t.text}; border: 1px solid ${t.text}; }\n .top { display: flex; flex-wrap: wrap-reverse; justify-content: space-between; align-items: center; gap: ${space(2)}; }\n .hours { margin: 0; ${monoLabel}; color: ${t.textMuted}; }\n .tag { margin: 0; padding: 3px 6px; ${monoLabel}; font-weight: ${fontWeight('medium')}; background: ${accent}; color: ${accentOn}; }\n .name { margin: ${space(2)} 0 0; font-family: ${t.fontHeading}; font-size: clamp(2.5rem, 1rem + 10cqi, 4rem); font-weight: ${fontWeight('semibold')}; line-height: 1; letter-spacing: -0.04em; overflow-wrap: anywhere; }\n .region { margin: ${space(2)} 0 0; font-size: 1rem; line-height: 1.4; }\n .text { margin: ${space(2)} 0 0; font-size: 0.9375rem; line-height: 1.5; color: ${t.textMuted}; }\n @container (max-width: 22rem) { article { padding: ${space(5)}; } }\n @media (forced-colors: active) { article { border-color: CanvasText; } .tag { border: 1px solid CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const level = levelOf(this.headingLevel);\n return html`<article part=\"card\">\n ${\n this.hours || this.tag\n ? html`<div class=\"top\">${this.hours ? html`<p class=\"hours\" part=\"hours\">${this.hours}</p>` : html`<span></span>`}${this.tag ? html`<p class=\"tag\" part=\"tag\">${this.tag}</p>` : nothing}</div>`\n : nothing\n }\n <div class=\"name\" role=\"heading\" aria-level=${level} part=\"name\">${this.name}</div>\n ${this.region ? html`<p class=\"region\" part=\"region\">${this.region}</p>` : nothing}\n ${this.text ? html`<p class=\"text\" part=\"text\">${this.text}</p>` : nothing}\n </article>`;\n }\n}\n\ncustomElements.define('impakt-stage-tag', ImpaktStageTag);\ncustomElements.define('impakt-section-head', ImpaktSectionHead);\ncustomElements.define('impakt-service-card', ImpaktServiceCard);\ncustomElements.define('impakt-cursor', ImpaktCursor);\ncustomElements.define('impakt-hand-note', ImpaktHandNote);\ncustomElements.define('impakt-facts', ImpaktFacts);\ncustomElements.define('impakt-numbered-list', ImpaktNumberedList);\ncustomElements.define('impakt-column-list', ImpaktColumnList);\ncustomElements.define('impakt-office-card', ImpaktOfficeCard);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-stage-tag': ImpaktStageTag;\n 'impakt-section-head': ImpaktSectionHead;\n 'impakt-service-card': ImpaktServiceCard;\n 'impakt-cursor': ImpaktCursor;\n 'impakt-hand-note': ImpaktHandNote;\n 'impakt-facts': ImpaktFacts;\n 'impakt-numbered-list': ImpaktNumberedList;\n 'impakt-column-list': ImpaktColumnList;\n 'impakt-office-card': ImpaktOfficeCard;\n }\n}\n", "/**\n * The colours the G2 Noire blocks share.\n *\n * Two kinds. The fixed ink set is for a surface that stays ink in both themes,\n * such as a stage tag or a callout, so the yellow on it stays readable in dark.\n * The band set follows the `impakt-section` band a block sits on: `tone=\"ink\"`\n * sets `--impakt-band` and `--impakt-band-on`, and a block drawn outside any band\n * falls back to the ink values, so it is drawn as an ink panel of its own.\n *\n * Every value is a token with the G2 literal as its fallback, so the theme can\n * take them over without a change here.\n */\nimport { css, unsafeCSS } from 'lit';\nimport { token } from '@atomic-ui/ui';\n\n/** Ink, `#111111`. It does not flip in dark. */\nexport const ink = token('color.ink', '#111111');\n/** Paper, `#EFEFED`: text on ink. */\nexport const paper = token('color.paper', '#EFEFED');\n/** A raised surface on ink, `#1C1C1C`. */\nexport const inkRaised = token('color.ink-raised', '#1C1C1C');\n/** A line on ink, `#2E2E2E`. */\nexport const inkLine = token('color.ink-line', '#2E2E2E');\n/** Quiet text on ink, 7:1 on `#111111`. */\nexport const inkMuted = token('color.ink-muted', '#A8A8A6');\nexport const accent = token('color.accent.default', '#FFD43B');\nexport const accentOn = token('color.accent.on', '#111111');\n\n/** The band behind the block. */\nexport const band = unsafeCSS('var(--impakt-band, var(--impakt-color-ink, #111111))');\n/** Text on the band. */\nexport const bandOn = unsafeCSS('var(--impakt-band-on, var(--impakt-color-paper, #EFEFED))');\n/** Quiet text on the band. */\nexport const bandMuted = unsafeCSS('var(--impakt-band-muted, var(--impakt-color-ink-muted, #A8A8A6))');\n/** A tile raised off the band: `#1C1C1C` on an ink band. */\nexport const bandRaised = unsafeCSS(\n 'var(--impakt-color-band-raised, color-mix(in srgb, var(--impakt-band-on, #EFEFED) 6%, var(--impakt-band, var(--impakt-color-ink, #111111))))',\n);\n/** A line on the band: `#2E2E2E` on an ink band. */\nexport const bandLine = unsafeCSS(\n 'var(--impakt-color-band-line, color-mix(in srgb, var(--impakt-band-on, #EFEFED) 16%, var(--impakt-band, var(--impakt-color-ink, #111111))))',\n);\n\n/** Small uppercase mono, the G2 label: 11px, +6% tracking. */\nexport const monoLabel = css`\n font-family: var(--impakt-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);\n font-size: 0.6875rem;\n font-weight: 400;\n line-height: 1.4;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n`;\n\n/** The level a heading is given, kept between 1 and 6. */\nexport const levelOf = (n: number | undefined, fallback = 3): number => Math.min(Math.max(Number(n) || fallback, 1), 6);\n\n/** \"1\" \u2192 \"01\". */\nexport const pad = (n: number): string => String(n).padStart(2, '0');\n", "/**\n * The G2 Noire blocks for a case study and the studio's process: the process\n * line, the week strip, the \"how might we\" callout, the hypothesis card and the\n * browser frame a product screenshot sits in.\n */\nimport { css, html, nothing, svg, type TemplateResult } from 'lit';\nimport { ImpaktElement, fontWeight, say, space, t, visuallyHidden } from '@atomic-ui/ui';\nimport { accent, accentOn, band, bandLine, bandMuted, bandOn, bandRaised, ink, inkLine, levelOf, monoLabel, paper } from './g2-shared';\n\n/** One point on the process line. */\nexport interface ProcessNode {\n /** What happens here, such as \"Discovery\". */\n label: string;\n /** How far the line dips here: 0 on the main line, 1 a step below, 2 two steps. */\n depth?: number;\n /** The point the project is at now, filled in the accent. */\n current?: boolean;\n /** A flag above the point, such as \"Build merged\" or \"v1.0 launch\". */\n flag?: string;\n}\n\nconst STEP = 40;\nconst TOP = 72;\n\n/**\n * A project's process drawn as one main line that dips to a different depth\n * for each phase, like a branch in version control: hollow rings for each\n * point, the current one filled in the accent, a mono label by each (above a\n * point on the main line, below one that dips) and accent flags such as\n * \"Build merged\" and \"v1.0 launch\". A flag on the main line stands in for\n * its point's label there.\n *\n * **The drawing is decoration; the list is the content.** A screen reader\n * meets an ordered list of the points, in order, with their flags and the\n * current one marked as the current step (1.1.1, 1.3.1). On a narrow column,\n * measured against its own width, the same list is drawn as a vertical rail\n * and the drawing is not shown, so nothing is lost at 320px (1.4.10).\n *\n * It is drawn for an ink band and takes the band's colours; outside one it\n * draws its own ink panel. The current point keeps a ring in the band's text\n * colour, so it is not told by its colour alone (1.4.1, 1.4.11).\n *\n * @category content\n * @icon git-commit\n */\nexport class ImpaktProcessLine extends ImpaktElement {\n static properties = {\n nodes: { type: Array },\n lineLabel: { type: String, attribute: 'line-label' },\n label: { type: String },\n };\n /** The points, left to right. */\n declare nodes: ProcessNode[];\n /** A label at the start of the line, such as \"main\". */\n declare lineLabel: string;\n /** A name for the list, for a screen reader, such as \"How a project runs\". */\n declare label: string;\n\n constructor() {\n super();\n this.nodes = [];\n this.lineLabel = '';\n this.label = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; container-type: inline-size; background: ${band}; color: ${bandOn}; }\n .visual { display: none; position: relative; }\n .visual svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; overflow: visible; }\n .visual path { fill: none; stroke: ${bandOn}; stroke-width: 1.5; vector-effect: non-scaling-stroke; }\n .ring { position: absolute; inline-size: 10px; block-size: 10px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid ${bandOn}; background: ${band}; transform: translate(-50%, -50%); }\n .ring.current { inline-size: 12px; block-size: 12px; background: ${accent}; }\n .vlabel { position: absolute; transform: translateX(-50%); ${monoLabel}; color: ${bandMuted}; white-space: nowrap; }\n .lineLabel { position: absolute; inset-inline-start: 0; ${monoLabel}; color: ${bandMuted}; }\n .flag { display: inline-block; padding: 4px 8px; ${monoLabel}; font-weight: ${fontWeight('medium')}; background: ${accent}; color: ${accentOn}; white-space: nowrap; }\n .visual .flag { position: absolute; transform: translate(-50%, -100%); }\n\n ol { margin: 0; padding: ${space(6)} ${space(4)}; list-style: none; }\n li { position: relative; padding: 0 0 ${space(5)} 28px; }\n li::before { content: ''; position: absolute; inset-inline-start: 0; inset-block-start: 4px; inline-size: 10px; block-size: 10px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid ${bandOn}; background: ${band}; }\n li[aria-current]::before { background: ${accent}; }\n li:not(:last-child)::after { content: ''; position: absolute; inset-inline-start: 4.25px; inset-block-start: 14px; inset-block-end: -4px; inline-size: 1.5px; background: ${bandOn}; }\n .rlabel { ${monoLabel}; font-size: 0.75rem; color: ${bandOn}; }\n li .flag { margin-inline-start: ${space(2)}; }\n\n @container (min-width: 60rem) {\n .visual { display: block; }\n ol { ${visuallyHidden} }\n }\n @media (forced-colors: active) {\n .visual path { stroke: CanvasText; }\n .ring, li::before { border-color: CanvasText; background: Canvas; }\n .ring.current, li[aria-current]::before { background: Highlight; }\n li::after { background: CanvasText; }\n .flag { border: 1px solid CanvasText; }\n }\n `,\n ];\n\n render(): TemplateResult {\n const nodes = this.nodes ?? [];\n if (!nodes.length) return html``;\n const n = nodes.length;\n const depthOf = (node: ProcessNode) => Math.max(0, Math.min(4, Number(node.depth) || 0));\n const maxDepth = Math.max(...nodes.map(depthOf));\n const height = TOP + maxDepth * STEP + 44;\n const pts = nodes.map((node, i) => ({ x: ((i + 0.5) / n) * 1000, y: TOP + depthOf(node) * STEP }));\n let d = `M0 ${pts[0]!.y} L${pts[0]!.x} ${pts[0]!.y}`;\n for (let i = 1; i < n; i++) {\n const a = pts[i - 1]!;\n const b = pts[i]!;\n if (a.y === b.y) d += ` L${b.x} ${b.y}`;\n else {\n const mid = (a.x + b.x) / 2;\n d += ` C${mid} ${a.y} ${mid} ${b.y} ${b.x} ${b.y}`;\n }\n }\n d += ` L1000 ${pts[n - 1]!.y}`;\n const pct = (i: number) => `${((i + 0.5) / n) * 100}%`;\n return html`<div class=\"visual\" part=\"drawing\" aria-hidden=\"true\" style=\"block-size:${height}px\">\n <svg viewBox=\"0 0 1000 ${height}\" preserveAspectRatio=\"none\" focusable=\"false\">${svg`<path d=${d} />`}</svg>\n ${this.lineLabel ? html`<span class=\"lineLabel\" style=\"inset-block-start:${TOP - 64}px\">${this.lineLabel}</span>` : nothing}\n ${nodes.map((node, i) => {\n const y = pts[i]!.y;\n // On the main line the label sits above the point, clear of the curves that leave it; a\n // flag there stands in for it. Below the main line the label hangs under the point.\n const onMain = depthOf(node) === 0;\n const label = onMain\n ? node.flag\n ? nothing\n : html`<span class=\"vlabel\" style=\"inset-inline-start:${pct(i)};inset-block-start:${y - 30}px\">${node.label}</span>`\n : html`<span class=\"vlabel\" style=\"inset-inline-start:${pct(i)};inset-block-start:${y + 14}px\">${node.label}</span>`;\n return html`<span class=\"ring ${node.current ? 'current' : ''}\" style=\"inset-inline-start:${pct(i)};inset-block-start:${y}px\"></span>\n ${label}\n ${node.flag ? html`<span class=\"flag\" style=\"inset-inline-start:${pct(i)};inset-block-start:${y - 12}px\">${node.flag}</span>` : nothing}`;\n })}\n </div>\n <ol part=\"list\" role=\"list\" aria-label=${this.label || nothing}>\n ${nodes.map(\n (node) => html`<li part=\"item\" aria-current=${node.current ? 'step' : nothing}>\n <span class=\"rlabel\">${node.label}</span>${node.flag ? html`<span class=\"flag\">${node.flag}</span>` : nothing}\n </li>`,\n )}\n </ol>`;\n }\n}\n\n/** One day of the week strip. */\nexport interface WeekDay {\n /** The day, such as \"Mon\". Set in mono capitals. */\n day: string;\n /** What happens, such as \"Plan\". */\n heading: string;\n /** A line about it. */\n text?: string;\n /** Pick this day out in the accent, such as the demo. */\n highlight?: boolean;\n}\n\n/**\n * A working week in five tiles, such as Mon Plan, Tue Make, Wed Review, Thu\n * Make and Fri Demo: a mono day, a heading and a line, on tiles raised off an\n * ink band, with one day picked out in the accent.\n *\n * A list, each heading at the level the page asks for (1.3.1). The accent day\n * is also the only one with ink words, and its heading says what it is, so it\n * is not told by colour alone (1.4.1). The tiles wrap on a narrow screen\n * (1.4.10).\n *\n * @category content\n * @icon calendar\n */\nexport class ImpaktWeekStrip extends ImpaktElement {\n static properties = {\n days: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n label: { type: String },\n };\n declare days: WeekDay[];\n declare headingLevel: number;\n /** A name for the list, for a screen reader. Leave empty for none. */\n declare label: string;\n\n constructor() {\n super();\n this.days = [];\n this.headingLevel = 3;\n this.label = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; }\n ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr)); gap: 10px; }\n li { box-sizing: border-box; min-block-size: 150px; padding: ${space(5)}; background: ${bandRaised}; border: 1px solid ${bandLine}; color: ${bandOn}; }\n li.highlight { background: ${accent}; border-color: ${accent}; color: ${accentOn}; }\n .day { margin: 0; ${monoLabel}; color: ${bandMuted}; }\n .heading { margin: ${space(2)} 0 0; font-family: ${t.fontHeading}; font-size: 2rem; font-weight: ${fontWeight('semibold')}; line-height: 1.1; letter-spacing: -0.03em; }\n .text { margin: ${space(3)} 0 0; font-size: 0.875rem; line-height: 1.45; color: ${bandMuted}; }\n li.highlight :is(.day, .text) { color: ${accentOn}; }\n @media (forced-colors: active) { li, li.highlight { border-color: CanvasText; } li.highlight { border-width: 3px; } }\n `,\n ];\n\n render(): TemplateResult {\n if (!this.days?.length) return html``;\n const level = levelOf(this.headingLevel);\n return html`<ol part=\"list\" role=\"list\" aria-label=${this.label || nothing}>\n ${this.days.map(\n (day) => html`<li part=\"day\" class=${day.highlight ? 'highlight' : ''}>\n <p class=\"day\">${day.day}</p>\n <div class=\"heading\" role=\"heading\" aria-level=${level}>${day.heading}</div>\n ${day.text ? html`<p class=\"text\">${day.text}</p>` : nothing}\n </li>`,\n )}\n </ol>`;\n }\n}\n\n/**\n * A statement set apart on an ink panel, under a mono accent label: the \"How\n * might we\" of a case study.\n *\n * The panel stays ink in both themes, so the accent label on it keeps its\n * contrast (1.4.3). The label and statement are plain text, read in order.\n *\n * @category content\n * @icon quote\n * @slot - The statement, when it holds more than words. Replaces `text`.\n */\nexport class ImpaktCallout extends ImpaktElement {\n static properties = {\n label: { type: String },\n text: { type: String },\n };\n /** The label above, such as \"How might we\". */\n declare label: string;\n /** The statement. */\n declare text: string;\n\n constructor() {\n super();\n this.label = '';\n this.text = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; }\n .panel { padding: ${space(8)} ${space(8)} ${space(10)}; background: ${ink}; color: ${paper}; border: 1px solid ${ink}; }\n .label { margin: 0 0 ${space(4)}; ${monoLabel}; font-weight: ${fontWeight('medium')}; color: ${accent}; }\n .text { margin: 0; max-inline-size: 26em; font-family: ${t.fontHeading}; font-size: clamp(1.5rem, 1rem + 2vw, 2rem); font-weight: ${fontWeight('semibold')}; line-height: 1.2; letter-spacing: -0.02em; }\n @media (prefers-color-scheme: dark) { .panel { border-color: ${inkLine}; } }\n @media (max-width: 30rem) { .panel { padding: ${space(6)}; } }\n @media (forced-colors: active) { .panel { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"panel\" part=\"panel\">\n ${this.label ? html`<p class=\"label\" part=\"label\">${this.label}</p>` : nothing}\n <p class=\"text\" part=\"text\"><slot>${this.text}</slot></p>\n </div>`;\n }\n}\n\n/**\n * A hypothesis to test: its number such as \"H1\", how much it matters, a\n * statement, and the metric that will tell, on a white card with an ink border.\n * Lay six out two to a row.\n *\n * `impact` draws the tag: \"High impact\" on the accent, \"Medium impact\" and\n * \"Low impact\" outlined in ink. The tag says the impact in words, so it is not\n * told by its colour (1.4.1).\n *\n * @category content\n * @icon flask\n */\nexport class ImpaktHypothesisCard extends ImpaktElement {\n static properties = {\n number: { type: String },\n statement: { type: String },\n metric: { type: String },\n impact: { type: String, reflect: true },\n impactLabel: { type: String, attribute: 'impact-label' },\n };\n /** The hypothesis's number, such as \"H1\". */\n declare number: string;\n /** What the team believes, such as \"A jobs board grouped by stage shows stuck cars faster than a shared spreadsheet.\" */\n declare statement: string;\n /** What will be measured, such as \"Time a car waits unnoticed\". */\n declare metric: string;\n /** How much it matters. Leave empty for no tag. */\n declare impact: 'high' | 'medium' | 'low' | '';\n /** The tag's words, in place of the impact's own. */\n declare impactLabel: string;\n\n constructor() {\n super();\n this.number = '';\n this.statement = '';\n this.metric = '';\n this.impact = '';\n this.impactLabel = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; block-size: 100%; }\n article { box-sizing: border-box; block-size: 100%; display: grid; align-content: start; gap: ${space(4)}; padding: ${space(6)}; background: ${t.surfaceCard}; color: ${t.text}; border: 1px solid ${t.text}; }\n .top { display: flex; justify-content: space-between; align-items: center; gap: ${space(2)}; flex-wrap: wrap; min-block-size: 22px; }\n .number { font-family: ${t.fontMono}; font-size: 0.75rem; letter-spacing: 0.06em; }\n .impact { margin: 0; padding: 3px 7px; ${monoLabel}; font-weight: ${fontWeight('medium')}; border: 1px solid ${t.text}; color: ${t.text}; }\n :host([impact='high']) .impact { background: ${accent}; color: ${accentOn}; border-color: ${accentOn}; }\n .statement { margin: 0; font-family: ${t.fontHeading}; font-size: 1.25rem; line-height: 1.35; letter-spacing: -0.01em; }\n .metric { margin: 0; ${monoLabel}; color: ${t.textMuted}; }\n @media (forced-colors: active) { article, .impact { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const words: Record<string, string> = { high: 'High impact', medium: 'Medium impact', low: 'Low impact' };\n const impact = this.impactLabel || (this.impact && words[this.impact] ? say(words[this.impact]!) : '');\n return html`<article part=\"card\">\n ${\n this.number || impact\n ? html`<div class=\"top\">\n <span class=\"number\" part=\"number\">${this.number}</span>\n ${impact ? html`<p class=\"impact\" part=\"impact\">${impact}</p>` : nothing}\n </div>`\n : nothing\n }\n ${this.statement ? html`<p class=\"statement\" part=\"statement\">${this.statement}</p>` : nothing}\n ${this.metric ? html`<p class=\"metric\" part=\"metric\">${say('Metric')} \u00B7 ${this.metric}</p>` : nothing}\n </article>`;\n }\n}\n\n/**\n * A window frame for a product screenshot on an ink band: a 40px bar with\n * three dots, the first in the accent, and a mono caption, over a canvas that\n * holds the picture. With no picture in it, the canvas shows a grid, as a\n * placeholder.\n *\n * **The frame is decoration; the picture carries the words.** Give the image\n * its own `alt`. The bar is hidden from a screen reader (1.1.1).\n *\n * @category media\n * @icon browser\n * @slot - The picture, such as an `<img>` with its `alt`.\n */\nexport class ImpaktBrowserFrame extends ImpaktElement {\n static properties = {\n caption: { type: String },\n ratio: { type: String },\n filled: { state: true },\n };\n /** The caption in the bar, such as \"Harbour \u00B7 Cover\". It is decoration. */\n declare caption: string;\n /** The canvas's shape while it is empty, as a CSS aspect ratio. */\n declare ratio: string;\n declare protected filled: boolean;\n\n constructor() {\n super();\n this.caption = '';\n this.ratio = '16 / 9';\n this.filled = false;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; }\n .frame { border: 1px solid ${bandLine}; background: ${band}; color: ${bandOn}; }\n .bar { display: flex; align-items: center; gap: 6px; block-size: 40px; padding-inline: ${space(3)}; background: ${bandRaised}; border-block-end: 1px solid ${bandLine}; overflow: hidden; }\n .dot { flex: none; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${bandLine}; }\n .dot:first-child { background: ${accent}; }\n .caption { margin-inline-start: ${space(1.5)}; ${monoLabel}; color: ${bandMuted}; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .canvas { position: relative; }\n .canvas.empty { background-image: linear-gradient(to right, ${bandLine} 1px, transparent 1px), linear-gradient(to bottom, ${bandLine} 1px, transparent 1px); background-size: 28px 28px; }\n ::slotted(img), ::slotted(picture), ::slotted(video) { display: block; inline-size: 100%; block-size: auto; }\n @media (forced-colors: active) { .frame, .bar { border-color: CanvasText; } .dot { background: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"frame\" part=\"frame\">\n <div class=\"bar\" part=\"bar\" aria-hidden=\"true\">\n <span class=\"dot\"></span><span class=\"dot\"></span><span class=\"dot\"></span>\n ${this.caption ? html`<span class=\"caption\" part=\"caption\">${this.caption}</span>` : nothing}\n </div>\n <div class=\"canvas ${this.filled ? '' : 'empty'}\" part=\"canvas\" style=${this.filled ? '' : `aspect-ratio: ${this.ratio || '16 / 9'}`}>\n <slot @slotchange=${this.onSlot}></slot>\n </div>\n </div>`;\n }\n\n private onSlot(e: Event): void {\n this.filled = (e.target as HTMLSlotElement).assignedElements().length > 0;\n }\n}\n\ncustomElements.define('impakt-process-line', ImpaktProcessLine);\ncustomElements.define('impakt-week-strip', ImpaktWeekStrip);\ncustomElements.define('impakt-callout', ImpaktCallout);\ncustomElements.define('impakt-hypothesis-card', ImpaktHypothesisCard);\ncustomElements.define('impakt-browser-frame', ImpaktBrowserFrame);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-process-line': ImpaktProcessLine;\n 'impakt-week-strip': ImpaktWeekStrip;\n 'impakt-callout': ImpaktCallout;\n 'impakt-hypothesis-card': ImpaktHypothesisCard;\n 'impakt-browser-frame': ImpaktBrowserFrame;\n }\n}\n", "/**\n * The G2 Noire blocks for the AI tools pages: the flow that shows how a tool\n * works, or how a visitor gets from one page to the next.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement, fontWeight, space, t } from '@atomic-ui/ui';\nimport { accent, accentOn, bandLine, bandMuted, bandOn, bandRaised, ink, inkLine, inkMuted, levelOf, monoLabel, paper } from './g2-shared';\n\n/** One step of a flow. */\nexport interface FlowStep {\n /** A mono label, such as \"01 \u00B7 Model\". */\n label?: string;\n /** What happens, such as \"Reads and drafts\". */\n heading: string;\n /** A line about it. */\n text?: string;\n /** The box: white with an ink border, soft, ink, or the accent. */\n tone?: 'card' | 'soft' | 'ink' | 'accent';\n /** Words on the arrow that leads to this step, such as \"back\". */\n connector?: string;\n}\n\n/**\n * Steps in a row joined by arrows: how a tool works (\"Reads and drafts\",\n * \"Checks every answer\", \"Makes the call\"), or the pages a visitor passes\n * through. Each box has a tone, a mono label, a heading and a line; an arrow\n * can carry words such as \"back\".\n *\n * **An ordered list.** A screen reader meets the steps in order, each heading\n * at the level the page asks for; the arrows are decoration, and words on an\n * arrow are read before the step they lead to (1.3.1). In a narrow column,\n * measured against its own width, the steps stack and the arrows point down\n * (1.4.10).\n *\n * On an ink band, set `on-ink`: white boxes become tiles raised off the band.\n * The ink and accent boxes keep their colours in both themes, so their words\n * keep their contrast (1.4.3).\n *\n * @category content\n * @icon flow\n */\nexport class ImpaktFlow extends ImpaktElement {\n static properties = {\n steps: { type: Array },\n size: { type: String, reflect: true },\n onInk: { type: Boolean, reflect: true, attribute: 'on-ink' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n label: { type: String },\n };\n declare steps: FlowStep[];\n /** The headings' size: `md` 18px for a flow of pages, `lg` 32px for how a tool works. */\n declare size: 'md' | 'lg';\n /** Draw white boxes as tiles raised off an ink band. */\n declare onInk: boolean;\n declare headingLevel: number;\n /** A name for the list, for a screen reader. Leave empty for none. */\n declare label: string;\n\n constructor() {\n super();\n this.steps = [];\n this.size = 'md';\n this.onInk = false;\n this.headingLevel = 3;\n this.label = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; container-type: inline-size; }\n ol { margin: 0; padding: 0; list-style: none; display: flex; align-items: stretch; }\n li { flex: 1 1 0; min-inline-size: 0; display: flex; align-items: stretch; }\n li:not(:first-child) { flex-basis: 56px; }\n .arrow { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; inline-size: 56px; color: ${t.text}; }\n :host([on-ink]) .arrow { color: ${bandOn}; }\n .arrow svg { display: block; }\n .via { font-size: 0.75rem; line-height: 1.2; color: ${t.textMuted}; }\n :host([on-ink]) .via { color: ${bandMuted}; }\n .box { flex: 1 1 auto; min-inline-size: 0; box-sizing: border-box; padding: ${space(4)} ${space(5)}; border: 1px solid ${t.text}; background: ${t.surfaceCard}; color: ${t.text}; }\n :host([size='lg']) .box { padding: ${space(6)}; }\n .box.soft { background: ${t.surfaceSubtle}; }\n :host([on-ink]) .box.card, :host([on-ink]) .box.soft { background: ${bandRaised}; border-color: ${bandLine}; color: ${bandOn}; }\n .box.ink { background: ${ink}; border-color: ${inkLine}; color: ${paper}; }\n .box.accent { background: ${accent}; border-color: ${accent}; color: ${accentOn}; }\n .label { margin: 0 0 ${space(2)}; ${monoLabel}; color: ${t.textMuted}; }\n .text { margin: ${space(2)} 0 0; font-size: 0.875rem; line-height: 1.5; color: ${t.textMuted}; }\n :host([on-ink]) :is(.card, .soft) :is(.label, .text) { color: ${bandMuted}; }\n .ink :is(.label, .text) { color: ${inkMuted}; }\n .accent :is(.label, .text) { color: ${accentOn}; }\n .heading { margin: 0; font-family: ${t.fontHeading}; font-size: 1.125rem; font-weight: ${fontWeight('medium')}; line-height: 1.25; letter-spacing: -0.01em; }\n :host([size='lg']) .heading { font-size: clamp(1.5rem, 1rem + 2cqi, 2rem); font-weight: ${fontWeight('semibold')}; line-height: 1.1; letter-spacing: -0.03em; }\n @container (max-width: 47.99rem) {\n ol, li { flex-direction: column; }\n .arrow { inline-size: auto; block-size: 48px; flex-direction: row; }\n .arrow svg { transform: rotate(90deg); }\n }\n @media (forced-colors: active) { .box { border-color: CanvasText; } .accent { border-width: 3px; } }\n `,\n ];\n\n render(): TemplateResult {\n if (!this.steps?.length) return html``;\n const level = levelOf(this.headingLevel);\n return html`<ol part=\"list\" role=\"list\" aria-label=${this.label || nothing}>\n ${this.steps.map(\n (step, i) => html`<li part=\"step\">\n ${\n i > 0\n ? html`<span class=\"arrow\" part=\"arrow\">\n <svg viewBox=\"0 0 36 12\" width=\"36\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.25\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M0 6h34M29 1l5 5-5 5\" /></svg>\n ${step.connector ? html`<span class=\"via\">${step.connector}</span>` : nothing}\n </span>`\n : nothing\n }\n <div class=\"box ${step.tone ?? 'card'}\" part=\"box\">\n ${step.label ? html`<p class=\"label\">${step.label}</p>` : nothing}\n <div class=\"heading\" role=\"heading\" aria-level=${level}>${step.heading}</div>\n ${step.text ? html`<p class=\"text\">${step.text}</p>` : n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,GAAW,UAAU,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAQpH,EAEA,QAAyB,CACvB,GAAI,CAAC,KAAK,OAAO,OAAQ,OAAOC,KAChC,IAAMC,EAAQC,GAAQ,KAAK,YAAY,EACvC,OAAOF,4CAA8C,KAAK,OAASG,EAAO;AAAA,QACtE,KAAK,MAAM,IACX,CAACC,EAAM,IAAMJ;AAAA,YAET,EAAI,EACAA;AAAA;AAAA,kBAEEI,EAAK,UAAYJ,uBAAyBI,EAAK,SAAS,UAAYD,EAAO;AAAA,uBAE7EA,EACN;AAAA,4BACkBC,EAAK,MAAQ,MAAM;AAAA,cACjCA,EAAK,MAAQJ,sBAAwBI,EAAK,KAAK,OAASD,EAAO;AAAA,6DAChBF,CAAK,IAAIG,EAAK,OAAO;AAAA,cACpEA,EAAK,KAAOJ,qBAAuBI,EAAK,IAAI,OAASD,EAAO;AAAA;AAAA,cAGpE,CAAC;AAAA,UAEL,CACF,EAEA,eAAe,OAAO,cAAepB,EAAU",
|
|
6
|
-
"names": ["css", "html", "nothing", "ImpaktElement", "fontSize", "fontWeight", "lineHeight", "space", "spaceAround", "t", "token", "type", "iconSvg", "heading", "level", "text", "cls", "headingStyles", "ImpaktHero", "pictured", "ImpaktFeatureList", "numbered", "item", "index", "ImpaktQuote", "ImpaktStat", "ImpaktAnnouncement", "ImpaktSearchBar", "event", "data", "values", "value", "key", "field", "i", "id", "choices", "o", "c", "css", "html", "nothing", "ImpaktElement", "focusRing", "fontSize", "fontWeight", "lineHeight", "space", "spaceAround", "t", "iconSvg", "ImpaktCardGrid", "card", "css", "html", "nothing", "unsafeCSS", "ImpaktElement", "focusRing", "fontWeight", "say", "space", "t", "token", "JOURNEY_STAGES", "isStage", "value", "indexOf", "stage", "arrow", "pointer", "move", "name", "ms", "easing", "
|
|
4
|
+
"sourcesContent": ["/**\n * @atomic-ui/blocks \u2014 the section blocks Impakt sites are built from: marketing blocks,\n * property and selling tools, the site frame and the changelog blocks. Standard\n * custom elements in Lit, styled only from design tokens, built to WCAG 2.2 AA.\n *\n * Importing this module defines every block. It imports `@atomic-ui/ui` first,\n * which defines the product components the blocks draw inside themselves, such\n * as `impakt-button`, `impakt-nav` and `impakt-select`, and gives them their\n * base class, tokens and style fragments.\n */\nimport '@atomic-ui/ui';\n\nexport {\n ImpaktHero,\n ImpaktFeatureList,\n ImpaktQuote,\n ImpaktStat,\n ImpaktAnnouncement,\n ImpaktSearchBar,\n type FeatureItem,\n type SearchField,\n} from './components/marketing';\nexport { ImpaktCardGrid, type CardItem } from './components/card-grid';\nexport { ImpaktJourneyButton, JOURNEY_STAGES, type JourneyStage } from './components/journey';\nexport {\n ImpaktWorkList,\n ImpaktStatRow,\n ImpaktFaq,\n ImpaktSiteMenu,\n ImpaktOffer,\n ImpaktPostCard,\n ImpaktHighlight,\n type WorkItem,\n type StatRowItem,\n type FaqItem,\n} from './components/studio';\nexport {\n ImpaktCarousel,\n ImpaktGallery,\n ImpaktLogoCloud,\n ImpaktSteps,\n ImpaktMediaSplit,\n ImpaktCtaBanner,\n ImpaktReviews,\n ImpaktNewsletter,\n gallerySpan,\n type GalleryItem,\n type LogoItem,\n type StepItem,\n type ReviewItem,\n} from './components/organisms';\nexport {\n ImpaktSitePlan,\n ImpaktMortgageCalculator,\n ImpaktBeforeAfter,\n ImpaktStickyBar,\n ImpaktLocationCard,\n monthlyPayment,\n type SitePlot,\n type NearbyItem,\n} from './components/property';\nexport {\n ImpaktPlanComparison,\n ImpaktVideo,\n ImpaktRegulatoryNotice,\n ImpaktStampDutyCalculator,\n ImpaktAffordabilityCalculator,\n ImpaktContactBlock,\n stampDuty,\n embedOf,\n SDLT,\n type PlanItem,\n type PlanRow,\n} from './components/selling';\nexport {\n ImpaktEstimator,\n estimate,\n phaseWeeks,\n type EstimatorQuestion,\n type EstimatorChoice,\n type EstimatorBand,\n type EstimatorPhase,\n type EstimateResult,\n} from './components/estimator';\nexport { ImpaktSiteHeader, ImpaktSiteFooter, ImpaktWordmark, type FooterLogLine, type FooterColumn } from './components/site';\nexport { ImpaktScene, type SceneDrive, type SceneLayout } from './components/scene';\nexport { ImpaktScrubber, type ScrubberStop } from './components/scrubber';\nexport {\n ImpaktReleaseCard,\n ImpaktReleaseList,\n ImpaktBranchList,\n ImpaktCheckList,\n ImpaktBranchTimeline,\n type DiffLine,\n type ReleaseItem,\n type Branch,\n type CheckItem,\n type TimelineLane,\n type TimelineMark,\n} from './components/changelog';\nexport {\n ImpaktStageTag,\n ImpaktSectionHead,\n ImpaktServiceCard,\n ImpaktCursor,\n ImpaktHandNote,\n ImpaktFacts,\n ImpaktNumberedList,\n ImpaktColumnList,\n ImpaktOfficeCard,\n STAGE_WORDS,\n type StageName,\n type FactItem,\n type NumberedItem,\n type ColumnListColumn,\n} from './components/g2-site';\nexport {\n ImpaktProcessLine,\n ImpaktWeekStrip,\n ImpaktCallout,\n ImpaktHypothesisCard,\n ImpaktBrowserFrame,\n type ProcessNode,\n type WeekDay,\n} from './components/g2-case';\nexport { ImpaktFlow, type FlowStep } from './components/g2-tools';\n", "import { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement, fontSize, fontWeight, lineHeight, space, spaceAround, t, token, type, iconSvg } from '@atomic-ui/ui';\n\n/** A heading at a level the author chose, drawn at a size the component chose. */\nconst heading = (level: number, text: string | TemplateResult, cls: string): TemplateResult =>\n html`<div class=${cls} role=\"heading\" aria-level=${level}>${text}</div>`;\n\nconst headingStyles = css`\n .h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; line-height: ${lineHeight('tight')}; }\n .eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${t.brand})); ${type('sm')} font-size: var(--impakt-font-size-eyebrow, var(--impakt-font-size-sm, 0.875rem)); font-family: ${t.fontEyebrow}; font-weight: var(--impakt-font-weight-eyebrow, ${fontWeight('semibold')}); letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .body { margin: 0; line-height: ${lineHeight('normal')}; max-inline-size: 65ch; }\n`;\n\n/**\n * The opening of a page: a short label, a big heading, a line of text, the\n * page's main actions and, beside them, a picture.\n *\n * Put the buttons in the `actions` slot. The picture goes beside the words on\n * a wide screen and below them on a phone, so the heading is always the first\n * thing read.\n *\n * @category layout\n * @icon hero\n * @role heading\n * A heading with more than words in it, such as a word picked out with\n * `impakt-highlight`, is slotted as `heading`; it stays the hero's heading at\n * its `level`, and `heading` is then only the fallback.\n *\n * @slot heading - The heading's words, when they hold more than text, such as an `impakt-highlight`.\n * @slot actions - The page's main buttons and links.\n * @slot search - A search bar across the bottom of a full-picture hero.\n */\nexport class ImpaktHero extends ImpaktElement {\n static properties = {\n eyebrow: { type: String },\n heading: { type: String },\n lead: { type: String },\n level: { type: Number, reflect: true },\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n treatment: { type: String, reflect: true },\n ratingText: { type: String, attribute: 'rating-text' },\n eyebrowIcon: { type: String, attribute: 'eyebrow-icon' },\n align: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A short label above the heading, such as the name of the development. */\n declare eyebrow: string;\n declare heading: string;\n /** A sentence or two under the heading. */\n declare lead: string;\n /** The heading's level in the page. A page's hero is usually its only level 1. */\n declare level: 1 | 2;\n declare imageSrc: string;\n /** What the picture shows. Leave empty only when it is decoration. */\n declare imageAlt: string;\n /** The picture beside the words, or filling the whole block with the words over it. */\n declare treatment: 'split' | 'cover';\n /** A short line of proof on the picture, such as \"4.8 from 312 buyers\". */\n declare ratingText: string;\n /** A small picture before the eyebrow on a full-picture hero. */\n declare eyebrowIcon:\n | 'none'\n | 'arrow-right'\n | 'arrow-left'\n | 'chevron-right'\n | 'chevron-down'\n | 'check'\n | 'close'\n | 'menu'\n | 'plus'\n | 'minus'\n | 'search'\n | 'external'\n | 'download'\n | 'home'\n | 'phone'\n | 'mail'\n | 'map-pin'\n | 'calendar'\n | 'clock'\n | 'user'\n | 'star'\n | 'heart'\n | 'shield'\n | 'leaf'\n | 'sun'\n | 'bolt'\n | 'key'\n | 'info'\n | 'warning'\n | 'document'\n | 'pound'\n | 'chat';\n /** Where the words sit. Centred heroes have no picture beside them. */\n declare align: 'start' | 'center';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.eyebrow = '';\n this.heading = '';\n this.lead = '';\n this.level = 1;\n this.imageSrc = '';\n this.imageAlt = '';\n this.treatment = 'split';\n this.ratingText = '';\n this.eyebrowIcon = 'none';\n this.align = 'start';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n .hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: ${space(8)}; align-items: center; }\n .hero.pictured { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }\n .words { display: flex; flex-direction: column; gap: ${space(4)}; }\n :host([align='center']) .words { align-items: center; text-align: center; margin-inline: auto; max-inline-size: 48rem; }\n .h { ${type('5xl')} letter-spacing: ${t.trackingTight}; text-wrap: balance; }\n .body { ${type('lg')} color: ${t.textMuted}; text-wrap: pretty; }\n @container (max-width: 40rem) { .h { ${type('4xl')} } }\n .actions { display: flex; flex-wrap: wrap; gap: ${space(3)} ${space(4)}; align-items: center; margin-block-start: ${space(2)}; }\n :host([align='center']) .actions { justify-content: center; }\n img { display: block; inline-size: 100%; block-size: auto; border-radius: ${t.radius2xl}; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: ${t.shadowLg}; }\n @container (max-width: 48rem) { .hero.pictured { grid-template-columns: minmax(0, 1fr); } }\n /* Cover: the picture fills the block edge to edge, a scrim keeps the words readable (1.4.3). */\n .cover { position: relative; display: flex; flex-direction: column; justify-content: center; min-block-size: clamp(44rem, 61vw, 55rem); margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); padding: ${space(32)} max(${space(8)}, calc(var(--impakt-bleed, 1) * (50vw - 50%))) ${space(24)}; overflow: hidden; color: #fff; --impakt-color-text-heading: #fff; }\n .cover img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }\n .cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(18 31 26 / 0.82) 0%, rgb(18 31 26 / 0.42) 55%, rgb(18 31 26 / 0.05) 100%); }\n .cover .words { position: relative; z-index: 1; max-inline-size: 48rem; }\n .cover .eyebrow { display: inline-flex; align-items: center; gap: ${space(2)}; align-self: flex-start; padding: ${space(2)} ${space(3.5)}; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); text-transform: none; letter-spacing: 0; }\n .chip-line { position: relative; z-index: 1; block-size: 0; }\n .chip { position: absolute; inset-block-start: ${space(14)}; inset-inline-end: ${space(9)}; display: inline-flex; align-items: center; gap: ${space(2.5)}; padding: ${space(3)} ${space(4.5)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; white-space: nowrap; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: ${t.radiusXl}; }\n .finder { position: relative; z-index: 1; margin-block-start: ${space(12)}; }\n .cover .h { font-size: clamp(3rem, 6.4vw, 5.75rem); line-height: 1; }\n .cover .body { color: rgb(255 255 255 / 0.92); max-inline-size: 40rem; }\n @container (max-width: 64rem) { .chip { display: none; } }\n @container (max-width: 30rem) { .finder { display: none; } }\n @container (max-width: 48rem) { .finder { margin-block-start: ${space(6)}; } .cover { justify-content: flex-end; min-block-size: 43.75rem; padding-block: ${space(32)} ${space(10)}; } .cover::after { background: linear-gradient(180deg, rgb(18 31 26 / 0.1) 0%, rgb(18 31 26 / 0.3) 42%, rgb(18 31 26 / 0.86) 100%); } .cover .h { font-size: 3rem; } }\n `,\n ];\n\n render(): TemplateResult {\n if (this.treatment === 'cover' && this.imageSrc) {\n return html`<div class=\"cover\" part=\"hero\">\n ${this.ratingText ? html`<div class=\"chip-line\"><div class=\"chip\">${iconSvg('star', '20px')}${this.ratingText}</div></div>` : nothing}\n <img src=${this.imageSrc} alt=${this.imageAlt} part=\"image\" />\n <div class=\"words\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrowIcon !== 'none' ? iconSvg(this.eyebrowIcon, '16px') : nothing}${this.eyebrow}</p>` : nothing}\n ${heading(this.level, html`<slot name=\"heading\">${this.heading}</slot>`, 'h')}\n ${this.lead ? html`<p class=\"body\">${this.lead}</p>` : nothing}\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>\n <div class=\"finder\"><slot name=\"search\"></slot></div>\n </div>`;\n }\n const pictured = Boolean(this.imageSrc) && this.align !== 'center';\n return html`<div class=\"hero ${pictured ? 'pictured' : ''}\" part=\"hero\">\n <div class=\"words\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n ${heading(this.level, html`<slot name=\"heading\">${this.heading}</slot>`, 'h')}\n ${this.lead ? html`<p class=\"body\">${this.lead}</p>` : nothing}\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>\n ${pictured ? html`<img src=${this.imageSrc} alt=${this.imageAlt} part=\"image\" />` : nothing}\n </div>`;\n }\n}\n\n/** One benefit or feature in a list of them. */\nexport interface FeatureItem {\n id?: string;\n icon?: string;\n heading: string;\n text?: string;\n /**\n * With `look=\"numbered\"`: a word or two read with the item when it is the\n * one that needs attention, such as \"Needs your attention\". Its dot then\n * turns to the accent; the word is what carries it to a screen reader.\n */\n attention?: string;\n}\n\n/**\n * Benefits or features side by side, each with an icon, a short heading and a\n * line of text: \"Ten years of cover\", \"Lower bills from day one\".\n *\n * The icons are decoration, because each heading already says what it is.\n * The items are a list, so a screen reader says how many there are.\n *\n * `look=\"ruled\"` draws each item under a 1px ink rule with no icon, the\n * heading at 24px and the text muted. `look=\"numbered\"` draws each as a card\n * with a 1px ink border, its number in monospace at the top left and a status\n * dot at the top right: ink, or the accent for the one item given\n * `attention`. The numbers and dots are decoration.\n *\n * @category content\n * @icon features\n */\nexport class ImpaktFeatureList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n columns: { type: String, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n layout: { type: String, reflect: true },\n look: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: FeatureItem[];\n declare columns: 'two' | 'three' | 'four';\n /** The level of each item's heading. One below the heading above the list. */\n declare headingLevel: 2 | 3 | 4;\n /** Icons above the words, or beside them. */\n declare layout: 'stacked' | 'inline';\n /** `icons` draws each item's icon. `ruled` sets each under a 1px ink rule. `numbered` sets each in a bordered card with its number and a status dot. */\n declare look: 'icons' | 'ruled' | 'numbered';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.columns = 'three';\n this.headingLevel = 3;\n this.layout = 'stacked';\n this.look = 'icons';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(8)} ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }\n :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n :host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }\n li { display: flex; flex-direction: column; gap: ${space(2)}; }\n :host([layout='inline']) li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: ${space(4)}; align-items: start; }\n :host([layout='inline']) .words { display: flex; flex-direction: column; gap: ${space(1)}; }\n .icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 48px; block-size: 48px; border-radius: ${t.radiusLg}; background: ${t.brandSubtle}; color: ${t.brand}; margin-block-end: ${space(2)}; }\n :host([layout='inline']) .icon { margin: 0; }\n .h { font-size: ${fontSize('lg')}; }\n .body { color: ${t.text}; }\n /* Ruled: a 1px ink rule above each item, no icon, the heading at 24px and the words muted. */\n :host([look='ruled']) li { gap: ${space(3)}; padding-block-start: ${space(5)}; border-block-start: ${t.borderThin} solid ${t.text}; }\n :host(:is([look='ruled'], [look='numbered'])) .icon { display: none; }\n :host(:is([look='ruled'], [look='numbered'])) .h { font-size: clamp(1.25rem, 3cqi, 1.5rem); font-weight: ${fontWeight('semibold')}; letter-spacing: -0.02em; line-height: 1.2; }\n :host(:is([look='ruled'], [look='numbered'])) .body { color: ${t.textMuted}; }\n :host(:is([look='ruled'], [look='numbered'])) .words { display: flex; flex-direction: column; gap: ${space(3)}; }\n /* Numbered: a card with a 1px ink border, its number at the top left and a status dot at the top right. */\n :host([look='numbered']) ul { gap: ${space(3)}; }\n :host([look='numbered']) li { gap: ${space(4)}; padding: ${space(6)}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusSm}; }\n .top { display: flex; align-items: center; justify-content: space-between; font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; color: ${t.text}; }\n .dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: ${t.text}; }\n .dot.attention { background: ${token('color.accent.default', '#ffd43b')}; box-shadow: inset 0 0 0 1px ${t.text}; }\n .sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n @media (forced-colors: active) { .dot { background: CanvasText; } .dot.attention { background: Highlight; } :host([look='numbered']) li { border-color: CanvasText; } }\n @container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n @container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n render(): TemplateResult {\n const numbered = this.look === 'numbered';\n return html`<ul part=\"list\">${(this.items ?? []).map(\n (item, index) => html`<li part=\"item\">\n ${numbered ? html`<div class=\"top\" aria-hidden=\"true\"><span>${String(index + 1).padStart(2, '0')}</span><span class=${item.attention ? 'dot attention' : 'dot'}></span></div>` : nothing}\n ${item.icon && this.look !== 'ruled' && !numbered ? html`<span class=\"icon\">${iconSvg(item.icon, '24px')}</span>` : nothing}\n <div class=\"words\">${heading(this.headingLevel, html`${item.heading}${numbered && item.attention ? html`<span class=\"sr\"> (${item.attention})</span>` : nothing}`, 'h')}${item.text ? html`<p class=\"body\">${item.text}</p>` : nothing}</div>\n </li>`,\n )}</ul>`;\n }\n}\n\n/**\n * Something a customer said, and who said it.\n *\n * It is a `blockquote` with a `figcaption`, so the words and the person are\n * tied together for a screen reader as well as on the screen.\n *\n * @category content\n * @icon quote\n */\nexport class ImpaktQuote extends ImpaktElement {\n static properties = {\n quote: { type: String },\n person: { type: String },\n about: { type: String },\n imageSrc: { type: String, attribute: 'image-src' },\n size: { type: String, reflect: true },\n align: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The words they said, without quotation marks. */\n declare quote: string;\n /** Who said it. */\n declare person: string;\n /** Who they are, such as \"Bought at Larkfield Meadows, 2025\". */\n declare about: string;\n /** A photo of them. It is decoration, because their name is beside it. */\n declare imageSrc: string;\n declare size: 'md' | 'lg';\n declare align: 'start' | 'center';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.quote = '';\n this.person = '';\n this.about = '';\n this.imageSrc = '';\n this.size = 'md';\n this.align = 'start';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; }\n figure { margin: 0; display: flex; flex-direction: column; gap: ${space(4)}; max-inline-size: 48rem; }\n :host([align='center']) figure { margin-inline: auto; align-items: center; text-align: center; }\n blockquote { margin: 0; font-family: ${t.fontHeading}; font-size: ${fontSize('lg')}; line-height: ${lineHeight('normal')}; color: inherit; }\n :host([size='lg']) blockquote { font-size: ${fontSize('2xl')}; line-height: ${lineHeight('tight')}; }\n blockquote::before { content: '\\\\201C'; } blockquote::after { content: '\\\\201D'; }\n figcaption { display: flex; align-items: center; gap: ${space(3)}; }\n img { inline-size: 48px; block-size: 48px; border-radius: 50%; object-fit: cover; }\n .name { font-weight: ${fontWeight('semibold')}; }\n .detail { color: ${t.textMuted}; font-size: ${fontSize('sm')}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<figure part=\"figure\">\n <blockquote part=\"quote\">${this.quote}</blockquote>\n ${this.person ? html`<figcaption>${this.imageSrc ? html`<img src=${this.imageSrc} alt=\"\" />` : nothing}<span><span class=\"name\">${this.person}</span>${this.about ? html`<br /><span class=\"detail\">${this.about}</span>` : nothing}</span></figcaption>` : nothing}\n </figure>`;\n }\n}\n\n/**\n * A number that makes a point, with what it counts beneath it: \"36 years\",\n * \"Building in Kent since 1987\".\n *\n * @category content\n * @icon stat\n */\nexport class ImpaktStat extends ImpaktElement {\n static properties = {\n figure: { type: String },\n label: { type: String },\n note: { type: String },\n size: { type: String, reflect: true },\n align: { type: String, reflect: true },\n };\n /** How large the number is drawn. */\n declare size: 'md' | 'lg' | 'xl';\n /** The number, written as it should appear, such as \"36\" or \"\u00A3280k\". */\n declare figure: string;\n /** What the number counts. */\n declare label: string;\n /** A line more, if the label needs it. */\n declare note: string;\n declare align: 'start' | 'center';\n\n constructor() {\n super();\n this.figure = '';\n this.label = '';\n this.note = '';\n this.size = 'md';\n this.align = 'start';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; }\n .stat { display: flex; flex-direction: column; gap: ${space(1)}; }\n :host([align='center']) .stat { align-items: center; text-align: center; }\n .value { font-family: ${t.fontHeading}; font-size: ${fontSize('3xl')}; font-weight: ${fontWeight('bold')}; line-height: 1; color: ${t.textHeading}; }\n :host([size='lg']) .value { font-size: ${fontSize('5xl')}; }\n :host([size='xl']) .value { font-size: clamp(2.75rem, 6vw, 4rem); }\n .label { font-weight: ${fontWeight('semibold')}; }\n .detail { color: ${t.textMuted}; font-size: ${fontSize('sm')}; }\n `,\n ];\n\n render(): TemplateResult {\n // Read as one phrase, \"36 years\", rather than a bare number and then a label.\n return html`<p class=\"stat\" part=\"stat\" style=\"margin:0\"><span class=\"value\">${this.figure}</span> <span class=\"label\">${this.label}</span>${this.note ? html` <span class=\"detail\">${this.note}</span>` : nothing}</p>`;\n }\n}\n\n/**\n * A thin line of news across the top of a page: a launch, a change to opening\n * hours. Keep it to one short sentence.\n *\n * @category feedback\n * @icon alert\n */\nexport class ImpaktAnnouncement extends ImpaktElement {\n static properties = {\n message: { type: String },\n linkText: { type: String, attribute: 'link-text' },\n href: { type: String },\n };\n declare message: string;\n declare linkText: string;\n declare href: string;\n\n constructor() {\n super();\n this.message = '';\n this.linkText = '';\n this.href = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; }\n .bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: ${space(2)} ${space(3)}; padding: ${space(2.5)} ${space(5)}; ${type('sm')} text-align: center; color: ${t.onBrand}; background: ${t.brand}; }\n :host { margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); }\n a { display: inline-flex; align-items: center; gap: ${space(1)}; min-block-size: ${t.targetMin}; color: inherit; font-weight: ${fontWeight('semibold')}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"bar\" part=\"bar\"><span>${this.message}</span>${this.linkText && this.href ? html`<a href=${this.href}>${this.linkText}${iconSvg('arrow-right', '14px')}</a>` : nothing}</div>`;\n }\n}\n\n/** One choice in a search bar. */\nexport interface SearchField {\n id?: string;\n /** The name it sends, such as \"bedrooms\". */\n name?: string;\n label: string;\n /** What it shows before anything is chosen. */\n placeholder?: string;\n /** The other choices, separated by commas. */\n options?: string;\n}\n\n/**\n * A row of choices and one button that finds what fits: where, how many\n * bedrooms, up to what budget.\n *\n * Each choice is a native select with a real label. It sends the visitor to\n * `action` with their choices in the address, so it works as a plain link can.\n *\n * @category form\n * @icon search\n * @fires {CustomEvent<{ values: Record<string, string> }>} impakt-submit - When the search is run. The choices are in detail.values.\n */\nexport class ImpaktSearchBar extends ImpaktElement {\n static properties = {\n items: { type: Array },\n buttonText: { type: String, attribute: 'button-text' },\n action: { type: String },\n label: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: SearchField[];\n declare buttonText: string;\n /** Where the search goes. Leave empty to handle it in the app. */\n declare action: string;\n /** What the search is called for a screen reader. */\n declare label: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.buttonText = 'Search';\n this.action = '';\n this.label = 'Search';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n form { display: flex; align-items: center; padding: ${space(3)}; background: ${t.surfaceCard}; color: ${t.text}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowXl}; }\n .field { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${space(1)}; padding: ${space(1.5)} ${space(5)}; }\n label { ${type('sm')} color: ${t.textMuted}; }\n select { inline-size: 100%; min-block-size: 28px; padding: 0; font: inherit; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.text}; background: transparent; border: 0; border-radius: ${t.radiusSm}; cursor: pointer; }\n select:focus-visible, button:focus-visible { outline: 2px solid ${t.brand}; outline-offset: 2px; }\n button { flex: none; min-block-size: 48px; padding: ${space(3)} ${space(6)}; font: inherit; font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; background: ${t.brand}; border: 0; border-radius: ${t.radiusLg}; cursor: pointer; }\n button:hover { background: ${t.brandHover}; }\n @container (max-width: 56rem) { form { flex-wrap: wrap; } .field { flex: 1 1 40%; } button { inline-size: 100%; } }\n @container (max-width: 30rem) { form { flex-direction: column; align-items: stretch; gap: ${space(2)}; } .field { flex: none; } }\n `,\n ];\n\n private submit(event: SubmitEvent): void {\n const data = new FormData(event.currentTarget as HTMLFormElement);\n const values: Record<string, string> = {};\n data.forEach((value, key) => {\n if (value !== '') values[key] = String(value);\n });\n this.dispatchEvent(new CustomEvent('impakt-submit', { detail: { values }, bubbles: true, composed: true }));\n if (!this.action) event.preventDefault();\n }\n\n render(): TemplateResult {\n return html`<form role=\"search\" aria-label=${this.label} method=\"get\" action=${this.action || nothing} @submit=${this.submit} part=\"form\">\n ${(this.items ?? []).map((field, i) => {\n const id = this.id_(`field-${i}`);\n const choices = String(field.options ?? '')\n .split(',')\n .map((o) => o.trim())\n .filter(Boolean);\n return html`<div class=\"field\"><label for=${id}>${field.label}</label><select id=${id} name=${field.name || field.label.toLowerCase().replace(/[^a-z0-9]+/g, '-')}>\n <option value=\"\">${field.placeholder || 'Any'}</option>${choices.map((c) => html`<option value=${c}>${c}</option>`)}\n </select></div>`;\n })}\n <button type=\"submit\">${this.buttonText}</button>\n </form>`;\n }\n}\n\ncustomElements.define('impakt-search-bar', ImpaktSearchBar);\ncustomElements.define('impakt-announcement', ImpaktAnnouncement);\ncustomElements.define('impakt-hero', ImpaktHero);\ncustomElements.define('impakt-feature-list', ImpaktFeatureList);\ncustomElements.define('impakt-quote', ImpaktQuote);\ncustomElements.define('impakt-stat', ImpaktStat);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-hero': ImpaktHero;\n 'impakt-feature-list': ImpaktFeatureList;\n 'impakt-quote': ImpaktQuote;\n 'impakt-stat': ImpaktStat;\n }\n}\n", "/**\n * A row of linked cards.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement, focusRing, fontSize, fontWeight, lineHeight, space, spaceAround, t, iconSvg } from '@atomic-ui/ui';\n\n/** One card in a row of them. */\nexport interface CardItem {\n id?: string;\n heading: string;\n text?: string;\n imageSrc?: string;\n imageAlt?: string;\n href?: string;\n badge?: string;\n}\n\n/**\n * A row of cards, each a picture, a heading, a line of text and a link: the\n * developments on a developments page, or the house types at one of them.\n *\n * **The whole card is the link's target, and the heading is its name.** The\n * link is on the heading, so a screen reader hears \"Larkfield Meadows, link\"\n * once rather than the whole card read out as one long link, and a pointer\n * can still press anywhere on the card.\n *\n * @category content\n * @icon cards\n */\nexport class ImpaktCardGrid extends ImpaktElement {\n static properties = {\n items: { type: Array },\n columns: { type: String, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n ratio: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: CardItem[];\n declare columns: 'two' | 'three' | 'four';\n /** The level of each card's heading. One below the heading above the cards. */\n declare headingLevel: 2 | 3 | 4;\n /** The shape of each card's picture. */\n declare ratio: '16:9' | '4:3' | '3:2' | '1:1';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.columns = 'three';\n this.headingLevel = 3;\n this.ratio = '4:3';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; --ratio: 4 / 3; }\n :host([ratio='16:9']) { --ratio: 16 / 9; }\n :host([ratio='3:2']) { --ratio: 3 / 2; }\n :host([ratio='1:1']) { --ratio: 1 / 1; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }\n :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n :host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }\n /* A card is drawn as impakt-card is: a 1px border in the text colour and no shadow. */\n li { position: relative; display: flex; flex-direction: column; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusXl}; box-shadow: none; overflow: hidden; }\n img { border-block-end: ${t.borderThin} solid ${t.text}; }\n img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; }\n .words { display: flex; flex-direction: column; gap: ${space(2)}; padding: ${space(5)}; flex: 1; }\n .h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-size: ${fontSize('lg')}; font-weight: ${fontWeight('bold')}; line-height: ${lineHeight('tight')}; }\n .h a { color: inherit; text-decoration: none; border-radius: ${t.radiusSm}; }\n .h a::after { content: ''; position: absolute; inset: 0; }\n li.linked:hover .h a { text-decoration: underline; text-underline-offset: 0.2em; }\n .body { margin: 0; line-height: ${lineHeight('normal')}; }\n /* A marketing badge: monospace capitals at 11px in a 1px outline. */\n .badge { align-self: flex-start; padding: 2px ${space(2)}; border-radius: ${t.radiusSm}; font-family: ${t.fontMono}; font-size: 0.6875rem; font-weight: ${fontWeight('medium')}; line-height: 1.4; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.text}; background: transparent; border: ${t.borderThin} solid ${t.text}; }\n @media (forced-colors: active) { li, img, .badge { border-color: CanvasText; } }\n .more { margin-block-start: auto; display: inline-flex; align-items: center; gap: ${space(1)}; color: ${t.link}; font-weight: ${fontWeight('semibold')}; }\n @container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n @container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<ul part=\"list\">${(this.items ?? []).map(\n (card) => html`<li class=${card.href ? 'linked' : ''} part=\"card\">\n ${card.imageSrc ? html`<img src=${card.imageSrc} alt=${card.imageAlt ?? ''} loading=\"lazy\" />` : nothing}\n <div class=\"words\">\n ${card.badge ? html`<span class=\"badge\">${card.badge}</span>` : nothing}\n <div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${card.href ? html`<a href=${card.href}>${card.heading}</a>` : card.heading}</div>\n ${card.text ? html`<p class=\"body\">${card.text}</p>` : nothing}\n ${card.href ? html`<span class=\"more\" aria-hidden=\"true\">${iconSvg('arrow-right', '1em')}</span>` : nothing}\n </div>\n </li>`,\n )}</ul>`;\n }\n}\n\ncustomElements.define('impakt-card-grid', ImpaktCardGrid);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-card-grid': ImpaktCardGrid;\n }\n}\n", "/**\n * The journey button: a site's one call to action, drawn at the stage a\n * section of the page is about.\n */\nimport { css, html, nothing, unsafeCSS, type TemplateResult } from 'lit';\nimport { ImpaktElement, focusRing, fontWeight, say, space, t, token } from '@atomic-ui/ui';\n\n/** The stages a button passes through on its way to being live, in order. */\nexport const JOURNEY_STAGES = ['note', 'wireframe', 'component', 'code', 'live'] as const;\nexport type JourneyStage = (typeof JOURNEY_STAGES)[number];\n\nconst isStage = (value: unknown): value is JourneyStage => (JOURNEY_STAGES as readonly string[]).includes(value as string);\nconst indexOf = (stage: JourneyStage): number => JOURNEY_STAGES.indexOf(stage);\n\n/** The arrow after the words. Drawn, so no font has to hold the glyph. */\nconst arrow = html`<svg class=\"arrow\" viewBox=\"0 0 20 12\" width=\"20\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M0 6h18M13 1l5 5-5 5\" />\n</svg>`;\n\n/** A pointer, drawn at the live button when the annotations are on. */\nconst pointer = html`<svg class=\"pointer\" viewBox=\"0 0 16 20\" width=\"16\" height=\"20\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M1 1v16l4.2-4 2.9 6.2 2.6-1.2-2.9-6.1H14Z\" stroke-width=\"1.2\" stroke-linejoin=\"round\" />\n</svg>`;\n\n/** One move of the motion spec, read from its tokens with the spec's values as the fallback. */\nconst move = (name: string, ms: number, easing: string) =>\n unsafeCSS(`--jt: var(--impakt-motion-journey-${name}-duration, ${ms}ms); --je: var(--impakt-motion-journey-${name}-easing, ${easing});`);\n\n/** The moves between stages, in order: the move into stage k is MOVES[k - 1]. Each easing is the motion spec's (11:830). */\nexport const JOURNEY_MOVES = [\n { name: 'flatten', ms: 640, easing: [0.65, 0, 0.35, 1] },\n { name: 'ink-in', ms: 560, easing: [0.22, 1, 0.36, 1] },\n { name: 'compile', ms: 720, easing: [0.83, 0, 0.17, 1] },\n { name: 'ship', ms: 600, easing: [0.34, 1.56, 0.64, 1] },\n] as const;\n\n/**\n * The stage as a number, 0 (note) to 4 (live), and how far through each gap between two tracked sections the\n * scroll has gone. They are registered as numbers, so the stage can be transitioned when it is set by hand and\n * animated by a scroll timeline when it follows the page.\n */\nconst P = '--impakt-journey-p';\n/** The most gaps between tracked sections a scroll timeline drives. A page with more falls back to the frame loop. */\nconst GAPS = 8;\nconst gapName = (i: number) => `--impakt-journey-g${i}`;\nlet registered: boolean | undefined;\n/** Register the numbers once for the document. A browser without CSS.registerProperty still draws every stage; it cuts between them. */\nfunction register(): boolean {\n if (registered !== undefined) return registered;\n const api = typeof CSS !== 'undefined' ? (CSS as unknown as { registerProperty?: (d: PropertyDefinition) => void }) : undefined;\n if (!api?.registerProperty) return (registered = false);\n for (const name of [P, ...Array.from({ length: GAPS }, (_, i) => gapName(i))]) {\n try {\n api.registerProperty({ name, syntax: '<number>', inherits: true, initialValue: '0' });\n } catch {\n // Already registered, by this or another copy of the library.\n }\n }\n return (registered = true);\n}\n\n/** A CSS cubic-bezier as a function of progress, for the frame loop, which applies the spec's easing itself. */\nexport function cubicBezier([x1, y1, x2, y2]: readonly number[]): (x: number) => number {\n const at = (a: number, b: number, t: number) => 3 * a * (1 - t) ** 2 * t + 3 * b * (1 - t) * t ** 2 + t ** 3;\n return (x: number) => {\n if (x <= 0) return 0;\n if (x >= 1) return 1;\n let lo = 0;\n let hi = 1;\n let t = x;\n for (let i = 0; i < 30; i += 1) {\n const v = at(x1!, x2!, t);\n if (Math.abs(v - x) < 1e-5) break;\n if (v < x) lo = t;\n else hi = t;\n t = (lo + hi) / 2;\n }\n return at(y1!, y2!, t);\n };\n}\n\n/** The move between two stages, which takes the timing of the move into the later one. */\nconst moveBetween = (a: number, b: number) => JOURNEY_MOVES[Math.max(0, Math.min(3, Math.max(a, b) - 1))]!;\n\n/**\n * How much of stage k shows: 1 at its own stage, falling to 0 one stage either side. Every shape, every word and\n * every note is drawn from these, so the whole morph follows the stage number wherever it is between two stages.\n */\nconst w = (k: number) => `clamp(0, min(calc(1 + var(${P}) - ${k}), calc(1 - var(${P}) + ${k})), 1)`;\n/** How far the note has still to flatten, 1 at the note and 0 from the wireframe on. */\nconst toNote = `clamp(0, calc(1 - var(${P})), 1)`;\n/** How far the live button has come, 0 at the code and 1 live; past 4 is ship's overshoot. */\nconst live = `max(0, calc(var(${P}) - 3))`;\nconst over = `max(0, calc(var(${P}) - 4))`;\n\n/**\n * A call to action drawn as the thing it once was: a sticky note from a\n * workshop, a wireframe box, a designed component, the code that renders it,\n * and at last the live button. A page shows it at the stage each section is\n * about, so the same button is seen being made as the page is read.\n *\n * **It is the same link at every stage.** Whatever it is drawn as, it is one\n * `<a>` whose name is its words, so a screen reader and a keyboard meet an\n * ordinary link; the note, the wireframe cross, the measuring marks and the\n * lines of code around it are decoration and are hidden (1.3.1, 4.1.2). Its\n * target is at least 44px tall at every stage (2.5.8).\n *\n * **A page that shows it more than once sets `decorative` on the copies.** A\n * decorative one is a picture of the button, not a control: it has no link\n * and is hidden from a screen reader, so the page does not hold five links\n * that say the same thing (2.4.4).\n *\n * **It keeps its shape as it scales.** The drawing is about 14 wide to 9\n * tall at any width, 560 by 360 on a wide page and 347 by 223 on a phone, and\n * everything in it is sized from its own width.\n *\n * **One button can follow the page.** Give `track` a selector for the page's\n * sections, each carrying `data-journey-stage`, and the button takes the stage\n * of whichever section is across the middle of the screen. Between two\n * sections the whole morph is scrubbed by the scroll, as the motion spec\n * (`11:830`) asks: the shapes, the words and the design notes all follow the\n * scroll, and the move is complete as the next section crosses the middle of\n * the screen. Scrolling back halfway leaves it halfway.\n *\n * Where the browser has scroll-driven animations, the scroll drives the stage\n * itself through a scroll timeline, with no script running as the page moves;\n * the button only measures where the sections are, again when the page is\n * resized. Elsewhere a frame loop reads the scroll at most once a frame, and\n * only while the page scrolls. Either way each move between two sections is\n * shaped by that move's easing, so ship overshoots near the end of its range.\n *\n * **One button can travel.** Set `travel` and the button stays in view while\n * its sections scroll past, as the spec's one moving object does. It is sticky,\n * so put it in a column as tall as the tracked sections, beside them, such as\n * the second column of a grid whose first holds the sections. It sits\n * `--impakt-journey-travel-top` from the top of the screen, a fifth of the\n * screen unless the page sets it. On a phone, where the sections stack, leave\n * `travel` off and give each section its own decorative copy.\n *\n * **Each move has its own timing**, from the motion spec: flatten 640ms, ink\n * in 560ms, compile 720ms, ship 600ms with an overshoot, lift 180ms on hover\n * and press 140ms. Each is read from `--impakt-motion-journey-<move>-duration`\n * and `-easing`. When `stage` is set by hand the move runs on that timing.\n * **Only transforms, opacity and colour move**, so a change of stage costs no\n * layout.\n *\n * **With reduced motion asked for** each stage cuts straight to its final\n * state: there is no morph, no scale and no change of position. A tracked\n * button swaps to a section's stage as soon as the section enters the screen,\n * and pointing at the live button changes its colour only (2.3.3).\n *\n * **`annotations` draws the design notes around it**, as the site's motion\n * frames show: the stage's caption above, a handwritten note in the margin at\n * the note stage, the width and height marks at the wireframe and component,\n * the spec tags under the component and a pointer at the live button. They\n * are decoration and are hidden from a screen reader. Leave it off when the\n * button is a plain call to action.\n *\n * The words on every fill are a pair the tokens already measured: the accent\n * with its own text colour, and the text colour with the card colour (1.4.3).\n * A brand whose ink is dark may colour the words in the code window by\n * setting `--impakt-journey-code-words`.\n *\n * @category action\n * @icon button\n * @fires {CustomEvent<{ stage: JourneyStage }>} impakt-journey-stage - When a tracked button changes stage as the page scrolls.\n * @cssprop --impakt-journey-travel-top - With `travel`: how far from the top of the screen the button stays.\n */\nexport class ImpaktJourneyButton extends ImpaktElement {\n static properties = {\n stage: { type: String, reflect: true },\n label: { type: String },\n href: { type: String },\n decorative: { type: Boolean, reflect: true },\n track: { type: String },\n travel: { type: Boolean, reflect: true },\n code: { type: Array },\n annotations: { type: Boolean, reflect: true },\n captions: { type: Array },\n marginNote: { type: String, attribute: 'margin-note' },\n specs: { type: Array },\n markWidth: { type: String, attribute: 'mark-width' },\n markHeight: { type: String, attribute: 'mark-height' },\n };\n /** What the button is drawn as. */\n declare stage: JourneyStage;\n /** The button's words, such as \"Book a 30-minute call\". */\n declare label: string;\n /** Where the button goes. */\n declare href: string;\n /** Draw it as a picture only, with no link, for a page that already has the real button. */\n declare decorative: boolean;\n /**\n * A selector for the sections of the page that each carry\n * `data-journey-stage`. The button then takes the stage of the section\n * across the middle of the screen. Leave empty to set `stage` by hand.\n */\n declare track: string;\n /** With `track`: stay in view while the tracked sections scroll past. Place it in a column as tall as they are. */\n declare travel: boolean;\n /**\n * Lines of code drawn around the words at the `code` stage, split where the\n * words go: the lines before, then the lines after. They are decoration and\n * are not read. A line that starts with `//` is drawn dimmer, as a comment.\n * Left empty, plain bars are drawn instead.\n */\n declare code: { before?: string[]; after?: string[] };\n /** Draw the design notes around the button: captions, marks, spec tags, a margin note and a pointer. */\n declare annotations: boolean;\n /** With `annotations`: the caption above each stage, in order, such as \"Note \u2014 Discover\". Numbered for you. */\n declare captions: string[];\n /** With `annotations`: the handwritten note beside the sticky note. */\n declare marginNote: string;\n /** With `annotations`: the tags under the component, such as \"Fill \u00B7 Accent/Signal\". */\n declare specs: string[];\n /** With `annotations`: the width written on the width mark, such as \"400\". */\n declare markWidth: string;\n /** With `annotations`: the height written on the height mark, such as \"96\". */\n declare markHeight: string;\n\n constructor() {\n super();\n this.stage = 'live';\n this.label = '';\n this.href = '';\n this.decorative = false;\n this.track = '';\n this.travel = false;\n this.code = {};\n this.annotations = false;\n this.captions = [];\n this.marginNote = '';\n this.specs = [];\n this.markWidth = '400';\n this.markHeight = '96';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host {\n display: block; inline-size: min(100%, 35rem); container-type: inline-size;\n --impakt-journey-accent: ${token('color.accent.default', '#ffd43b')}; --impakt-journey-on-accent: ${token('color.accent.on', '#1a1a1a')};\n --hand: var(--impakt-font-family-hand, ${t.fontBody});\n /* The stage as a number. Set by hand, it moves on the timing of the move into the new stage, and back out of a\n stage the same move runs in reverse. A tracked button sets it on the frame instead, from the scroll. */\n ${unsafeCSS(P)}: 4;\n transition: ${unsafeCSS(P)} var(--jt) var(--je);\n ${move('flatten', 640, 'cubic-bezier(0.65, 0, 0.35, 1)')}\n }\n :host([stage='note']) { ${unsafeCSS(P)}: 0; }\n :host([stage='wireframe']) { ${unsafeCSS(P)}: 1; }\n :host([stage='component']) { ${unsafeCSS(P)}: 2; ${move('ink-in', 560, 'cubic-bezier(0.22, 1, 0.36, 1)')} }\n :host([stage='code']) { ${unsafeCSS(P)}: 3; ${move('compile', 720, 'cubic-bezier(0.83, 0, 0.17, 1)')} }\n :host([stage='live']) { ${unsafeCSS(P)}: 4; ${move('ship', 600, 'cubic-bezier(0.34, 1.56, 0.64, 1)')} }\n /* Travelling: it stays in view while its sections scroll past, in a column as tall as they are. */\n :host([travel]) { position: sticky; inset-block-start: var(--impakt-journey-travel-top, 20vh); }\n\n /* About 14 wide to 9 tall at any width. Every size inside is a share of the width (cqi). */\n .frame { position: relative; aspect-ratio: 14 / 9; }\n /* Each plate is one stage's shape with that stage's words in it. Every one is drawn from the stage number, so\n its opacity and its shape follow the stage wherever it is between two. Nothing here changes the layout. */\n .plate { position: absolute; box-sizing: border-box; pointer-events: none; }\n .bar { inset-inline-start: 14.29cqi; inline-size: 71.43cqi; inset-block-start: calc(50% - 8.57cqi); block-size: 17.14cqi; }\n .note { inset-inline-start: 22cqi; inset-block-start: 9cqi; inline-size: 46cqi; block-size: 46cqi; background: var(--impakt-journey-accent); box-shadow: 0 1.1rem 2.2rem rgb(0 0 0 / 0.18); }\n .wire { background: ${t.surfaceCard}; border: ${t.borderThin} dashed ${t.textMuted}; }\n .wire svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; color: ${t.rule}; }\n .solid { background: var(--impakt-journey-accent); }\n .shadow { box-shadow: 0 0.9rem 1.75rem rgb(0 0 0 / 0.22); }\n /* The code window is the raised ink and its muted words, a pair the theme measures, so it stays a dark window on paper and on an ink band alike. */\n .window { inset-inline: 14.29cqi; inset-block: 8cqi; padding: 4cqi; background: var(--impakt-color-surface-ink-raised, ${t.text}); border: ${t.borderThin} solid var(--impakt-color-line-inverse, transparent); border-radius: ${t.radius}; font-family: ${t.fontMono}; font-size: clamp(0.625rem, 2.15cqi, 0.8125rem); line-height: 1.6; color: var(--impakt-color-text-inverse-muted, color-mix(in srgb, ${t.surfaceCard} 78%, ${t.text})); white-space: pre; overflow: hidden; display: grid; grid-template-rows: minmax(0, 1fr) 44px minmax(0, 1fr); }\n /* On a small button the lines furthest from the words are cut off, so a line never runs under the words. */\n .window .before { align-self: end; display: flex; flex-direction: column; justify-content: flex-end; max-block-size: 100%; overflow: hidden; }\n .window .after { align-self: start; display: flex; flex-direction: column; max-block-size: 100%; overflow: hidden; }\n .window .comment { font-style: italic; }\n .window .rule { display: block; block-size: 0.5em; margin-block: 0.55em; background: currentColor; opacity: 0.35; }\n\n /*\n * The morph. Each plate shows at its own stage and fades one stage either side. The note flattens as it goes,\n * without growing wider, so a shape that is not showing never reaches past the block (1.4.10); the wireframe\n * comes out of the flattened note; the component is inked in from a slightly smaller box; the code window opens\n * from a strip; and the live button's shadow and fill grow to full size, past it for a moment where ship's\n * easing overshoots.\n */\n .note { opacity: ${unsafeCSS(w(0))}; transform: rotate(calc(-4deg * ${unsafeCSS(w(0))})) scale(1, calc(0.45 + 0.55 * ${unsafeCSS(w(0))})); }\n .wire { opacity: ${unsafeCSS(w(1))}; transform: rotate(calc(-4deg * ${unsafeCSS(toNote)})) scale(calc(1 - 0.4 * ${unsafeCSS(toNote)}), calc(1 + 0.9 * ${unsafeCSS(toNote)})); }\n .solid { opacity: max(${unsafeCSS(w(2))}, ${unsafeCSS(w(4))}); transform: scale(calc(0.92 + 0.08 * max(${unsafeCSS(w(2))}, min(1, ${unsafeCSS(live)})) + 0.4 * ${unsafeCSS(over)})); }\n .window { opacity: ${unsafeCSS(w(3))}; transform: scale(calc(0.94 + 0.06 * ${unsafeCSS(w(3))}), calc(0.5 + 0.5 * ${unsafeCSS(w(3))})); }\n .shadow { opacity: ${unsafeCSS(w(4))}; transform: scale(calc(0.9 + 0.1 * min(1, ${unsafeCSS(live)}) + 0.4 * ${unsafeCSS(over)})); }\n\n /* The words as each stage draws them, inside that stage's plate, so they morph and fade with it. All decoration: the link below carries the name. */\n .said { position: absolute; inset: 0; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding-inline: 4.3cqi; font-family: ${t.fontBody}; font-size: clamp(0.9375rem, 3.57cqi, 1.25rem); font-weight: ${fontWeight('medium')}; line-height: 1.2; color: var(--impakt-journey-on-accent); }\n .arrow { flex: none; }\n /* At the note stage the words are handwritten, bold, with a line drawn under them. */\n .note .said { flex-direction: column; align-items: flex-start; padding: 4.5cqi; font-family: var(--hand); font-size: clamp(1.25rem, 5.4cqi, 2rem); font-weight: ${fontWeight('bold')}; line-height: 1.1; letter-spacing: -0.01em; }\n .note .said .text::after { content: ''; display: block; block-size: 0.28em; margin-block-start: 0.12em; inline-size: 92%; background: currentColor; -webkit-mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6c30-4 60-5 98-3s66 3 98-1' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E\") center / 100% 100% no-repeat; mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6c30-4 60-5 98-3s66 3 98-1' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E\") center / 100% 100% no-repeat; }\n .note .said .arrow { align-self: flex-end; }\n .wire .said { justify-content: center; font-family: ${t.fontMono}; font-size: clamp(0.6875rem, 2.5cqi, 0.875rem); font-weight: ${fontWeight('regular')}; color: ${t.textMuted}; }\n .window .said { position: static; padding-inline: 3ch 0; justify-content: flex-start; font-family: ${t.fontMono}; font-size: inherit; font-weight: ${fontWeight('regular')}; color: var(--impakt-journey-code-words, var(--ik-ink-inverse, ${t.surfaceCard})); }\n .window .said .arrow { display: none; }\n\n /*\n * The link. One element at every stage, sized to the shape the stage draws, so the keyboard, a pointer and a\n * screen reader meet an ordinary link with the button's words. Its own words are not painted: the plates paint\n * them, so they can morph. In forced colours the plates step aside and the link draws its words itself.\n */\n .words { position: absolute; inset-inline-start: 14.29cqi; inline-size: 71.43cqi; inset-block-start: calc(50% - 8.57cqi); box-sizing: border-box; min-block-size: max(44px, 17.14cqi); display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding-inline: 4.3cqi; font-family: ${t.fontBody}; font-size: clamp(0.9375rem, 3.57cqi, 1.25rem); font-weight: ${fontWeight('medium')}; line-height: 1.2; color: transparent; text-decoration: none; }\n :host([stage='note']) .words { inset-inline-start: 22cqi; inset-block-start: 9cqi; inline-size: 46cqi; min-block-size: 46cqi; align-items: flex-start; padding: 4.5cqi; font-family: var(--hand); font-size: clamp(1.25rem, 5.4cqi, 2rem); font-weight: ${fontWeight('bold')}; line-height: 1.1; transform: rotate(-4deg); }\n :host([stage='wireframe']) .words { justify-content: center; font-family: ${t.fontMono}; font-size: clamp(0.6875rem, 2.5cqi, 0.875rem); font-weight: ${fontWeight('regular')}; }\n :host([stage='code']) .words { min-block-size: 44px; inset-block-start: calc(50% - 22px); justify-content: flex-start; padding-inline: calc(4cqi + 3ch) 4cqi; font-family: ${t.fontMono}; font-size: clamp(0.625rem, 2.15cqi, 0.8125rem); font-weight: ${fontWeight('regular')}; }\n a.words:focus-visible { outline: none; box-shadow: ${t.focusShadow}; }\n\n /* Live, it answers a pointer: the button lifts when pointed at and sits when pressed, and its fill deepens a little. */\n .solid { transition: background-color 180ms, translate var(--impakt-motion-journey-lift-duration, 180ms) var(--impakt-motion-journey-lift-easing, cubic-bezier(0.2, 0, 0, 1)); }\n :host([stage='live']) .frame:has(a.words:hover) .solid { background: color-mix(in srgb, var(--impakt-journey-accent) 90%, ${t.text}); translate: 0 -2px; }\n :host([stage='live']) .frame:has(a.words:active) .solid { translate: 0 1px; transition: background-color 140ms, translate var(--impakt-motion-journey-press-duration, 140ms) var(--impakt-motion-journey-press-easing, cubic-bezier(0.4, 0, 0.2, 1)); }\n\n /* The design notes. Each shows at its own stages, follows the stage number with the shapes, and none is read. */\n .ann { position: absolute; pointer-events: none; color: ${t.text}; }\n .caption { inset-block-start: 0; inset-inline-start: 0; font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; white-space: nowrap; }\n .caption span { position: absolute; inset-block-start: 0; inset-inline-start: 0; }\n ${unsafeCSS(JOURNEY_STAGES.map((_, k) => `.caption span:nth-child(${k + 1}) { opacity: ${w(k)}; }`).join('\\n '))}\n .margin { inset-inline-start: 71cqi; inset-block-start: 10cqi; inline-size: 27cqi; font-family: var(--hand); font-size: clamp(0.75rem, 2.9cqi, 1rem); line-height: 1.25; transform: rotate(4deg); opacity: ${unsafeCSS(w(0))}; }\n .width { inset-inline-start: 14.29cqi; inline-size: 71.43cqi; inset-block-start: calc(50% - 8.57cqi - 5cqi); block-size: 2cqi; border-inline: 1px solid currentColor; }\n .width::before { content: ''; position: absolute; inset-inline: 0; inset-block-start: 50%; border-block-start: 1px solid currentColor; }\n .width b, .height b { position: absolute; font-family: ${t.fontMono}; font-size: 0.6875rem; font-weight: ${fontWeight('regular')}; line-height: 1; background: var(--impakt-journey-mark-ground, ${t.surfaceCard}); padding-inline: 0.4em; }\n .width b { inset-block-start: 50%; inset-inline-start: 50%; transform: translate(-50%, -50%); }\n .height { inset-inline-start: calc(14.29cqi + 71.43cqi + 2.5cqi); inline-size: 2cqi; inset-block-start: calc(50% - 8.57cqi); block-size: 17.14cqi; border-block: 1px solid currentColor; }\n .height::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 50%; border-inline-start: 1px solid currentColor; }\n .height b { inset-block-start: 50%; inset-inline-start: calc(100% + 0.2em); transform: translateY(-50%); background: none; }\n .width, .height { opacity: max(${unsafeCSS(w(1))}, ${unsafeCSS(w(2))}); }\n .specs { inset-inline-start: 14.29cqi; inset-block-start: calc(50% + 8.57cqi + 3cqi); display: flex; flex-wrap: wrap; gap: 1.5cqi; inline-size: 75cqi; opacity: ${unsafeCSS(w(2))}; }\n .specs span { padding: 0.15em 0.6em; font-family: ${t.fontMono}; font-size: clamp(0.5625rem, 1.9cqi, 0.6875rem); letter-spacing: ${t.trackingWide}; text-transform: uppercase; white-space: nowrap; border: 1px solid currentColor; background: ${t.surfaceCard}; }\n .cursor { inset-inline-start: calc(14.29cqi + 71.43cqi - 4cqi); inset-block-start: calc(50% + 8.57cqi - 4cqi); opacity: ${unsafeCSS(w(4))}; }\n .pointer { display: block; fill: ${t.text}; stroke: ${t.surfaceCard}; }\n\n /* The gaps a scroll timeline drives, one keyframe set each. */\n ${unsafeCSS(Array.from({ length: GAPS }, (_, i) => `@keyframes impakt-journey-g${i} { from { ${gapName(i)}: 0; } to { ${gapName(i)}: 1; } }`).join('\\n '))}\n\n /* Reduced motion: each stage cuts to its final state, and the live button changes colour only. */\n @media (prefers-reduced-motion: reduce) {\n :host { transition: none; }\n .solid { transition: background-color 180ms; }\n :host([stage='live']) .frame:has(a.words:is(:hover, :active)) .solid { translate: none; }\n }\n @media (forced-colors: active) {\n .plate { forced-color-adjust: none; }\n .plate .said { display: none; }\n .note, .solid { background: Highlight; }\n .window { background: Canvas; border: 1px solid CanvasText; color: CanvasText; }\n .wire { background: Canvas; border-color: CanvasText; }\n .words { color: LinkText; }\n :host(:is([stage='note'], [stage='component'], [stage='live'])) .words { color: HighlightText; forced-color-adjust: none; }\n .ann { color: CanvasText; }\n }\n `,\n ];\n\n private observer?: IntersectionObserver;\n private sections: Element[] = [];\n private frameRequest = 0;\n private resizeObserver?: ResizeObserver;\n private easings: Array<(x: number) => number> = [];\n private readonly onScroll = (): void => {\n if (this.frameRequest) return;\n this.frameRequest = requestAnimationFrame(() => {\n this.frameRequest = 0;\n this.scrub();\n });\n };\n private readonly onResize = (): void => {\n if (this.getAttribute('scrub') === 'timeline') this.timeline();\n else this.onScroll();\n };\n\n connectedCallback(): void {\n super.connectedCallback();\n register();\n // The first render starts the watch; this is for a button taken off the page and put back.\n if (this.hasUpdated) this.watch();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.unwatch();\n }\n\n protected willUpdate(changed: Map<string, unknown>): void {\n // A stage that is not one of the five would draw nothing at all, so it falls back to the finished button.\n if (changed.has('stage') && !isStage(this.stage)) this.stage = 'live';\n }\n\n protected updated(changed: Map<string, unknown>): void {\n if (changed.has('track')) this.watch();\n }\n\n private get frameEl(): HTMLElement | null {\n return this.renderRoot.querySelector<HTMLElement>('.frame');\n }\n\n private reduced(): boolean {\n return Boolean(this.ownerDocument.defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)').matches);\n }\n\n private unwatch(): void {\n this.observer?.disconnect();\n this.observer = undefined;\n this.resizeObserver?.disconnect();\n this.resizeObserver = undefined;\n const view = this.ownerDocument?.defaultView;\n view?.removeEventListener('scroll', this.onScroll);\n view?.removeEventListener('resize', this.onResize);\n if (this.frameRequest) cancelAnimationFrame(this.frameRequest);\n this.frameRequest = 0;\n this.removeAttribute('scrub');\n const frame = this.frameEl;\n if (frame)\n for (const prop of [\n P,\n 'animation-name',\n 'animation-duration',\n 'animation-timing-function',\n 'animation-fill-mode',\n 'animation-timeline',\n 'animation-range',\n ])\n frame.style.removeProperty(prop);\n }\n\n /**\n * Follow the sections named by `track`. Without reduced motion the section across the middle of the screen\n * sets the stage and the scroll scrubs the morph between sections; with it, a section sets the stage as soon as\n * it enters the screen and nothing is scrubbed.\n */\n private watch(): void {\n this.unwatch();\n this.sections = [];\n if (!this.track || !this.isConnected || typeof IntersectionObserver !== 'function') return;\n let sections: Element[];\n try {\n sections = Array.from(this.ownerDocument.querySelectorAll(this.track)).filter((el) => isStage(el.getAttribute('data-journey-stage')));\n } catch {\n // Not a selector: nothing to follow.\n return;\n }\n if (!sections.length) return;\n this.sections = sections;\n if (this.reduced()) {\n // The whole screen: a section's stage is taken the moment it enters, and given back when it leaves at the foot.\n this.observer = new IntersectionObserver(() => this.entered(), { threshold: 0 });\n } else {\n // A line across the middle of the screen. A section is \"current\" while it crosses that line.\n this.observer = new IntersectionObserver((entries) => this.crossed(entries), { rootMargin: '-50% 0px -50% 0px', threshold: 0 });\n }\n for (const section of sections) this.observer.observe(section);\n if (!this.reduced()) this.startScrub();\n }\n\n private crossed(entries: IntersectionObserverEntry[]): void {\n const entry = entries.find((e) => e.isIntersecting);\n const stage = entry?.target.getAttribute('data-journey-stage');\n if (isStage(stage)) this.become(stage);\n }\n\n /** With reduced motion: the stage of the last section whose top has come onto the screen. */\n private entered(): void {\n const view = this.ownerDocument.defaultView;\n if (!view) return;\n let stage: string | null = null;\n for (const section of this.sections) if (section.getBoundingClientRect().top < view.innerHeight) stage = section.getAttribute('data-journey-stage');\n if (isStage(stage)) this.become(stage);\n }\n\n private become(stage: JourneyStage): void {\n if (stage === this.stage) return;\n this.stage = stage;\n this.dispatchEvent(new CustomEvent('impakt-journey-stage', { detail: { stage }, bubbles: true, composed: true }));\n }\n\n /** Scrub with a scroll timeline where the browser has one and the page scrolls the document; otherwise with a frame loop. */\n private startScrub(): void {\n const view = this.ownerDocument.defaultView;\n if (!view) return;\n const supports =\n typeof CSS !== 'undefined' &&\n typeof CSS.supports === 'function' &&\n CSS.supports('animation-timeline: scroll()') &&\n CSS.supports('animation-range: 0px 1px');\n const timeline = supports && register() && this.sections.length - 1 <= GAPS && this.rootScrolls();\n view.addEventListener('resize', this.onResize, { passive: true });\n if (typeof ResizeObserver === 'function') {\n this.resizeObserver = new ResizeObserver(this.onResize);\n this.resizeObserver.observe(this.ownerDocument.documentElement);\n for (const section of this.sections) this.resizeObserver.observe(section);\n }\n this.easings = JOURNEY_MOVES.map((m) => cubicBezier(this.easingOf(m.name, m.easing)));\n if (timeline) {\n this.setAttribute('scrub', 'timeline');\n this.timeline();\n } else if (typeof view.requestAnimationFrame === 'function') {\n this.setAttribute('scrub', 'frame');\n view.addEventListener('scroll', this.onScroll, { passive: true });\n this.scrub();\n }\n }\n\n /** Whether the tracked sections scroll with the document, which is the scroller a root scroll timeline follows. */\n private rootScrolls(): boolean {\n const view = this.ownerDocument.defaultView!;\n for (let el = this.sections[0]?.parentElement; el && el !== this.ownerDocument.body && el !== this.ownerDocument.documentElement; el = el.parentElement) {\n const { overflowY } = view.getComputedStyle(el);\n if ((overflowY === 'auto' || overflowY === 'scroll') && el.scrollHeight > el.clientHeight) return false;\n }\n return true;\n }\n\n /** The easing of a move, from its token if the page sets one, as four numbers. */\n private easingOf(name: string, fallback: readonly number[]): readonly number[] {\n const value = this.ownerDocument.defaultView?.getComputedStyle(this).getPropertyValue(`--impakt-motion-journey-${name}-easing`) ?? '';\n const numbers = /cubic-bezier\\(([^)]+)\\)/.exec(value)?.[1]?.split(',').map(Number);\n return numbers?.length === 4 && numbers.every(Number.isFinite) ? numbers : fallback;\n }\n\n /** Each gap between two tracked sections, as the scroll positions it runs between and the stages at its ends. */\n private gaps(): Array<{ from: number; to: number; start: number; end: number }> {\n const view = this.ownerDocument.defaultView!;\n const middle = view.innerHeight / 2;\n const tops = this.sections.map((s) => s.getBoundingClientRect().top + view.scrollY);\n const stages = this.sections.map((s) => indexOf(s.getAttribute('data-journey-stage') as JourneyStage));\n return tops.slice(1).map((top, i) => ({ from: stages[i]!, to: stages[i + 1]!, start: tops[i]! - middle, end: top - middle }));\n }\n\n /**\n * The scroll timeline. Each gap animates its own number from 0 to 1 across the scroll between its two sections,\n * shaped by the move's easing, and the stage is the first section's stage plus each gap's step times its number.\n * The browser runs it as the page scrolls; this only runs again when the page is resized.\n */\n private timeline(): void {\n const frame = this.frameEl;\n if (!frame || !this.sections.length) return;\n const gaps = this.gaps().filter((g) => g.end > g.start);\n const first = indexOf(this.sections[0]!.getAttribute('data-journey-stage') as JourneyStage);\n const terms = gaps.map((g, i) => (g.to === g.from ? '' : ` + ${g.to - g.from} * var(${gapName(i)})`)).join('');\n frame.style.setProperty(P, `calc(${first}${terms})`);\n const list = (f: (g: (typeof gaps)[number], i: number) => string) => gaps.map(f).join(', ') || 'none';\n frame.style.setProperty('animation-name', gaps.length ? list((_, i) => `impakt-journey-g${i}`) : 'none');\n frame.style.setProperty(\n 'animation-duration',\n list(() => '1ms'),\n );\n frame.style.setProperty(\n 'animation-timing-function',\n list((g) => {\n const m = moveBetween(g.from, g.to);\n return `var(--impakt-motion-journey-${m.name}-easing, cubic-bezier(${m.easing.join(', ')}))`;\n }),\n );\n frame.style.setProperty(\n 'animation-fill-mode',\n list(() => 'both'),\n );\n frame.style.setProperty(\n 'animation-timeline',\n list(() => 'scroll(root block)'),\n );\n frame.style.setProperty(\n 'animation-range',\n list((g) => `${Math.round(g.start)}px ${Math.round(g.end)}px`),\n );\n }\n\n /**\n * The frame loop. The section across the middle of the screen gives the whole part of the stage; how far the next\n * section has risen toward the middle, shaped by the move's easing, gives the rest, so the move is complete as\n * the next section crosses it.\n */\n private scrub(): void {\n const view = this.ownerDocument.defaultView;\n const frame = this.frameEl;\n if (!view || !frame || !this.sections.length) return;\n const middle = view.innerHeight / 2;\n const tops = this.sections.map((s) => s.getBoundingClientRect().top);\n let at = 0;\n tops.forEach((top, i) => {\n if (top <= middle) at = i;\n });\n const stageAt = (i: number) => indexOf(this.sections[i]!.getAttribute('data-journey-stage') as JourneyStage);\n const next = at + 1 < this.sections.length ? at + 1 : at;\n const span = tops[next]! - tops[at]!;\n const f = next === at || span <= 0 ? 0 : Math.min(1, Math.max(0, (middle - tops[at]!) / span));\n const [a, b] = [stageAt(at), stageAt(next)];\n const eased = a === b ? 0 : this.easings[JOURNEY_MOVES.indexOf(moveBetween(a, b))]!(f);\n const p = a + eased * (b - a);\n frame.style.setProperty(P, p.toFixed(4));\n }\n\n private lines(lines: string[] | undefined, fallback: number): TemplateResult[] {\n return lines?.length\n ? lines.map((line) => html`<span class=${line.trim().startsWith('//') ? 'comment' : ''}>${line}</span>`)\n : Array.from({ length: fallback }, (_, i) => html`<span class=\"rule\" style=${`inline-size:${[58, 72, 44][i % 3]}%`}></span>`);\n }\n\n /** The design notes around the button. All decoration. */\n private notes(): TemplateResult {\n const captions = this.captions?.length\n ? this.captions\n : [say('Note \u2014 Discover'), say('Wireframe \u2014 Design low-fi'), say('Component \u2014 Design hi-fi'), say('Code \u2014 Build'), say('Live \u2014 Launch')];\n const specs = this.specs?.length ? this.specs : [say('Fill \u00B7 Accent/Signal'), say('Radius \u00B7 0'), say('Type \u00B7 Archivo 20')];\n return html`<span class=\"ann caption\" part=\"caption\">${JOURNEY_STAGES.map((_, i) => html`<span>${String(i + 1).padStart(2, '0')} \u00B7 ${captions[i] ?? ''}</span>`)}</span>\n <span class=\"ann margin\" part=\"margin-note\">${this.marginNote || say('make it the biggest thing on the page')}</span>\n <span class=\"ann width\"><b>${this.markWidth}</b></span>\n <span class=\"ann height\"><b>${this.markHeight}</b></span>\n <span class=\"ann specs\" part=\"specs\">${specs.map((spec) => html`<span>${spec}</span>`)}</span>\n <span class=\"ann cursor\">${pointer}</span>`;\n }\n\n render(): TemplateResult {\n const said = html`<span class=\"said\"><span class=\"text\">${this.label}</span>${arrow}</span>`;\n const words = html`<span class=\"text\">${this.label}</span>`;\n return html`<div class=\"frame\" part=\"frame\" aria-hidden=${this.decorative ? 'true' : nothing}>\n <span class=\"plate note\" aria-hidden=\"true\">${said}</span>\n <span class=\"plate bar wire\" aria-hidden=\"true\"><svg viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" fill=\"none\" stroke=\"currentColor\" focusable=\"false\"><path d=\"M0 0 100 100M0 100 100 0\" vector-effect=\"non-scaling-stroke\" /></svg>${said}</span>\n <span class=\"plate bar shadow\" aria-hidden=\"true\"></span>\n <span class=\"plate bar solid\" aria-hidden=\"true\">${said}</span>\n <span class=\"plate window\" aria-hidden=\"true\"><span class=\"before\">${this.lines(this.code?.before, 3)}</span>${said}<span class=\"after\">${this.lines(this.code?.after, 2)}</span></span>\n ${this.annotations ? html`<span class=\"notes\" aria-hidden=\"true\">${this.notes()}</span>` : nothing}\n ${this.decorative || !this.href ? html`<span class=\"words\" part=\"button\">${words}</span>` : html`<a class=\"words\" part=\"button\" href=${this.href}>${words}</a>`}\n </div>`;\n }\n}\n\ncustomElements.define('impakt-journey-button', ImpaktJourneyButton);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-journey-button': ImpaktJourneyButton;\n }\n}\n", "/**\n * The blocks a studio's own site is built from: the numbered list of work, a\n * row of figures, and the questions at the foot of a page.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport {\n ImpaktElement,\n focusRing,\n fontSize,\n fontWeight,\n lineHeight,\n lockScroll,\n space,\n spaceAround,\n t,\n token,\n unlockScroll,\n type NavLink,\n} from '@atomic-ui/ui';\n\n/** One project in a list of work. */\nexport interface WorkItem {\n id?: string;\n /** The project's name, set large. */\n name: string;\n /** What it is and who it is for, such as \"Web platform \u00B7 Automotive\". */\n meta?: string;\n /** Where the row goes when it is pressed. Leave empty for a row that goes nowhere: it has no arrow and does not turn to ink. */\n href?: string;\n /** A sentence about it, in its own column, such as \"Audits a website against WCAG 2.2 and writes the fixes.\" */\n text?: string;\n /** A short status, set in capitals, such as \"Available now\" or \"Coming soon\". The word carries the status. */\n badge?: string;\n /** A price line under the badge, such as \"From \u00A359 a month\". */\n price?: string;\n /** Keep the row in ink, with the badge and the arrow in the accent: the one item the page wants seen first. */\n featured?: boolean;\n /** A picture shown, tilted, beside the pointer while the row is pointed at. It is decoration and is not read. */\n preview?: string;\n /** A small caption on the preview card, such as \"Harbour \u00B7 Cover \u00B7 4:3\". */\n previewLabel?: string;\n}\n\n/** The arrow at the end of a row that goes somewhere. Drawn, so no font has to hold the glyph. */\nconst arrow = html`<svg viewBox=\"0 0 22 22\" width=\"22\" height=\"22\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M5 17 17 5M8 5h9v9\" />\n</svg>`;\n\n/**\n * A numbered list of projects, each name set large: the work on a studio's\n * home page, or the index on its work page.\n *\n * **Each row is one link.** The link sits on the project's name, which is a\n * heading, and is stretched over the row, so the whole row can be pressed\n * while a screen reader meets one link with one name (2.4.4, 2.5.8). The\n * number and the arrow are decoration and are hidden from it; the list itself\n * says how many projects there are and which one this is (1.3.1).\n *\n * **Pointing at a row and focusing it look the same.** The row turns to the\n * text colour with the card colour on it, a pair every brand's tokens already\n * hold at 4.5:1, so the state never depends on a colour of its own (1.4.3,\n * 1.4.11). The focus ring is still drawn over it (2.4.7).\n *\n * The names shrink with the block's own width, not the window's, so the list\n * reads the same in a narrow column as on a phone (1.4.10).\n *\n * **A row can say more.** `text` adds a description column, `badge` a status\n * word in capitals and `price` a line under it, so the same list sets out a\n * studio's work or a shop of tools. A `featured` row stays in ink with its\n * badge and arrow in the accent. `columns` draws a line of column names above\n * the rows, such as \"No.\", \"Project\" and \"Type \u00B7 Sector\"; it is decoration,\n * since each row's own words already say what they are.\n *\n * **A row can show a picture as it is pointed at.** Give it `preview` and a\n * card with the picture follows the pointer, tilted. It is shown only to a\n * mouse, never on touch or with reduced motion asked for, and it is hidden\n * from a screen reader: the row's name already says what it is.\n *\n * @category content\n * @icon list\n */\nexport class ImpaktWorkList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n start: { type: Number },\n label: { type: String },\n columns: { type: Array },\n preview: { state: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The projects, in order. */\n declare items: WorkItem[];\n /** The heading level of each project's name. It depends on what is above the list on the page. */\n declare headingLevel: number;\n /** The number the first project is given. */\n declare start: number;\n /** A name for the list, so a screen reader can tell it from other lists on the page. Leave empty for none. */\n declare label: string;\n /**\n * Column names drawn above the rows, in monospace capitals: the first over\n * the numbers, the second over the names, and the rest, joined with \" \u00B7 \",\n * over the last column, such as `[\"No.\", \"Project\", \"Type \u00B7 Sector\"]`.\n * Leave empty for none.\n */\n declare columns: string[];\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n /** The preview being shown, with where the pointer is. */\n declare private preview: { src: string; label: string; x: number; y: number } | null;\n\n constructor() {\n super();\n this.items = [];\n this.headingLevel = 3;\n this.start = 1;\n this.label = '';\n this.columns = [];\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n this.preview = null;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; position: relative; container: impakt-work-list / inline-size; --impakt-work-accent: ${token('color.accent.default', '#ffd43b')}; --impakt-work-on-accent: ${token('color.accent.on', '#111111')}; }\n ol { list-style: none; margin: 0; padding: 0; border-block-start: ${t.borderThin} solid ${t.text}; }\n .columns + ol { border-block-start: 0; }\n li, .columns { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto 22px; align-items: center; column-gap: ${space(6)}; padding: ${space(5)} ${space(8)}; }\n .texts li, .texts.columns { grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 1fr) auto 22px; }\n li { position: relative; border-block-end: ${t.borderThin} solid ${t.text}; transition: background-color 140ms ease-out, color 140ms ease-out; }\n .columns { padding-block: ${space(3)}; border-block-end: ${t.borderThin} solid ${t.text}; font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; }\n .columns .last { grid-column: -3; text-align: end; }\n .number { font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; font-variant-numeric: tabular-nums; color: ${t.textMuted}; }\n .name { font-family: ${t.fontHeading}; font-size: clamp(2rem, 7cqi, 4.5rem); font-weight: ${fontWeight('semibold')}; line-height: 1; letter-spacing: -0.05em; color: ${t.text}; overflow-wrap: anywhere; }\n .texts .name { font-size: clamp(2rem, 5cqi, 3.5rem); }\n .name a { color: inherit; text-decoration: none; }\n /* The link is stretched over the row, so the row is one target. */\n .name a::after { content: ''; position: absolute; inset: 0; z-index: 1; }\n .name a:focus-visible { outline: none; }\n .name a:focus-visible::after { box-shadow: ${t.focusShadow}; }\n .text { margin: 0; font-size: ${fontSize('md')}; line-height: ${lineHeight('normal')}; color: ${t.textMuted}; }\n .side { display: flex; flex-direction: column; align-items: flex-end; gap: ${space(2)}; text-align: end; }\n .meta, .price { font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; }\n .price { font-size: 0.6875rem; }\n /* Marketing badges are monospace capitals at 11px. A row that goes somewhere has a solid one; one that does not yet has an outline. */\n .badge { display: inline-block; padding: ${space(1)} ${space(2.5)}; font-family: ${t.fontMono}; font-size: 0.6875rem; font-weight: ${fontWeight('medium')}; line-height: 1.4; letter-spacing: ${t.trackingWide}; text-transform: uppercase; white-space: nowrap; color: ${t.surfaceCard}; background: ${t.text}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusSm}; }\n li:not(:has(a)) .badge { color: ${t.text}; background: transparent; }\n .arrow { display: flex; color: ${t.text}; }\n /* Pointed at, focused or featured, the row turns to ink. The card colour on the text colour is a pair every brand already holds at 4.5:1. */\n li:has(a):hover, li:has(a:focus-visible), li.featured { background: ${t.text}; }\n li:has(a):hover .name, li:has(a:focus-visible) .name, li.featured .name { color: ${t.surfaceCard}; }\n li:has(a):hover :is(.number, .meta, .text, .price), li:has(a:focus-visible) :is(.number, .meta, .text, .price), li.featured :is(.number, .meta, .text, .price) { color: color-mix(in srgb, ${t.surfaceCard} 78%, ${t.text}); }\n li:has(a):hover .badge, li:has(a:focus-visible) .badge { color: ${t.text}; background: ${t.surfaceCard}; border-color: ${t.surfaceCard}; }\n li:has(a):hover .arrow, li:has(a:focus-visible) .arrow, li.featured .arrow { color: var(--impakt-work-accent); }\n li.featured .badge { color: var(--impakt-work-on-accent); background: var(--impakt-work-accent); border-color: var(--impakt-work-accent); }\n /* The preview card follows the pointer. Only its transform changes, so it costs no layout. */\n .preview { position: absolute; inset-block-start: 0; inset-inline-start: 0; z-index: 2; inline-size: 15rem; box-sizing: border-box; padding: ${space(2)}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; box-shadow: 0 16px 32px rgb(0 0 0 / 0.2); pointer-events: none; transform: translate(var(--x), var(--y)) translate(-50%, -50%) rotate(-3deg); }\n .preview img { display: block; inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; }\n .preview span { display: block; padding-block-end: ${space(2)}; font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; }\n @container impakt-work-list (max-width: 40rem) {\n li, .texts li { grid-template-columns: 2rem minmax(0, 1fr) auto; column-gap: ${space(3)}; padding-inline: ${space(4)}; }\n .text { grid-column: 2 / -1; grid-row: 2; margin-block-start: ${space(2)}; }\n .side { grid-column: 2 / -1; grid-row: 3; align-items: flex-start; text-align: start; margin-block-start: ${space(2)}; }\n li:not(:has(.text)) .side { grid-row: 2; }\n .arrow { grid-column: 3; grid-row: 1; }\n .columns { display: none; }\n }\n @media (prefers-reduced-motion: reduce) { li { transition: none; } .preview { display: none; } }\n @media (forced-colors: active) {\n li:has(a):hover, li:has(a:focus-visible), li.featured { background: Canvas; outline: 2px solid Highlight; outline-offset: -2px; }\n li:has(a):hover :is(.name, .number, .meta, .arrow, .text, .price), li:has(a:focus-visible) :is(.name, .number, .meta, .arrow, .text, .price), li.featured :is(.name, .number, .meta, .arrow, .text, .price) { color: CanvasText; }\n .badge, li.featured .badge { color: CanvasText; background: Canvas; border-color: CanvasText; }\n }\n `,\n ];\n\n /** Show a row's preview beside a mouse pointer. Touch and reduced motion get none. */\n private point(event: PointerEvent, item: WorkItem): void {\n if (!item.preview || event.pointerType !== 'mouse' || window.matchMedia?.('(prefers-reduced-motion: reduce)').matches) {\n if (this.preview) this.preview = null;\n return;\n }\n const box = this.getBoundingClientRect();\n this.preview = { src: item.preview, label: item.previewLabel ?? '', x: event.clientX - box.left, y: event.clientY - box.top };\n }\n\n private columnRow(texts: boolean): TemplateResult | typeof nothing {\n const columns = this.columns ?? [];\n if (!columns.length) return nothing;\n const [number, name, ...rest] = columns;\n // Decoration: each row's own words already say what they are.\n return html`<div class=${texts ? 'columns texts' : 'columns'} part=\"columns\" aria-hidden=\"true\">\n <span>${number ?? ''}</span><span>${name ?? ''}</span>${rest.length ? html`<span class=\"last\">${rest.join(' \u00B7 ')}</span>` : nothing}\n </div>`;\n }\n\n render(): TemplateResult {\n const items = this.items ?? [];\n const texts = items.some((item) => !!item.text);\n const preview = this.preview;\n // role=\"list\" is set by hand: a list with its markers removed is not announced as a list by every screen reader.\n return html`${this.columnRow(texts)}<ol role=\"list\" part=\"list\" class=${texts ? 'texts' : ''} aria-label=${this.label || nothing} @pointerleave=${() => (this.preview = null)}>\n ${items.map((item, index) => {\n const number = String(this.start + index).padStart(2, '0');\n const side = item.badge || item.price || item.meta;\n return html`<li part=\"row\" class=${item.featured ? 'featured' : ''} @pointermove=${(event: PointerEvent) => this.point(event, item)}>\n <span class=\"number\" aria-hidden=\"true\">${number}</span>\n <div class=\"name\" part=\"name\" role=\"heading\" aria-level=${this.headingLevel}>\n ${item.href ? html`<a href=${item.href} part=\"link\">${item.name}</a>` : item.name}\n </div>\n ${texts ? html`<p class=\"text\" part=\"text\">${item.text ?? ''}</p>` : nothing}\n ${\n side\n ? html`<span class=\"side\">\n ${item.badge ? html`<span class=\"badge\" part=\"badge\">${item.badge}</span>` : nothing}\n ${item.price ? html`<span class=\"price\" part=\"price\">${item.price}</span>` : nothing}\n ${item.meta ? html`<span class=\"meta\" part=\"meta\">${item.meta}</span>` : nothing}\n </span>`\n : html`<span></span>`\n }\n ${item.href ? html`<span class=\"arrow\">${arrow}</span>` : html`<span></span>`}\n </li>`;\n })}\n </ol>${\n preview\n ? html`<div class=\"preview\" part=\"preview\" aria-hidden=\"true\" style=${`--x:${preview.x}px;--y:${preview.y}px`}>\n ${preview.label ? html`<span>${preview.label}</span>` : nothing}<img src=${preview.src} alt=\"\" />\n </div>`\n : nothing\n }`;\n }\n}\n\n/** One figure in a row of them. */\nexport interface StatRowItem {\n /** The number, written as it should appear, such as \"161 ms\" or \"4\". */\n figure: string;\n /** What the number counts. */\n label: string;\n /** A line more, if the label needs it. */\n note?: string;\n}\n\n/**\n * A row of figures under a rule, each with what it counts: \"4 live products\",\n * \"161 ms response time\".\n *\n * The figures are a list, so a screen reader says how many there are, and each\n * is read as one phrase, \"161 ms response time\", not a bare number followed\n * some way off by its label (1.3.1). The row wraps by its own width: four\n * across, then two (a phone 350px wide shows two by two), then one, with\n * nothing to scroll sideways at 320px (1.4.10).\n *\n * @category content\n * @icon stat\n */\nexport class ImpaktStatRow extends ImpaktElement {\n static properties = {\n items: { type: Array },\n label: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The figures, in order. Four fit a row on a wide page. */\n declare items: StatRowItem[];\n /** A name for the row, such as \"Live products\", read before the figures. Leave empty for none. */\n declare label: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.label = '';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container: impakt-stat-row / inline-size; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: ${space(6)}; }\n li { border-block-start: ${t.borderThin} solid ${t.rule}; padding-block-start: ${space(5)}; }\n p { margin: 0; display: flex; flex-direction: column; gap: ${space(2)}; }\n .value { font-family: ${t.fontHeading}; font-size: clamp(2.25rem, 6cqi, 3.25rem); font-weight: ${fontWeight('semibold')}; line-height: 1; letter-spacing: -0.04em; color: ${t.textHeading}; }\n .label { font-size: ${fontSize('sm')}; line-height: ${lineHeight('normal')}; color: ${t.textMuted}; }\n /* The note is meta: monospace capitals at 11px. */\n .note { font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<ul role=\"list\" part=\"list\" aria-label=${this.label || nothing}>\n ${this.items.map(\n (item) =>\n html`<li part=\"stat\">\n <p><span class=\"value\" part=\"value\">${item.figure}</span> <span class=\"label\" part=\"label\">${item.label}</span>${item.note ? html` <span class=\"note\">${item.note}</span>` : nothing}</p>\n </li>`,\n )}\n </ul>`;\n }\n}\n\n/** One question and its answer. */\nexport interface FaqItem {\n id: string;\n /** The question. */\n heading: string;\n /** The answer, as plain text. An answer with links or a list is slotted as `panel-<id>` instead. */\n body: string;\n}\n\n/**\n * The questions at the foot of a page, under a heading: a title, a line of\n * introduction, and the questions as sections that open.\n *\n * It is `impakt-accordion` with the heading a page always writes above it, so\n * the levels cannot drift: the questions are always one level below the\n * block's own heading (1.3.1). With a heading, the block is a region named by\n * it, so a screen reader can jump straight to the questions (2.4.1).\n *\n * An answer that is more than words is slotted as `panel-<id>`, exactly as\n * on the accordion, and is passed through to it.\n *\n * @category content\n * @icon accordion\n */\nexport class ImpaktFaq extends ImpaktElement {\n static properties = {\n eyebrow: { type: String },\n heading: { type: String },\n lead: { type: String },\n items: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n open: { type: Array },\n multiple: { type: Boolean },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The small line above the heading, such as \"Questions\". */\n declare eyebrow: string;\n /** The block's heading, such as \"Questions founders ask us first.\" */\n declare heading: string;\n /** A line under the heading. */\n declare lead: string;\n /** The questions, in order. */\n declare items: FaqItem[];\n /** The level of the block's heading. The questions are one level below it. */\n declare headingLevel: number;\n /** The ids of the questions that start open. */\n declare open: string[];\n /** Let more than one answer be open at once. */\n declare multiple: boolean;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.eyebrow = '';\n this.heading = '';\n this.lead = '';\n this.items = [];\n this.headingLevel = 2;\n this.open = [];\n this.multiple = true;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container: impakt-faq / inline-size; }\n .head { display: flex; flex-direction: column; gap: ${space(4)}; margin-block-end: ${space(10)}; max-inline-size: 44rem; }\n .eyebrow { margin: 0; font-family: ${t.fontEyebrow}; font-size: ${fontSize('sm')}; color: var(--impakt-eyebrow, ${t.textMuted}); }\n .heading { font-family: ${t.fontHeading}; font-size: clamp(2rem, 6cqi, 3.25rem); font-weight: ${fontWeight('semibold')}; line-height: 1.04; letter-spacing: -0.04em; color: ${t.textHeading}; }\n .lead { margin: 0; font-size: ${fontSize('md')}; line-height: ${lineHeight('normal')}; color: ${t.textMuted}; }\n /* The questions sit between 1px ink rules, the first one included, each a row about 92px tall set at heading size S. */\n impakt-accordion { border-block-start: ${t.borderThin} solid ${t.text}; }\n impakt-accordion::part(item) { border-block-end: ${t.borderThin} solid ${t.text}; }\n impakt-accordion::part(header) { min-block-size: 5.75rem; padding-block: ${space(5)}; font-family: ${t.fontHeading}; font-size: clamp(1.25rem, 3.2cqi, 1.5rem); font-weight: ${fontWeight('semibold')}; line-height: 1.2; letter-spacing: -0.02em; }\n impakt-accordion::part(panel) { max-inline-size: 44rem; color: ${t.textMuted}; line-height: ${lineHeight('normal')}; }\n @media (forced-colors: active) { impakt-accordion, impakt-accordion::part(item) { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const headingId = this.id_('heading');\n const level = Math.min(Math.max(this.headingLevel, 1), 5);\n const head =\n this.eyebrow || this.heading || this.lead\n ? html`<div class=\"head\" part=\"head\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n ${this.heading ? html`<div id=${headingId} class=\"heading\" part=\"heading\" role=\"heading\" aria-level=${level}>${this.heading}</div>` : nothing}\n ${this.lead ? html`<p class=\"lead\" part=\"lead\">${this.lead}</p>` : nothing}\n </div>`\n : nothing;\n // Each answer's slot is passed through to the accordion, with the plain answer as what shows when nothing is slotted.\n const accordion = html`<impakt-accordion part=\"questions\" marker=\"plus\" .items=${this.items} .headingLevel=${level + 1} .open=${this.open} .multiple=${this.multiple}>\n ${this.items.map((item) => html`<slot name=${`panel-${item.id}`} slot=${`panel-${item.id}`}>${item.body}</slot>`)}\n </impakt-accordion>`;\n return this.heading ? html`<section aria-labelledby=${headingId}>${head}${accordion}</section>` : html`<div>${head}${accordion}</div>`;\n }\n}\n\n/**\n * A site's menu as a whole screen: a few large links, for a phone or for a\n * site with only a handful of pages.\n *\n * **It is a native `<dialog>` opened with `showModal()`**, as the drawer is, so\n * the focus trap, Escape, the inert page behind it and the return of focus to\n * the button that opened it all come from the browser (2.1.2, 2.4.3). The page\n * behind does not scroll while it is open. The button that opens it is the\n * page's own; set `open` from it and listen for `impakt-close`.\n *\n * **The links are a navigation landmark with a name**, and the page the reader\n * is on carries `aria-current=\"page\"` and is marked with a square, so the mark\n * does not depend on colour (1.4.1). Set `current-text`, such as \"Current\",\n * and the words \"Current \u00B7 01\" stand in its number instead of the square. A\n * brand whose ink is dark may also colour it, by setting\n * `--impakt-site-menu-current`.\n *\n * The menu is drawn in ink: the text colour as the background with the card\n * colour on it, a pair every brand already holds at 4.5:1. A component slotted\n * at its foot takes the same colours through its tokens; a plain link there\n * keeps the page's own link colour, so slot `impakt-link` instead.\n *\n * @category navigation\n * @icon menu\n * @slot footer - Under the links: a call to action, an email address.\n * @fires {CustomEvent<null>} impakt-close - When the menu is closed, by its button, by Escape or by following a link.\n */\nexport class ImpaktSiteMenu extends ImpaktElement {\n static properties = {\n open: { type: Boolean, reflect: true },\n links: { type: Array },\n current: { type: String },\n brand: { type: String },\n mark: { type: String },\n home: { type: String },\n label: { type: String },\n closeText: { type: String, attribute: 'close-text' },\n currentText: { type: String, attribute: 'current-text' },\n };\n /** Whether the menu is showing. */\n declare open: boolean;\n /** The pages, in order. */\n declare links: NavLink[];\n /** The `href` of the page the reader is on, so its link is marked. */\n declare current: string;\n /** The site's name, at the top. */\n declare brand: string;\n /** A letter in a small square before the name, such as \"i\", as the site header's canvas look draws it. */\n declare mark: string;\n /** Where the site's name goes. */\n declare home: string;\n /** The menu's name, read when it opens and as the name of its links. */\n declare label: string;\n /** The words on the button that closes it. */\n declare closeText: string;\n /**\n * A word shown with the current page's number, such as \"Current\", so it\n * reads \"Current \u00B7 01\". It then marks the page in place of the square.\n * Leave empty for the square.\n */\n declare currentText: string;\n\n constructor() {\n super();\n this.open = false;\n this.links = [];\n this.current = '';\n this.brand = '';\n this.mark = '';\n this.home = '/';\n this.label = 'Menu';\n this.closeText = 'Close';\n this.currentText = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n /* The ink colours are taken on the host, because the dialog repaints the text colour for what is inside it. */\n :host { --impakt-menu: ${t.text}; --impakt-menu-on: ${t.surfaceCard}; --impakt-menu-muted: color-mix(in srgb, ${t.surfaceCard} 78%, ${t.text}); --impakt-menu-rule: color-mix(in srgb, ${t.surfaceCard} 18%, ${t.text}); }\n dialog { box-sizing: border-box; display: none; flex-direction: column; inline-size: 100vw; max-inline-size: 100vw; block-size: 100dvh; max-block-size: 100dvh; margin: 0; padding: 0; border: 0; overflow: auto; background: var(--impakt-menu); color: var(--impakt-menu-on); }\n dialog[open] { display: flex; }\n dialog::backdrop { background: var(--impakt-menu); }\n .bar { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding: ${space(2)} ${space(4)}; border-block-end: ${t.borderThin} solid var(--impakt-menu-rule); }\n .brand { color: inherit; text-decoration: none; font-family: ${t.fontHeading}; font-size: ${fontSize('md')}; font-weight: ${fontWeight('semibold')}; border-radius: ${t.radiusSm}; }\n .brand.marked { display: inline-flex; align-items: center; gap: ${space(3)}; min-block-size: 44px; font-weight: ${fontWeight('medium')}; }\n .mark { display: inline-grid; place-items: center; inline-size: 28px; block-size: 28px; flex: none; background: var(--impakt-menu-on); color: var(--impakt-menu); font-size: ${fontSize('sm')}; }\n .close { display: inline-flex; align-items: center; gap: ${space(2)}; min-block-size: 44px; padding: 0 ${space(4)}; font: inherit; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('medium')}; color: var(--impakt-menu); background: var(--impakt-menu-on); border: 0; border-radius: ${t.radius}; cursor: pointer; }\n nav { flex: 1; padding: ${space(6)} ${space(5)} 0; }\n ol { list-style: none; margin: 0; padding: 0; }\n li { border-block-end: ${t.borderThin} solid var(--impakt-menu-rule); }\n li a { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding-block: ${space(4)}; color: inherit; text-decoration: none; font-family: ${t.fontHeading}; font-size: clamp(2.25rem, 12vw, 3.5rem); font-weight: ${fontWeight('semibold')}; line-height: 1; letter-spacing: -0.05em; }\n li a:hover .words { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }\n .number { font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('regular')}; letter-spacing: 0; color: var(--impakt-menu-muted); }\n /*\n * The current page is marked with a square. Its colour stays the menu's own text colour unless a brand sets\n * --impakt-site-menu-current, because an accent is only readable on ink when the brand's ink is dark (1.4.3).\n */\n a[aria-current] { color: var(--impakt-site-menu-current, var(--impakt-menu-on)); }\n a[aria-current] .number { color: var(--impakt-site-menu-current, var(--impakt-menu-on)); }\n a[aria-current]:not(.worded) .words::before { content: ''; display: inline-block; inline-size: 0.28em; block-size: 0.28em; margin-inline-end: 0.22em; vertical-align: 0.18em; background: currentColor; }\n .foot { display: flex; flex-direction: column; gap: ${space(4)}; padding: ${space(8)} ${space(5)} calc(${space(8)} + env(safe-area-inset-bottom)); }\n .foot[hidden] { display: none; }\n /* What is slotted at the foot is read on ink too. */\n ::slotted(*) { --impakt-color-text-default: var(--impakt-menu-on); --impakt-color-text-heading: var(--impakt-menu-on); --impakt-color-text-muted: var(--impakt-menu-muted); --impakt-color-text-link: var(--impakt-menu-on); --impakt-color-text-link-hover: var(--impakt-menu-on); color: var(--impakt-menu-on); }\n @media (forced-colors: active) { dialog { border: 1px solid CanvasText; } .close { border: 1px solid ButtonText; } }\n `,\n ];\n\n private hasFooter = false;\n\n private get dialog(): HTMLDialogElement | null {\n return this.renderRoot.querySelector('dialog');\n }\n\n updated(changed: Map<string, unknown>): void {\n if (!changed.has('open')) return;\n const dialog = this.dialog;\n if (!dialog) return;\n if (this.open) {\n if (typeof dialog.showModal === 'function') dialog.showModal();\n else dialog.setAttribute('open', '');\n lockScroll(this);\n } else {\n if (typeof dialog.close === 'function' && dialog.open) dialog.close();\n else dialog.removeAttribute('open');\n unlockScroll(this);\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n unlockScroll(this);\n }\n\n private close(): void {\n if (!this.open) return;\n this.open = false;\n this.dispatchEvent(new CustomEvent('impakt-close', { bubbles: true, composed: true }));\n }\n\n private footerChanged(event: Event): void {\n this.hasFooter = (event.target as HTMLSlotElement).assignedNodes().length > 0;\n this.requestUpdate();\n }\n\n render(): TemplateResult {\n return html`<dialog part=\"dialog\" aria-label=${this.label} @cancel=${() => this.close()} @close=${() => this.close()}>\n <div class=\"bar\" part=\"bar\">\n ${\n this.brand\n ? html`<a class=${this.mark ? 'brand marked' : 'brand'} href=${this.home || '/'} part=\"brand\">${this.mark ? html`<span class=\"mark\" part=\"mark\" aria-hidden=\"true\">${this.mark}</span>` : nothing}${this.brand}</a>`\n : html`<span></span>`\n }\n <button class=\"close\" type=\"button\" part=\"close\" @click=${() => this.close()}>\n <span>${this.closeText}</span>\n <svg viewBox=\"0 0 12 12\" width=\"12\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M1 1l10 10M11 1 1 11\" /></svg>\n </button>\n </div>\n <nav aria-label=${this.label} part=\"nav\">\n <ol role=\"list\">\n ${(this.links ?? []).map((link, index) => {\n const current = !!this.current && link.href === this.current;\n const number = String(index + 1).padStart(2, '0');\n const worded = current && !!this.currentText;\n // Following a link closes the menu, so a link to a place on the same page does not leave it open over that place.\n return html`<li>\n <a href=${link.href} class=${worded ? 'worded' : ''} aria-current=${current ? 'page' : nothing} part=\"link\" @click=${() => this.close()}>\n <span class=\"words\">${link.label}</span><span class=\"number\" aria-hidden=\"true\">${worded ? `${this.currentText} \u00B7 ${number}` : number}</span>\n </a>\n </li>`;\n })}\n </ol>\n </nav>\n <div class=\"foot\" part=\"footer\" ?hidden=${!this.hasFooter}><slot name=\"footer\" @slotchange=${this.footerChanged}></slot></div>\n </dialog>`;\n }\n}\n\n/**\n * An offer, set out in two halves: what it is, with one action, and a short\n * numbered list of what you get.\n *\n * It draws no background of its own. Put it in `impakt-section` with the\n * `accent` or `ink` tone and it takes that band's colours, so the words on it\n * are always the colour the tokens measured against the band (1.4.3).\n *\n * The points are an ordered list, so a screen reader says how many there are;\n * the numbers drawn beside them are decoration (1.3.1). The halves stack by\n * the block's own width, and on a narrow screen the action comes after the\n * points, so it is the last thing read before the next section (1.4.10).\n *\n * @category content\n * @icon megaphone\n * @slot actions - The action: one button.\n */\nexport class ImpaktOffer extends ImpaktElement {\n static properties = {\n eyebrow: { type: String },\n heading: { type: String },\n lead: { type: String },\n points: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The small line above the heading, such as \"Free for founders and product owners\". */\n declare eyebrow: string;\n /** What is offered, such as \"Get a 48-hour product teardown.\" */\n declare heading: string;\n /** A sentence or two more. */\n declare lead: string;\n /** What you get, one short line each. */\n declare points: string[];\n declare headingLevel: number;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.eyebrow = '';\n this.heading = '';\n this.lead = '';\n this.points = [];\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container: impakt-offer / inline-size; }\n .offer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: 'copy points' 'actions points'; grid-template-rows: auto 1fr; column-gap: ${space(12)}; row-gap: ${space(5)}; align-items: start; }\n .copy { grid-area: copy; }\n .actions { grid-area: actions; }\n ol { grid-area: points; }\n .copy { display: flex; flex-direction: column; align-items: flex-start; gap: ${space(5)}; }\n .eyebrow { margin: 0; font-family: ${t.fontEyebrow}; font-size: ${fontSize('sm')}; color: var(--impakt-eyebrow, ${t.textMuted}); }\n .heading { font-family: ${t.fontHeading}; font-size: clamp(2rem, 7cqi, 4rem); font-weight: ${fontWeight('semibold')}; line-height: 1; letter-spacing: -0.04em; color: ${t.textHeading}; }\n .lead { margin: 0; max-inline-size: 32rem; font-size: ${fontSize('md')}; line-height: ${lineHeight('normal')}; color: ${t.text}; }\n ol { list-style: none; margin: 0; padding: 0; }\n li { display: flex; gap: ${space(5)}; padding-block: ${space(5)}; border-block-start: ${t.borderThin} solid ${t.text}; font-size: ${fontSize('lg')}; font-weight: ${fontWeight('medium')}; line-height: 1.2; color: ${t.text}; }\n .number { flex: none; font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('regular')}; line-height: 1.6; }\n @container impakt-offer (max-width: 44rem) { .offer { grid-template-columns: 1fr; grid-template-areas: 'copy' 'points' 'actions'; grid-template-rows: auto; row-gap: ${space(8)}; } }\n `,\n ];\n\n render(): TemplateResult {\n const level = Math.min(Math.max(this.headingLevel, 1), 6);\n return html`<div class=\"offer\" part=\"offer\">\n <div class=\"copy\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n ${this.heading ? html`<div class=\"heading\" part=\"heading\" role=\"heading\" aria-level=${level}>${this.heading}</div>` : nothing}\n ${this.lead ? html`<p class=\"lead\" part=\"lead\">${this.lead}</p>` : nothing}\n </div>\n <div class=\"actions\" part=\"actions\"><slot name=\"actions\"></slot></div>\n ${\n (this.points ?? []).length\n ? html`<ol role=\"list\" part=\"points\">\n ${this.points.map((point, index) => html`<li><span class=\"number\" aria-hidden=\"true\">${String(index + 1).padStart(2, '0')}</span><span>${point}</span></li>`)}\n </ol>`\n : nothing\n }\n </div>`;\n }\n}\n\n/**\n * A card for one article: what it is filed under, its title and a line about\n * it.\n *\n * **The card is one link.** The link sits on the title, which is a heading,\n * and is stretched over the card, so the whole card can be pressed while a\n * screen reader meets one link named by the title, not a \"Read more\" that says\n * nothing out of context (2.4.4). `link-text` adds a visible line such as\n * \"Read\"; it is decoration and is hidden from a screen reader, which already\n * has the title.\n *\n * @category content\n * @icon card\n */\nexport class ImpaktPostCard extends ImpaktElement {\n static properties = {\n heading: { type: String },\n text: { type: String },\n meta: { type: String },\n href: { type: String },\n linkText: { type: String, attribute: 'link-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n };\n /** The article's title. */\n declare heading: string;\n /** A line about it. */\n declare text: string;\n /** What it is filed under and how long it is, such as \"Pricing \u00B7 7 min read\". */\n declare meta: string;\n /** Where the card goes. */\n declare href: string;\n /** A visible line at the foot of the card, such as \"Read\". Leave empty for none. */\n declare linkText: string;\n declare headingLevel: number;\n\n constructor() {\n super();\n this.heading = '';\n this.text = '';\n this.meta = '';\n this.href = '';\n this.linkText = '';\n this.headingLevel = 3;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; block-size: 100%; }\n article { position: relative; box-sizing: border-box; block-size: 100%; display: flex; flex-direction: column; gap: ${space(4)}; padding: ${space(6)}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radius}; transition: background-color 140ms ease-out; }\n .meta { margin: 0; font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; }\n .heading { font-family: ${t.fontHeading}; font-size: ${fontSize('xl')}; font-weight: ${fontWeight('semibold')}; line-height: 1.15; letter-spacing: -0.025em; color: ${t.text}; }\n .heading a { color: inherit; text-decoration: none; }\n .heading a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }\n .heading a:focus-visible { outline: none; }\n .heading a:focus-visible::after { box-shadow: ${t.focusShadow}; }\n article:has(a):hover .heading { text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }\n .text { margin: 0; font-size: ${fontSize('sm')}; line-height: ${lineHeight('normal')}; color: ${t.textMuted}; }\n .more { margin-block-start: auto; font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.text}; }\n @media (forced-colors: active) { article { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const level = Math.min(Math.max(this.headingLevel, 1), 6);\n return html`<article part=\"card\">\n ${this.meta ? html`<p class=\"meta\" part=\"meta\">${this.meta}</p>` : nothing}\n <div class=\"heading\" part=\"heading\" role=\"heading\" aria-level=${level}>${this.href ? html`<a href=${this.href} part=\"link\">${this.heading}</a>` : this.heading}</div>\n ${this.text ? html`<p class=\"text\" part=\"text\">${this.text}</p>` : nothing}\n ${this.linkText && this.href ? html`<span class=\"more\" aria-hidden=\"true\">${this.linkText} \u2192</span>` : nothing}\n </article>`;\n }\n}\n\n/**\n * A word or two of a heading picked out as if selected in a design tool: the\n * accent colour behind it, an outline and four handles.\n *\n * It is decoration round real text. The words stay in the heading, in the\n * page, so they are read, found and translated as the rest of it is; the\n * handles and the optional label are hidden from a screen reader (1.3.1).\n * The words on the accent are the colour the tokens measured against it\n * (1.4.3). Nothing moves, so there is nothing to stop for reduced motion.\n *\n * `cursor` draws a pointer at the bottom-right handle, as if someone in the\n * file had just picked the words; its value, if any, is the name tag beside\n * it. `hide-label-on=\"phone\"` leaves the label out on a phone, where it would\n * crowd the line below.\n *\n * @category content\n * @icon text\n * @slot - The words to pick out.\n */\nexport class ImpaktHighlight extends ImpaktElement {\n static properties = {\n label: { type: String },\n cursor: { type: String },\n hideLabelOn: { type: String, reflect: true, attribute: 'hide-label-on' },\n };\n /** A small tag under the words, such as \"Design \u00B7 H1 / 120\". It is decoration and is not read. */\n declare label: string;\n /**\n * Draw a pointer at the bottom-right handle. Its value is a name tag beside\n * the pointer, such as \"Maria\"; an empty value draws the pointer alone. Leave\n * the attribute off for no pointer. Decoration, not read.\n */\n declare cursor: string | null;\n /** Leave the label out on a phone (`phone`). */\n declare hideLabelOn: '' | 'phone';\n\n constructor() {\n super();\n this.label = '';\n this.cursor = null;\n this.hideLabelOn = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: inline-block; position: relative; padding-inline: 0.1em; margin-inline: -0.02em; background: ${token('color.accent.default', '#ffd43b')}; color: ${token('color.accent.on', '#1a1a1a')}; outline: 1.5px solid ${token('color.accent.on', '#1a1a1a')}; outline-offset: -1px; }\n .handle { position: absolute; inline-size: 6px; block-size: 6px; box-sizing: border-box; background: ${t.surfaceCard}; border: 1px solid ${token('color.accent.on', '#1a1a1a')}; }\n .handle:nth-of-type(1) { inset-block-start: -3px; inset-inline-start: -3px; }\n .handle:nth-of-type(2) { inset-block-start: -3px; inset-inline-end: -3px; }\n .handle:nth-of-type(3) { inset-block-end: -3px; inset-inline-start: -3px; }\n .handle:nth-of-type(4) { inset-block-end: -3px; inset-inline-end: -3px; }\n /* The label is meta: monospace capitals at 11px, square. */\n .label { position: absolute; inset-block-start: calc(100% + 8px); inset-inline-start: 0; padding: 3px 7px; white-space: nowrap; font-family: ${t.fontMono}; font-size: 0.6875rem; font-weight: ${fontWeight('medium')}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${t.surfaceCard}; background: ${t.text}; border-radius: ${t.radiusSm}; }\n @media (max-width: 40rem) { :host([hide-label-on='phone']) .label { display: none; } }\n /* The pointer's tip sits on the bottom-right handle. */\n .cursor { position: absolute; inset-block-start: calc(100% - 1px); inset-inline-start: calc(100% - 1px); display: flex; align-items: flex-start; gap: 2px; pointer-events: none; line-height: 1; }\n .cursor svg { display: block; flex: none; color: ${t.text}; stroke: ${t.surfaceCard}; }\n .tag { margin-block-start: 14px; padding: 3px 6px; white-space: nowrap; font-family: ${t.fontMono}; font-size: 0.6875rem; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${t.surfaceCard}; background: ${t.text}; }\n @media (forced-colors: active) { :host { forced-color-adjust: none; background: Highlight; color: HighlightText; outline-color: HighlightText; } .handle { border-color: HighlightText; background: Canvas; } .label, .tag { background: CanvasText; color: Canvas; } .cursor svg { color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<slot></slot><span class=\"handle\" aria-hidden=\"true\"></span><span class=\"handle\" aria-hidden=\"true\"></span><span class=\"handle\" aria-hidden=\"true\"></span><span class=\"handle\" aria-hidden=\"true\"></span>${\n this.label ? html`<span class=\"label\" part=\"label\" aria-hidden=\"true\">${this.label}</span>` : nothing\n }${\n this.cursor != null\n ? html`<span class=\"cursor\" part=\"cursor\" aria-hidden=\"true\"\n ><svg viewBox=\"0 0 16 20\" width=\"16\" height=\"20\" focusable=\"false\"><path d=\"M1 1v16l4.2-4 2.9 6.2 2.6-1.2-2.9-6.1H14Z\" fill=\"currentColor\" stroke-width=\"1.2\" stroke-linejoin=\"round\" /></svg\n >${this.cursor ? html`<span class=\"tag\">${this.cursor}</span>` : nothing}</span\n >`\n : nothing\n }`;\n }\n}\n\ncustomElements.define('impakt-work-list', ImpaktWorkList);\ncustomElements.define('impakt-stat-row', ImpaktStatRow);\ncustomElements.define('impakt-faq', ImpaktFaq);\ncustomElements.define('impakt-site-menu', ImpaktSiteMenu);\ncustomElements.define('impakt-offer', ImpaktOffer);\ncustomElements.define('impakt-post-card', ImpaktPostCard);\ncustomElements.define('impakt-highlight', ImpaktHighlight);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-work-list': ImpaktWorkList;\n 'impakt-stat-row': ImpaktStatRow;\n 'impakt-faq': ImpaktFaq;\n 'impakt-site-menu': ImpaktSiteMenu;\n 'impakt-offer': ImpaktOffer;\n 'impakt-post-card': ImpaktPostCard;\n 'impakt-highlight': ImpaktHighlight;\n }\n}\n", "import { css, html, nothing, type TemplateResult } from 'lit';\nimport { say, ImpaktElement, focusRing, targetSize, visuallyHidden, fontWeight, lineHeight, space, spaceAround, t, token, type, iconSvg } from '@atomic-ui/ui';\n\nconst token_accent = token('color.accent.default', '#c8a15a');\n\nconst reducedMotion = (): boolean => typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;\n\n/** A round control laid over or beside content: previous, next, close. */\nconst roundButton = css`\n .round { ${targetSize} display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; padding: 0; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.rule}; border-radius: 50%; box-shadow: ${t.shadowSm}; cursor: pointer; transition: box-shadow 120ms ease-in-out, background-color 120ms ease-in-out; }\n .round:hover:not(:disabled) { box-shadow: ${t.shadowMd}; }\n .round:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }\n`;\n\nconst headingStyles = css`\n .eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${t.brand})); ${type('sm')} font-size: var(--impakt-font-size-eyebrow, var(--impakt-font-size-sm, 0.875rem)); font-family: ${t.fontEyebrow}; font-weight: var(--impakt-font-weight-eyebrow, ${fontWeight('semibold')}); letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .h { margin: 0; color: ${t.textHeading}; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; letter-spacing: ${t.trackingTight}; text-wrap: balance; }\n .lead { margin: 0; color: ${t.textMuted}; text-wrap: pretty; }\n`;\n\n/**\n * Slides that move sideways: house types, reviews, the rooms of a show home.\n * Put anything in it, one child to a slide.\n *\n * It follows the ARIA carousel pattern. Each slide is named \"2 of 6\", a live\n * region says where you are, and it can be moved with the buttons, the dots,\n * the arrow keys, a swipe or a scroll.\n *\n * **It moves only when asked.** Autoplay is off by default. Turned on, it has a\n * Pause button, stops while pointed at or focused, and never runs for someone\n * who has asked for reduced motion (2.2.2).\n *\n * @category content\n * @icon carousel\n * @slot - The slides, one child to each.\n */\nexport class ImpaktCarousel extends ImpaktElement {\n static properties = {\n label: { type: String },\n perView: { type: String, reflect: true, attribute: 'per-view' },\n arrows: { type: String, reflect: true },\n autoplay: { type: Boolean, reflect: true },\n seconds: { type: Number },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** What the slides are, for a screen reader, such as \"House types\". */\n declare label: string;\n /** How many slides show at once on a wide screen. A tablet shows at most two, and a phone one. */\n declare perView: '1' | '2' | '3';\n /** Where the arrows sit: under the slides, or level with the heading above them. */\n declare arrows: 'below' | 'top';\n /** Move on by itself. People can pause it, and it never runs for those who ask for less motion. */\n declare autoplay: boolean;\n /** How long each slide stays, when it moves by itself. */\n declare seconds: number;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private index = 0;\n private count = 0;\n /** How many slides fit right now, which the width decides. */\n private visible: number | null = null;\n /** Where a button or dot is taking the row. Until it arrives, the scroll position is not the truth. */\n private heading: number | null = null;\n private settle: ReturnType<typeof setTimeout> | undefined;\n private observer: ResizeObserver | undefined;\n private paused = false;\n private held = false;\n private timer: ReturnType<typeof setInterval> | undefined;\n\n constructor() {\n super();\n this.label = 'Slides';\n this.perView = '1';\n this.arrows = 'below';\n this.autoplay = false;\n this.seconds = 6;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n roundButton,\n css`\n :host { display: block; container-type: inline-size; --most: 1; --gap: ${space(6)}; }\n :host([per-view='2']) { --most: 2; }\n :host([per-view='3']) { --most: 3; }\n .track { --per: var(--most); display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: ${space(1)} ${space(2)}; border-radius: ${t.radiusLg}; }\n .track::-webkit-scrollbar { display: none; }\n ::slotted(*) { flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per)); min-inline-size: 0; scroll-snap-align: start; box-sizing: border-box; }\n /* Whole slides only: a slice of the next one reads as content spilling out of the page. */\n @container (max-width: 60rem) { .track { --per: min(var(--most), 2); } }\n @container (max-width: 40rem) { .track { --per: 1; --gap: ${space(4)}; } }\n .controls { display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; margin-block-start: ${space(4)}; }\n .dots { display: flex; flex-wrap: wrap; gap: ${space(1)}; }\n .dot { ${targetSize} display: inline-flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 0; cursor: pointer; border-radius: ${t.radiusSm}; }\n .dot span { display: block; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${t.rule}; transition: inline-size 150ms ease-in-out, background-color 150ms ease-in-out; }\n .dot[aria-current='true'] span { inline-size: 24px; background: ${t.brand}; }\n .buttons { display: flex; gap: ${space(2)}; }\n section { position: relative; }\n @container (min-width: 40.01rem) { :host([arrows='top']) .buttons { position: absolute; inset-block-end: calc(100% + ${space(4)}); inset-inline-end: 0; } }\n .sr-only { ${visuallyHidden} }\n @media (forced-colors: active) { .dot span { background: CanvasText; } .dot[aria-current='true'] span { background: Highlight; } }\n `,\n ];\n\n private get track(): HTMLElement | null {\n return this.renderRoot.querySelector('.track');\n }\n\n private get slides(): HTMLElement[] {\n return Array.from(this.children) as HTMLElement[];\n }\n\n /** The last slide that can sit at the start of the row. */\n private get last(): number {\n return Math.max(0, this.count - (this.visible ?? Number(this.perView || 1)));\n }\n\n /** Count what actually fits, and keep the row on a real stop when that changes. */\n private measure(): void {\n const track = this.track;\n const first = this.slides[0];\n if (!track || !first) return;\n const width = first.getBoundingClientRect().width;\n if (width <= 0) return;\n const gap = Number.parseFloat(getComputedStyle(track).columnGap) || 0;\n const fits = Math.max(1, Math.round((track.clientWidth + gap) / (width + gap)));\n if (fits === this.visible) return;\n this.visible = fits;\n this.index = Math.min(this.index, this.last);\n const slide = this.slides[this.index];\n if (slide && typeof track.scrollTo === 'function') track.scrollTo({ left: slide.offsetLeft - track.offsetLeft, behavior: 'auto' });\n this.requestUpdate();\n }\n\n private onSlots(): void {\n const slides = this.slides;\n this.count = slides.length;\n slides.forEach((slide, i) => {\n slide.setAttribute('role', 'group');\n slide.setAttribute('aria-roledescription', say('slide'));\n slide.setAttribute('aria-label', say('{slide} of {slides}', { slide: i + 1, slides: slides.length }));\n });\n this.measure();\n this.requestUpdate();\n }\n\n private go(to: number): void {\n const target = Math.min(this.last, Math.max(0, to));\n this.index = target;\n this.heading = target;\n clearTimeout(this.settle);\n // If the row has not got there by now (a tab in the background, say), put it there.\n this.settle = setTimeout(() => {\n const arrived = this.heading === null;\n this.heading = null;\n const track = this.track;\n const slide = this.slides[this.index];\n if (!arrived && track && slide && typeof track.scrollTo === 'function') track.scrollTo({ left: slide.offsetLeft - track.offsetLeft, behavior: 'auto' });\n }, 900);\n this.requestUpdate();\n const track = this.track;\n const slide = this.slides[target];\n if (track && slide && typeof track.scrollTo === 'function') {\n track.scrollTo({ left: slide.offsetLeft - track.offsetLeft, behavior: reducedMotion() ? 'auto' : 'smooth' });\n }\n }\n\n private onScroll(): void {\n const track = this.track;\n const slides = this.slides;\n if (!track || !slides.length) return;\n let nearest = 0;\n let distance = Infinity;\n slides.forEach((slide, i) => {\n const d = Math.abs(slide.offsetLeft - track.offsetLeft - track.scrollLeft);\n if (d < distance) {\n distance = d;\n nearest = i;\n }\n });\n if (this.heading !== null) {\n if (nearest === this.heading && distance < 2) {\n this.heading = null;\n clearTimeout(this.settle);\n }\n return;\n }\n if (nearest !== this.index) {\n this.index = Math.min(nearest, this.last);\n this.requestUpdate();\n }\n }\n\n private onKey(event: KeyboardEvent): void {\n if (event.key === 'ArrowRight') {\n event.preventDefault();\n this.go(this.index + 1);\n }\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n this.go(this.index - 1);\n }\n }\n\n private get canPlay(): boolean {\n return this.autoplay && !reducedMotion();\n }\n\n private restart(): void {\n clearInterval(this.timer);\n this.timer = undefined;\n if (!this.canPlay || this.paused || this.held) return;\n this.timer = setInterval(() => this.go(this.index >= this.last ? 0 : this.index + 1), Math.max(2, this.seconds) * 1000);\n }\n\n private hold(held: boolean): void {\n this.held = held;\n this.restart();\n }\n\n private togglePause(): void {\n this.paused = !this.paused;\n this.restart();\n this.requestUpdate();\n }\n\n protected firstUpdated(): void {\n if (typeof ResizeObserver === 'function' && this.track) {\n this.observer = new ResizeObserver(() => this.measure());\n this.observer.observe(this.track);\n }\n }\n\n protected updated(changed: Map<string, unknown>): void {\n if (changed.has('autoplay') || changed.has('seconds')) this.restart();\n if (changed.has('perView')) this.measure();\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n if (this.track) this.observer?.observe(this.track);\n this.restart();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.observer?.disconnect();\n clearInterval(this.timer);\n clearTimeout(this.settle);\n }\n\n render(): TemplateResult {\n const stops = Array.from({ length: this.last + 1 }, (_, i) => i);\n return html`<section aria-roledescription=${say('carousel')} aria-label=${this.label} part=\"carousel\" @keydown=${this.onKey}\n @mouseenter=${() => this.hold(true)} @mouseleave=${() => this.hold(false)} @focusin=${() => this.hold(true)} @focusout=${() => this.hold(false)}>\n <div class=\"track\" part=\"track\" tabindex=\"0\" @scroll=${this.onScroll}><slot @slotchange=${this.onSlots}></slot></div>\n <div class=\"controls\" part=\"controls\">\n <div class=\"dots\">${stops.length > 1 ? stops.map((i) => html`<button class=\"dot\" type=\"button\" aria-label=${say('Go to slide {slide}', { slide: i + 1 })} aria-current=${i === this.index ? 'true' : 'false'} @click=${() => this.go(i)}><span></span></button>`) : nothing}</div>\n <div class=\"buttons\">\n ${this.canPlay ? html`<button class=\"round\" type=\"button\" aria-label=${say(this.paused ? 'Play the slides' : 'Pause the slides')} @click=${this.togglePause}>${this.paused ? iconSvg('arrow-right', '18px') : html`<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\"><rect x=\"6\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\"/><rect x=\"14\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\"/></svg>`}</button>` : nothing}\n <button class=\"round\" type=\"button\" aria-label=${say('Previous slide')} ?disabled=${this.index === 0} @click=${() => this.go(this.index - 1)}>${iconSvg('arrow-left', '18px')}</button>\n <button class=\"round\" type=\"button\" aria-label=${say('Next slide')} ?disabled=${this.index >= this.last} @click=${() => this.go(this.index + 1)}>${iconSvg('arrow-right', '18px')}</button>\n </div>\n </div>\n <p class=\"sr-only\" aria-live=\"polite\">${say('Slide {slide} of {slides}', { slide: this.index + 1, slides: this.count })}</p>\n </section>`;\n }\n}\n\n/** One picture in a gallery. */\nexport interface GalleryItem {\n id?: string;\n src: string;\n alt: string;\n caption?: string;\n}\n\n/**\n * How far a gallery picture stretches so that no row ends in a gap, on a wide\n * container and on a narrow one. The large first picture keeps its own size.\n */\nexport function gallerySpan(index: number, count: number, layout: 'feature' | 'grid'): { wide: number; narrow: number; rows: number } {\n const last = index === count - 1;\n const span = { wide: 1, narrow: 1, rows: 1 };\n if (layout === 'grid') {\n if (last) {\n span.wide = count % 3 ? 4 - (count % 3) : 1;\n span.narrow = count % 2 ? 2 : 1;\n }\n return span;\n }\n if (index === 0) return span;\n if (count === 2) return { wide: 2, narrow: 2, rows: 2 };\n if (count === 3) return { ...span, wide: 2 };\n if (last) {\n const extra = (count - 5) % 4;\n span.wide = count === 4 ? 2 : count > 5 && extra ? 5 - extra : 1;\n span.narrow = count % 2 ? 1 : 2;\n }\n return span;\n}\n\n/**\n * A set of pictures, with the first shown large, that open full screen one at\n * a time: the rooms of a show home, or views of a development.\n *\n * Each picture is a button. The full-screen view is a real modal dialog, so\n * focus stays inside it, Escape closes it and focus returns to the picture that\n * opened it. The arrow keys move between pictures.\n *\n * @category media\n * @icon gallery\n */\nexport class ImpaktGallery extends ImpaktElement {\n static properties = {\n items: { type: Array },\n layout: { type: String, reflect: true },\n label: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: GalleryItem[];\n /** One large picture with smaller ones beside it, or an even grid. */\n declare layout: 'feature' | 'grid';\n /** What the pictures are of, for a screen reader. */\n declare label: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private shown = -1;\n private opener: HTMLElement | null = null;\n\n constructor() {\n super();\n this.items = [];\n this.layout = 'feature';\n this.label = 'Gallery';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n roundButton,\n css`\n :host { display: block; container-type: inline-size; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(3)}; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 180px; }\n :host([layout='grid']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 220px; }\n li { grid-column: span var(--span-wide, 1); grid-row: span var(--span-rows, 1); }\n :host([layout='feature']) li:first-child { grid-column: span 2; grid-row: span 2; }\n .open { position: relative; display: block; inline-size: 100%; block-size: 100%; padding: 0; border: 0; background: ${t.surfaceInset}; border-radius: ${t.radiusXl}; overflow: hidden; cursor: zoom-in; }\n .open img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 300ms ease-out; }\n .open:hover img { transform: scale(1.03); }\n @container (max-width: 40rem) { ul, :host([layout='grid']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 130px; } li { grid-column: span var(--span-narrow, 1); } }\n dialog { padding: 0; border: 0; background: transparent; max-inline-size: none; max-block-size: none; inline-size: 100vw; block-size: 100dvh; }\n dialog::backdrop { background: rgb(10 14 12 / 0.9); }\n .stage { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; block-size: 100%; box-sizing: border-box; padding: ${space(4)}; gap: ${space(3)}; color: #fff; }\n .bar { display: flex; align-items: center; justify-content: space-between; ${type('sm')} }\n .middle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: ${space(3)}; min-block-size: 0; }\n .middle img { display: block; margin: auto; max-inline-size: 100%; max-block-size: 100%; object-fit: contain; border-radius: ${t.radiusLg}; }\n figure { margin: 0; display: flex; min-block-size: 0; block-size: 100%; }\n .caption { margin: 0; text-align: center; ${type('sm')} }\n `,\n ];\n\n private get dialog(): HTMLDialogElement | null {\n return this.renderRoot.querySelector('dialog');\n }\n\n private open(index: number, event: Event): void {\n this.opener = event.currentTarget as HTMLElement;\n this.shown = index;\n this.requestUpdate();\n void this.updateComplete.then(() => {\n const d = this.dialog;\n if (d && !d.open) {\n if (typeof d.showModal === 'function') d.showModal();\n else d.setAttribute('open', '');\n }\n });\n }\n\n private close(): void {\n const d = this.dialog;\n if (d?.open) {\n if (typeof d.close === 'function') d.close();\n else d.removeAttribute('open');\n }\n this.onClosed();\n }\n\n private onClosed(): void {\n if (this.shown === -1) return;\n this.shown = -1;\n this.requestUpdate();\n this.opener?.focus();\n }\n\n private step(by: number): void {\n const n = (this.items ?? []).length;\n if (!n || this.shown < 0) return;\n this.shown = (this.shown + by + n) % n;\n this.requestUpdate();\n }\n\n private onKey(event: KeyboardEvent): void {\n if (event.key === 'ArrowRight') {\n event.preventDefault();\n this.step(1);\n }\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n this.step(-1);\n }\n }\n\n render(): TemplateResult {\n const items = this.items ?? [];\n const current = this.shown >= 0 ? items[this.shown] : undefined;\n return html`<ul aria-label=${this.label} part=\"list\">${items.map((item, i) => {\n const span = gallerySpan(i, items.length, this.layout);\n return html`<li style=${`--span-wide:${span.wide};--span-narrow:${span.narrow};--span-rows:${span.rows}`}>\n <button class=\"open\" type=\"button\" aria-label=${say('View larger: {picture}', { picture: item.alt })} @click=${(e: Event) => this.open(i, e)}><img src=${item.src} alt=${item.alt} loading=\"lazy\" /></button>\n </li>`;\n })}</ul>\n <dialog aria-label=${this.label} @keydown=${this.onKey} @close=${this.onClosed}>\n ${\n current\n ? html`<div class=\"stage\">\n <div class=\"bar\"><span>${this.shown + 1} of ${items.length}</span><button class=\"round\" type=\"button\" aria-label=${say('Close')} @click=${this.close}>${iconSvg('close', '18px')}</button></div>\n <div class=\"middle\">\n <button class=\"round\" type=\"button\" aria-label=${say('Previous picture')} @click=${() => this.step(-1)}>${iconSvg('arrow-left', '18px')}</button>\n <figure><img src=${current.src} alt=${current.alt} /></figure>\n <button class=\"round\" type=\"button\" aria-label=${say('Next picture')} @click=${() => this.step(1)}>${iconSvg('arrow-right', '18px')}</button>\n </div>\n <p class=\"caption\">${current.caption ?? current.alt}</p>\n </div>`\n : nothing\n }\n </dialog>`;\n }\n}\n\n/** One accreditation or partner. */\nexport interface LogoItem {\n id?: string;\n src: string;\n alt: string;\n href?: string;\n}\n\n/**\n * A row of logos that lends trust: accreditations, awards, lenders, partners.\n *\n * The logos are drawn quietly so they do not fight the page, and come to full\n * colour when pointed at. Each one is named by its alt text.\n *\n * @category content\n * @icon logos\n */\nexport class ImpaktLogoCloud extends ImpaktElement {\n static properties = {\n heading: { type: String },\n items: { type: Array },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A line above the logos, such as \"Accredited by\". */\n declare heading: string;\n declare items: LogoItem[];\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = '';\n this.items = [];\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; }\n p { margin: 0 0 ${space(6)}; text-align: center; color: ${t.textMuted}; ${type('sm')} font-weight: ${fontWeight('medium')}; }\n ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: ${space(8)} ${space(12)}; }\n img { display: block; block-size: 40px; inline-size: auto; max-inline-size: 160px; object-fit: contain; filter: grayscale(1); opacity: 0.7; transition: filter 200ms ease-in-out, opacity 200ms ease-in-out; }\n li:hover img { filter: none; opacity: 1; }\n a { display: block; border-radius: ${t.radiusSm}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`${this.heading ? html`<p part=\"heading\">${this.heading}</p>` : nothing}\n <ul part=\"list\">${(this.items ?? []).map((logo) => html`<li>${logo.href ? html`<a href=${logo.href}><img src=${logo.src} alt=${logo.alt} /></a>` : html`<img src=${logo.src} alt=${logo.alt} />`}</li>`)}</ul>`;\n }\n}\n\n/** One step in a process. */\nexport interface StepItem {\n id?: string;\n heading: string;\n text?: string;\n /** A short line above the heading, such as how long the step takes. */\n meta?: string;\n}\n\n/**\n * A process, in order, joined by a line: how buying a home works, what happens\n * after you apply.\n *\n * It is an ordered list, so a screen reader says the number and how many there\n * are. The numbers are drawn from the list, not typed in.\n *\n * @category content\n * @icon steps\n */\nexport class ImpaktSteps extends ImpaktElement {\n static properties = {\n items: { type: Array },\n orientation: { type: String, reflect: true },\n look: { type: String, reflect: true },\n tones: { type: Boolean, reflect: true },\n current: { type: Number },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: StepItem[];\n /** Across the page, or down it. Across becomes down on a narrow screen. */\n declare orientation: 'horizontal' | 'vertical';\n /**\n * `numbered` joins numbered circles with a line. `ruled` gives each step a\n * 1px rule along its top in the band's text colour, with its number and\n * meta in monospace capitals (\"01 \u00B7 1 TO 2 WEEKS\"), as a project plan's\n * phases are drawn; on a phone the steps hang off a rail down the left. The\n * steps are an ordered list either way.\n */\n declare look: 'numbered' | 'ruled';\n /**\n * With `ruled`: colour each step's rule in the brand's chart colours, and on\n * a phone draw the steps as a coloured branch graph, for a brand that wants\n * colour there.\n */\n declare tones: boolean;\n /**\n * The index of the step the project is at, from 0, or -1 for none. It is\n * marked `aria-current=\"step\"`, its rule is drawn heavier and its meta and\n * rule take `--impakt-steps-current`, which a dark band sets to the accent.\n */\n declare current: number;\n /** The level of each step's heading. One below the heading above the steps. */\n declare headingLevel: 2 | 3 | 4;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.orientation = 'horizontal';\n this.look = 'numbered';\n this.tones = false;\n this.current = -1;\n this.headingLevel = 3;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: ${space(6)}; }\n li { position: relative; counter-increment: step; display: flex; flex-direction: column; gap: ${space(2)}; }\n li::before { content: counter(step); display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; border-radius: 50%; background: ${t.brand}; color: ${t.onBrand}; ${type('sm')} font-weight: ${fontWeight('bold')}; position: relative; z-index: 1; margin-block-end: ${space(2)}; }\n li:not(:last-child)::after { content: ''; position: absolute; inset-block-start: 20px; inset-inline-start: 48px; inset-inline-end: calc(-1 * ${space(6)} + 8px); block-size: 2px; background: ${t.rule}; }\n .h { ${type('lg')} letter-spacing: 0; }\n .meta { margin: 0; ${type('sm')} color: ${t.textMuted}; font-family: ${t.fontMono}; letter-spacing: 0.02em; }\n .body { margin: 0; color: ${t.textMuted}; line-height: ${lineHeight('normal')}; text-wrap: pretty; }\n :host([orientation='vertical']) ol { grid-auto-flow: row; }\n :host([orientation='vertical']) li { padding-inline-start: 56px; min-block-size: 56px; }\n :host([orientation='vertical']) li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }\n :host([orientation='vertical']) li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${space(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }\n @container (max-width: 40rem) {\n ol { grid-auto-flow: row; }\n li { padding-inline-start: 56px; min-block-size: 56px; }\n li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }\n li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${space(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }\n }\n /* Ruled: a 1px rule in the band's text colour, or in the chart colours with tones. */\n :host([look='ruled']) li { --rule: currentColor; padding-block-start: ${space(5)}; border-block-start: 1px solid var(--rule); }\n :host([look='ruled'][tones]) li { --rule: var(--chart); border-block-start-width: 3px; }\n :host([look='ruled']:not([tones])) .meta { font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n :host([look='ruled']:not([tones])) .meta::before { content: counter(step, decimal-leading-zero) ' \u00B7 '; }\n :host([look='ruled']:not([tones])) li[aria-current] { --rule: var(--impakt-steps-current, currentColor); border-block-start-width: 2px; padding-block-start: calc(${space(5)} - 1px); }\n :host([look='ruled']:not([tones])) li[aria-current] .meta { color: var(--impakt-steps-current, currentColor); }\n :host([look='ruled']) li::before, :host([look='ruled']) li::after { display: none; }\n :host([look='ruled']) ol { gap: ${space(5)}; }\n /* On a phone the ruled steps hang off a rail: a 1.5px line down the left and a hollow 10px ring at each step, the current one filled. */\n @container (max-width: 40rem) {\n :host([look='ruled']) ol { gap: 0; }\n :host([look='ruled']) li, :host([look='ruled']:not([tones])) li[aria-current] { padding-inline-start: 40px; padding-block: ${space(6)}; min-block-size: 0; border-block-start: 0; }\n :host([look='ruled']) li::before { display: block; content: ''; position: absolute; inset-block: 0; inset-inline-start: 4px; inline-size: 1.5px; block-size: auto; border-radius: 0; margin: 0; background: currentColor; }\n :host([look='ruled']) li::after { display: block; content: ''; position: absolute; inset-block-start: calc(${space(6)} + 2px); inset-inline-start: 0; inline-size: 10px; block-size: 10px; box-sizing: border-box; border: 1px solid currentColor; border-radius: 50%; background: ${t.surfaceCard}; }\n :host([look='ruled']) li:first-child::before { inset-block-start: calc(${space(6)} + 7px); }\n :host([look='ruled']) li:last-child::before { inset-block-end: auto; block-size: calc(${space(6)} + 7px); }\n :host([look='ruled']:not([tones])) li[aria-current]::after { background: var(--impakt-steps-current, currentColor); }\n /* With tones: a branch graph, one trunk down the left and each step a coloured branch off it with a dot. */\n :host([look='ruled'][tones]) li::before { inset-block: 0; inset-inline-start: 0; inline-size: 2px; block-size: auto; background: ${t.text}; }\n :host([look='ruled'][tones]) li::after { inset-block: ${space(3)}; inset-inline-start: 2px; inline-size: 12px; block-size: auto; background: radial-gradient(circle at 100% 34px, var(--rule) 4px, transparent 4.5px); border: 2px solid var(--rule); border-inline-start: 0; border-radius: 0 14px 14px 0; }\n }\n @media (forced-colors: active) { li::before { border: 1px solid CanvasText; } li:not(:last-child)::after { background: CanvasText; } :host([look='ruled']) li { border-block-start-color: CanvasText; } :host([look='ruled']) li[aria-current]::after { background: Highlight; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<ol part=\"list\">${(this.items ?? []).map(\n (\n step,\n i,\n ) => html`<li part=\"step\" aria-current=${i === this.current ? 'step' : nothing} style=${this.look === 'ruled' ? `--chart:var(--impakt-color-chart-${(i % 5) + 1}, ${'var(--impakt-color-brand-default, #1f4ed8)'})` : nothing}>\n ${step.meta ? html`<p class=\"meta\">${step.meta}</p>` : nothing}\n <div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${step.heading}</div>\n ${step.text ? html`<p class=\"body\">${step.text}</p>` : nothing}\n </li>`,\n )}</ol>`;\n }\n}\n\n/**\n * A picture beside words, the working section of a marketing page: a heading,\n * a line of text, a short list of points and an action.\n *\n * On a phone the words come first, whichever side the picture is on, so the\n * reading order never depends on the layout.\n *\n * @category layout\n * @icon split\n * @role heading\n * @slot actions - Buttons and links under the words.\n */\nexport class ImpaktMediaSplit extends ImpaktElement {\n static properties = {\n eyebrow: { type: String },\n heading: { type: String },\n lead: { type: String },\n points: { type: Array },\n level: { type: Number, reflect: true },\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n imageSide: { type: String, reflect: true, attribute: 'image-side' },\n insetSrc: { type: String, attribute: 'inset-src' },\n insetAlt: { type: String, attribute: 'inset-alt' },\n ratio: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare eyebrow: string;\n declare heading: string;\n /** A sentence or two under the heading. */\n declare lead: string;\n /** Short points, each drawn with a tick. */\n declare points: string[];\n /** The heading's level in the page. */\n declare level: 2 | 3;\n declare imageSrc: string;\n /** What the picture shows. Leave empty only when it is decoration. */\n declare imageAlt: string;\n /** A smaller picture overlapping the corner of the main one. */\n declare insetSrc: string;\n declare insetAlt: string;\n /** Which side the picture sits on, on a wide screen. */\n declare imageSide: 'start' | 'end';\n /** The picture's shape. */\n declare ratio: '4:3' | '1:1' | '3:2' | '16:9';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.eyebrow = '';\n this.heading = '';\n this.lead = '';\n this.points = [];\n this.level = 2;\n this.imageSrc = '';\n this.imageAlt = '';\n this.imageSide = 'end';\n this.insetSrc = '';\n this.insetAlt = '';\n this.ratio = '4:3';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; --ratio: 4 / 3; }\n :host([ratio='1:1']) { --ratio: 1 / 1; }\n :host([ratio='3:2']) { --ratio: 3 / 2; }\n :host([ratio='16:9']) { --ratio: 16 / 9; }\n .split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(16)}; align-items: center; }\n :host([image-side='start']) .picture { order: -1; }\n .words { display: flex; flex-direction: column; gap: ${space(4)}; }\n .h { ${type('4xl')} }\n .lead { ${type('lg')} }\n ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: ${space(3)}; }\n li { display: flex; gap: ${space(3)}; align-items: flex-start; line-height: ${lineHeight('normal')}; }\n .tick { flex: none; display: inline-flex; align-items: center; justify-content: center; inline-size: 24px; block-size: 24px; border-radius: 50%; background: ${t.brandSubtle}; color: ${t.brand}; }\n .actions { display: flex; flex-wrap: wrap; gap: ${space(3)} ${space(4)}; align-items: center; margin-block-start: ${space(2)}; }\n img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowXl}; }\n .picture { position: relative; }\n .picture.has-inset { padding-block-end: 8%; padding-inline-end: 4%; }\n .inset { position: absolute; inset-block-end: 0; inset-inline-end: 0; inline-size: 42%; aspect-ratio: 10 / 7; border: 6px solid ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-sizing: border-box; }\n @container (max-width: 48rem) {\n .split { grid-template-columns: minmax(0, 1fr); gap: ${space(8)}; }\n :host([image-side='start']) .picture { order: 0; }\n .h { ${type('3xl')} }\n }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"split\" part=\"split\">\n <div class=\"words\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n <div class=\"h\" role=\"heading\" aria-level=${this.level}>${this.heading}</div>\n ${this.lead ? html`<p class=\"lead\">${this.lead}</p>` : nothing}\n ${this.points?.length ? html`<ul>${this.points.map((p) => html`<li><span class=\"tick\">${iconSvg('check', '14px')}</span><span>${p}</span></li>`)}</ul>` : nothing}\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>\n ${this.imageSrc ? html`<div class=\"picture ${this.insetSrc ? 'has-inset' : ''}\"><img src=${this.imageSrc} alt=${this.imageAlt} loading=\"lazy\" part=\"image\" />${this.insetSrc ? html`<img class=\"inset\" src=${this.insetSrc} alt=${this.insetAlt} loading=\"lazy\" />` : nothing}</div>` : nothing}\n </div>`;\n }\n}\n\n/**\n * The closing push of a page: a rounded panel with a heading, a line of text\n * and the page's main action, set apart from everything above it.\n *\n * @category layout\n * @icon banner\n * @slot actions - The buttons.\n */\nexport class ImpaktCtaBanner extends ImpaktElement {\n static properties = {\n heading: { type: String },\n lead: { type: String },\n tone: { type: String, reflect: true },\n align: { type: String, reflect: true },\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare lead: string;\n /** The panel's colour. */\n declare tone: 'brand' | 'subtle' | 'card';\n /** Words beside the action, centred above it, or above it on the left. */\n declare align: 'split' | 'center' | 'stacked';\n /** A photo behind the words, with a scrim so they stay readable. */\n declare imageSrc: string;\n declare imageAlt: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = '';\n this.lead = '';\n this.tone = 'brand';\n this.align = 'split';\n this.imageSrc = '';\n this.imageAlt = '';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n .panel { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: ${space(8)}; padding: ${space(16)}; border-radius: ${t.radius2xl}; background: ${t.surfaceCard}; box-shadow: ${t.shadowSm}, inset 0 0 0 1px ${t.hairline}; }\n :host([tone='subtle']) .panel { background: ${t.surfaceSubtle}; box-shadow: none; }\n :host([tone='brand']) .panel { background: ${t.brand}; color: ${t.onBrand}; box-shadow: ${t.shadowMd};\n /* A primary button on the brand panel turns over, as it does on an ink band, so it keeps an edge against the panel. */\n --impakt-button-primary: ${t.onBrand}; --impakt-button-on-primary: ${t.brand}; --impakt-button-primary-hover: color-mix(in srgb, ${t.onBrand} 86%, ${t.brand}); --impakt-color-text-inverse: ${t.brand}; }\n /* Only the words take the light colours: a button in the actions keeps its own. */\n :host([tone='brand']) .words { --impakt-color-text-heading: ${t.onBrand}; --impakt-color-text-default: ${t.onBrand}; --impakt-color-text-muted: ${t.onBrand}; --impakt-color-text-link: ${t.onBrand}; }\n /* A soft glow in the corner, so a flat colour has some depth. Decoration only. */\n :host([tone='brand']) .panel::before { content: ''; position: absolute; inset-block-start: -40%; inset-inline-end: -10%; inline-size: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, ${t.onBrand} 18%, transparent), transparent); pointer-events: none; }\n .photo { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }\n .panel.pictured { min-block-size: 26rem; color: #fff; background: #12211a; --impakt-color-text-heading: #fff; }\n .panel.pictured::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(18 31 26 / 0.8) 0%, rgb(18 31 26 / 0.1) 75%); }\n .panel.pictured .words, .panel.pictured .actions { z-index: 1; }\n @container (max-width: 48rem) { .panel.pictured { justify-content: flex-end; } .panel.pictured::after { background: linear-gradient(180deg, rgb(18 31 26 / 0.15) 0%, rgb(18 31 26 / 0.85) 100%); } }\n .words { position: relative; display: flex; flex-direction: column; gap: ${space(3)}; max-inline-size: 40rem; }\n .h { ${type('4xl')} }\n .lead { ${type('lg')} }\n .actions { position: relative; flex: none; display: flex; flex-wrap: wrap; gap: ${space(3)}; }\n :host([align='stacked']) .panel { flex-direction: column; align-items: flex-start; justify-content: center; }\n :host([align='center']) .panel { flex-direction: column; text-align: center; }\n :host([align='center']) .words { align-items: center; }\n @container (max-width: 48rem) { .panel { flex-direction: column; align-items: flex-start; padding: ${space(8)} ${space(6)}; } .h { ${type('3xl')} } :host([align='center']) .panel { align-items: center; } }\n @media (forced-colors: active) { .panel { border: 1px solid CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"panel ${this.imageSrc ? 'pictured' : ''}\" part=\"panel\">\n ${this.imageSrc ? html`<img class=\"photo\" src=${this.imageSrc} alt=${this.imageAlt} />` : nothing}\n <div class=\"words\">\n <div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>\n ${this.lead ? html`<p class=\"lead\">${this.lead}</p>` : nothing}\n </div>\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </div>`;\n }\n}\n\n/** One review. */\nexport interface ReviewItem {\n id?: string;\n quote: string;\n person: string;\n about?: string;\n rating?: number;\n avatarSrc?: string;\n}\n\nconst stars = (rating: number): TemplateResult =>\n html`<span class=\"stars\" role=\"img\" aria-label=${say('Rated {rating} out of 5', { rating })}>${[1, 2, 3, 4, 5].map((n) => html`<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" fill=${n <= rating ? 'currentColor' : 'none'} stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linejoin=\"round\"><path d=\"M12 3.5l2.6 5.4 5.9.7-4.4 4 1.2 5.8L12 16.5l-5.3 2.9 1.2-5.8-4.4-4 5.9-.7z\"/></svg>`)}</span>`;\n\nconst initials = (name: string): string =>\n name\n .split(/\\s+/)\n .filter((w) => /^[A-Za-z]/.test(w) && w.toLowerCase() !== 'and')\n .slice(0, 2)\n .map((w) => w[0]!.toUpperCase())\n .join('');\n\n/**\n * What customers say, in cards, with their rating and a face or their\n * initials, and a summary line above them.\n *\n * A rating is said in words as well as drawn in stars.\n *\n * @category content\n * @icon reviews\n */\nexport class ImpaktReviews extends ImpaktElement {\n static properties = {\n summary: { type: String },\n rating: { type: Number },\n items: { type: Array },\n columns: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A line above the reviews, such as \"4.8 from 312 buyers\". */\n declare summary: string;\n /** The overall rating out of 5, drawn beside the summary. */\n declare rating: number | undefined;\n declare items: ReviewItem[];\n declare columns: 'two' | 'three';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.summary = '';\n this.rating = undefined;\n this.items = [];\n this.columns = 'three';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n .top { display: flex; align-items: center; gap: ${space(3)}; margin-block-end: ${space(6)}; ${type('sm')} font-weight: ${fontWeight('medium')}; }\n .stars { display: inline-flex; gap: 2px; color: ${token_accent}; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }\n :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n li { display: flex; flex-direction: column; gap: ${space(4)}; padding: ${space(6)}; background: ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowSm}, inset 0 0 0 1px ${t.hairline}; }\n blockquote { margin: 0; flex: 1; ${type('md')} text-wrap: pretty; }\n .who { display: flex; align-items: center; gap: ${space(3)}; }\n .face { flex: none; display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; border-radius: 50%; overflow: hidden; background: ${t.brandSubtle}; color: ${t.brand}; ${type('sm')} font-weight: ${fontWeight('bold')}; }\n .face img { inline-size: 100%; block-size: 100%; object-fit: cover; }\n .name { font-weight: ${fontWeight('semibold')}; ${type('sm')} }\n .about { color: ${t.textMuted}; ${type('sm')} }\n @container (max-width: 56rem) { ul, :host([columns='two']) ul { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n render(): TemplateResult {\n return html`${this.summary || this.rating ? html`<p class=\"top\" part=\"summary\" style=\"margin-block-start:0\">${this.rating ? stars(Math.round(this.rating)) : nothing}<span>${this.summary}</span></p>` : nothing}\n <ul part=\"list\">${(this.items ?? []).map(\n (r) => html`<li part=\"review\">\n ${r.rating ? stars(r.rating) : nothing}\n <blockquote>${r.quote}</blockquote>\n <div class=\"who\"><span class=\"face\" aria-hidden=\"true\">${r.avatarSrc ? html`<img src=${r.avatarSrc} alt=\"\" />` : initials(r.person)}</span><span><span class=\"name\">${r.person}</span>${r.about ? html`<br /><span class=\"about\">${r.about}</span>` : nothing}</span></div>\n </li>`,\n )}</ul>`;\n }\n}\n\n/**\n * An email sign-up in one line: release dates, price lists, launch news.\n *\n * The field has a real label, the browser checks the address, and what happens\n * with the address is said beside the button. The app receives the address and\n * says when it is done.\n *\n * @category form\n * @icon mail\n * @fires {CustomEvent<{ email: string }>} impakt-submit - When a valid address is sent. The address is in detail.email.\n */\nexport class ImpaktNewsletter extends ImpaktElement {\n static properties = {\n heading: { type: String },\n lead: { type: String },\n label: { type: String },\n buttonText: { type: String, attribute: 'button-text' },\n smallPrint: { type: String, attribute: 'small-print' },\n doneText: { type: String, attribute: 'done-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare lead: string;\n /** The field's label. */\n declare label: string;\n declare buttonText: string;\n /** What happens with the address, such as how to stop the emails. */\n declare smallPrint: string;\n /** What is said once the address is sent. */\n declare doneText: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private done = false;\n\n constructor() {\n super();\n this.heading = '';\n this.lead = '';\n this.label = 'Email address';\n this.buttonText = 'Sign up';\n this.smallPrint = '';\n this.doneText = 'Thank you. You\u2019re on the list.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n headingStyles,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(8)}; align-items: center; }\n .words { display: flex; flex-direction: column; gap: ${space(2)}; }\n .h { ${type('2xl')} }\n form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: ${space(1)} ${space(3)}; }\n label { grid-column: 1 / -1; ${type('sm')} font-weight: ${fontWeight('semibold')}; }\n input { min-block-size: 44px; box-sizing: border-box; inline-size: 100%; padding: ${space(2.5)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; box-shadow: ${t.shadowXs}; }\n button { ${targetSize} min-block-size: 44px; padding: ${space(2)} ${space(5)}; font: inherit; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; background: ${t.brand}; border: 0; border-radius: ${t.radiusLg}; box-shadow: ${t.shadowXs}; cursor: pointer; }\n button:hover { background: ${t.brandHover}; }\n .note { grid-column: 1 / -1; margin: ${space(1)} 0 0; color: ${t.textMuted}; ${type('sm')} }\n .done { margin: 0; ${type('md')} font-weight: ${fontWeight('semibold')}; }\n @container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n private submit(event: SubmitEvent): void {\n event.preventDefault();\n const form = event.currentTarget as HTMLFormElement;\n if (typeof form.reportValidity === 'function' && !form.reportValidity()) return;\n const email = (form.querySelector('input') as HTMLInputElement).value.trim();\n this.dispatchEvent(new CustomEvent('impakt-submit', { detail: { email }, bubbles: true, composed: true }));\n this.done = true;\n this.requestUpdate();\n }\n\n render(): TemplateResult {\n const field = this.id_('email');\n return html`<div class=\"wrap\" part=\"wrap\">\n <div class=\"words\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${this.lead ? html`<p class=\"lead\">${this.lead}</p>` : nothing}\n </div>\n <div aria-live=\"polite\">${\n this.done\n ? html`<p class=\"done\">${this.doneText}</p>`\n : html`<form @submit=${this.submit}>\n <label for=${field}>${this.label}</label>\n <input id=${field} type=\"email\" name=\"email\" autocomplete=\"email\" required />\n <button type=\"submit\">${this.buttonText}</button>\n ${this.smallPrint ? html`<p class=\"note\">${this.smallPrint}</p>` : nothing}\n </form>`\n }</div>\n </div>`;\n }\n}\n\ncustomElements.define('impakt-carousel', ImpaktCarousel);\ncustomElements.define('impakt-gallery', ImpaktGallery);\ncustomElements.define('impakt-logo-cloud', ImpaktLogoCloud);\ncustomElements.define('impakt-steps', ImpaktSteps);\ncustomElements.define('impakt-media-split', ImpaktMediaSplit);\ncustomElements.define('impakt-cta-banner', ImpaktCtaBanner);\ncustomElements.define('impakt-reviews', ImpaktReviews);\ncustomElements.define('impakt-newsletter', ImpaktNewsletter);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-carousel': ImpaktCarousel;\n 'impakt-gallery': ImpaktGallery;\n 'impakt-logo-cloud': ImpaktLogoCloud;\n 'impakt-steps': ImpaktSteps;\n 'impakt-media-split': ImpaktMediaSplit;\n 'impakt-cta-banner': ImpaktCtaBanner;\n 'impakt-reviews': ImpaktReviews;\n 'impakt-newsletter': ImpaktNewsletter;\n }\n}\n", "import { css, html, nothing, type TemplateResult } from 'lit';\nimport { say, pageLocale, ImpaktElement, focusRing, targetSize, fontWeight, space, spaceAround, t, type, iconSvg } from '@atomic-ui/ui';\n\nexport interface SitePlot {\n id?: string;\n /** What is printed on the pin, such as 14. */\n number: string;\n /** The house type, such as The Hawthorn. */\n name?: string;\n status: 'available' | 'reserved' | 'sold';\n price?: string;\n beds?: string;\n /** How far across the plan the pin sits, from 0 to 100. */\n x: number | string;\n /** How far down the plan the pin sits, from 0 to 100. */\n y: number | string;\n href?: string;\n}\n\n/**\n * A drawing of the development with a pin on every plot. Choose a pin to see\n * whether it is available, what it costs and where to go next.\n *\n * Every pin is a button named in full, such as \"Plot 14, The Hawthorn,\n * Available, \u00A3385,000\". Status is shown by the pin's shape as well as its\n * colour, so it does not rely on colour alone (1.4.1).\n *\n * @category content\n * @icon map\n * @fires {CustomEvent<{ plot: SitePlot }>} impakt-select - When a plot is chosen. The plot is in detail.plot.\n */\nexport class ImpaktSitePlan extends ImpaktElement {\n static properties = {\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n plots: { type: Array },\n hint: { type: String },\n selectedPlot: { type: String, attribute: 'selected-plot' },\n panel: { type: String, reflect: true },\n plotWord: { type: String, attribute: 'plot-word' },\n actionText: { type: String, attribute: 'action-text' },\n availableText: { type: String, attribute: 'available-text' },\n reservedText: { type: String, attribute: 'reserved-text' },\n soldText: { type: String, attribute: 'sold-text' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare imageSrc: string;\n declare imageAlt: string;\n declare plots: SitePlot[];\n /** The number of the plot shown first. */\n declare selectedPlot: string;\n /** The details beside the plan, or floating over it. */\n declare panel: 'beside' | 'over';\n /** What is said before a plot is chosen. */\n declare hint: string;\n declare plotWord: string;\n declare actionText: string;\n declare availableText: string;\n declare reservedText: string;\n declare soldText: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private chosen: SitePlot | undefined;\n\n constructor() {\n super();\n this.imageSrc = '';\n this.imageAlt = '';\n this.plots = [];\n this.hint = 'Choose a plot to see its price and availability.';\n this.selectedPlot = '';\n this.panel = 'beside';\n this.plotWord = 'Plot';\n this.actionText = 'View this home';\n this.availableText = 'Available';\n this.reservedText = 'Reserved';\n this.soldText = 'Sold';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: ${space(6)}; align-items: start; }\n .plan { position: relative; overflow: hidden; border-radius: ${t.radius2xl}; background: ${t.surfaceSubtle}; box-shadow: ${t.shadowMd}; line-height: 0; }\n .plan img { inline-size: 100%; block-size: auto; }\n .pin { position: absolute; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; inline-size: 34px; block-size: 34px; margin: -17px 0 0 -17px; padding: 0; font: inherit; ${type('xs')} line-height: 1; font-weight: ${fontWeight('bold')}; color: ${t.onBrand}; background: ${t.brand}; border: 2px solid ${t.surfaceCard}; border-radius: 50%; box-shadow: ${t.shadowMd}; cursor: pointer; transition: transform 120ms ease-in-out; }\n .pin:hover { transform: scale(1.12); }\n .pin.reserved { color: ${t.text}; background: ${t.warningSubtle}; border-color: ${t.warning}; border-style: dashed; }\n .pin.sold { color: ${t.textMuted}; background: ${t.surfaceCard}; border-color: ${t.border}; border-radius: ${t.radius}; }\n .pin[aria-pressed='true'] { transform: scale(1.22); box-shadow: ${t.shadowLg}, 0 0 0 3px ${t.brand}; }\n .panel { display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(6)}; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowSm}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }\n .hint { margin: 0; color: ${t.textMuted}; }\n .name { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .sub { margin: 0; color: ${t.textMuted}; }\n .price { margin: 0; ${type('xl')} font-weight: ${fontWeight('semibold')}; }\n .status { align-self: flex-start; padding: ${space(0.5)} ${space(2.5)}; ${type('xs')} font-weight: ${fontWeight('semibold')}; color: ${t.successText}; background: ${t.successSubtle}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); }\n .status.reserved { color: ${t.warningText}; background: ${t.warningSubtle}; }\n .status.sold { color: ${t.text}; background: ${t.surfaceSubtle}; }\n .go { ${targetSize} display: inline-flex; align-items: center; justify-content: center; gap: ${space(2)}; padding: ${space(2)} ${space(4)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border-radius: ${t.radiusLg}; }\n .go:hover { background: ${t.brandHover}; }\n .legend { display: flex; flex-wrap: wrap; gap: ${space(4)}; margin: ${space(3)} 0 0; padding: 0; list-style: none; ${type('sm')} color: ${t.textMuted}; }\n .legend li { display: inline-flex; align-items: center; gap: ${space(2)}; }\n .key { box-sizing: border-box; inline-size: 14px; block-size: 14px; background: ${t.brand}; border: 2px solid ${t.surfaceCard}; border-radius: 50%; outline: 1px solid color-mix(in srgb, currentColor 55%, transparent); }\n .key.reserved { background: ${t.warningSubtle}; border: 2px dashed ${t.warning}; }\n .key.sold { background: ${t.surfaceCard}; border: 2px solid ${t.border}; border-radius: 3px; }\n :host { --plan-card: var(--impakt-solid-card, ${t.surfaceCard}); --plan-text: var(--impakt-solid-text, ${t.text}); --plan-heading: var(--impakt-solid-heading, ${t.text}); --plan-muted: var(--impakt-solid-muted, ${t.textMuted}); }\n :host([panel='over']) .panel { background: var(--plan-card); color: var(--plan-text); --impakt-color-surface-card: var(--plan-card); --impakt-color-text-default: var(--plan-text); --impakt-color-text-heading: var(--plan-heading); --impakt-color-text-muted: var(--plan-muted); }\n @container (min-width: 44.01rem) { :host([panel='over']) .wrap { position: relative; grid-template-columns: minmax(0, 1fr); } :host([panel='over']) .panel { position: absolute; inset-block-start: 32%; inset-inline-end: ${space(8)}; inline-size: 22.5rem; box-sizing: border-box; box-shadow: ${t.shadowXl}; } }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n willUpdate(changed: Map<string, unknown>): void {\n if ((changed.has('selectedPlot') || changed.has('plots')) && this.selectedPlot && !this.chosen)\n this.chosen = this.plots.find((p) => String(p.number) === this.selectedPlot);\n }\n\n private word(status: string): string {\n return status === 'sold' ? this.soldText : status === 'reserved' ? this.reservedText : this.availableText;\n }\n\n private choose(plot: SitePlot): void {\n this.chosen = plot;\n this.requestUpdate();\n this.dispatchEvent(new CustomEvent('impakt-select', { detail: { plot }, bubbles: true, composed: true }));\n }\n\n private renderPanel(): TemplateResult {\n const plot = this.chosen;\n if (!plot) return html`<p class=\"hint\">${this.hint}</p>`;\n const status = plot.status ?? 'available';\n return html`<span class=\"status ${status}\">${this.word(status)}</span>\n <p class=\"name\">${this.plotWord} ${plot.number}</p>\n ${plot.name || plot.beds ? html`<p class=\"sub\">${[plot.name, plot.beds].filter(Boolean).join(' \u00B7 ')}</p>` : nothing}\n ${plot.price ? html`<p class=\"price\">${plot.price}</p>` : nothing}\n ${plot.href && status !== 'sold' ? html`<a class=\"go\" href=${plot.href}>${this.actionText}${iconSvg('arrow-right', '16px')}</a>` : nothing}`;\n }\n\n render(): TemplateResult {\n return html`<div class=\"wrap\" part=\"wrap\">\n <div>\n <div class=\"plan\" part=\"plan\">\n <img src=${this.imageSrc} alt=${this.imageAlt} />\n ${this.plots.map((plot) => {\n const status = plot.status ?? 'available';\n const name = [`${this.plotWord} ${plot.number}`, plot.name, this.word(status), plot.price].filter(Boolean).join(', ');\n return html`<button class=\"pin ${status}\" type=\"button\" style=\"left:${Number(plot.x)}%;top:${Number(plot.y)}%\" aria-label=${name} aria-pressed=${String(this.chosen === plot)} @click=${() => this.choose(plot)}>${plot.number}</button>`;\n })}\n </div>\n <ul class=\"legend\">\n <li><span class=\"key\"></span>${this.availableText}</li>\n <li><span class=\"key reserved\"></span>${this.reservedText}</li>\n <li><span class=\"key sold\"></span>${this.soldText}</li>\n </ul>\n </div>\n <div class=\"panel\" part=\"panel\" aria-live=\"polite\">${this.renderPanel()}</div>\n </div>`;\n }\n}\n\n/** The monthly repayment on a loan. A rate of nothing is the loan split evenly. */\nexport function monthlyPayment(loan: number, annualRate: number, years: number): number {\n const months = years * 12;\n if (loan <= 0 || months <= 0) return 0;\n const rate = annualRate / 100 / 12;\n return rate === 0 ? loan / months : (loan * rate) / (1 - (1 + rate) ** -months);\n}\n\n/**\n * What a home would cost each month, worked out as the sliders move.\n *\n * The result is an estimate and the warning under it is on by default, because\n * UK rules expect it wherever repayments are shown. Change the words for other\n * markets, but check with whoever signs off your financial promotions first.\n *\n * @category form\n * @icon pound\n */\nexport class ImpaktMortgageCalculator extends ImpaktElement {\n static properties = {\n heading: { type: String },\n price: { type: Number },\n depositPercent: { type: Number, attribute: 'deposit-percent' },\n rate: { type: Number },\n years: { type: Number },\n currency: { type: String },\n smallPrint: { type: String, attribute: 'small-print' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare price: number;\n declare depositPercent: number;\n declare rate: number;\n declare years: number;\n /** The three-letter currency code, such as GBP. */\n declare currency: string;\n declare smallPrint: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = 'What would it cost each month?';\n this.price = 385000;\n this.depositPercent = 10;\n this.rate = 4.5;\n this.years = 30;\n this.currency = 'GBP';\n this.smallPrint = 'This is an estimate, not a mortgage offer. Your home may be repossessed if you do not keep up repayments on your mortgage.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowMd}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }\n .inputs { display: flex; flex-direction: column; gap: ${space(5)}; padding: ${space(8)}; }\n .h { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n label { display: flex; justify-content: space-between; gap: ${space(3)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; margin-block-end: ${space(1.5)}; }\n .read { font-weight: ${fontWeight('regular')}; color: ${t.textMuted}; }\n input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${space(2)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; }\n input[type='range'] { inline-size: 100%; min-block-size: 24px; margin: 0; accent-color: ${t.brand}; }\n .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(4)}; }\n .result { display: flex; flex-direction: column; justify-content: center; gap: ${space(2)}; padding: ${space(8)}; color: ${t.onBrand}; background: ${t.brand}; }\n .caption { margin: 0; ${type('sm')} opacity: 0.85; }\n output { display: block; font-family: ${t.fontHeading}; ${type('4xl')} font-weight: ${fontWeight('bold')}; }\n dl { display: grid; gap: ${space(2)}; margin: ${space(4)} 0 0; padding-block-start: ${space(4)}; border-block-start: 1px solid color-mix(in srgb, ${t.onBrand} 25%, transparent); ${type('sm')} }\n dl div { display: flex; justify-content: space-between; gap: ${space(3)}; }\n dt { opacity: 0.85; }\n dd { margin: 0; font-weight: ${fontWeight('semibold')}; }\n /* Muted text is proved against the card colour, not this band, so the small print here is in the text colour (1.4.3). */\n .small { grid-column: 1 / -1; margin: 0; padding: ${space(4)} ${space(8)}; ${type('xs')} color: ${t.text}; background: ${t.surfaceSubtle}; }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${space(5)}; } .small { padding: ${space(4)} ${space(5)}; } }\n `,\n ];\n\n private money(amount: number): string {\n try {\n return new Intl.NumberFormat(pageLocale(this), { style: 'currency', currency: this.currency, maximumFractionDigits: 0 }).format(amount);\n } catch {\n return String(Math.round(amount));\n }\n }\n\n private field(key: 'price' | 'depositPercent' | 'rate' | 'years'): (event: Event) => void {\n return (event) => {\n this[key] = Number((event.target as HTMLInputElement).value) || 0;\n };\n }\n\n render(): TemplateResult {\n const deposit = (this.price * this.depositPercent) / 100;\n const loan = Math.max(this.price - deposit, 0);\n const monthly = monthlyPayment(loan, this.rate, this.years);\n return html`<div class=\"wrap\" part=\"wrap\">\n <div class=\"inputs\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n <div><label for=${this.id_('price')}>${say('Home price')}</label><input id=${this.id_('price')} type=\"number\" min=\"0\" step=\"1000\" inputmode=\"numeric\" .value=${String(this.price)} @input=${this.field('price')} /></div>\n <div><label for=${this.id_('deposit')}>${say('Deposit')} <span class=\"read\">${this.depositPercent}% \u00B7 ${this.money(deposit)}</span></label><input id=${this.id_('deposit')} type=\"range\" min=\"5\" max=\"60\" step=\"1\" .value=${String(this.depositPercent)} @input=${this.field('depositPercent')} /></div>\n <div class=\"two\">\n <div><label for=${this.id_('years')}>${say('Term')} <span class=\"read\">${say('{years} years', { years: this.years })}</span></label><input id=${this.id_('years')} type=\"range\" min=\"5\" max=\"40\" step=\"1\" .value=${String(this.years)} @input=${this.field('years')} /></div>\n <div><label for=${this.id_('rate')}>${say('Interest rate (%)')}</label><input id=${this.id_('rate')} type=\"number\" min=\"0\" max=\"20\" step=\"0.05\" inputmode=\"decimal\" .value=${String(this.rate)} @input=${this.field('rate')} /></div>\n </div>\n </div>\n <div class=\"result\">\n <p class=\"caption\">${say('Estimated monthly repayment')}</p>\n <output for=${`${this.id_('price')} ${this.id_('deposit')} ${this.id_('years')} ${this.id_('rate')}`}>${this.money(monthly)}</output>\n <dl>\n <div><dt>${say('You would borrow')}</dt><dd>${this.money(loan)}</dd></div>\n <div><dt>${say('Total repayable')}</dt><dd>${this.money(monthly * this.years * 12)}</dd></div>\n </dl>\n </div>\n ${this.smallPrint ? html`<p class=\"small\">${this.smallPrint}</p>` : nothing}\n </div>`;\n }\n}\n\n/**\n * Two pictures of one place with a handle to drag between them: a bare plot\n * and the finished street, a shell and the fitted kitchen.\n *\n * The handle is a native range control, so it works with a finger, a mouse and\n * the arrow keys, and a screen reader hears how far across it is. Both pictures\n * need descriptions, because they are the content.\n *\n * @category content\n * @icon image\n */\nexport class ImpaktBeforeAfter extends ImpaktElement {\n static properties = {\n beforeSrc: { type: String, attribute: 'before-src' },\n beforeAlt: { type: String, attribute: 'before-alt' },\n afterSrc: { type: String, attribute: 'after-src' },\n afterAlt: { type: String, attribute: 'after-alt' },\n beforeLabel: { type: String, attribute: 'before-label' },\n afterLabel: { type: String, attribute: 'after-label' },\n label: { type: String },\n position: { type: Number },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare beforeSrc: string;\n declare beforeAlt: string;\n declare afterSrc: string;\n declare afterAlt: string;\n declare beforeLabel: string;\n declare afterLabel: string;\n /** The name of the handle for a screen reader. */\n declare label: string;\n /** How far across the handle starts, from 0 to 100. */\n declare position: number;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.beforeSrc = '';\n this.beforeAlt = '';\n this.afterSrc = '';\n this.afterAlt = '';\n this.beforeLabel = 'Before';\n this.afterLabel = 'After';\n this.label = 'Compare the two pictures';\n this.position = 50;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n .frame { position: relative; overflow: hidden; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowLg}; line-height: 0; --at: 50%; }\n img { display: block; inline-size: 100%; block-size: auto; }\n .after { position: absolute; inset: 0; block-size: 100%; object-fit: cover; clip-path: inset(0 0 0 var(--at)); }\n .tag { position: absolute; inset-block-start: ${space(3)}; padding: ${space(1)} ${space(3)}; ${type('xs')} line-height: 1.4; font-weight: ${fontWeight('semibold')}; color: ${t.text}; background: ${t.surfaceCard}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); box-shadow: ${t.shadowSm}; }\n .tag.b { inset-inline-start: ${space(3)}; }\n .tag.a { inset-inline-end: ${space(3)}; }\n .line { position: absolute; inset-block: 0; inset-inline-start: var(--at); inline-size: 2px; margin-inline-start: -1px; background: ${t.surfaceCard}; pointer-events: none; }\n .grip { position: absolute; inset-block-start: 50%; inset-inline-start: 50%; display: flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; margin: -22px 0 0 -22px; color: ${t.text}; background: ${t.surfaceCard}; border-radius: 50%; box-shadow: ${t.shadowMd}; }\n input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }\n .frame:has(input:focus-visible) .grip { box-shadow: ${t.focusShadow}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"frame\" part=\"frame\" style=\"--at:${this.position}%\">\n <img src=${this.beforeSrc} alt=${this.beforeAlt} />\n <img class=\"after\" src=${this.afterSrc} alt=${this.afterAlt} />\n <span class=\"tag b\" aria-hidden=\"true\">${this.beforeLabel}</span>\n <span class=\"tag a\" aria-hidden=\"true\">${this.afterLabel}</span>\n <span class=\"line\"><span class=\"grip\">${iconSvg('arrow-left', '14px')}${iconSvg('arrow-right', '14px')}</span></span>\n <input type=\"range\" min=\"0\" max=\"100\" aria-label=${this.label} .value=${String(this.position)} @input=${(e: Event) => {\n this.position = Number((e.target as HTMLInputElement).value);\n }} />\n </div>`;\n }\n}\n\n/**\n * A bar fixed to the bottom of the screen that keeps the one thing to do in\n * reach, such as booking a viewing.\n *\n * It appears once the visitor has scrolled, keeps a space for itself at the end\n * of the page, and tells the browser to scroll focused controls clear of it so\n * it never covers what the keyboard is on (2.4.11).\n *\n * @category navigation\n * @icon bar\n * @slot actions - The button or link to keep in reach.\n */\nexport class ImpaktStickyBar extends ImpaktElement {\n static properties = {\n label: { type: String },\n heading: { type: String },\n lead: { type: String },\n showOn: { type: String, reflect: true, attribute: 'show-on' },\n revealAfter: { type: Number, attribute: 'reveal-after' },\n };\n /** The name of this region for a screen reader. */\n declare label: string;\n declare heading: string;\n declare lead: string;\n declare showOn: 'phones' | 'all';\n /** How many pixels the visitor scrolls before it appears. */\n declare revealAfter: number;\n\n private shown = false;\n\n constructor() {\n super();\n this.label = 'Quick actions';\n this.heading = '';\n this.lead = '';\n this.showOn = 'phones';\n this.revealAfter = 400;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; }\n .bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding: ${space(3)} ${space(4)} calc(${space(3)} + env(safe-area-inset-bottom)); background: ${t.surfaceCard}; box-shadow: ${t.shadowXl}, 0 -1px 0 color-mix(in srgb, ${t.text} 8%, transparent); transform: translateY(110%); visibility: hidden; transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 220ms; }\n .bar.on { transform: none; visibility: visible; }\n .spacer { block-size: 5rem; }\n .h { font-family: ${t.fontHeading}; ${type('md')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .t { ${type('xs')} color: ${t.textMuted}; }\n .words { min-inline-size: 0; }\n .actions { display: flex; flex: none; gap: ${space(2)}; }\n @media (min-width: 48rem) { :host([show-on='phones']) { display: none; } }\n `,\n ];\n\n private check = (): void => {\n const shown = window.scrollY >= this.revealAfter;\n if (shown === this.shown) return;\n this.shown = shown;\n this.requestUpdate();\n this.clearance(shown);\n };\n\n /** Leaves room for the bar when the browser scrolls something into view. */\n private clearance(on: boolean): void {\n const visible = on && getComputedStyle(this).display !== 'none';\n const height = visible ? `${this.renderRoot.querySelector('.bar')?.getBoundingClientRect().height ?? 80}px` : '';\n const root = document.documentElement.style;\n root.scrollPaddingBlockEnd = height;\n // The toast reads this to sit above the bar rather than on its button.\n if (height) root.setProperty('--impakt-bottom-bar', height);\n else root.removeProperty('--impakt-bottom-bar');\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n window.addEventListener('scroll', this.check, { passive: true });\n this.check();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener('scroll', this.check);\n this.clearance(false);\n }\n\n render(): TemplateResult {\n return html`<div class=\"spacer\"></div>\n <section class=\"bar ${this.shown ? 'on' : ''}\" part=\"bar\" aria-label=${this.label}>\n <div class=\"words\">\n ${this.heading ? html`<div class=\"h\">${this.heading}</div>` : nothing}\n ${this.lead ? html`<div class=\"t\">${this.lead}</div>` : nothing}\n </div>\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </section>`;\n }\n}\n\nexport interface NearbyItem {\n id?: string;\n place: string;\n /** How far, in words: 8 minutes by train. */\n distance: string;\n}\n\n/**\n * Where a place is and how to get there: a map picture, the address, opening\n * hours, travel times and a link for directions.\n *\n * The map is a picture you supply, not an embedded map. An embed loads a third\n * party's cookies before the visitor has agreed to anything.\n *\n * @category content\n * @icon map-pin\n * @role heading\n */\nexport class ImpaktLocationCard extends ImpaktElement {\n static properties = {\n heading: { type: String },\n address: { type: String },\n hours: { type: String },\n phone: { type: String },\n mapSrc: { type: String, attribute: 'map-src' },\n mapAlt: { type: String, attribute: 'map-alt' },\n directionsText: { type: String, attribute: 'directions-text' },\n directionsHref: { type: String, attribute: 'directions-href' },\n nearby: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare address: string;\n declare hours: string;\n declare phone: string;\n declare mapSrc: string;\n declare mapAlt: string;\n declare directionsText: string;\n /** Leave empty and the link searches a map for the address. */\n declare directionsHref: string;\n declare nearby: NearbyItem[];\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = '';\n this.address = '';\n this.hours = '';\n this.phone = '';\n this.mapSrc = '';\n this.mapAlt = '';\n this.directionsText = 'Get directions';\n this.directionsHref = '';\n this.nearby = [];\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowMd}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }\n .wrap.solo { grid-template-columns: minmax(0, 1fr); }\n .map { min-block-size: 16rem; background: ${t.surfaceSubtle}; }\n .map img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }\n .info { display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(8)}; }\n .h { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .row { display: flex; gap: ${space(3)}; margin: 0; white-space: pre-line; }\n .row svg { flex: none; margin-block-start: ${space(0.5)}; color: ${t.brand}; }\n .row a { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; margin-block-start: -2px; }\n a { color: ${t.link}; }\n ul { display: grid; gap: ${space(1.5)}; margin: ${space(1)} 0; padding: ${space(3)} 0 0; list-style: none; border-block-start: 1px solid color-mix(in srgb, ${t.text} 10%, transparent); ${type('sm')} }\n li { display: flex; justify-content: space-between; gap: ${space(3)}; }\n li span:last-child { color: ${t.textMuted}; text-align: end; }\n .go { ${targetSize} align-self: flex-start; display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(2)} ${space(4)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border-radius: ${t.radiusLg}; }\n .go:hover { background: ${t.brandHover}; }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .info { padding: ${space(5)}; } }\n `,\n ];\n\n render(): TemplateResult {\n const directions = this.directionsHref || (this.address ? `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(this.address)}` : '');\n return html`<div class=\"wrap ${this.mapSrc ? '' : 'solo'}\" part=\"wrap\">\n ${this.mapSrc ? html`<div class=\"map\"><img src=${this.mapSrc} alt=${this.mapAlt} /></div>` : nothing}\n <div class=\"info\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${this.address ? html`<p class=\"row\">${iconSvg('map-pin', '20px')}<span>${this.address}</span></p>` : nothing}\n ${this.hours ? html`<p class=\"row\">${iconSvg('clock', '20px')}<span>${this.hours}</span></p>` : nothing}\n ${this.phone ? html`<p class=\"row\">${iconSvg('phone', '20px')}<a href=${`tel:${this.phone.replace(/\\s+/g, '')}`}>${this.phone}</a></p>` : nothing}\n ${this.nearby.length ? html`<ul>${this.nearby.map((item) => html`<li><span>${item.place}</span><span>${item.distance}</span></li>`)}</ul>` : nothing}\n ${directions ? html`<a class=\"go\" href=${directions}>${this.directionsText}${iconSvg('arrow-right', '16px')}</a>` : nothing}\n </div>\n </div>`;\n }\n}\n\ncustomElements.define('impakt-site-plan', ImpaktSitePlan);\ncustomElements.define('impakt-mortgage-calculator', ImpaktMortgageCalculator);\ncustomElements.define('impakt-before-after', ImpaktBeforeAfter);\ncustomElements.define('impakt-sticky-bar', ImpaktStickyBar);\ncustomElements.define('impakt-location-card', ImpaktLocationCard);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-site-plan': ImpaktSitePlan;\n 'impakt-mortgage-calculator': ImpaktMortgageCalculator;\n 'impakt-before-after': ImpaktBeforeAfter;\n 'impakt-sticky-bar': ImpaktStickyBar;\n 'impakt-location-card': ImpaktLocationCard;\n }\n}\n", "import { css, html, nothing, type TemplateResult } from 'lit';\nimport { say, pageLocale, ImpaktElement, focusRing, targetSize, visuallyHidden, fontWeight, space, spaceAround, t, token, type } from '@atomic-ui/ui';\n\ntype Space = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\nconst card = css`\n .card { background: ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowSm}, 0 0 0 1px ${t.hairline}; }\n .h { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .btn { display: inline-flex; justify-content: center; align-items: center; min-block-size: 44px; padding: ${space(2.5)} ${space(5)}; font: inherit; font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border: 0; border-radius: ${t.radiusLg}; cursor: pointer; }\n .btn:hover { background: ${t.brandHover}; }\n .btn.quiet { color: ${t.link}; background: transparent; box-shadow: inset 0 0 0 ${t.borderThin} ${t.border}; }\n .small { margin: 0; ${type('xs')} color: ${t.textMuted}; }\n .visually-hidden { ${visuallyHidden} }\n`;\n\nconst money = (amount: number, currency = 'GBP', digits = 0) => {\n try {\n return new Intl.NumberFormat(pageLocale(), { style: 'currency', currency, maximumFractionDigits: digits, minimumFractionDigits: digits }).format(amount);\n } catch {\n return String(Math.round(amount));\n }\n};\n\n/** The arrow after a button's words. Drawn, so no font has to hold the glyph. */\nconst arrow = html`<svg viewBox=\"0 0 20 12\" width=\"20\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M0 6h18M13 1l5 5-5 5\" /></svg>`;\n\n/** One plan in a comparison. */\nexport interface PlanItem {\n id: string;\n name: string;\n /** The price as shown, such as \u00A312. */\n price: string;\n /** What the price is for, such as `a month`. */\n period?: string;\n note?: string;\n /** The rows this plan has, by their words, separated by commas. */\n includes: string;\n href?: string;\n /** A label such as `Most popular`, which also makes the plan stand out. */\n badge?: string;\n}\n\n/** One line a comparison checks every plan against. */\nexport interface PlanRow {\n id: string;\n label: string;\n}\n\n/**\n * Cover levels side by side, with a tick or a cross for each thing they\n * include and a button under each.\n *\n * A tick is never colour alone: each one says \"Included\" or \"Not included\" to\n * a screen reader, and a line a plan does not have also says \"\u00B7 not included\"\n * in muted words on the screen. On a narrow screen the plans stack, each with\n * its own list.\n *\n * Each plan is a card with a 1px border in the text colour and no shadow. The\n * plan with a `badge` is filled with the text colour, its badge in monospace\n * capitals and its price, ticks and button in the accent, a pair the tokens\n * already hold at 4.5:1 on ink (1.4.3).\n *\n * @fires {CustomEvent<{ plan: PlanItem }>} impakt-select - When a plan is chosen. Cancel it to stay on the page.\n * @category content\n * @icon table\n */\nexport class ImpaktPlanComparison extends ImpaktElement {\n static properties = {\n heading: { type: String },\n plans: { type: Array },\n rows: { type: Array },\n buttonText: { type: String, attribute: 'button-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare plans: PlanItem[];\n declare rows: PlanRow[];\n declare buttonText: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'Compare cover';\n this.plans = [];\n this.rows = [];\n this.buttonText = 'Choose';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n targetSize,\n spaceAround,\n card,\n css`\n :host { display: block; container-type: inline-size; }\n .h { margin-block-end: ${space(5)}; }\n .grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: ${space(4)}; }\n .plan { --plan-accent: ${token('color.accent.default', '#ffd43b')}; --plan-on-accent: ${token('color.accent.on', '#111111')}; position: relative; display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(6)}; color: ${t.text}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusSm}; box-shadow: none; }\n /* The featured plan is filled with ink: the card colour on it, and the accent for its badge, price, ticks and button. */\n .plan.top { background: ${t.text}; color: ${t.surfaceCard}; --plan-muted: color-mix(in srgb, ${t.surfaceCard} 72%, ${t.text}); }\n .badge { align-self: flex-start; padding: 2px ${space(2)}; font-family: ${t.fontMono}; font-size: 0.6875rem; font-weight: ${fontWeight('medium')}; line-height: 1.4; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: var(--plan-on-accent); background: var(--plan-accent); white-space: nowrap; }\n .name { margin: 0; ${type('lg')} font-weight: ${fontWeight('medium')}; color: inherit; }\n .price { margin: 0; font-family: ${t.fontHeading}; ${type('4xl')} font-weight: ${fontWeight('bold')}; letter-spacing: -0.03em; color: inherit; }\n /* Accent words on ink only where the theme says the pair reads: in light. In dark the ink turns to paper and the price keeps the card's words. */\n .top .price { color: var(--impakt-color-accent-on-ink, var(--impakt-site-menu-current, currentColor)); }\n .period { margin-inline-start: ${space(1)}; font-family: ${t.fontMono}; font-size: 0.8125rem; font-weight: ${fontWeight('regular')}; letter-spacing: 0; color: var(--plan-muted, ${t.textMuted}); }\n .note { margin: 0; ${type('sm')} color: var(--plan-muted, ${t.textMuted}); }\n ul { flex: 1; margin: 0; padding: ${space(3)} 0 0; list-style: none; display: grid; gap: ${space(2)}; align-content: start; }\n li { display: flex; gap: ${space(2)}; ${type('sm')} }\n li[data-has='false'] { color: var(--plan-muted, ${t.textMuted}); }\n .mark { flex-shrink: 0; inline-size: 1em; text-align: start; }\n .top li[data-has='true'] .mark { color: var(--plan-accent); }\n .plan .btn { justify-content: space-between; gap: ${space(4)}; color: ${t.surfaceCard}; background: ${t.text}; border-radius: ${t.radiusSm}; box-shadow: none; }\n .plan .btn:hover { background: ${t.brandHover}; }\n .plan.top .btn { color: var(--plan-on-accent); background: var(--plan-accent); }\n .plan.top .btn:hover { background: color-mix(in srgb, var(--plan-accent) 88%, ${t.surfaceCard}); }\n @media (forced-colors: active) { .plan { border-color: CanvasText; } .badge { border: 1px solid CanvasText; } }\n @container (max-width: 40rem) { .grid { grid-template-columns: minmax(0, 1fr); gap: ${space(6)}; } }\n `,\n ];\n\n private has(plan: PlanItem, row: PlanRow): boolean {\n return plan.includes\n .split(',')\n .map((s) => s.trim().toLowerCase())\n .includes(row.label.trim().toLowerCase());\n }\n\n private choose(plan: PlanItem, event: Event): void {\n const go = this.dispatchEvent(new CustomEvent('impakt-select', { detail: { plan }, bubbles: true, composed: true, cancelable: true }));\n if (!go) event.preventDefault();\n }\n\n render(): TemplateResult {\n return html`\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n <div class=\"grid\" style=${`--cols: ${Math.max(1, this.plans.length)}`}>\n ${this.plans.map(\n (p) => html`<section class=\"card plan ${p.badge ? 'top' : ''}\" aria-labelledby=${this.id_(`n-${p.id}`)}>\n ${p.badge ? html`<span class=\"badge\">${p.badge}</span>` : nothing}\n <h3 class=\"name\" id=${this.id_(`n-${p.id}`)}>${p.name}</h3>\n <p class=\"price\">${p.price}${p.period ? html` <span class=\"period\">${p.period}</span>` : nothing}</p>\n ${p.note ? html`<p class=\"note\">${p.note}</p>` : nothing}\n <ul>${this.rows.map((r) => {\n const has = this.has(p, r);\n // A line the plan has is ticked and says so to a screen reader; one it lacks says \"not included\" on the screen too.\n return html`<li data-has=${String(has)}><span class=\"mark\" aria-hidden=\"true\">${has ? '\u221A' : '\u2013'}</span><span>${r.label}${\n has ? html`<span class=\"visually-hidden\">: ${say('included')}</span>` : html`<span class=\"not\"> \u00B7 ${say('not included')}</span>`\n }</span></li>`;\n })}</ul>\n ${\n p.href\n ? html`<a class=\"btn\" href=${p.href} @click=${(e: Event) => this.choose(p, e)}><span>${this.buttonText}<span class=\"visually-hidden\"> ${p.name}</span></span>${arrow}</a>`\n : html`<button class=\"btn\" type=\"button\" @click=${(e: Event) => this.choose(p, e)}><span>${this.buttonText}<span class=\"visually-hidden\"> ${p.name}</span></span>${arrow}</button>`\n }\n </section>`,\n )}\n </div>`;\n }\n}\n\n/** A YouTube or Vimeo address as its privacy-friendly embed, or null for a plain video file. */\nexport function embedOf(src: string, locale?: string): string | null {\n const yt = /(?:youtube\\.com\\/(?:watch\\?v=|embed\\/|shorts\\/)|youtu\\.be\\/)([\\w-]{6,})/.exec(src);\n // The player's own controls and captions in the page's language (ADR 0026).\n const hl =\n locale && !/^en\\b/i.test(locale) ? `&hl=${encodeURIComponent(locale.split('-')[0]!)}&cc_lang_pref=${encodeURIComponent(locale.split('-')[0]!)}` : '';\n if (yt) return `https://www.youtube-nocookie.com/embed/${yt[1]}?autoplay=1&rel=0${hl}`;\n const vimeo = /vimeo\\.com\\/(?:video\\/)?(\\d+)/.exec(src);\n if (vimeo) return `https://player.vimeo.com/video/${vimeo[1]}?autoplay=1&dnt=1`;\n return null;\n}\n\n/**\n * A video, with its title, captions and a transcript link.\n *\n * A YouTube or Vimeo video shows its poster and a Play button first, and only\n * loads the player when pressed, so the page stays fast and nothing is sent to\n * the video site until someone chooses to watch. A video file plays in the\n * browser's own player, with captions from `captions-src`.\n *\n * `look=\"window\"` draws it in a window on an ink stage, as a product\n * walkthrough is shown: a bar with three dots and a caption in monospace\n * capitals, and an accent Play button with the video's length beside its\n * words. The stage stays ink in both themes. `transcript` puts what the video\n * shows on the page itself, in a section that opens under it, as an\n * alternative to a link to it (1.2.1, 1.2.3).\n *\n * @category media\n * @icon play\n */\nexport class ImpaktVideo extends ImpaktElement {\n static properties = {\n videoSrc: { type: String, attribute: 'video-src' },\n label: { type: String },\n posterSrc: { type: String, attribute: 'poster-src' },\n captionsSrc: { type: String, attribute: 'captions-src' },\n transcriptHref: { type: String, attribute: 'transcript-href' },\n playText: { type: String, attribute: 'play-text' },\n ratio: { type: String, reflect: true },\n look: { type: String, reflect: true },\n caption: { type: String },\n duration: { type: String },\n transcript: { type: String },\n transcriptText: { type: String, attribute: 'transcript-text' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A YouTube or Vimeo address, or a video file such as an .mp4. */\n declare videoSrc: string;\n /** What the video is, read out before it plays. */\n declare label: string;\n declare posterSrc: string;\n /** A captions file in WebVTT, for a video file. */\n declare captionsSrc: string;\n declare transcriptHref: string;\n declare playText: string;\n declare ratio: '16:9' | '4:3' | '1:1' | '9:16';\n /** `plain` is the video alone. `window` draws it in a window with a bar and a caption, on an ink stage. */\n declare look: 'plain' | 'window';\n /** With `window`: the words in the window's bar, such as \"Walkthrough video\". Decoration: `label` is what is read. */\n declare caption: string;\n /** How long the video is, such as \"2 min\", shown beside the Play button's words and read with them. */\n declare duration: string;\n /** What the video shows, as words, shown in a section that opens under it. Blank lines start a new paragraph. */\n declare transcript: string;\n /** The words on the line that opens the transcript, such as \"Read what the video shows\". */\n declare transcriptText: string;\n declare playing: boolean;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.videoSrc = '';\n this.label = 'Video';\n this.posterSrc = '';\n this.captionsSrc = '';\n this.transcriptHref = '';\n this.playText = 'Play video';\n this.ratio = '16:9';\n this.look = 'plain';\n this.caption = '';\n this.duration = '';\n this.transcript = '';\n this.transcriptText = '';\n this.playing = false;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n card,\n css`\n :host { display: block; }\n .frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: ${t.radiusXl}; background: #111; }\n :host([ratio='4:3']) .frame { aspect-ratio: 4 / 3; }\n :host([ratio='1:1']) .frame { aspect-ratio: 1; }\n :host([ratio='9:16']) .frame { aspect-ratio: 9 / 16; max-inline-size: 420px; }\n iframe, video, img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; border: 0; object-fit: cover; }\n .play { position: absolute; inset: 0; display: grid; place-items: center; inline-size: 100%; padding: 0; color: #fff; background: linear-gradient(transparent 40%, rgb(0 0 0 / 0.55)); border: 0; cursor: pointer; }\n .disc { display: grid; place-items: center; inline-size: 72px; block-size: 72px; border-radius: 50%; background: ${t.brand}; box-shadow: ${t.shadowLg}; }\n /* Held inside the frame at both edges, so loosened or long words wrap rather than run out of it (1.4.12). */\n .label { position: absolute; inset-inline: ${space(5)}; inset-block-end: ${space(4)}; ${type('lg')} font-weight: ${fontWeight('semibold')}; text-align: start; }\n .foot { margin: ${space(2)} 0 0; ${type('sm')} }\n .foot a { color: ${t.link}; }\n .empty { display: grid; place-items: center; block-size: 100%; color: #ccc; }\n /* The window: a bar with three dots and a caption over an ink stage. It stays ink in both themes. */\n .window { --stage: var(--impakt-video-stage, #111111); --stage-on: var(--impakt-video-stage-on, #efefed); --stage-rule: color-mix(in srgb, var(--stage-on) 14%, var(--stage)); background: var(--stage); color: var(--stage-on); border: ${t.borderThin} solid var(--stage-rule); }\n .bar { display: flex; align-items: center; gap: ${space(1.5)}; padding: ${space(3)} ${space(4)}; border-block-end: ${t.borderThin} solid var(--stage-rule); background: color-mix(in srgb, var(--stage-on) 6%, var(--stage)); }\n .bar .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--stage-rule); }\n .bar .dot:first-child { background: ${token('color.accent.default', '#ffd43b')}; }\n .bar .caption { margin-inline-start: ${space(1.5)}; font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: color-mix(in srgb, var(--stage-on) 78%, var(--stage)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n :host([look='window']) .frame { border-radius: 0; background: var(--stage); }\n :host([look='window']) .play { background: none; color: inherit; }\n :host([look='window']) .disc { display: none; }\n :host([look='window']) .label { position: static; display: inline-flex; align-items: baseline; gap: ${space(3)}; max-inline-size: calc(100% - 2 * ${space(5)}); box-sizing: border-box; padding: ${space(3)} ${space(5)}; ${type('md')} font-weight: ${fontWeight('medium')}; color: ${token('color.accent.on', '#111111')}; background: ${token('color.accent.default', '#ffd43b')}; }\n :host([look='window']) .play:hover .label { background: color-mix(in srgb, ${token('color.accent.default', '#ffd43b')} 88%, #ffffff); }\n :host([look='window']) .play:focus-visible { outline: none; }\n :host([look='window']) .play:focus-visible .label { box-shadow: ${t.focusShadow}; }\n .length { font-family: ${t.fontMono}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .transcript { margin-block-start: ${space(3)}; border-block: ${t.borderThin} solid ${t.text}; }\n .transcript summary { ${targetSize} display: flex; align-items: center; gap: ${space(2)}; padding-block: ${space(3)}; cursor: pointer; font-weight: ${fontWeight('medium')}; list-style: none; }\n .transcript summary::-webkit-details-marker { display: none; }\n .transcript summary::before { content: '+'; inline-size: 1ch; font-family: ${t.fontMono}; }\n .transcript[open] summary::before { content: '\u2212'; }\n .transcript .words { padding-block-end: ${space(4)}; color: ${t.textMuted}; display: grid; gap: ${space(3)}; max-inline-size: 65ch; }\n .transcript p { margin: 0; }\n @media (forced-colors: active) { .window, .bar { border-color: CanvasText; } :host([look='window']) .label { border: 1px solid ButtonText; } }\n `,\n ];\n\n render(): TemplateResult {\n const embed = embedOf(this.videoSrc, pageLocale(this));\n let player: TemplateResult;\n if (!this.videoSrc) player = html`<div class=\"empty\">${say('Add a video address')}</div>`;\n else if (embed && this.playing)\n player = html`<iframe src=${embed} title=${this.label} allow=\"autoplay; encrypted-media; picture-in-picture; fullscreen\" allowfullscreen></iframe>`;\n else if (embed)\n player = html`${this.posterSrc ? html`<img src=${this.posterSrc} alt=\"\" />` : nothing}\n <button class=\"play\" type=\"button\" @click=${() => {\n this.playing = true;\n }}>\n <span class=\"disc\" aria-hidden=\"true\"><svg width=\"28\" height=\"28\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M8 5v14l11-7z\"/></svg></span>\n <span class=\"label\">${this.playText}${this.duration ? html` <span class=\"length\">${this.duration}</span>` : nothing}<span class=\"visually-hidden\">: ${this.label}</span></span>\n </button>`;\n else\n player = html`<video controls preload=\"metadata\" poster=${this.posterSrc || nothing} aria-label=${this.label}>\n <source src=${this.videoSrc} />\n ${this.captionsSrc ? html`<track kind=\"captions\" src=${this.captionsSrc} srclang=\"en\" label=\"English\" default />` : nothing}\n </video>`;\n const frame = html`<div class=\"frame\" part=\"frame\">${player}</div>`;\n const paragraphs = (this.transcript ?? '')\n .split(/\\n\\s*\\n/)\n .map((p) => p.trim())\n .filter(Boolean);\n return html`${\n this.look === 'window'\n ? html`<div class=\"window\" part=\"window\">\n <div class=\"bar\" aria-hidden=\"true\"><span class=\"dot\"></span><span class=\"dot\"></span><span class=\"dot\"></span>${this.caption ? html`<span class=\"caption\">${this.caption}</span>` : nothing}</div>\n ${frame}\n </div>`\n : frame\n }\n ${\n paragraphs.length\n ? html`<details class=\"transcript\" part=\"transcript\"><summary>${this.transcriptText || say('Read the transcript')}</summary><div class=\"words\">${paragraphs.map((p) => html`<p>${p}</p>`)}</div></details>`\n : nothing\n }\n ${this.transcriptHref ? html`<p class=\"foot\"><a href=${this.transcriptHref}>${say('Read the transcript')}<span class=\"visually-hidden\">${say(' of {video}', { video: this.label })}</span></a></p>` : nothing}`;\n }\n}\n\nconst NOTICE_WORDS: Record<string, { heading: string; text: string }> = {\n mortgage: { heading: 'Your home may be repossessed', text: 'Your home may be repossessed if you do not keep up repayments on your mortgage.' },\n 'secured-loan': {\n heading: 'Think carefully before securing other debts against your home',\n text: 'Your home may be repossessed if you do not keep up repayments on a mortgage or any other debt secured on it.',\n },\n investment: { heading: 'Capital at risk', text: 'The value of investments can go down as well as up, and you may get back less than you put in.' },\n insurance: { heading: 'Important information', text: 'Read the policy documents to check the cover suits your needs. Limits and exclusions apply.' },\n custom: { heading: '', text: '' },\n};\n\n/**\n * The warning and the regulator wording a financial page must carry, as a\n * block of its own so it is never left off.\n *\n * Pick the kind to start from the usual words, or `custom` to write your own.\n * Whatever it says, check it with whoever signs off your financial promotions.\n *\n * @category feedback\n * @icon shield\n */\nexport class ImpaktRegulatoryNotice extends ImpaktElement {\n static properties = {\n kind: { type: String, reflect: true },\n heading: { type: String },\n text: { type: String },\n firm: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare kind: 'mortgage' | 'secured-loan' | 'investment' | 'insurance' | 'custom';\n /** Leave empty to use the usual heading for the kind. */\n declare heading: string;\n /** Leave empty to use the usual warning for the kind. */\n declare text: string;\n /** Who you are and who regulates you, such as \"Acme Ltd is authorised and regulated by the Financial Conduct Authority (FRN 123456).\" */\n declare firm: string;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.kind = 'mortgage';\n this.heading = '';\n this.text = '';\n this.firm = '';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; }\n .box { padding: ${space(5)}; border-inline-start: 6px solid ${t.warning}; border-radius: ${t.radiusLg}; background: ${t.warningSubtle}; }\n :host([kind='insurance']) .box { border-color: ${t.info}; background: ${t.infoSubtle}; }\n strong { display: block; margin-block-end: ${space(1)}; ${type('md')} color: ${t.text}; }\n p { margin: 0; color: ${t.text}; }\n /* Muted text is proved against the card colour, not the notice's, so the firm's line is in the text colour (1.4.3). */\n .firm { margin-block-start: ${space(3)}; ${type('sm')} color: ${t.text}; }\n `,\n ];\n\n render(): TemplateResult {\n const preset = NOTICE_WORDS[this.kind] ?? NOTICE_WORDS.custom!;\n const heading = this.heading || (preset.heading ? say(preset.heading) : '');\n const text = this.text || (preset.text ? say(preset.text) : '');\n return html`<aside class=\"box\" part=\"box\" aria-label=${heading || say('Important information')}>\n ${heading ? html`<strong>${heading}</strong>` : nothing}\n ${text ? html`<p>${text}</p>` : nothing}\n ${this.firm ? html`<p class=\"firm\">${this.firm}</p>` : nothing}\n </aside>`;\n }\n}\n\n/** One band of a tax: everything above `from` and up to the next band's `from` is charged at `rate`. */\ninterface Band {\n from: number;\n rate: number;\n}\n\n/**\n * Stamp Duty Land Tax for England and Northern Ireland, from 1 April 2025.\n * Exported so the numbers can be checked, and changed in one place.\n */\nexport const SDLT = {\n standard: [\n { from: 0, rate: 0 },\n { from: 125000, rate: 2 },\n { from: 250000, rate: 5 },\n { from: 925000, rate: 10 },\n { from: 1500000, rate: 12 },\n ] as Band[],\n firstTime: [\n { from: 0, rate: 0 },\n { from: 300000, rate: 5 },\n ] as Band[],\n firstTimeLimit: 500000,\n additionalSurcharge: 5,\n};\n\nfunction taxOn(price: number, bands: Band[], extra = 0): number {\n let tax = 0;\n bands.forEach((band, i) => {\n const top = bands[i + 1]?.from ?? Infinity;\n if (price > band.from) tax += ((Math.min(price, top) - band.from) * (band.rate + extra)) / 100;\n });\n return Math.round(tax);\n}\n\n/** The stamp duty on a home, for a mover, a first-time buyer or a second home. */\nexport function stampDuty(price: number, buyer: 'mover' | 'first-time' | 'additional'): number {\n if (price <= 0) return 0;\n if (buyer === 'first-time' && price <= SDLT.firstTimeLimit) return taxOn(price, SDLT.firstTime);\n if (buyer === 'additional') return price < 40000 ? 0 : taxOn(price, SDLT.standard, SDLT.additionalSurcharge);\n return taxOn(price, SDLT.standard);\n}\n\nconst calcStyles = css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; }\n .inputs { display: flex; flex-direction: column; gap: ${space(5)}; padding: ${space(8)}; }\n label, legend { display: block; ${type('sm')} font-weight: ${fontWeight('semibold')}; margin-block-end: ${space(1.5)}; padding: 0; }\n fieldset { margin: 0; padding: 0; border: 0; }\n .choices { display: flex; flex-wrap: wrap; gap: ${space(2)}; }\n .choices label { display: inline-flex; align-items: center; gap: ${space(2)}; margin: 0; padding: ${space(2)} ${space(3)}; font-weight: ${fontWeight('regular')}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; cursor: pointer; }\n .choices input { accent-color: ${t.brand}; }\n input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${space(2)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; }\n .result { display: flex; flex-direction: column; justify-content: center; gap: ${space(2)}; padding: ${space(8)}; color: ${t.onBrand}; background: ${t.brand}; }\n .caption { margin: 0; ${type('sm')} opacity: 0.85; }\n output { display: block; font-family: ${t.fontHeading}; ${type('4xl')} font-weight: ${fontWeight('bold')}; }\n .line { margin: 0; ${type('sm')} }\n .foot { grid-column: 1 / -1; padding: ${space(4)} ${space(8)}; background: ${t.surfaceSubtle}; }\n /* Muted text is proved against the card colour, not this band, so the small print here is in the text colour (1.4.3). */\n .foot .small { color: ${t.text}; }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${space(5)}; } .foot { padding: ${space(4)} ${space(5)}; } }\n`;\n\n/**\n * How much stamp duty a home would cost, for a home mover, a first-time buyer\n * or a second home, worked out as the price is typed.\n *\n * The rates are England and Northern Ireland's from 1 April 2025. Scotland and\n * Wales have their own taxes, and rates change, so the small print says which\n * rates these are and points to GOV.UK.\n *\n * @category form\n * @icon pound\n */\nexport class ImpaktStampDutyCalculator extends ImpaktElement {\n static properties = {\n heading: { type: String },\n price: { type: Number },\n buyer: { type: String },\n smallPrint: { type: String, attribute: 'small-print' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare price: number;\n declare buyer: 'mover' | 'first-time' | 'additional';\n declare smallPrint: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'How much stamp duty would you pay?';\n this.price = 385000;\n this.buyer = 'first-time';\n this.smallPrint =\n 'Based on Stamp Duty Land Tax rates in England and Northern Ireland from 1 April 2025. Scotland and Wales have their own taxes. Check what you would pay on GOV.UK.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpaktElement.styles, focusRing, spaceAround, card, calcStyles];\n\n render(): TemplateResult {\n const duty = stampDuty(this.price, this.buyer);\n const rate = this.price > 0 ? (duty / this.price) * 100 : 0;\n const buyers: [typeof this.buyer, string][] = [\n ['first-time', say('First home')],\n ['mover', say('Moving home')],\n ['additional', say('Second home')],\n ];\n return html`<div class=\"card wrap\" part=\"wrap\">\n <div class=\"inputs\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n <div><label for=${this.id_('price')}>${say('Price of the home (\u00A3)')}</label>\n <input id=${this.id_('price')} type=\"number\" min=\"0\" step=\"1000\" inputmode=\"numeric\" .value=${String(this.price)} @input=${(e: Event) => {\n this.price = Number((e.target as HTMLInputElement).value) || 0;\n }} /></div>\n <fieldset><legend>${say('Are you buying')}</legend><div class=\"choices\">\n ${buyers.map(\n ([value, label]) =>\n html`<label><input type=\"radio\" name=${this.id_('buyer')} .checked=${this.buyer === value} @change=${() => {\n this.buyer = value;\n }} />${label}</label>`,\n )}\n </div></fieldset>\n </div>\n <div class=\"result\" aria-live=\"polite\">\n <p class=\"caption\">${say('Stamp duty to pay')}</p>\n <output for=${this.id_('price')}>${money(duty)}</output>\n <p class=\"line\">${duty ? say('About {rate}% of the price', { rate: rate.toFixed(1) }) : say('Nothing to pay at this price')}</p>\n ${this.buyer === 'first-time' && this.price > SDLT.firstTimeLimit ? html`<p class=\"line\">${say('First-time buyer relief stops above {limit}, so the usual rates apply.', { limit: money(SDLT.firstTimeLimit) })}</p>` : nothing}\n </div>\n ${this.smallPrint ? html`<div class=\"foot\"><p class=\"small\">${this.smallPrint}</p></div>` : nothing}\n </div>`;\n }\n}\n\n/**\n * Roughly how much someone could borrow, from what they earn, and the price\n * of home that buys with their deposit.\n *\n * Lenders usually lend four to four and a half times income; the multiple is\n * a setting. It is a guide, not an offer, and the small print says so.\n *\n * @category form\n * @icon pound\n */\nexport class ImpaktAffordabilityCalculator extends ImpaktElement {\n static properties = {\n heading: { type: String },\n income: { type: Number },\n secondIncome: { type: Number, attribute: 'second-income' },\n deposit: { type: Number },\n timesIncome: { type: Number, attribute: 'times-income' },\n smallPrint: { type: String, attribute: 'small-print' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare income: number;\n declare secondIncome: number;\n declare deposit: number;\n /** How many times income a lender would lend, such as 4.5. */\n declare timesIncome: number;\n declare smallPrint: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'How much could you borrow?';\n this.income = 45000;\n this.secondIncome = 0;\n this.deposit = 30000;\n this.timesIncome = 4.5;\n this.smallPrint =\n 'This is a guide, not a mortgage offer. What a lender offers depends on your circumstances. Your home may be repossessed if you do not keep up repayments on your mortgage.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpaktElement.styles, focusRing, spaceAround, card, calcStyles];\n\n private field(key: 'income' | 'secondIncome' | 'deposit'): (event: Event) => void {\n return (event) => {\n this[key] = Number((event.target as HTMLInputElement).value) || 0;\n };\n }\n\n render(): TemplateResult {\n const borrow = Math.max(0, (this.income + this.secondIncome) * this.timesIncome);\n const input = (key: 'income' | 'secondIncome' | 'deposit', label: string) => html`<div><label for=${this.id_(key)}>${label}</label>\n <input id=${this.id_(key)} type=\"number\" min=\"0\" step=\"1000\" inputmode=\"numeric\" .value=${String(this[key])} @input=${this.field(key)} /></div>`;\n return html`<div class=\"card wrap\" part=\"wrap\">\n <div class=\"inputs\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${input('income', say('Your yearly income before tax (\u00A3)'))}\n ${input('secondIncome', say('A second person\u2019s income, if buying together (\u00A3)'))}\n ${input('deposit', say('Your deposit (\u00A3)'))}\n </div>\n <div class=\"result\" aria-live=\"polite\">\n <p class=\"caption\">${say('You could borrow about')}</p>\n <output>${money(borrow)}</output>\n <p class=\"line\">${say('With your deposit, that\u2019s a home of about {amount}.', { amount: money(borrow + this.deposit) })}</p>\n </div>\n ${this.smallPrint ? html`<div class=\"foot\"><p class=\"small\">${this.smallPrint}</p></div>` : nothing}\n </div>`;\n }\n}\n\n/**\n * How to get in touch: a phone number, opening hours, an email address, and a\n * short form to ask for a call back.\n *\n * The form fires `impakt-submit` with the name, phone number and best time; the\n * app sends it on. Then the block thanks them in place.\n *\n * @fires {CustomEvent<{ name: string; phone: string; when: string }>} impakt-submit - When the form is sent.\n * @category content\n * @icon phone\n */\nexport class ImpaktContactBlock extends ImpaktElement {\n static properties = {\n heading: { type: String },\n phone: { type: String },\n hours: { type: String },\n email: { type: String },\n callbackHeading: { type: String, attribute: 'callback-heading' },\n buttonText: { type: String, attribute: 'button-text' },\n doneText: { type: String, attribute: 'done-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare phone: string;\n /** One line a day or range, such as \"Monday to Friday, 9am to 6pm\". */\n declare hours: string;\n declare email: string;\n /** Leave empty to show no call back form. */\n declare callbackHeading: string;\n declare buttonText: string;\n declare doneText: string;\n declare headingLevel: 2 | 3;\n declare sent: boolean;\n declare spaceAbove: Space;\n declare spaceBelow: Space;\n\n constructor() {\n super();\n this.heading = 'Talk to us';\n this.phone = '0800 000 0000';\n this.hours = 'Monday to Friday, 9am to 6pm\\nSaturday, 10am to 2pm';\n this.email = '';\n this.callbackHeading = 'Or we can call you';\n this.buttonText = 'Ask for a call back';\n this.doneText = 'Thanks. We\u2019ll call you at the time you chose.';\n this.headingLevel = 2;\n this.sent = false;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n card,\n css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${space(6)}; padding: ${space(8)}; }\n .phone { display: inline-block; margin: ${space(3)} 0; font-family: ${t.fontHeading}; ${type('3xl')} font-weight: ${fontWeight('bold')}; color: ${t.link}; text-decoration: none; }\n .hours { margin: 0; white-space: pre-line; color: ${t.textMuted}; }\n .email { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; margin-block-start: ${space(3)}; color: ${t.link}; overflow-wrap: anywhere; }\n form { display: grid; gap: ${space(3)}; padding: ${space(5)}; border-radius: ${t.radiusLg}; background: ${t.surfaceInset}; }\n .sub { margin: 0; ${type('lg')} font-weight: ${fontWeight('bold')}; color: ${t.text}; }\n label { display: block; ${type('sm')} font-weight: ${fontWeight('semibold')}; margin-block-end: ${space(1)}; }\n input, select { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${space(2)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; }\n .done { margin: 0; padding: ${space(5)}; border-radius: ${t.radiusLg}; background: ${t.successSubtle}; color: ${t.successText}; font-weight: ${fontWeight('semibold')}; }\n @container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); padding: ${space(5)}; } }\n `,\n ];\n\n private submit(event: SubmitEvent): void {\n event.preventDefault();\n const form = new FormData(event.target as HTMLFormElement);\n const data = { name: String(form.get('name') ?? ''), phone: String(form.get('phone') ?? ''), when: String(form.get('when') ?? '') };\n this.dispatchEvent(new CustomEvent('impakt-submit', { detail: data, bubbles: true, composed: true }));\n this.sent = true;\n }\n\n render(): TemplateResult {\n return html`<div class=\"card wrap\" part=\"wrap\">\n <div>\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${this.phone ? html`<a class=\"phone\" href=${`tel:${this.phone.replace(/[^\\d+]/g, '')}`}>${this.phone}</a>` : nothing}\n ${this.hours ? html`<p class=\"hours\">${this.hours}</p>` : nothing}\n ${this.email ? html`<a class=\"email\" href=${`mailto:${this.email}`}>${this.email}</a>` : nothing}\n </div>\n ${\n !this.callbackHeading\n ? nothing\n : this.sent\n ? html`<p class=\"done\" role=\"status\">${this.doneText}</p>`\n : html`<form @submit=${this.submit} aria-labelledby=${this.id_('cb')}>\n <p class=\"sub\" id=${this.id_('cb')}>${this.callbackHeading}</p>\n <div><label for=${this.id_('name')}>${say('Your name')}</label><input id=${this.id_('name')} name=\"name\" autocomplete=\"name\" required /></div>\n <div><label for=${this.id_('tel')}>${say('Phone number')}</label><input id=${this.id_('tel')} name=\"phone\" type=\"tel\" autocomplete=\"tel\" required /></div>\n <div><label for=${this.id_('when')}>${say('Best time to call')}</label><select id=${this.id_('when')} name=\"when\"><option value=\"Morning\">${say('Morning')}</option><option value=\"Afternoon\">${say('Afternoon')}</option><option value=\"Evening\">${say('Evening')}</option></select></div>\n <button class=\"btn\" type=\"submit\">${this.buttonText}</button>\n </form>`\n }\n </div>`;\n }\n}\n\n// Working values, not settings: kept out of `properties` so the page designer does not offer them.\nImpaktVideo.createProperty('playing', { state: true });\nImpaktContactBlock.createProperty('sent', { state: true });\n\ncustomElements.define('impakt-plan-comparison', ImpaktPlanComparison);\ncustomElements.define('impakt-video', ImpaktVideo);\ncustomElements.define('impakt-regulatory-notice', ImpaktRegulatoryNotice);\ncustomElements.define('impakt-stamp-duty-calculator', ImpaktStampDutyCalculator);\ncustomElements.define('impakt-affordability-calculator', ImpaktAffordabilityCalculator);\ncustomElements.define('impakt-contact-block', ImpaktContactBlock);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-plan-comparison': ImpaktPlanComparison;\n 'impakt-video': ImpaktVideo;\n 'impakt-regulatory-notice': ImpaktRegulatoryNotice;\n 'impakt-stamp-duty-calculator': ImpaktStampDutyCalculator;\n 'impakt-affordability-calculator': ImpaktAffordabilityCalculator;\n 'impakt-contact-block': ImpaktContactBlock;\n }\n}\n", "/**\n * A cost estimator: a few questions, one at a time, with a budget beside them\n * that moves as the answers change, and then a result with a timeline, a team\n * and a way of working.\n *\n * Every number is content. Each choice says what it adds to the cost and the\n * weeks, or what it multiplies them by, and the bands say how big a team a\n * cost needs. The arithmetic lives here, in code, because a binding never\n * computes (ADR 0003): a studio changes its rates in the CMS, not the rules.\n */\nimport { css, html, nothing, unsafeCSS, type TemplateResult } from 'lit';\nimport {\n ImpaktElement,\n pageLocale,\n say,\n focusRing,\n targetSize,\n visuallyHidden,\n fontSize,\n fontWeight,\n space,\n spaceAround,\n t,\n token,\n type,\n toneOf,\n} from '@atomic-ui/ui';\n\n/** One answer to a question, and what it does to the estimate. */\nexport interface EstimatorChoice {\n id: string;\n label: string;\n /** A line under the label, such as \"iPhone and Android\". */\n hint?: string;\n /** Added to the cost, counted in units (see `unit`). */\n cost?: number;\n /** Added to the weeks. */\n weeks?: number;\n /** Multiplies the cost, such as 1.35 for a more polished first version. */\n costFactor?: number;\n /** Multiplies the weeks. */\n weeksFactor?: number;\n /** Engineers added to the team, such as one more to go faster. */\n engineers?: number;\n /** Shown beside the budget when it is picked. */\n tip?: string;\n /** How the summary names it, such as \"a SaaS platform\" or \"payments\". The label when left out. */\n phrase?: string;\n}\n\n/** One question. */\nexport interface EstimatorQuestion {\n id: string;\n heading: string;\n hint?: string;\n /** `one` picks one card, `many` picks any number, and `scale` is a slider across the choices in order. */\n kind: 'one' | 'many' | 'scale';\n choices: EstimatorChoice[];\n /** The choices picked at the start. A `one` or `scale` question takes the first id; with none, its first choice. */\n start?: string[];\n /** A short name for the question in the summary that is sent on, such as \"Polish\". Left out of it when there is none. */\n short?: string;\n /** For a `many` question, whether the summary lists what was picked, as in \"with payments and AI features\". Yes when left out. */\n inSummary?: boolean;\n}\n\n/** A band of cost: the first band whose `below` the cost is under applies, or the last one. */\nexport interface EstimatorBand {\n below?: number;\n /** For a team band, how many engineers. */\n engineers?: number;\n /** For a way-of-working band, what it is called. */\n text?: string;\n}\n\n/** One part of the timeline. The part with no share takes the weeks the others leave. */\nexport interface EstimatorPhase {\n label: string;\n /** Its share of the weeks, such as 0.1. At least one week either way. */\n share?: number;\n}\n\n/** What an estimate came to, as the `impakt-estimate` event carries it. */\nexport interface EstimateResult {\n low: number;\n high: number;\n weeks: number;\n engineers: number;\n way: string;\n summary: string;\n /** The ids picked for each question. */\n answers: Record<string, string[]>;\n}\n\nconst sum = (xs: number[]) => xs.reduce((a, b) => a + b, 0);\nconst bandFor = (bands: EstimatorBand[], cost: number): EstimatorBand | undefined =>\n bands.find((b) => typeof b.below === 'number' && cost < b.below) ?? bands.at(-1);\n\n/** The arithmetic, apart from the element so it can be checked on its own. */\nexport function estimate(\n questions: EstimatorQuestion[],\n answers: Record<string, string[]>,\n rules: { low: number; high: number; minWeeks: number; teams: EstimatorBand[]; ways: EstimatorBand[] },\n): { cost: number; low: number; high: number; weeks: number; engineers: number; way: string } {\n const chosen = questions.flatMap((q) => (answers[q.id] ?? []).flatMap((id) => q.choices.filter((c) => c.id === id)));\n let cost = sum(chosen.map((c) => c.cost ?? 0));\n let weeks = sum(chosen.map((c) => c.weeks ?? 0));\n for (const c of chosen) {\n cost *= c.costFactor ?? 1;\n weeks *= c.weeksFactor ?? 1;\n }\n const engineers = (bandFor(rules.teams, cost)?.engineers ?? 1) + sum(chosen.map((c) => c.engineers ?? 0));\n return {\n cost,\n low: Math.round(cost * rules.low),\n high: Math.round(cost * rules.high),\n weeks: Math.max(rules.minWeeks, Math.round(weeks)),\n engineers,\n way: bandFor(rules.ways, cost)?.text ?? '',\n };\n}\n\n/** The weeks each part of the timeline takes, adding up to the whole. */\nexport function phaseWeeks(phases: EstimatorPhase[], weeks: number): number[] {\n const fixed = phases.map((p) => (typeof p.share === 'number' ? Math.max(1, Math.round(weeks * p.share)) : 0));\n const rest = Math.max(1, weeks - sum(fixed));\n return phases.map((p, i) => (typeof p.share === 'number' ? fixed[i]! : rest));\n}\n\n/**\n * Asks a few questions one at a time and keeps a budget beside them that moves\n * with every answer, then shows the estimate: the range, the weeks, how long\n * each part takes, the team and the way of working. The visitor can send the\n * estimate on to a contact page, where a message box can start with it.\n *\n * **`layout=\"all\"` asks every question at once.** Each is a numbered row of\n * square chips (`impakt-chip-group`, radios for one answer and checkboxes for\n * several) under a monospace label such as \"01 \u00B7 What are you building?\", and\n * the result sits beside them as an ink panel: the budget in the accent, the\n * weeks to a first release, each part of the timeline as a row, a full-width\n * button to send it and the suggested way of working. The note goes under the\n * chips on a wide screen and under the panel on a phone, where the chips and\n * the panel stack with no gap. The wizard stays the default.\n *\n * @category form\n * @icon calculator\n * @fires {CustomEvent<EstimateResult>} impakt-estimate - When the estimate is sent on. The result is in detail.\n */\nexport class ImpaktEstimator extends ImpaktElement {\n static properties = {\n questions: { type: Array },\n teams: { type: Array },\n ways: { type: Array },\n phases: { type: Array },\n low: { type: Number },\n high: { type: Number },\n minWeeks: { type: Number, attribute: 'min-weeks' },\n currency: { type: String },\n unit: { type: Number },\n intro: { type: String },\n budgetLabel: { type: String, attribute: 'budget-label' },\n resultHeading: { type: String, attribute: 'result-heading' },\n teamText: { type: String, attribute: 'team-text' },\n teamTextOne: { type: String, attribute: 'team-text-one' },\n note: { type: String },\n contactHref: { type: String, attribute: 'contact-href' },\n sendLabel: { type: String, attribute: 'send-label' },\n layout: { type: String, reflect: true },\n wayLabel: { type: String, attribute: 'way-label' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n\n /** The questions, in the order they are asked. */\n declare questions: EstimatorQuestion[];\n /** How many engineers each band of cost needs. */\n declare teams: EstimatorBand[];\n /** The way of working for each band of cost. */\n declare ways: EstimatorBand[];\n /** The parts of the timeline, in order. */\n declare phases: EstimatorPhase[];\n /** The low end of the range, as a share of the cost. */\n declare low: number;\n /** The high end of the range, as a share of the cost. */\n declare high: number;\n /** The fewest weeks an estimate says. */\n declare minWeeks: number;\n /** The currency the cost is in, such as GBP. */\n declare currency: string;\n /** What one unit of cost is worth, such as 1000 when the costs are in thousands. */\n declare unit: number;\n /** Beside the budget before anything is picked, such as \"Start by telling us what you are building.\" */\n declare intro: string;\n declare budgetLabel: string;\n declare resultHeading: string;\n /** The team, with {n} for the number of engineers. */\n declare teamText: string;\n /** The team when it has one engineer. */\n declare teamTextOne: string;\n /** A line under the result, such as how accurate it is. */\n declare note: string;\n /** Where the estimate is sent on to. With none, there is no button to send it. */\n declare contactHref: string;\n declare sendLabel: string;\n /** `wizard` asks one question at a time. `all` asks every question at once, with the result beside them as an ink panel. */\n declare layout: 'wizard' | 'all';\n /** With `all`: the words before the way of working under the panel, such as \"Suggested way to work\". */\n declare wayLabel: string;\n /** The level of each question's heading. */\n declare headingLevel: number;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private at = 0;\n private answers: Record<string, string[]> = {};\n private tip = '';\n private copied = '';\n private started = false;\n\n constructor() {\n super();\n this.questions = [];\n this.teams = [];\n this.ways = [];\n this.phases = [];\n this.low = 0.85;\n this.high = 1.25;\n this.minWeeks = 1;\n this.currency = 'GBP';\n this.unit = 1;\n this.intro = '';\n this.budgetLabel = 'Indicative budget';\n this.resultHeading = 'Your estimate';\n this.teamText = '{n} engineers';\n this.teamTextOne = '1 engineer';\n this.note = '';\n this.contactHref = '';\n this.sendLabel = 'Send this to us';\n this.layout = 'wizard';\n this.wayLabel = '';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n focusRing,\n css`\n :host { display: block; container-type: inline-size; }\n [hidden] { display: none !important; }\n .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: ${space(10)}; align-items: start; }\n .mono { font-family: ${t.fontMono}; font-size: ${fontSize('xs')}; letter-spacing: 0.04em; text-transform: uppercase; color: ${t.textMuted}; margin: 0; }\n .sr-only { ${visuallyHidden} }\n\n .progress { display: grid; gap: ${space(2)}; margin-block-end: ${space(6)}; }\n .bar { block-size: 4px; border-radius: 2px; background: color-mix(in srgb, currentColor 12%, transparent); overflow: hidden; }\n .bar i { display: block; block-size: 100%; background: ${t.brand}; transition: inline-size 300ms ease; }\n\n fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }\n legend { padding: 0; margin-block-end: ${space(2)}; }\n .q { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; ${type('3xl')} letter-spacing: ${t.trackingTight}; color: ${t.textHeading}; outline: none; }\n .hint { margin: 0 0 ${space(6)}; color: ${t.textMuted}; }\n\n .choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(3)}; }\n .choices.many { grid-template-columns: repeat(3, minmax(0, 1fr)); }\n .choice { position: relative; display: grid; gap: ${space(1)}; align-content: start; padding: ${space(4)}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; background: ${t.surfaceCard}; cursor: pointer; transition: border-color 120ms ease, background 120ms ease; }\n .choice:hover { border-color: ${t.borderStrong}; }\n .choice input { ${visuallyHidden} }\n .choice:has(input:checked) { border-color: ${t.brand}; box-shadow: inset 0 0 0 1px ${t.brand}; background: ${t.brandSubtle}; }\n .choice:has(input:focus-visible) { box-shadow: ${t.focusShadow}; }\n .many .choice { padding: ${space(3)}; }\n .label { font-weight: ${fontWeight('semibold')}; }\n .small { ${type('sm')} color: ${t.textMuted}; }\n /* A tick for a picked feature, drawn in the corner. */\n .many .choice:has(input:checked)::after { content: '\u2713'; position: absolute; inset-block-start: ${space(2)}; inset-inline-end: ${space(3)}; color: ${t.brand}; font-weight: ${fontWeight('bold')}; }\n\n .scale { display: grid; gap: ${space(3)}; }\n .scale input { inline-size: 100%; accent-color: ${t.brand}; ${targetSize} }\n .ticks { display: flex; justify-content: space-between; ${type('sm')} color: ${t.textMuted}; }\n .ticks span[aria-current] { color: ${t.text}; font-weight: ${fontWeight('semibold')}; }\n .now { margin: 0; }\n\n .nav { display: flex; gap: ${space(3)}; margin-block-start: ${space(8)}; }\n button, .send { ${targetSize} display: inline-flex; align-items: center; justify-content: center; gap: ${space(2)}; padding: ${space(2.5)} ${space(5)}; border-radius: ${t.radiusLg}; font: inherit; font-weight: ${fontWeight('semibold')}; cursor: pointer; text-decoration: none; border: ${t.borderThin} solid transparent; }\n .primary, .send { background: ${t.brand}; color: ${t.onBrand}; }\n .primary:hover, .send:hover { background: ${t.brandHover}; }\n .secondary { background: transparent; color: ${t.text}; border-color: ${t.borderStrong}; }\n .secondary:hover { background: ${t.surfaceSubtle}; }\n\n .panel { position: sticky; inset-block-start: ${space(6)}; overflow: hidden; isolation: isolate; padding: ${space(8)}; border-radius: ${t.radiusXl}; background: ${t.surfaceCard}; box-shadow: ${t.shadowMd}; display: grid; gap: ${space(2)}; }\n /* The glow behind the budget grows as the product does. */\n .glow { position: absolute; z-index: -1; inset-block-start: -40%; inset-inline-end: -30%; inline-size: 120%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, ${unsafeCSS(toneOf(1, 0))} 45%, transparent), color-mix(in srgb, ${unsafeCSS(toneOf(2, 1))} 25%, transparent) 45%, transparent 70%); transform: scale(var(--s, 0.7)); transform-origin: 70% 30%; transition: transform 500ms cubic-bezier(.2, .8, .2, 1); pointer-events: none; }\n .range { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; font-size: ${fontSize('5xl')}; line-height: 1; letter-spacing: ${t.trackingTight}; color: ${t.textHeading}; }\n .weeks { margin: 0; ${type('lg')} }\n .tip { margin: ${space(4)} 0 0; padding-block-start: ${space(4)}; border-block-start: 1px solid color-mix(in srgb, currentColor 15%, transparent); color: ${t.textMuted}; }\n\n .result { display: grid; gap: ${space(6)}; }\n .summary { margin: 0; ${type('xl')} text-wrap: pretty; }\n .phases { display: flex; gap: 3px; block-size: 14px; border-radius: 7px; overflow: hidden; }\n .phases i { display: block; }\n .legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: ${space(2)} ${space(5)}; }\n .legend li { display: inline-flex; align-items: center; gap: ${space(2)}; }\n .legend li::before { content: ''; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--c); }\n dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(4)}; }\n dt { margin: 0 0 ${space(1)}; }\n dd { margin: 0; font-weight: ${fontWeight('semibold')}; }\n .actions { display: flex; flex-wrap: wrap; gap: ${space(3)}; }\n .note { margin: 0; ${type('sm')} color: ${t.textMuted}; }\n .status { margin: 0; ${type('sm')} }\n\n @container (max-width: 48rem) {\n .wrap { grid-template-columns: minmax(0, 1fr); gap: ${space(8)}; }\n /* Not sticky once the panel is under the questions, but still the glow's containing block, so the panel clips it\n and it never widens the page (1.4.10). */\n .panel { position: relative; inset-block-start: auto; }\n .choices.many { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n }\n @container (max-width: 30rem) {\n .choices { grid-template-columns: minmax(0, 1fr); }\n .range { font-size: ${fontSize('4xl')}; }\n }\n /* layout=\"all\": every question at once, and the result as an ink panel beside them. */\n .all { --accent: ${token('color.accent.default', '#ffd43b')}; --on-accent: ${token('color.accent.on', '#111111')}; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: 'questions panel' 'note panel'; grid-template-rows: auto 1fr; column-gap: ${space(2.5)}; align-items: stretch; }\n .all .questions { grid-area: questions; display: grid; gap: ${space(6)}; padding: ${space(8)} ${space(8)} ${space(4)}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-block-end: 0; }\n .all .foot { grid-area: note; padding: 0 ${space(8)} ${space(8)}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-block-start: 0; }\n .all .foot .note { ${type('md')} }\n .all .ink { grid-area: panel; display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(8)}; background: ${t.text}; color: ${t.surfaceCard}; --muted: color-mix(in srgb, ${t.surfaceCard} 72%, ${t.text}); --line: color-mix(in srgb, ${t.surfaceCard} 18%, ${t.text}); }\n .all .ink .mono { color: var(--muted); font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; }\n /* The accent on ink only where the theme says the pair reads; in dark the panel turns to paper and the range keeps its words. */\n .all .ink .range { color: var(--impakt-color-accent-on-ink, var(--impakt-site-menu-current, currentColor)); font-size: clamp(2.5rem, 7cqi, 3.5rem); letter-spacing: -0.04em; }\n .all .ink .weeks { font-size: 1.25rem; line-height: 1.3; padding-block-end: ${space(3)}; }\n .all .rows { list-style: none; margin: 0; padding: 0; }\n .all .rows li { display: flex; justify-content: space-between; align-items: baseline; gap: ${space(4)}; padding-block: ${space(3.5)}; border-block-start: ${t.borderThin} solid var(--line); }\n .all .rows .length { font-family: ${t.fontMono}; ${type('sm')} color: var(--muted); white-space: nowrap; }\n .all .cta { ${targetSize} display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; min-block-size: 44px; padding: ${space(3)} ${space(5)}; ${type('md')} font-weight: ${fontWeight('medium')}; color: var(--on-accent); background: var(--accent); text-decoration: none; }\n .all .cta:hover { background: color-mix(in srgb, var(--accent) 88%, #ffffff); }\n .all .cta:focus-visible { outline: none; box-shadow: 0 0 0 2px ${t.text}, 0 0 0 4px ${t.surfaceCard}; }\n .all .way { margin: 0; ${type('sm')} color: var(--muted); }\n @container (max-width: 48rem) {\n .all { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'questions' 'panel' 'note'; grid-template-rows: auto; column-gap: 0; }\n .all .questions { padding: ${space(6)} ${space(5)}; border-block-end: ${t.borderThin} solid ${t.text}; }\n .all .foot { padding: ${space(4)} 0 0; background: none; border: 0; }\n .all .ink { padding: ${space(6)} ${space(5)}; }\n }\n @media (forced-colors: active) {\n .all .ink { border: 1px solid CanvasText; }\n .all .cta { border: 1px solid ButtonText; }\n .choice:has(input:checked) { outline: 3px solid Highlight; }\n .bar i, .phases i, .legend li::before { background: CanvasText !important; }\n .glow { display: none; }\n }\n `,\n ];\n\n /** The answers each question starts with. */\n private reset(): void {\n this.answers = Object.fromEntries(\n (this.questions ?? []).map((q) => {\n const ids = (q.start ?? []).filter((id) => q.choices.some((c) => c.id === id));\n if (q.kind === 'many') return [q.id, ids];\n return [q.id, [ids[0] ?? q.choices[0]?.id].filter((x): x is string => Boolean(x))];\n }),\n );\n this.at = 0;\n this.tip = '';\n this.copied = '';\n }\n\n protected willUpdate(changed: Map<string, unknown>): void {\n if (changed.has('questions') || !this.started) {\n this.reset();\n this.started = true;\n }\n }\n\n private get rules() {\n return { low: this.low, high: this.high, minWeeks: this.minWeeks, teams: this.teams ?? [], ways: this.ways ?? [] };\n }\n\n private money(n: number): string {\n try {\n return new Intl.NumberFormat(pageLocale(this), {\n style: 'currency',\n currency: this.currency || 'GBP',\n notation: 'compact',\n maximumFractionDigits: 0,\n }).format(n * (this.unit || 1));\n } catch {\n return String(n * (this.unit || 1));\n }\n }\n\n private listOf(words: string[]): string {\n try {\n return new Intl.ListFormat(pageLocale(this), { type: 'conjunction' }).format(words);\n } catch {\n return words.join(', ');\n }\n }\n\n private weeksWord(n: number): string {\n return n === 1 ? say('{n} week', { n }) : say('{n} weeks', { n });\n }\n\n /** The largest the budget can be, so the glow is full size at it. */\n private get most(): number {\n const qs = this.questions ?? [];\n const answers = Object.fromEntries(\n qs.map((q) => {\n if (q.kind === 'many') return [q.id, q.choices.map((c) => c.id)];\n const best = [...q.choices].sort((a, b) => (b.cost ?? 0) * (b.costFactor ?? 1) - (a.cost ?? 0) * (a.costFactor ?? 1))[0];\n return [q.id, best ? [best.id] : []];\n }),\n );\n return estimate(qs, answers, this.rules).high || 1;\n }\n\n private summaryOf(r: ReturnType<typeof estimate>): string {\n const qs = this.questions ?? [];\n const one = qs.find((q) => q.kind === 'one');\n const thing = one ? one.choices.find((c) => c.id === this.answers[one.id]?.[0]) : undefined;\n const many = qs\n .filter((q) => q.kind === 'many' && q.inSummary !== false)\n .flatMap((q) =>\n (this.answers[q.id] ?? []).map((id) => {\n const c = q.choices.find((x) => x.id === id);\n return c ? c.phrase || c.label : id;\n }),\n );\n const name = thing ? thing.phrase || thing.label : '';\n const first = !name\n ? ''\n : many.length\n ? say('You are building {thing} with {list}.', { thing: name, list: this.listOf(many) })\n : say('You are building {thing}.', { thing: name });\n const rest = say('Expect {range} and about {weeks} to a first release.', { range: this.rangeOf(r), weeks: this.weeksWord(r.weeks) });\n return first ? `${first} ${rest}` : rest;\n }\n\n private rangeOf(r: { low: number; high: number }): string {\n return say('{low} to {high}', { low: this.money(r.low), high: this.money(r.high) });\n }\n private teamOf(n: number): string {\n return n === 1 ? this.teamTextOne : this.teamText.replace('{n}', String(n));\n }\n\n private pick(q: EstimatorQuestion, choice: EstimatorChoice, on: boolean): void {\n const now = this.answers[q.id] ?? [];\n this.answers = {\n ...this.answers,\n [q.id]: q.kind === 'many' ? (on ? [...now.filter((id) => id !== choice.id), choice.id] : now.filter((id) => id !== choice.id)) : [choice.id],\n };\n if (on && choice.tip) this.tip = choice.tip;\n this.requestUpdate();\n }\n\n private go(to: number): void {\n const last = (this.questions ?? []).length;\n this.at = Math.max(0, Math.min(last, to));\n this.copied = '';\n this.requestUpdate();\n void this.updateComplete.then(() => (this.renderRoot.querySelector('.current .q') as HTMLElement | null)?.focus({ preventScroll: true }));\n }\n\n private result(): EstimateResult {\n const r = estimate(this.questions ?? [], this.answers, this.rules);\n return {\n low: r.low * (this.unit || 1),\n high: r.high * (this.unit || 1),\n weeks: r.weeks,\n engineers: r.engineers,\n way: r.way,\n summary: this.textOf(r),\n answers: this.answers,\n };\n }\n\n /** The estimate as words to send or copy. */\n private textOf(r: ReturnType<typeof estimate>): string {\n const parts = [this.summaryOf(r), `${this.teamOf(r.engineers)}.`];\n if (r.way) parts.push(`${r.way}.`);\n const picked = (this.questions ?? [])\n .filter((q) => q.short && q.kind !== 'many')\n .map((q) => {\n const c = q.choices.find((x) => x.id === this.answers[q.id]?.[0]);\n return c ? `${q.short}: ${c.label}.` : '';\n })\n .filter(Boolean);\n const many = (this.questions ?? [])\n .filter((q) => q.short && q.kind === 'many' && q.inSummary === false)\n .map((q) => {\n const labels = (this.answers[q.id] ?? []).map((id) => q.choices.find((x) => x.id === id)?.label ?? id);\n return labels.length ? `${q.short}: ${this.listOf(labels)}.` : '';\n })\n .filter(Boolean);\n return [...parts, ...many, ...picked].join(' ');\n }\n\n private send(e: Event): void {\n const result = this.result();\n try {\n sessionStorage.setItem('impakt.estimate', result.summary);\n } catch {\n /* storage can be blocked; the link still goes */\n }\n const go = this.dispatchEvent(new CustomEvent('impakt-estimate', { detail: result, bubbles: true, composed: true, cancelable: true }));\n if (!go) e.preventDefault();\n }\n\n private async copy(): Promise<void> {\n const text = this.result().summary;\n try {\n await navigator.clipboard.writeText(text);\n this.copied = say('Summary copied.');\n } catch {\n this.copied = say('Copying is blocked here. Select the summary above instead.');\n }\n this.requestUpdate();\n }\n\n private heading(text: string): TemplateResult {\n const l = Math.min(Math.max(this.headingLevel || 2, 2), 6);\n return html`<div class=\"q\" role=\"heading\" aria-level=${l} tabindex=\"-1\">${text}</div>`;\n }\n\n private renderQuestion(q: EstimatorQuestion, i: number): TemplateResult {\n const picked = this.answers[q.id] ?? [];\n const current = i === this.at;\n if (q.kind === 'scale') {\n const index = Math.max(\n 0,\n q.choices.findIndex((c) => c.id === picked[0]),\n );\n const chosen = q.choices[index];\n return html`<fieldset class=${current ? 'current' : ''} ?hidden=${!current}>\n <legend>${this.heading(q.heading)}</legend>\n ${q.hint ? html`<p class=\"hint\">${q.hint}</p>` : nothing}\n <div class=\"scale\">\n <input type=\"range\" min=\"0\" max=${Math.max(0, q.choices.length - 1)} step=\"1\" .value=${String(index)} aria-label=${q.heading} aria-valuetext=${chosen?.label ?? ''}\n @input=${(e: Event) => {\n const c = q.choices[Number((e.target as HTMLInputElement).value)];\n if (c) this.pick(q, c, true);\n }}>\n <div class=\"ticks\" aria-hidden=\"true\">${q.choices.map((c, k) => html`<span aria-current=${k === index ? 'true' : nothing}>${c.label}</span>`)}</div>\n ${chosen?.hint ? html`<p class=\"now\">${chosen.hint}</p>` : nothing}\n </div>\n </fieldset>`;\n }\n const many = q.kind === 'many';\n return html`<fieldset class=${current ? 'current' : ''} ?hidden=${!current}>\n <legend>${this.heading(q.heading)}</legend>\n ${q.hint ? html`<p class=\"hint\">${q.hint}</p>` : nothing}\n <div class=\"choices ${many ? 'many' : ''}\">\n ${q.choices.map(\n (c) => html`<label class=\"choice\">\n <input type=${many ? 'checkbox' : 'radio'} name=${`${this.uid}-${q.id}`} value=${c.id} .checked=${picked.includes(c.id)}\n @change=${(e: Event) => this.pick(q, c, (e.target as HTMLInputElement).checked)}>\n <span class=\"label\">${c.label}</span>\n ${c.hint ? html`<span class=\"small\">${c.hint}</span>` : nothing}\n </label>`,\n )}\n </div>\n </fieldset>`;\n }\n\n private renderResult(r: ReturnType<typeof estimate>): TemplateResult {\n const weeks = phaseWeeks(this.phases ?? [], r.weeks);\n const current = this.at === (this.questions ?? []).length;\n return html`<div class=\"result ${current ? 'current' : ''}\" ?hidden=${!current}>\n ${this.heading(this.resultHeading)}\n <p class=\"summary\">${this.summaryOf(r)}</p>\n ${\n (this.phases ?? []).length\n ? html`\n <div class=\"phases\" aria-hidden=\"true\">${(this.phases ?? []).map((_, i) => html`<i style=${`flex-grow:${weeks[i]};background:${toneOf(undefined, i)}`}></i>`)}</div>\n <ul class=\"legend\">${(this.phases ?? []).map((p, i) => html`<li style=${`--c:${toneOf(undefined, i)}`}>${p.label} <b>${this.weeksWord(weeks[i]!)}</b></li>`)}</ul>`\n : nothing\n }\n <dl>\n <div><dt class=\"mono\">${say('Your team')}</dt><dd>${this.teamOf(r.engineers)}</dd></div>\n ${r.way ? html`<div><dt class=\"mono\">${say('Way of working')}</dt><dd>${r.way}</dd></div>` : nothing}\n </dl>\n <div class=\"actions\">\n ${this.contactHref ? html`<a class=\"send\" href=${this.contactHref} @click=${(e: Event) => this.send(e)}>${this.sendLabel} <span aria-hidden=\"true\">\u2192</span></a>` : nothing}\n <button type=\"button\" class=\"secondary\" @click=${() => this.copy()}>${say('Copy summary')}</button>\n <button type=\"button\" class=\"secondary\" @click=${() => {\n this.reset();\n this.go(0);\n }}>${say('Start again')}</button>\n </div>\n <p class=\"status\" role=\"status\">${this.copied}</p>\n ${this.note ? html`<p class=\"note\">${this.note}</p>` : nothing}\n </div>`;\n }\n\n /** Every question at once, as rows of chips, with the result beside them in ink. */\n private renderAll(r: ReturnType<typeof estimate>): TemplateResult {\n const qs = this.questions ?? [];\n const weeks = phaseWeeks(this.phases ?? [], r.weeks);\n const arrow = html`<svg viewBox=\"0 0 20 12\" width=\"20\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M0 6h18M13 1l5 5-5 5\" /></svg>`;\n return html`<div class=\"all\">\n <div class=\"questions\" part=\"questions\">\n ${qs.map((q, i) => {\n const picked = this.answers[q.id] ?? [];\n const many = q.kind === 'many';\n const options = q.choices.map((c) => ({ value: c.id, label: c.label }));\n return html`<impakt-chip-group look=\"site\" part=\"question\" .label=${`${String(i + 1).padStart(2, '0')} \u00B7 ${q.heading}`} .description=${q.hint ?? ''}\n .options=${options} ?multiple=${many} .values=${many ? picked : []} .value=${many ? '' : (picked[0] ?? '')}\n @impakt-change=${(e: CustomEvent<{ value: string }>) => this.chipsChanged(q, e)}></impakt-chip-group>`;\n })}\n </div>\n <aside class=\"ink\" part=\"panel\">\n <p class=\"mono\">${this.budgetLabel}</p>\n <p class=\"range\" aria-live=\"polite\" aria-atomic=\"true\">${this.rangeOf(r)}</p>\n <p class=\"weeks\">${say('About {weeks} to a first release', { weeks: this.weeksWord(r.weeks) })}</p>\n ${\n (this.phases ?? []).length\n ? html`<ul class=\"rows\" role=\"list\">${(this.phases ?? []).map((phase, i) => html`<li><span>${phase.label}</span><span class=\"length\">${this.weeksWord(weeks[i]!)}</span></li>`)}</ul>`\n : nothing\n }\n ${this.contactHref ? html`<a class=\"cta\" href=${this.contactHref} part=\"send\" @click=${(e: Event) => this.send(e)}><span>${this.sendLabel}</span>${arrow}</a>` : nothing}\n ${r.way ? html`<p class=\"way\">${this.wayLabel || say('Way of working')}: ${r.way}</p>` : nothing}\n </aside>\n ${this.note ? html`<div class=\"foot\"><p class=\"note\">${this.note}</p></div>` : nothing}\n </div>`;\n }\n\n /** A row of chips changed: one answer, or the set of them. */\n private chipsChanged(q: EstimatorQuestion, e: CustomEvent<{ value: string }>): void {\n const group = e.target as HTMLElement & { values?: string[] };\n const ids = q.kind === 'many' ? [...(group.values ?? [])] : [e.detail?.value].filter((x): x is string => Boolean(x));\n this.answers = { ...this.answers, [q.id]: ids };\n const last = ids.at(-1);\n const tip = q.choices.find((c) => c.id === last)?.tip;\n if (tip) this.tip = tip;\n this.requestUpdate();\n }\n\n render(): TemplateResult {\n const qs = this.questions ?? [];\n if (this.layout === 'all') return this.renderAll(estimate(qs, this.answers, this.rules));\n const total = qs.length;\n const r = estimate(qs, this.answers, this.rules);\n const done = this.at >= total;\n const scale = (0.6 + Math.min(1, r.high / this.most) * 1.1).toFixed(2);\n return html`<div class=\"wrap\">\n <div>\n <div class=\"progress\">\n <p class=\"mono\">${done ? this.resultHeading : say('Step {step} of {steps}', { step: this.at + 1, steps: total })}</p>\n <div class=\"bar\" aria-hidden=\"true\"><i style=${`inline-size:${total ? (done ? 100 : ((this.at + 1) / (total + 1)) * 100) : 0}%`}></i></div>\n </div>\n ${qs.map((q, i) => this.renderQuestion(q, i))}\n ${this.renderResult(r)}\n ${\n done\n ? nothing\n : html`<div class=\"nav\">\n ${this.at > 0 ? html`<button type=\"button\" class=\"secondary\" @click=${() => this.go(this.at - 1)}>${say('Back')}</button>` : nothing}\n <button type=\"button\" class=\"primary\" @click=${() => this.go(this.at + 1)}>${this.at === total - 1 ? say('See my estimate') : say('Next')} <span aria-hidden=\"true\">\u2192</span></button>\n </div>`\n }\n </div>\n <aside class=\"panel\" part=\"panel\" style=${`--s:${scale}`}>\n <div class=\"glow\" aria-hidden=\"true\"></div>\n <p class=\"mono\">${this.budgetLabel}</p>\n <p class=\"range\" aria-live=\"polite\" aria-atomic=\"true\">${this.rangeOf(r)}</p>\n <p class=\"weeks\">${say('About {weeks} to a first release', { weeks: this.weeksWord(r.weeks) })}</p>\n <p class=\"tip\" aria-live=\"polite\">${this.tip || this.intro}</p>\n </aside>\n </div>`;\n }\n}\n\ncustomElements.define('impakt-estimator', ImpaktEstimator);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-estimator': ImpaktEstimator;\n }\n}\n", "/**\n * A site's own header and footer, drawn as one piece each, for the layout's\n * header and footer slots, and the wordmark that starts a header.\n *\n * The chip that sits beside a wordmark is a product component, `impakt-chip`,\n * and comes from `@atomic-ui/ui`.\n *\n * The page frame (`impakt-page`) gives them their landmarks, so neither draws a\n * `<header>` or `<footer>` of its own: a second banner would be one a screen\n * reader announces twice.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\n// The base, the tokens and the nav and button these draw come from @atomic-ui/ui, which defines its elements on import.\nimport { ImpaktElement, focusRing, hideOn, fontSize, fontWeight, space, t, token, type, toneOf, type NavLink, type Tone } from '@atomic-ui/ui';\n\n/** The footer stripe's colours, left to right. */\n/** The stripe's segments take the brand's chart colours in order. */\nconst STRIPE = [0, 1, 2, 3, 4];\n\n/** Code-like labels: a branch, a hash, a commit message. */\nconst MONO = t.fontMono;\n\n// Quieter words are faded to 0.72, no further: that keeps them at 4.5:1 on the page and card colours (1.4.3).\n\n/**\n * The site header: the brand, the main links and one call to action, with an\n * optional chip beside the brand and a status before the action.\n *\n * The links fold behind a Menu button when they do not fit, as `impakt-nav`\n * does. The chip and the status are labels, not controls, and they are left\n * out on a phone so the brand, the menu and the action keep the row.\n *\n * **Build your own.** Place components in its three slots, start, middle and\n * end, and each slot that holds something replaces what the props draw there:\n * a wordmark and chips at the start, a nav in the middle, a status and a\n * button at the end, in any order. Give a component `hideOn: 'phone'` to leave\n * it out on a phone, so the phone's header is built from the same pieces.\n *\n * **A header for a studio's canvas.** `mark` draws a 28px ink square with a\n * letter in it before the name, `context` a path after it (\"/ home.canvas\"),\n * and `status-at=\"start\"` moves the status chip, a square with a dot and a\n * word such as \"Live\", up beside them. `nav-look=\"tabs\"` draws the links as\n * file tabs. `presence` draws a few small overlapping avatars of the people in\n * the file before the action; each is named for a screen reader.\n *\n * @category layout\n * @icon header\n * @slot start - The brand: a wordmark or logo, and any chips beside it.\n * @slot middle - The links, usually one nav.\n * @slot presence - Avatars of the people in the file, before the action. Replaces what `presence` draws.\n * @slot end - A status and the call to action.\n * @fires {CustomEvent<null>} impakt-action - When the call to action is pressed.\n */\nexport class ImpaktSiteHeader extends ImpaktElement {\n static properties = {\n brand: { type: String },\n logoSrc: { type: String, attribute: 'logo-src' },\n logoAlt: { type: String, attribute: 'logo-alt' },\n home: { type: String },\n badge: { type: String },\n meta: { type: String },\n links: { type: Array },\n label: { type: String },\n menuText: { type: String, attribute: 'menu-text' },\n status: { type: String },\n statusMeta: { type: String, attribute: 'status-meta' },\n statusTone: { type: String, attribute: 'status-tone' },\n actionText: { type: String, attribute: 'action-text' },\n actionHref: { type: String, attribute: 'action-href' },\n fold: { type: String, reflect: true },\n mark: { type: String },\n context: { type: String },\n statusAt: { type: String, reflect: true, attribute: 'status-at' },\n navLook: { type: String, attribute: 'nav-look' },\n current: { type: String },\n presence: { type: Array },\n };\n /** The site's name, set as a wordmark when there is no logo picture. */\n declare brand: string;\n /** A logo picture, used instead of the wordmark. */\n declare logoSrc: string;\n /** What the logo says. Leave empty to use the brand name. */\n declare logoAlt: string;\n /** Where the brand links to. */\n declare home: string;\n /** A short chip beside the brand, such as \"main\". */\n declare badge: string;\n /** A code-like line after the chip, such as a commit hash. */\n declare meta: string;\n declare links: NavLink[];\n /** The name of the links' landmark. */\n declare label: string;\n /** The words on the button that opens the links on a narrow screen. */\n declare menuText: string;\n /** A status before the action, such as the stage the site is at. */\n declare status: string;\n /** A code-like line in the status, such as a hash. */\n declare statusMeta: string;\n declare statusTone: Tone;\n declare actionText: string;\n declare actionHref: string;\n /**\n * How the links fold on a narrow screen. `measure` folds them when they do not fit, which needs\n * script. `narrow` folds them at 40rem in CSS: the Menu button then opens a whole-screen menu\n * with no script, and the header's action moves into that menu. Use `narrow` on a page that may\n * be shown without script.\n */\n declare fold: 'measure' | 'narrow';\n /** A letter or two in a 28px ink square before the name, such as \"i\". Decoration: the name is what is read. */\n declare mark: string;\n /** A path after the name, such as \"home.canvas\", drawn as \"/ home.canvas\". */\n declare context: string;\n /** Where the status sits: `end`, before the action, or `start`, after the name. */\n declare statusAt: 'start' | 'end';\n /** How the links are drawn, passed to `impakt-nav` as its `look`, such as `tabs` for file tabs. */\n declare navLook: string;\n /** The href of the link to mark as the page you are on, passed to the nav; unset, the nav works it out from the address. */\n declare current: string;\n /** The people in the file, drawn as small overlapping avatars. `accent` fills one in the accent. */\n declare presence: Array<{ name: string; initials?: string; accent?: boolean }>;\n\n constructor() {\n super();\n this.brand = '';\n this.logoSrc = '';\n this.logoAlt = '';\n this.home = '/';\n this.badge = '';\n this.meta = '';\n this.links = [];\n this.label = 'Main';\n this.menuText = 'Menu';\n this.status = '';\n this.statusMeta = '';\n this.statusTone = 'success';\n this.actionText = '';\n this.actionHref = '';\n this.fold = 'measure';\n this.mark = '';\n this.context = '';\n this.statusAt = 'end';\n this.navLook = '';\n this.current = '';\n this.presence = [];\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; container-type: inline-size; }\n /* With a mark, the name is set small beside it, as in the canvas header. */\n .brand.marked { gap: ${space(3)}; font-size: ${fontSize('md')}; letter-spacing: -0.01em; }\n .mark { display: inline-grid; place-items: center; inline-size: 28px; block-size: 28px; flex: none; background: ${t.text}; color: ${t.surfaceCard}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('medium')}; }\n .context { font-size: ${fontSize('sm')}; white-space: nowrap; }\n .context .slash { margin-inline-end: ${space(2)}; opacity: 0.72; }\n .presence { display: flex; }\n .presence .avatar { display: inline-grid; place-items: center; inline-size: 22px; block-size: 22px; box-sizing: border-box; margin-inline-start: -6px; border-radius: 50%; border: ${t.borderThin} solid ${t.text}; background: ${t.surfaceCard}; color: ${t.text}; font-family: ${MONO}; font-size: 0.625rem; line-height: 1; }\n .presence .avatar:first-child { margin-inline-start: 0; }\n .presence .avatar.accent { background: ${token('color.accent.default', '#ffd43b')}; color: ${token('color.accent.on', '#111111')}; }\n .bar { display: flex; align-items: center; gap: ${space(6)}; }\n .start { display: flex; align-items: center; gap: ${space(3)}; flex: none; }\n .middle { flex: 1 1 8rem; min-inline-size: 0; display: flex; align-items: center; justify-content: center; }\n .middle ::slotted(*) { flex: 1 1 auto; min-inline-size: 0; }\n slot { display: contents; }\n .brand { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; color: inherit; text-decoration: none; font-family: ${t.fontHeading}; font-weight: ${fontWeight('semibold')}; ${type('2xl')} letter-spacing: -0.02em; line-height: 1; border-radius: ${t.radiusSm}; }\n .brand img { display: block; block-size: 32px; inline-size: auto; }\n .chip { display: inline-flex; align-items: center; gap: ${space(1)}; padding: 2px ${space(2)}; border-radius: ${t.radius}; background: color-mix(in srgb, currentColor 7%, transparent); font-family: ${MONO}; font-size: ${fontSize('xs')}; }\n .chip svg { inline-size: 12px; block-size: 12px; }\n .meta { font-family: ${MONO}; font-size: ${fontSize('xs')}; opacity: 0.72; }\n .middle impakt-nav { flex: 1 1 8rem; }\n /* File tabs sit in one box as wide as the tabs, centred between the name and the action. */\n :host([fold='narrow']) .middle impakt-nav[look='tabs'] { flex: 0 1 auto; }\n .end { display: flex; align-items: center; gap: ${space(3)}; flex: none; }\n .end:empty, .start:empty { display: none; }\n .status { display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(1)} ${space(3)}; border: ${t.borderThin} solid ${t.border}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); background: ${t.surfaceCard}; font-family: ${MONO}; font-size: ${fontSize('xs')}; white-space: nowrap; }\n /* Beside the name it is a small square chip: an ink outline, a dot, and the word in monospace capitals. */\n .start .status { padding: 2px ${space(2)}; border-color: ${t.text}; border-radius: ${t.radius}; font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .start .status .dot { inline-size: 6px; block-size: 6px; }\n .status .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--tone); }\n .status .hash { opacity: 0.72; }\n @container (max-width: 22rem) { :host(:not([fold='narrow'])) .bar { flex-wrap: wrap; row-gap: ${space(2)}; } :host(:not([fold='narrow'])) .end { flex: 1 1 100%; } }\n @container (max-width: 56rem) { .chip, .meta, .status, .context, .presence { display: none; } .bar { gap: ${space(3)}; } }\n /* With no script the links cannot fold behind a Menu button. On a narrow screen they take a\n line of their own under the name and the action, and wrap there. */\n @container (max-width: 40rem) {\n :host(:not(:defined):not([fold='narrow'])) .bar { flex-wrap: wrap; row-gap: ${space(1)}; }\n :host(:not(:defined):not([fold='narrow'])) .start { flex: 1 1 auto; }\n /* Its row may be narrower than the links, which then wrap: the max-content floor below is for the measured header only. */\n :host(:not(:defined):not([fold='narrow'])) .middle { order: 3; flex: 1 1 100%; justify-content: flex-start; min-inline-size: 0; }\n /* fold=\"narrow\": the links are behind the Menu button, which sits at the end, and the action moves into the menu. */\n :host([fold='narrow']) .middle { justify-content: flex-end; }\n /*\n * The measured links get only the room left beside the brand and the end slot, whatever the end slot holds, so\n * they fold behind the Menu button when they do not fit there (#55). A floor at the links' own width would give\n * them the room they ask for and push the end slot off the screen instead. Once folded, the Menu button keeps\n * its whole width, so it never spills over the brand.\n */\n :host(:not([fold='narrow'])) .middle { justify-content: flex-end; min-inline-size: 0; }\n :host(:not([fold='narrow'])) .middle:has(impakt-nav[folded]) { min-inline-size: max-content; }\n :host(:not([fold='narrow'])) .middle ::slotted(impakt-nav[folded]) { flex: none; min-inline-size: max-content; }\n :host([fold='narrow']) .end > slot > impakt-button { display: none; }\n }\n `,\n ];\n\n private act(): void {\n this.dispatchEvent(new CustomEvent('impakt-action', { bubbles: true, composed: true }));\n }\n\n render(): TemplateResult {\n const wordmark = this.logoSrc ? html`<img src=${this.logoSrc} alt=${this.logoAlt || this.brand} />` : html`${this.brand}`;\n const status = this.status\n ? html`<span class=\"status\" part=\"status\" style=${`--tone:${toneOf(this.statusTone, 0)}`}><span class=\"dot\" aria-hidden=\"true\"></span>${this.status}${this.statusMeta ? html` <span class=\"hash\">${this.statusMeta}</span>` : nothing}</span>`\n : nothing;\n const presence = this.presence ?? [];\n // Each region shows what is placed in its slot, or, when nothing is, what the props describe.\n return html`<div class=\"bar\" part=\"bar\">\n <div class=\"start\"><slot name=\"start\">\n ${this.brand || this.logoSrc ? html`<a class=${this.mark ? 'brand marked' : 'brand'} href=${this.home || '/'} part=\"brand\">${this.mark ? html`<span class=\"mark\" part=\"mark\" aria-hidden=\"true\">${this.mark}</span>` : nothing}${wordmark}</a>` : nothing}\n ${this.context ? html`<span class=\"context\" part=\"context\"><span class=\"slash\" aria-hidden=\"true\">/</span>${this.context}</span>` : nothing}\n ${this.statusAt === 'start' ? status : nothing}\n ${this.badge ? html`<span class=\"chip\" part=\"badge\"><svg viewBox=\"0 0 14 14\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"><circle cx=\"3.5\" cy=\"3\" r=\"1.5\"/><circle cx=\"3.5\" cy=\"11\" r=\"1.5\"/><circle cx=\"10.5\" cy=\"4.5\" r=\"1.5\"/><path d=\"M3.5 4.5v5M10.5 6c0 2.5-3 2.5-6 4\"/></svg>${this.badge}</span>` : nothing}\n ${this.meta ? html`<span class=\"meta\" part=\"meta\">${this.meta}</span>` : nothing}\n </slot></div>\n <div class=\"middle\"><slot name=\"middle\">${(this.links ?? []).length ? html`<impakt-nav align=\"center\" size=\"sm\" fold=${this.fold} look=${this.navLook || nothing} .current=${this.current} .links=${this.links} .label=${this.label} .menuText=${this.menuText} .actionText=${this.fold === 'narrow' ? this.actionText : ''} .actionHref=${this.actionHref}></impakt-nav>` : nothing}</slot></div>\n <div class=\"end\"><slot name=\"presence\">${\n presence.length\n ? html`<span class=\"presence\" part=\"presence\">${presence.map(\n (person) =>\n html`<span class=${person.accent ? 'avatar accent' : 'avatar'} role=\"img\" aria-label=${person.name}>${person.initials ?? person.name.slice(0, 1).toUpperCase()}</span>`,\n )}</span>`\n : nothing\n }</slot><slot name=\"end\">\n ${this.statusAt === 'start' ? nothing : status}\n ${this.actionText ? html`<impakt-button variant=\"primary\" size=\"sm\" icon-after=\"arrow-right\" href=${this.actionHref || nothing} @click=${this.act}>${this.actionText}</impakt-button>` : nothing}\n </slot></div>\n </div>`;\n }\n}\n\n/**\n * The site's name as a wordmark, or its logo, linking home: the start of a\n * site header.\n *\n * @category layout\n * @icon logo\n */\nexport class ImpaktWordmark extends ImpaktElement {\n static properties = {\n text: { type: String },\n src: { type: String },\n alt: { type: String },\n href: { type: String },\n size: { type: String, reflect: true },\n hideOn: { type: String, reflect: true, attribute: 'hide-on' },\n };\n /** The name, set in the heading face. */\n declare text: string;\n /** A logo picture, used instead of the name. */\n declare src: string;\n /** What the logo says. Leave empty to use the name. */\n declare alt: string;\n declare href: string;\n /** Larger on a wide header, smaller on a phone's. */\n declare size: 'sm' | 'md' | 'lg';\n declare hideOn: 'never' | 'phone' | 'wide';\n\n constructor() {\n super();\n this.text = '';\n this.src = '';\n this.alt = '';\n this.href = '/';\n this.size = 'md';\n this.hideOn = 'never';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n hideOn,\n css`\n :host { display: inline-flex; align-items: center; flex: none; }\n a { color: inherit; text-decoration: none; font-family: ${t.fontHeading}; font-weight: ${fontWeight('semibold')}; letter-spacing: -0.02em; line-height: 1; border-radius: ${t.radiusSm}; }\n :host([size='sm']) a { ${type('xl')} } :host([size='md']) a { ${type('2xl')} } :host([size='lg']) a { ${type('3xl')} }\n img { display: block; block-size: 32px; inline-size: auto; }\n @media (max-width: 40rem) { :host([size='md']) a, :host([size='lg']) a { ${type('xl')} } }\n `,\n ];\n\n render(): TemplateResult {\n // The name arrives as the element's words when a page places it, or as `text` when it is set directly.\n return html`<a href=${this.href || '/'} part=\"link\">${this.src ? html`<img src=${this.src} alt=${this.alt || this.text || this.textContent?.trim() || ''} />` : html`<slot>${this.text}</slot>`}</a>`;\n }\n}\n\n/** One line of a footer's log: a code, what it says, and the colour of its dot. */\nexport interface FooterLogLine {\n meta?: string;\n text: string;\n tone?: Tone;\n}\n\n/** A column of footer links under a short heading. */\nexport interface FooterColumn {\n heading: string;\n links: NavLink[];\n}\n\n/**\n * The site footer: the footer band with the brand set large, an optional log of\n * lines beside it, columns of links, a legal line and a stripe of the brand's\n * colours along the foot.\n *\n * Each column is a list under its own heading, so a screen reader can move\n * from one to the next. The log is a list too; its dots are decoration.\n *\n * `action-text` and `action-href` put one outlined action at the end of the\n * columns' row, such as \"Back to top\". `tagline` sets a short line at the\n * other end of the legal line, such as \"Pixel to production\". On a phone the\n * columns sit two by two.\n *\n * @category layout\n * @icon footer\n */\nexport class ImpaktSiteFooter extends ImpaktElement {\n static properties = {\n brand: { type: String },\n brandSize: { type: String, reflect: true, attribute: 'brand-size' },\n log: { type: Array },\n columns: { type: Array },\n columnsOnPhone: { type: String, attribute: 'columns-on-phone', reflect: true },\n legal: { type: String },\n stripe: { type: Boolean, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n actionText: { type: String, attribute: 'action-text' },\n actionHref: { type: String, attribute: 'action-href' },\n tagline: { type: String },\n };\n /** The site's name, set large. */\n declare brand: string;\n /**\n * How large the name is set. `display` runs it the full width of the footer,\n * under the columns, sized by the footer's own width so it never spills at\n * 320px.\n */\n declare brandSize: 'lg' | 'display';\n /** Lines set in code type under the brand, newest first. The first is bright. */\n declare log: FooterLogLine[];\n declare columns: FooterColumn[];\n /** `hidden` leaves the link columns out on a phone, so the footer there is the name, the lines and the legal line. */\n declare columnsOnPhone: 'shown' | 'hidden';\n /** The line at the foot, such as the copyright. */\n declare legal: string;\n /** A stripe of the brand's colours along the bottom edge. */\n declare stripe: boolean;\n /** The level of each column's heading. */\n declare headingLevel: 2 | 3 | 4;\n /** The words on an outlined action at the end of the columns' row, such as \"Back to top\". */\n declare actionText: string;\n /** Where that action goes, such as \"#top\". */\n declare actionHref: string;\n /** A short line at the end of the legal line, such as \"Pixel to production\". */\n declare tagline: string;\n\n constructor() {\n super();\n this.brand = '';\n this.brandSize = 'lg';\n this.log = [];\n this.columns = [];\n this.columnsOnPhone = 'shown';\n this.legal = '';\n this.stripe = false;\n this.headingLevel = 2;\n this.actionText = '';\n this.actionHref = '';\n this.tagline = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n /* The page frame's footer band gives the colours; this sits flush with its foot so the stripe meets the edge. */\n :host { display: block; container-type: inline-size; position: relative; padding-block: ${space(8)} ${space(4)}; margin-block-end: calc(-1 * ${space(8)}); }\n .top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: ${space(10)}; }\n .brand { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.03em; }\n /* The name as a wordmark across the whole footer, under the columns. */\n :host([brand-size='display']) .top { grid-template-columns: 1fr; }\n :host([brand-size='display']) .top > div:first-child { order: 2; }\n /*\n * The G2 footer (10:728, 15:1099): a 1px rule across the top of the columns, the wordmark straight under them as wide as\n * the content (350px on a 1080px column, 343px of glyphs on a 350px phone column), and the legal line and the tagline\n * on one row under it in the 13px code face (#52).\n */\n :host([brand-size='display']) .top { gap: 0; }\n :host([brand-size='display']) .row { padding-block: 28px 40px; border-block-start: ${t.borderThin} solid currentColor; }\n :host([brand-size='display']) .brand { font-weight: ${fontWeight('semibold')}; font-size: clamp(3rem, 32.3cqi, 24rem); line-height: 0.9; letter-spacing: -0.06em; overflow-wrap: anywhere; }\n :host([brand-size='display']) :is(.legal, .tagline) { font-size: 0.8125rem; line-height: 1.5; }\n :host([brand-size='display']) .legal, :host([brand-size='display']) .foot { margin-block-start: ${space(6)}; }\n :host([brand-size='display']) .foot .legal { margin: 0; }\n @container (min-width: 48rem) { :host([brand-size='display']) .foot { flex-wrap: nowrap; } :host([brand-size='display']) .foot .legal { flex: 0 1 auto; min-inline-size: 0; } :host([brand-size='display']) .tagline { flex: none; } }\n ul { list-style: none; margin: 0; padding: 0; }\n .log { margin-block-start: ${space(8)}; display: grid; gap: ${space(3)}; font-family: ${MONO}; font-size: ${fontSize('sm')}; }\n .log li { display: flex; align-items: center; gap: ${space(3)}; opacity: 0.72; }\n .log li:first-child { opacity: 1; }\n .log .dot { flex: none; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--tone); }\n .log .code { margin-inline-end: ${space(3)}; }\n .columns { display: grid; grid-template-columns: repeat(var(--count, 4), minmax(0, 1fr)); gap: ${space(8)}; }\n .h { margin: 0 0 ${space(4)}; font-family: ${MONO}; font-size: ${fontSize('xs')}; font-weight: ${fontWeight('medium')}; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.72; }\n .columns ul { display: grid; gap: ${space(3)}; }\n a { color: inherit; text-decoration: none; font-weight: ${fontWeight('medium')}; border-radius: ${t.radiusSm}; }\n a:hover { text-decoration: underline; text-underline-offset: 0.25em; }\n .legal { margin: ${space(16)} 0 0; font-family: ${MONO}; font-size: ${fontSize('xs')}; opacity: 0.72; }\n .foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: ${space(2)} ${space(6)}; margin-block-start: ${space(16)}; }\n .foot .legal { margin: 0; }\n .tagline { margin: 0; font-family: ${MONO}; font-size: ${fontSize('xs')}; opacity: 0.72; text-align: end; }\n .row { display: flex; align-items: flex-start; gap: ${space(8)}; }\n .row .columns { flex: 1; }\n .row impakt-button { flex: none; }\n .stripe { position: absolute; inset-inline: -100vmax; inset-block-end: 0; block-size: 6px; display: flex; }\n .stripe span { flex: 1; }\n @container (max-width: 48rem) { .top { grid-template-columns: 1fr; } .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } .row { flex-direction: column; } }\n @container (max-width: 40rem) { :host([columns-on-phone='hidden']) .columns { display: none; } }\n @media (forced-colors: active) { :host { border-block-start: 1px solid CanvasText; } .log .dot { border: 1px solid CanvasText; } }\n `,\n ];\n\n private heading(text: string): TemplateResult {\n const level = Math.min(Math.max(this.headingLevel || 2, 2), 4);\n return level === 3 ? html`<h3 class=\"h\">${text}</h3>` : level === 4 ? html`<h4 class=\"h\">${text}</h4>` : html`<h2 class=\"h\">${text}</h2>`;\n }\n\n render(): TemplateResult {\n const log = this.log ?? [];\n return html`<div part=\"footer\">\n <div class=\"top\">\n <div>\n ${this.brand ? html`<p class=\"brand\" part=\"brand\">${this.brand}</p>` : nothing}\n ${log.length ? html`<ul class=\"log\" part=\"log\">${log.map((line, i) => html`<li style=${`--tone:${toneOf(line.tone ?? (i === 0 ? 'success' : 'accent'), i)}`}><span class=\"dot\" aria-hidden=\"true\"></span><span>${line.meta ? html`<span class=\"code\">${line.meta}</span>` : nothing}${line.text}</span></li>`)}</ul>` : nothing}\n </div>\n <div class=\"row\">\n <div class=\"columns\" part=\"columns\" style=${`--count:${Math.max(1, (this.columns ?? []).length)}`}>\n ${(this.columns ?? []).map((column) => html`<div>${this.heading(column.heading)}<ul>${(column.links ?? []).map((link) => html`<li><a href=${link.href}>${link.label}</a></li>`)}</ul></div>`)}\n </div>\n ${this.actionText ? html`<impakt-button variant=\"outline\" icon-after=\"arrow-right\" href=${this.actionHref || nothing} part=\"action\">${this.actionText}</impakt-button>` : nothing}\n </div>\n </div>\n ${\n this.tagline\n ? html`<div class=\"foot\">${this.legal ? html`<p class=\"legal\" part=\"legal\">${this.legal}</p>` : html`<span></span>`}<p class=\"tagline\" part=\"tagline\">${this.tagline}</p></div>`\n : this.legal\n ? html`<p class=\"legal\" part=\"legal\">${this.legal}</p>`\n : nothing\n }\n ${this.stripe ? html`<div class=\"stripe\" aria-hidden=\"true\">${STRIPE.map((i) => html`<span style=${`background:${toneOf(undefined, i)}`}></span>`)}</div>` : nothing}\n </div>`;\n }\n}\n\ncustomElements.define('impakt-site-header', ImpaktSiteHeader);\ncustomElements.define('impakt-wordmark', ImpaktWordmark);\ncustomElements.define('impakt-site-footer', ImpaktSiteFooter);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-site-header': ImpaktSiteHeader;\n 'impakt-wordmark': ImpaktWordmark;\n 'impakt-site-footer': ImpaktSiteFooter;\n }\n}\n", "import { html, css, nothing, type TemplateResult, type PropertyValues } from 'lit';\nimport { say, ImpaktElement, fontSize, fontWeight, space, t, token } from '@atomic-ui/ui';\n\nexport type SceneDrive = 'view' | 'page' | 'loop' | 'scrubber';\nexport type SceneLayout = 'stage' | 'split';\n\nconst clamp = (n: number) => Math.min(1, Math.max(0, n));\n\n/**\n * A scene: a stage whose children move along a progress from 0 to 1.\n *\n * The children declare timelines in their `motion` block, and `@atomic-ui/motion`\n * compiles them to keyframes. This element owns only the progress, and where it\n * comes from is the `drive` (ADR 0027):\n *\n * - `view` \u2014 the scene's own passage through the viewport. The stage pins\n * while the scene scrolls past, for `length` screens, or beside the content\n * in the default slot when `layout` is `split`.\n * - `page` \u2014 the scroll position of the whole page.\n * - `loop` \u2014 time, over `duration` seconds, repeating. **It always shows a\n * pause button**, because anything that moves on its own for more than five\n * seconds must be pausable (WCAG 2.2.2), and a scene that could forget that\n * is one the gate would have to catch on every page.\n * - `scrubber` \u2014 an `impakt-scrubber` placed in the `controls` slot.\n *\n * Progress is published three ways: the `progress` property, the\n * `--impakt-scene-progress` custom property on the host, and an\n * `impakt-scene-progress` event. Engines with scroll-driven animations run `view`\n * and `page` scenes natively, and the runtime ignores the event for them.\n *\n * Under reduced motion a `loop` does not start, and nothing pins: the stage\n * and the content stack, so every state of the scene can be read in order.\n *\n * @category layout\n * @icon layers\n * @slot stage - What moves, layered one over another. Pinned while the scene plays,\n * beside the content in `split` layout, after it, so the words are read first.\n * @slot - Content that scrolls past the stage, such as chapters.\n * @slot controls - An `impakt-scrubber`, for a scene driven by one.\n * @fires {CustomEvent<{ progress: number }>} impakt-scene-progress - `{ progress }` whenever the progress changes.\n */\nexport class ImpaktScene extends ImpaktElement {\n static properties = {\n drive: { type: String, reflect: true },\n layout: { type: String, reflect: true },\n length: { type: Number },\n duration: { type: Number },\n label: { type: String },\n progress: { type: Number },\n controls: { type: String, reflect: true },\n bleed: { type: Boolean, reflect: true },\n hideOn: { type: String, reflect: true, attribute: 'hide-on' },\n };\n\n /** Where the progress comes from. */\n declare drive: 'view' | 'page' | 'loop' | 'scrubber';\n /** `stage` pins one full-width stage; `split` pins it beside the content. */\n declare layout: 'stage' | 'split';\n /** How many screens of scrolling a `view` scene lasts, in `stage` layout. */\n declare length: number;\n /** Seconds per cycle of a `loop` scene. */\n declare duration: number;\n /** The scene's accessible name. Also names its pause button. */\n declare label: string;\n /** From 0 to 1. Set it to seek a `scrubber` scene, or where one starts. */\n declare progress: number;\n /**\n * Where the controls sit: `below` the stage, or `over` its foot, floating\n * on what it shows, as a video's do. Under reduced motion they sit below.\n */\n declare controls: 'below' | 'over';\n /** Run the stage to the window's edges, past the page's margins, as a hero drawn edge to edge does. */\n declare bleed: boolean;\n /**\n * Leave it out on a phone, or on anything wider, for a picture drawn twice:\n * once for a wide screen and once for a narrow one. Never both.\n */\n declare hideOn: 'never' | 'phone' | 'wide';\n /**\n * Whether a loop is paused: the scene's own state, set by its pause button\n * or by `pause()`. A plain field rather than a property, so it is never one\n * of the settings an author is offered.\n */\n private paused = false;\n\n private frame = 0;\n private started = 0;\n private reduced = false;\n private seekFrom = 0;\n private seekTo = 0;\n private seekStart = 0;\n private seekMs = 0;\n\n constructor() {\n super();\n this.drive = 'view';\n this.layout = 'stage';\n this.length = 3;\n this.duration = 8;\n this.label = 'Animation';\n this.progress = 0;\n this.controls = 'below';\n this.bleed = false;\n this.hideOn = 'never';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host {\n display: block;\n position: relative;\n }\n :host([drive='view'][layout='stage']) {\n min-height: calc(var(--impakt-scene-length, 3) * 100svh);\n }\n .frame {\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n }\n :host([layout='split']) .frame {\n grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);\n gap: ${space(8)};\n }\n .stage {\n position: sticky;\n top: 0;\n height: 100svh;\n display: grid;\n place-items: center;\n overflow: clip;\n }\n /* What is on the stage is layered, as in a motion tool: each thing sits\n over the one before, so a later layer's timeline can reveal it over an\n earlier one. */\n .stage ::slotted(*) {\n grid-area: 1 / 1;\n max-width: 100%;\n }\n :host([drive='loop']) .stage,\n :host([drive='scrubber']) .stage {\n position: relative;\n height: auto;\n min-height: 60svh;\n }\n .controls {\n display: flex;\n gap: ${space(3)};\n align-items: center;\n justify-content: center;\n padding-block: ${space(3)};\n }\n :host([bleed]) { margin-inline: calc(50% - 50vw); }\n @media (max-width: 40rem) { :host([hide-on='phone']) { display: none; } }\n @media (min-width: 40.0625rem) { :host([hide-on='wide']) { display: none; } }\n /* Over the stage, the controls float at its foot, above the layers and clear of its edges. */\n .stage > .controls { position: absolute; inset-inline: ${space(6)}; inset-block-end: ${space(6)}; z-index: 2; padding: 0; }\n .stage > .controls ::slotted(*) { box-shadow: 0 12px 32px rgb(16 19 23 / 14%); border-radius: 16px; background: var(--impakt-color-surface-card, #fff); }\n /* A control takes the row, so a graph scrubber spans the stage; a narrower one centres itself. */\n .controls ::slotted(*) { flex: 1 1 auto; min-width: 0; }\n .pause {\n min-width: ${token('target.min', '24px')};\n min-height: ${token('target.min', '24px')};\n padding: ${space(2)} ${space(4)};\n border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999));\n border: 1px solid ${t.border};\n background: ${t.surfaceCard};\n color: ${t.text};\n font-size: ${fontSize('sm')};\n font-weight: ${fontWeight('medium')};\n cursor: pointer;\n }\n .pause:focus-visible {\n outline: none;\n box-shadow: ${token('focus.ring.shadow', '0 0 0 2px #fff, 0 0 0 4px #1a1a1a')};\n }\n @media (max-width: 48rem) {\n :host([layout='split']) .frame {\n grid-template-columns: minmax(0, 1fr);\n }\n :host([layout='split']) .stage {\n height: 50svh;\n z-index: 1;\n }\n }\n @media (prefers-reduced-motion: reduce) {\n :host {\n min-height: 0 !important;\n }\n .stage {\n position: relative;\n height: auto;\n gap: ${space(6)};\n }\n /* With less motion the layers are shown one after another, so every\n state the scene would have moved through can still be seen. */\n .stage ::slotted(*) {\n grid-area: auto;\n }\n }\n `,\n ];\n\n /** @ignore */\n connectedCallback(): void {\n super.connectedCallback();\n try {\n this.reduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n } catch {\n this.reduced = false;\n }\n window.addEventListener('scroll', this.onScroll, { passive: true, capture: true });\n window.addEventListener('resize', this.onScroll);\n this.schedule();\n }\n\n /** @ignore */\n disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener('scroll', this.onScroll, { capture: true });\n window.removeEventListener('resize', this.onScroll);\n if (this.frame) cancelAnimationFrame(this.frame);\n this.frame = 0;\n }\n\n /** @ignore */\n protected updated(changed: PropertyValues<this>): void {\n if (changed.has('length')) this.style.setProperty('--impakt-scene-length', String(this.length));\n if (changed.has('progress')) this.publish();\n if (changed.has('drive')) {\n this.started = 0;\n this.schedule();\n }\n }\n\n /**\n * Move to a progress. With `ms`, ease there; without, jump. A scrubber seeks\n * a scene to a named stop this way.\n */\n seek(to: number, ms = 0): void {\n if (ms <= 0 || this.reduced) {\n this.progress = clamp(to);\n return;\n }\n this.seekFrom = this.progress;\n this.seekTo = clamp(to);\n this.seekStart = 0;\n this.seekMs = ms;\n this.schedule();\n }\n\n private onScroll = () => {\n if (this.drive === 'view' || this.drive === 'page') this.schedule();\n };\n\n private schedule(): void {\n if (!this.frame && typeof requestAnimationFrame === 'function') this.frame = requestAnimationFrame(this.tick);\n }\n\n private tick = (now: number) => {\n this.frame = 0;\n if (this.seekMs) {\n if (!this.seekStart) this.seekStart = now;\n const p = Math.min(1, (now - this.seekStart) / this.seekMs);\n // ease-in-out, so a jump between stops reads as travel rather than a cut\n const e = p < 0.5 ? 4 * p * p * p : 1 - Math.pow(-2 * p + 2, 3) / 2;\n this.progress = this.seekFrom + (this.seekTo - this.seekFrom) * e;\n if (p < 1) this.schedule();\n else this.seekMs = 0;\n return;\n }\n if (this.drive === 'view') {\n const r = this.getBoundingClientRect();\n const vh = window.innerHeight || 1;\n this.progress = clamp(-r.top / Math.max(1, r.height - vh));\n } else if (this.drive === 'page') {\n const doc = document.documentElement;\n this.progress = clamp(window.scrollY / Math.max(1, doc.scrollHeight - (window.innerHeight || 0)));\n } else if (this.drive === 'loop' && !this.paused && !this.reduced) {\n if (!this.started) this.started = now - this.progress * this.duration * 1000;\n this.progress = ((now - this.started) / (this.duration * 1000)) % 1;\n this.schedule();\n }\n };\n\n private publish(): void {\n this.style.setProperty('--impakt-scene-progress', this.progress.toFixed(4));\n this.dispatchEvent(new CustomEvent('impakt-scene-progress', { detail: { progress: this.progress }, bubbles: true, composed: true }));\n }\n\n private setPaused(paused: boolean): void {\n if (this.paused === paused) return;\n this.paused = paused;\n this.started = 0;\n this.schedule();\n this.requestUpdate();\n }\n\n private togglePause = () => this.setPaused(!this.paused);\n\n /** Stop a loop where it is, as its pause button does. An editor scrubbing the scene calls it. */\n pause(): void {\n this.setPaused(true);\n }\n\n render(): TemplateResult {\n const loop = this.drive === 'loop';\n const over = this.controls === 'over' && !this.reduced;\n const controls = html`<div class=\"controls\" part=\"controls\">\n <slot name=\"controls\"></slot>\n ${\n loop && !this.reduced\n ? html`<button class=\"pause\" type=\"button\" aria-pressed=${this.paused ? 'true' : 'false'} @click=${this.togglePause}>\n ${this.paused ? say('Play {name}', { name: this.label }) : say('Pause {name}', { name: this.label })}\n </button>`\n : nothing\n }\n </div>`;\n const stage = html`<div class=\"stage\" part=\"stage\"><slot name=\"stage\"></slot>${over ? controls : nothing}</div>`;\n return html`\n <div class=\"frame\" part=\"frame\" role=\"region\" aria-label=${this.label}>\n ${\n this.layout === 'split'\n ? html`<div class=\"content\" part=\"content\"><slot></slot></div>${stage}`\n : html`${stage}<div class=\"content\" part=\"content\"><slot></slot></div>`\n }\n </div>\n ${over ? nothing : controls}\n `;\n }\n}\n\ncustomElements.define('impakt-scene', ImpaktScene);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-scene': ImpaktScene;\n }\n}\n", "import { html, css, type TemplateResult } from 'lit';\nimport { say, ImpaktElement, visuallyHidden, fontSize, fontWeight, space, t, token } from '@atomic-ui/ui';\nimport type { ImpaktScene } from './scene';\n\nexport interface ScrubberStop {\n /** Where the stop sits on the scene's progress, from 0 to 1. */\n at: number;\n label: string;\n /** A short code beside it in the graph look, such as a commit hash. */\n meta?: string;\n /** A line under the code in the graph look, such as a commit message. */\n note?: string;\n /**\n * The colour of the line up to this stop, in the graph look: a named tone,\n * or 1 to 5 for the brand's chart colours, as a project's phases are drawn.\n */\n tone?: 'brand' | 'accent' | 'info' | 'success' | 'warning' | 'danger' | 1 | 2 | 3 | 4 | 5;\n}\n\nconst TONES = {\n brand: 'var(--impakt-color-brand-default, #1f4ed8)',\n accent: 'var(--impakt-color-accent-default, #c8a15a)',\n info: 'var(--impakt-color-status-info-default, #1f4ed8)',\n success: 'var(--impakt-color-status-success-default, #047857)',\n warning: 'var(--impakt-color-status-warning-default, #b45309)',\n danger: 'var(--impakt-color-status-danger-default, #c8102e)',\n} as const;\n\n/**\n * Drives the scene it sits in, by hand.\n *\n * Place it in an `impakt-scene`'s `controls` slot and set that scene's `drive`\n * to `scrubber`. Dragging moves through the scene; a named stop seeks to it\n * with an eased move rather than a cut, which is what makes the Commit-style\n * \"time travel\" read as travel.\n *\n * **It is a native range input.** A slider built from divs has to recreate\n * arrow keys, Page Up and Down, Home and End, the value announcement and touch\n * handling, and every one of those is a place to get it wrong. The input\n * already does all of it. The stops are buttons beside it, so a keyboard or\n * switch user reaches each named moment in one action instead of nudging a\n * thumb to find it (2.5.7, dragging movements).\n *\n * @category action\n * @icon adjustments-horizontal\n */\nexport class ImpaktScrubber extends ImpaktElement {\n static properties = {\n label: { type: String },\n stops: { type: Array },\n look: { type: String, reflect: true },\n hint: { type: String },\n value: { type: Number, state: true },\n };\n\n /** The slider's accessible name. */\n declare label: string;\n declare stops: ScrubberStop[];\n /**\n * `buttons` lists the stops as buttons under the slider. `graph` draws them\n * as commits on a line that fills in each stop's colour as it is dragged,\n * with the current one's code and note beside it.\n */\n declare look: 'buttons' | 'graph';\n /** A word of help in the graph look, such as \"drag to time-travel\". */\n declare hint: string;\n declare value: number;\n\n private scene: ImpaktScene | null = null;\n\n constructor() {\n super();\n this.label = 'Scene progress';\n this.stops = [];\n this.look = 'buttons';\n this.hint = '';\n this.value = 0;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host {\n display: block;\n width: 100%;\n max-width: 48rem;\n margin-inline: auto;\n }\n .wrap {\n display: grid;\n gap: ${space(2)};\n padding: ${space(3)} ${space(4)};\n border-radius: ${token('radius.xl', '16px')};\n background: ${t.surfaceCard};\n box-shadow: ${token('shadow.lg', '0 10px 15px -3px rgba(0,0,0,.1)')};\n border: 1px solid ${t.border};\n }\n input {\n width: 100%;\n min-height: ${token('target.min', '24px')};\n accent-color: ${t.brand};\n margin: 0;\n }\n .stops {\n position: relative;\n display: flex;\n flex-wrap: wrap;\n gap: ${space(2)};\n list-style: none;\n margin: 0;\n padding: 0;\n }\n button {\n min-height: ${token('target.min', '24px')};\n padding: ${space(1)} ${space(3)};\n border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999));\n border: 1px solid ${t.border};\n background: transparent;\n color: ${t.textMuted};\n font-size: ${fontSize('xs')};\n font-weight: ${fontWeight('medium')};\n cursor: pointer;\n }\n button[aria-current='true'] {\n color: ${t.text};\n border-color: ${t.text};\n }\n .sr-only {\n ${visuallyHidden}\n }\n /* The graph look: the code of where you are, the line of stops, where you are. */\n :host([look='graph']) { max-width: none; }\n .graph { display: grid; grid-template-columns: minmax(8rem, auto) minmax(0, 1fr) auto; gap: ${space(6)}; align-items: center; padding: ${space(4)} ${space(6)}; border-radius: ${token('radius.xl', '16px')}; background: ${t.surfaceCard}; box-shadow: ${token('shadow.lg', '0 10px 15px -3px rgba(0,0,0,.1)')}; border: 1px solid ${t.border}; }\n .mono { font-family: ${t.fontMono}; font-size: ${fontSize('xs')}; letter-spacing: 0.04em; }\n .head { display: grid; gap: 2px; }\n .head .k { color: ${t.textMuted}; text-transform: uppercase; }\n .head .code { font-size: ${fontSize('md')}; color: ${t.text}; }\n .head .note { color: ${t.textMuted}; }\n .line { position: relative; block-size: 48px; }\n .track, .fill { position: absolute; inset-inline: 0; inset-block-start: 14px; block-size: 3px; border-radius: 3px; background: ${t.border}; opacity: 0.5; }\n .fill { opacity: 1; background: none; display: flex; overflow: hidden; }\n .fill span { block-size: 100%; }\n .dot { position: absolute; inset-block-start: 15px; inline-size: 14px; block-size: 14px; translate: -50% -50%; border-radius: 50%; border: 2px solid var(--c); background: ${t.surfaceCard}; padding: 0; min-height: 0; cursor: pointer; }\n .dot[data-passed] { background: var(--c); }\n .dot[aria-current='true'] { inline-size: 24px; block-size: 24px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); }\n .dot-label { position: absolute; inset-block-start: 30px; translate: -50% 0; white-space: nowrap; color: ${t.textMuted}; text-transform: uppercase; pointer-events: none; }\n .dot-label[data-current] { color: ${t.text}; font-weight: ${fontWeight('bold')}; }\n .line input { position: absolute; inset: 0 0 auto; block-size: 30px; opacity: 0; cursor: grab; }\n .line input:focus-visible { opacity: 1; }\n .where { display: grid; gap: ${space(2)}; justify-items: end; }\n .chip { display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(1)} ${space(3)}; border-radius: var(--impakt-radius-pill, calc(var(--impakt-radius-md, 0.5rem) * 9999)); border: 1px solid ${t.border}; color: ${t.text}; text-transform: uppercase; }\n .chip::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--c); }\n .hint { color: ${t.textMuted}; text-transform: uppercase; }\n /* Muted by colour, not opacity, so the code keeps its contrast (1.4.3). */\n .chip .meta { color: ${t.textMuted}; }\n @media (max-width: 48rem) {\n .graph { grid-template-columns: minmax(0, 1fr); }\n .where { justify-items: start; }\n .dot-label:not([data-current]) { display: none; }\n }\n button:focus-visible,\n input:focus-visible {\n outline: none;\n box-shadow: ${token('focus.ring.shadow', '0 0 0 2px #fff, 0 0 0 4px #1a1a1a')};\n }\n `,\n ];\n\n /** @ignore */\n connectedCallback(): void {\n super.connectedCallback();\n this.scene = this.closest('impakt-scene');\n this.scene?.addEventListener('impakt-scene-progress', this.onProgress);\n if (this.scene) this.value = this.scene.progress;\n }\n\n /** @ignore */\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.scene?.removeEventListener('impakt-scene-progress', this.onProgress);\n this.scene = null;\n }\n\n private onProgress = (e: Event) => {\n this.value = (e as CustomEvent<{ progress: number }>).detail.progress;\n };\n\n private onInput = (e: Event) => {\n const v = Number((e.target as HTMLInputElement).value) / 1000;\n this.value = v;\n this.scene?.seek(v);\n };\n\n private goTo(stop: ScrubberStop) {\n this.scene?.seek(stop.at, 600);\n }\n\n /** The stop nearest the current position, which the stop list marks as current. */\n private nearest(): number {\n let best = -1;\n let gap = Infinity;\n this.stops.forEach((s, i) => {\n const d = Math.abs(s.at - this.value);\n if (d < gap) {\n gap = d;\n best = i;\n }\n });\n return best;\n }\n\n private renderGraph(nearestIndex: number, valueText: string): TemplateResult {\n let current = nearestIndex;\n const stops = [...(this.stops ?? [])].sort((a, b) => a.at - b.at);\n // Where you are, among the stops in the order they are drawn.\n current = stops.indexOf(this.stops[current]!);\n const colour = (s: ScrubberStop | undefined) => {\n const tone = s?.tone ?? 'brand';\n return typeof tone === 'number' ? `var(--impakt-color-chart-${tone}, ${TONES.brand})` : (TONES[tone] ?? TONES.brand);\n };\n const now = stops[current] ?? stops[0];\n // The line fills in each stop's colour, from the stop before it to it, as far as the playhead.\n const segments = stops.map((s, i) => {\n const from = i === 0 ? 0 : stops[i - 1]!.at;\n const to = Math.min(s.at, this.value);\n return { width: Math.round(Math.max(0, to - from) * 10000) / 100, c: colour(s) };\n });\n return html`<div class=\"graph\" part=\"wrap\">\n <div class=\"head mono\" aria-hidden=\"true\">\n <span class=\"k\">HEAD</span>\n <span class=\"code\">${now?.meta ?? now?.label ?? ''}</span>\n ${now?.note ? html`<span class=\"note\">${now.note}</span>` : null}\n </div>\n <div class=\"line\">\n <div class=\"track\"></div>\n <div class=\"fill\" aria-hidden=\"true\">${segments.map((g) => html`<span style=${`width:${g.width}%;background:${g.c}`}></span>`)}</div>\n ${stops.map(\n (s, i) => html`\n <button type=\"button\" class=\"dot\" style=${`left:${s.at * 100}%;--c:${colour(s)}`} ?data-passed=${s.at <= this.value + 0.0001} aria-current=${i === current ? 'true' : 'false'} @click=${() => this.goTo(s)}>\n <span class=\"sr-only\">${say('Go to {name}', { name: s.label })}</span>\n </button>\n <span class=\"dot-label mono\" style=${`left:${s.at * 100}%`} ?data-current=${i === current} aria-hidden=\"true\">${s.label}</span>`,\n )}\n <input type=\"range\" min=\"0\" max=\"1000\" step=\"1\" .value=${String(Math.round(this.value * 1000))} aria-label=${this.label} aria-valuetext=${valueText} @input=${this.onInput} />\n </div>\n <div class=\"where\" aria-hidden=\"true\">\n ${now ? html`<span class=\"chip mono\" style=${`--c:${colour(now)}`}>${now.label}${now.meta ? html` <span class=\"meta\">${now.meta}</span>` : null}</span>` : null}\n ${this.hint ? html`<span class=\"hint mono\">${this.hint}</span>` : null}\n </div>\n </div>`;\n }\n\n render(): TemplateResult {\n const current = this.nearest();\n const valueText = current >= 0 ? this.stops[current].label : `${Math.round(this.value * 100)}%`;\n if (this.look === 'graph') return this.renderGraph(current, valueText);\n return html`\n <div class=\"wrap\" part=\"wrap\">\n <input\n type=\"range\"\n min=\"0\"\n max=\"1000\"\n step=\"1\"\n .value=${String(Math.round(this.value * 1000))}\n aria-label=${this.label}\n aria-valuetext=${valueText}\n @input=${this.onInput}\n />\n ${\n this.stops.length\n ? html`<ul class=\"stops\" part=\"stops\">\n ${this.stops.map(\n (s, i) => html`<li>\n <button type=\"button\" aria-current=${i === current ? 'true' : 'false'} @click=${() => this.goTo(s)}>\n <span aria-hidden=\"true\">${s.label}</span><span class=\"sr-only\">${say('Go to {name}', { name: s.label })}</span>\n </button>\n </li>`,\n )}\n </ul>`\n : null\n }\n </div>\n `;\n }\n}\n\ncustomElements.define('impakt-scrubber', ImpaktScrubber);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-scrubber': ImpaktScrubber;\n }\n}\n", "/**\n * Blocks that tell how software was made, in the language software is made\n * in: a release with what it added and removed, services as branches that\n * merge into one product, checks that passed, and a project drawn as a commit\n * graph. They came from building the Impakt site's Commit design in Strata, and\n * they are written for any studio, agency or product team that wants to show\n * its work this way.\n *\n * Every colour is a brand token. A lane's colour is a tone (brand, accent or\n * a status colour), never a hex value, so a partner's brand restyles them.\n */\nimport { css, html, nothing, svg, type TemplateResult } from 'lit';\nimport {\n say,\n ImpaktElement,\n focusRing,\n visuallyHidden,\n fontSize,\n fontWeight,\n space,\n spaceAround,\n t,\n token,\n type,\n iconSvg,\n toneOf,\n TONE,\n type Tone,\n} from '@atomic-ui/ui';\nimport './property';\n\n// The tones (`Tone`, `TONE`, `toneOf`) are shared with `impakt-chip`, so they live in @atomic-ui/ui.\n\n/**\n * Marks an element `shown` once a quarter of it is on screen, so it can draw\n * itself in (the Commit motion spec's branch draw, graph draw and checks run).\n * Where nothing can watch, it is shown at once; what draws in is decided by\n * CSS under `prefers-reduced-motion: no-preference`, so reduced motion never waits.\n */\nfunction revealOnView(el: HTMLElement, onShow?: () => void): () => void {\n const show = () => {\n el.setAttribute('shown', '');\n onShow?.();\n };\n if (typeof IntersectionObserver !== 'function') {\n show();\n return () => undefined;\n }\n const io = new IntersectionObserver(\n (entries) => {\n if (entries.some((e) => e.isIntersecting)) {\n show();\n io.disconnect();\n }\n },\n { threshold: 0.25 },\n );\n io.observe(el);\n return () => io.disconnect();\n}\nconst reduced = () => typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;\n\n/** Code-like labels: a branch name, a version, a hash. The brand has no code face, so the system's is used. */\nconst mono = css`.mono { font-family: ${t.fontMono}; font-size: ${fontSize('xs')}; letter-spacing: 0.04em; }`;\n\nconst heading = (level: number, text: string | TemplateResult, cls: string): TemplateResult => {\n const l = Math.min(Math.max(level || 3, 2), 6);\n switch (l) {\n case 2:\n return html`<h2 class=${cls}>${text}</h2>`;\n case 4:\n return html`<h4 class=${cls}>${text}</h4>`;\n case 5:\n return html`<h5 class=${cls}>${text}</h5>`;\n case 6:\n return html`<h6 class=${cls}>${text}</h6>`;\n default:\n return html`<h3 class=${cls}>${text}</h3>`;\n }\n};\n\nconst words = css`\n .h { margin: 0; color: var(--impakt-heading, ${t.textHeading}); font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; letter-spacing: ${t.trackingTight}; text-wrap: balance; }\n .body { margin: 0; color: inherit; opacity: 0.8; text-wrap: pretty; }\n .meta { margin: 0; color: inherit; opacity: 0.72; text-transform: uppercase; }\n .sr-only { ${visuallyHidden} }\n`;\n\n// \u2500\u2500 Release card \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** One line of what a release changed. */\nexport interface DiffLine {\n id?: string;\n /** Added, taken away, or kept as it was. */\n change: 'added' | 'removed' | 'same';\n text: string;\n}\n\n/**\n * A piece of work told as a release: what it looked like when it started and\n * what shipped, a version line, and a short diff of what it added and took\n * away.\n *\n * With both pictures it is a before-and-after comparison a visitor drags; with\n * one it is a picture. The diff is a list, each line saying \"Added\" or\n * \"Removed\" for a screen reader, since the + and \u2212 are only drawn.\n *\n * @category content\n * @icon git-commit\n */\nexport class ImpaktReleaseCard extends ImpaktElement {\n static properties = {\n label: { type: String },\n heading: { type: String },\n text: { type: String },\n beforeSrc: { type: String, attribute: 'before-src' },\n beforeAlt: { type: String, attribute: 'before-alt' },\n afterSrc: { type: String, attribute: 'after-src' },\n afterAlt: { type: String, attribute: 'after-alt' },\n items: { type: Array },\n href: { type: String },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** A line above the heading, such as \"v1.0 \u00B7 Legal tech \u00B7 Property\". */\n declare label: string;\n declare heading: string;\n declare text: string;\n /** What it started as: a sketch or a wireframe. */\n declare beforeSrc: string;\n declare beforeAlt: string;\n /** What shipped. */\n declare afterSrc: string;\n declare afterAlt: string;\n /** What the release added, took away or kept. */\n declare items: DiffLine[];\n /** Where the heading links to, such as the case study. */\n declare href: string;\n declare headingLevel: 2 | 3 | 4;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.label = '';\n this.heading = '';\n this.text = '';\n this.beforeSrc = '';\n this.beforeAlt = '';\n this.afterSrc = '';\n this.afterAlt = '';\n this.items = [];\n this.href = '';\n this.headingLevel = 3;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n mono,\n words,\n css`\n :host { display: block; }\n article { display: flex; flex-direction: column; gap: ${space(3)}; }\n .media { border-radius: ${t.radiusXl}; overflow: clip; background: ${t.surfaceInset}; }\n .media img { display: block; inline-size: 100%; aspect-ratio: 5 / 3; object-fit: cover; }\n impakt-before-after { display: block; }\n .h { font-size: ${fontSize('3xl')}; }\n .h a { color: inherit; text-decoration: none; }\n .h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }\n .h a:focus-visible { outline: none; box-shadow: ${t.focusShadow}; border-radius: ${t.radiusSm}; }\n ul { list-style: none; margin: ${space(1)} 0 0; padding: 0; display: grid; gap: ${space(1)}; }\n li { display: grid; grid-template-columns: 1.25em minmax(0, 1fr); gap: ${space(2)}; padding: ${space(1)} ${space(3)}; border-radius: ${t.radius}; }\n li[data-change='added'] { background: ${t.successSubtle}; color: ${t.successText}; }\n li[data-change='removed'] { background: ${t.dangerSubtle}; color: ${t.dangerText}; }\n li[data-change='same'] { color: ${t.textMuted}; }\n .sign { font-weight: ${fontWeight('bold')}; }\n `,\n ];\n\n private raf = 0;\n\n /** Sweep the seam, as Commit's release wipe does: off the screenshot on hover, back on leaving. */\n private wipe(to: number): void {\n const ba = this.renderRoot.querySelector('impakt-before-after') as (HTMLElement & { position: number }) | null;\n if (!ba) return;\n cancelAnimationFrame(this.raf);\n if (reduced()) {\n ba.position = to;\n return;\n }\n const from = ba.position ?? SEAM;\n const start = performance.now();\n // cubic-bezier(.65, 0, .35, 1), near enough: an ease-in-out.\n const ease = (k: number) => (k < 0.5 ? 4 * k * k * k : 1 - Math.pow(-2 * k + 2, 3) / 2);\n const step = (now: number) => {\n const k = Math.min(1, (now - start) / 450);\n ba.position = from + (to - from) * ease(k);\n if (k < 1) this.raf = requestAnimationFrame(step);\n };\n this.raf = requestAnimationFrame(step);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n cancelAnimationFrame(this.raf);\n }\n\n render(): TemplateResult {\n const both = this.beforeSrc && this.afterSrc;\n const title = this.href ? html`<a href=${this.href}>${this.heading}</a>` : this.heading;\n const SIGN = { added: '+', removed: '\u2212', same: ' ' } as const;\n const SAID = { added: say('Added'), removed: say('Removed'), same: say('Kept') } as const;\n return html`<article part=\"card\">\n ${\n both\n ? html`<div class=\"media\" @pointerenter=${(e: PointerEvent) => e.pointerType === 'mouse' && this.wipe(0)} @pointerleave=${(e: PointerEvent) => e.pointerType === 'mouse' && this.wipe(SEAM)}><impakt-before-after .position=${SEAM} .beforeSrc=${this.beforeSrc} .beforeAlt=${this.beforeAlt} .afterSrc=${this.afterSrc} .afterAlt=${this.afterAlt} .beforeLabel=${say('Before')} .afterLabel=${say('Shipped')} .label=${say('Compare {name} before and after', { name: this.heading })}></impakt-before-after></div>`\n : this.afterSrc || this.beforeSrc\n ? html`<div class=\"media\"><img src=${this.afterSrc || this.beforeSrc} alt=${this.afterSrc ? this.afterAlt : this.beforeAlt} loading=\"lazy\" /></div>`\n : nothing\n }\n ${this.label ? html`<p class=\"meta mono\">${this.label}</p>` : nothing}\n ${this.heading ? headingWith(this.headingLevel, title) : nothing}\n ${this.text ? html`<p class=\"body\">${this.text}</p>` : nothing}\n ${(this.items ?? []).length ? html`<ul class=\"mono\" part=\"diff\">${this.items.map((line) => html`<li data-change=${line.change}><span class=\"sign\" aria-hidden=\"true\">${SIGN[line.change] ?? ' '}</span><span><span class=\"sr-only\">${SAID[line.change] ?? ''}: </span>${line.text}</span></li>`)}</ul>` : nothing}\n </article>`;\n }\n}\n\n// \u2500\u2500 Release list \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/**\n * One release in a list: a release card's props. `title` is read when there is\n * no `heading`, because that is what a collection's entry carries (ADR 0028).\n */\nexport interface ReleaseItem {\n label?: string;\n heading?: string;\n title?: string;\n text?: string;\n beforeSrc?: string;\n beforeAlt?: string;\n afterSrc?: string;\n afterAlt?: string;\n items?: DiffLine[];\n href?: string;\n}\n\n/**\n * Releases side by side, two to a row: a changelog of case studies.\n *\n * Bind `items` to a collection's entries and the list follows them: a new case\n * study appears here when it is published. The release for the page being\n * read is left out, so a case study's \"more work\" does not offer itself.\n *\n * @category content\n * @icon git-commit\n */\nexport class ImpaktReleaseList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n columns: { type: String, reflect: true },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: ReleaseItem[];\n /** Releases in a row on a wide screen. One on a phone. */\n declare columns: 'one' | 'two' | 'three';\n declare headingLevel: 2 | 3 | 4;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.columns = 'two';\n this.headingLevel = 3;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(12)} ${space(10)}; }\n :host([columns='one']) ul { grid-template-columns: minmax(0, 1fr); }\n :host([columns='three']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }\n @container (max-width: 44rem) { ul, :host([columns='three']) ul { grid-template-columns: minmax(0, 1fr); } }\n `,\n ];\n\n render(): TemplateResult {\n const here = typeof location === 'undefined' ? '' : location.pathname.replace(/\\/$/, '');\n const shown = (this.items ?? []).filter((item) => !item.href || item.href.replace(/\\/$/, '') !== here);\n return html`<ul part=\"list\">${shown.map((item) => {\n const heading = item.heading ?? item.title ?? '';\n return html`<li><impakt-release-card\n .label=${item.label ?? ''} .heading=${heading} .text=${item.text ?? ''} .href=${item.href ?? ''}\n .beforeSrc=${item.beforeSrc ?? ''} .beforeAlt=${item.beforeAlt || say('{name} as a wireframe', { name: heading })}\n .afterSrc=${item.afterSrc ?? ''} .afterAlt=${item.afterAlt || say('{name} as it shipped', { name: heading })}\n .items=${item.items ?? []} .headingLevel=${this.headingLevel}></impakt-release-card></li>`;\n })}</ul>`;\n }\n}\n\n/** Where the seam rests: the wireframe covers the left of the screenshot until it is pointed at. */\nconst SEAM = 42;\n\n/** A heading holding a template, such as a link. */\nfunction headingWith(level: number, content: TemplateResult | string): TemplateResult {\n const l = Math.min(Math.max(level || 3, 2), 6);\n if (l === 2) return html`<h2 class=\"h\">${content}</h2>`;\n if (l === 4) return html`<h4 class=\"h\">${content}</h4>`;\n if (l === 5) return html`<h5 class=\"h\">${content}</h5>`;\n if (l === 6) return html`<h6 class=\"h\">${content}</h6>`;\n return html`<h3 class=\"h\">${content}</h3>`;\n}\n\n// \u2500\u2500 Branch list \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** One branch: a service, a team, a line of work. */\nexport interface Branch {\n id?: string;\n /** A short code-like name, such as \"feature/mobile-apps\". */\n path?: string;\n heading: string;\n text?: string;\n /** A few words below the text, such as the tools it uses. */\n tags?: string[];\n tone?: Tone;\n /** Where the heading links to, such as the service's own page. */\n href?: string;\n}\n\n/**\n * Several lines of work that come together into one: each item branches off a\n * main line on the left and merges back into it, and the line ends in what\n * they make together.\n *\n * The lines are drawn; the items are a list with headings, so a screen reader\n * reads the work, not the drawing.\n *\n * `look=\"mono\"` draws it in thin ink lines with no chart colours: hollow\n * rings for the branches, one filled with the accent for the `current` item,\n * a hairline under each row, the paths in monospace capitals, and the main\n * line ending in a small ink dot beside the `trunk` words. The tags are left\n * out on a phone in that look. Which item is current is also said in words to\n * a screen reader, so it never rests on the colour alone (1.4.1).\n *\n * @category content\n * @icon git-merge\n */\nexport class ImpaktBranchList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n trunk: { type: String },\n look: { type: String, reflect: true },\n current: { type: Number },\n currentText: { type: String, attribute: 'current-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: Branch[];\n /** What the main line ends in, such as \"main \u2190 one team owns the result\". */\n declare trunk: string;\n /** `tones` draws each branch in a chart colour. `mono` draws thin ink lines with hollow rings, as the Noire site does. */\n declare look: 'tones' | 'mono';\n /** The index of the item to mark as current, from 0: its ring is filled with the accent. -1 for none. */\n declare current: number;\n /** What a screen reader hears after the current item's heading, such as \"current\". Set it with `current`, so the mark is not colour alone. */\n declare currentText: string;\n declare headingLevel: 2 | 3 | 4;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.trunk = '';\n this.look = 'tones';\n this.current = -1;\n this.currentText = '';\n this.headingLevel = 3;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n mono,\n words,\n css`\n :host { display: block; container-type: inline-size; --trunk: color-mix(in srgb, currentColor 70%, transparent); }\n ul { list-style: none; margin: 0; padding: 0; position: relative; }\n ul::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 11px; inline-size: 3px; border-radius: 3px; background: var(--trunk); }\n li { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); padding-block: ${space(6)}; }\n .graph { position: relative; }\n .graph svg { position: absolute; inset-block-start: -${space(6)}; inset-inline-start: 0; inline-size: 96px; block-size: calc(100% + ${space(12)}); overflow: visible; }\n .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${space(4)} ${space(10)}; align-items: start; }\n .path { margin: 0 0 ${space(2)}; opacity: 0.72; }\n .h { font-size: ${fontSize('3xl')}; line-height: 1.05; }\n .h a { color: inherit; text-decoration: none; }\n .h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }\n .h a:focus-visible { outline: none; box-shadow: ${t.focusShadow}; border-radius: ${t.radiusSm}; }\n .detail { display: flex; flex-direction: column; gap: ${space(3)}; padding-block-start: ${space(1)}; }\n .tags { margin: 0; opacity: 0.7; text-transform: uppercase; }\n .end { position: relative; display: flex; align-items: center; gap: ${space(3)}; padding-block-start: ${space(4)}; }\n .end::before { content: ''; inline-size: 16px; block-size: 16px; margin-inline-start: 5px; border-radius: 50%; background: currentColor; }\n @container (max-width: 44rem) {\n li { grid-template-columns: 56px minmax(0, 1fr); }\n .graph svg { inline-size: 56px; }\n .row { grid-template-columns: minmax(0, 1fr); }\n .h { font-size: ${fontSize('2xl')}; }\n }\n /* The mono look: thin ink lines, hollow rings, a hairline under each row and monospace capitals. */\n :host([look='mono']) { --trunk: currentColor; --gx: 60px; }\n :host([look='mono']) ul::before { inline-size: 1px; border-radius: 0; }\n :host([look='mono']) .graph svg path { stroke-width: 1.5; }\n :host([look='mono']) .ring { position: absolute; inset-inline-start: calc(var(--gx) - 5px); inset-block-start: calc(-1 * ${space(6)} + 0.43 * (100% + 2 * ${space(6)}) - 5px); inline-size: 10px; block-size: 10px; box-sizing: border-box; border-radius: 50%; border: 1px solid currentColor; background: ${t.surfaceCard}; }\n :host([look='mono']) .ring.current { background: ${token('color.accent.default', '#ffd43b')}; }\n :host([look='mono']) .text { padding-block-end: ${space(6)}; border-block-end: ${t.borderThin} solid ${t.rule}; }\n :host([look='mono']) li { padding-block-end: 0; }\n :host([look='mono']) .path { font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; opacity: 1; color: ${t.textMuted}; }\n :host([look='mono']) .h { font-size: clamp(1.5rem, 4cqi, 2rem); font-weight: ${fontWeight('semibold')}; letter-spacing: -0.03em; }\n :host([look='mono']) .tags { font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; opacity: 1; color: ${t.textMuted}; }\n :host([look='mono']) .body { color: ${t.textMuted}; opacity: 1; }\n :host([look='mono']) .end { font-size: 0.6875rem; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n /* The trunk runs on into its end dot, which sits on the trunk; the words line up with the rows' words. */\n :host([look='mono']) .end::before { flex: none; inline-size: 8px; block-size: 8px; margin-inline: 7.5px calc(96px - 15.5px - ${space(3)}); }\n :host([look='mono']) .end::after { content: ''; position: absolute; inset-block-start: -${space(10)}; inset-inline-start: 11px; inline-size: 1px; block-size: calc(${space(14)} + (100% - ${space(4)}) / 2); background: var(--trunk); }\n /* The last branch rejoins the trunk at the foot of the list, not past it, so nothing runs beyond the end dot. */\n :host([look='mono']) li:last-child .graph svg { block-size: calc(100% + ${space(6)}); }\n @container (max-width: 44rem) {\n /* Set on the list, since a container query cannot restyle the container itself. */\n :host([look='mono']) ul { --gx: 35px; }\n :host([look='mono']) .tags { display: none; }\n :host([look='mono']) .end::before { margin-inline-end: calc(56px - 15.5px - ${space(3)}); }\n }\n @media (forced-colors: active) { :host([look='mono']) .ring.current { background: Highlight; } }\n /* Branch draw: each branch opens down from the trunk, 120 ms after the one above, then its dot pops. */\n @media (prefers-reduced-motion: no-preference) {\n .graph svg { clip-path: inset(0 0 100% 0); transition: clip-path 700ms cubic-bezier(.25, 1, .5, 1) calc(var(--i, 0) * 120ms); }\n .graph circle, .ring { transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform 200ms ease-out calc(var(--i, 0) * 120ms + 500ms); }\n :host([shown]) .graph svg { clip-path: inset(0); }\n :host([shown]) .graph circle, :host([shown]) .ring { transform: scale(1); }\n }\n `,\n ];\n\n private unwatch: () => void = () => undefined;\n connectedCallback(): void {\n super.connectedCallback();\n this.unwatch = revealOnView(this);\n }\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.unwatch();\n }\n\n render(): TemplateResult {\n // Each branch leaves the trunk, swings out to its dot level with the\n // heading, and returns: drawn in a 96-wide box, scaled down on phones.\n // The mono look draws its rings in HTML, so they stay round however tall the row is.\n const mono = this.look === 'mono';\n const branch = (colour: string) => svg`<svg viewBox=\"0 0 96 200\" preserveAspectRatio=\"none\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M12 0 C12 40 60 30 60 70 L60 120 C60 160 12 160 12 200\" fill=\"none\" stroke=${colour} stroke-width=\"3\" vector-effect=\"non-scaling-stroke\" />\n ${mono ? nothing : svg`<circle cx=\"60\" cy=\"86\" r=\"8\" fill=${colour} />`}\n </svg>`;\n return html`<ul part=\"list\">${(this.items ?? []).map((item, i) => {\n const current = i === this.current;\n const words = html`${item.heading}${current && this.currentText ? html`<span class=\"sr-only\"> (${this.currentText})</span>` : nothing}`;\n return html`<li part=\"item\" style=${`--i:${i}`}>\n <div class=\"graph\">${branch(mono ? 'currentColor' : toneOf(item.tone, i))}${mono ? html`<span class=${current ? 'ring current' : 'ring'} aria-hidden=\"true\"></span>` : nothing}</div>\n <div class=\"text\">\n ${item.path ? html`<p class=\"path mono\">${item.path}</p>` : nothing}\n <div class=\"row\">\n ${heading(this.headingLevel, item.href ? html`<a href=${item.href}>${words}</a>` : words, 'h')}\n <div class=\"detail\">\n ${item.text ? html`<p class=\"body\">${item.text}</p>` : nothing}\n ${item.tags?.length ? html`<p class=\"tags mono\">${item.tags.join(' \u00B7 ')}</p>` : nothing}\n </div>\n </div>\n </div>\n </li>`;\n })}</ul>\n ${this.trunk ? html`<p class=\"end mono\" part=\"trunk\">${this.trunk}</p>` : nothing}`;\n }\n}\n\n// \u2500\u2500 Check list \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** One check that passed: a figure and what it measures. */\nexport interface CheckItem {\n id?: string;\n figure: string;\n label: string;\n /** A word at the end of the row, such as \"passed\". */\n status?: string;\n}\n\n/**\n * Proof as a list of passing checks: a large figure, what it measures, and its\n * status, each row ticked. It reads its colours from the band it sits on, so\n * it works on a dark section as well as a light one.\n *\n * @category content\n * @icon list-check\n */\nexport class ImpaktCheckList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n summary: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare items: CheckItem[];\n /** A line above the list, such as \"All 4 checks passed\". */\n declare summary: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.summary = '';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n mono,\n words,\n css`\n :host { display: block; container-type: inline-size; }\n .summary { display: inline-flex; align-items: center; gap: ${space(2)}; margin: 0 0 ${space(6)}; padding: ${space(1)} ${space(3)}; border-radius: ${t.radiusXl}; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); }\n .summary::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${t.success}; }\n /* The rows share one grid, so the figure column fits the widest figure and every row lines up. */\n ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 32px max-content minmax(0, 1fr) auto; column-gap: ${space(6)}; }\n li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; padding-block: ${space(5)}; border-block-end: 1px solid color-mix(in srgb, currentColor 18%, transparent); }\n /* Checks run: each tick pops in, 150 ms after the one above. */\n @media (prefers-reduced-motion: no-preference) {\n .tick { transform: scale(0); transition: transform 600ms cubic-bezier(.34, 1.56, .64, 1) calc(var(--i, 0) * 150ms); }\n :host([shown]) .tick { transform: scale(1); }\n }\n .sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n /* A passed check is a filled disc with a tick cut out of it, as a CI run shows one. */\n .tick { display: inline-flex; align-items: center; justify-content: center; inline-size: 26px; block-size: 26px; border-radius: 50%; background: ${t.success}; color: var(--impakt-color-status-success-on, #fff); }\n .figure { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('bold')}; font-size: ${fontSize('5xl')}; line-height: 1; letter-spacing: ${t.trackingTight}; white-space: nowrap; }\n .label { margin: 0; ${type('xl')} }\n .status { margin: 0; opacity: 0.72; }\n @container (max-width: 40rem) {\n ul { grid-template-columns: 28px minmax(0, 1fr); }\n li { row-gap: ${space(1)}; }\n .label, .status { grid-column: 2; }\n .figure { font-size: ${fontSize('4xl')}; }\n }\n `,\n ];\n\n private unwatch: () => void = () => undefined;\n /** How far each figure has counted up, from 0 to 1, while the checks run. */\n private counted: number[] | null = null;\n connectedCallback(): void {\n super.connectedCallback();\n this.unwatch = revealOnView(this, () => this.run());\n }\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.unwatch();\n }\n\n /** Checks run: each figure counts up over 1200 ms, 150 ms after the one above. */\n private run(): void {\n if (reduced()) return;\n const items = this.items ?? [];\n const start = performance.now();\n const step = (now: number) => {\n this.counted = items.map((_, i) => Math.min(1, Math.max(0, (now - start - i * 150) / 1200)));\n this.requestUpdate();\n if (this.counted.some((k) => k < 1)) requestAnimationFrame(step);\n else this.counted = null;\n };\n requestAnimationFrame(step);\n }\n\n render(): TemplateResult {\n // While counting, the drawn figure is hidden from screen readers and the final one is read instead.\n const shownFigure = (figure: string, i: number) => {\n const k = this.counted?.[i];\n const m = /^(\\d+)(.*)$/.exec(figure);\n if (k === undefined || k >= 1 || !m) return html`${figure}`;\n const eased = 1 - Math.pow(1 - k, 3);\n return html`<span aria-hidden=\"true\">${Math.round(Number(m[1]) * eased)}${m[2]}</span><span class=\"sr-only\">${figure}</span>`;\n };\n return html`${this.summary ? html`<p class=\"summary mono\" part=\"summary\">${this.summary}</p>` : nothing}\n <ul part=\"list\">${(this.items ?? []).map(\n (item, i) => html`<li part=\"item\" style=${`--i:${i}`}>\n <span class=\"tick\" aria-hidden=\"true\">${iconSvg('check', '16px')}</span>\n <p class=\"figure\">${shownFigure(item.figure, i)}</p>\n <p class=\"label\">${item.label}</p>\n ${item.status ? html`<p class=\"status mono\">${item.status}</p>` : html`<span></span>`}\n </li>`,\n )}</ul>`;\n }\n}\n\n// \u2500\u2500 Branch timeline \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** One stretch of work, drawn as a branch off the main line. */\nexport interface TimelineLane {\n id?: string;\n label: string;\n /** Where it starts and ends, in the timeline's units (weeks, say). */\n from: number;\n to: number;\n tone?: Tone;\n}\n\n/** A moment on a lane, such as a demo. */\nexport interface TimelineMark {\n id?: string;\n label: string;\n at: number;\n}\n\n/**\n * A project drawn as a commit graph: a main line along a scale of weeks, each\n * phase branching off it and merging back, moments marked on the way, and a\n * release tag where it ships.\n *\n * It is a picture, so it carries a text alternative that says the same in\n * words: each phase and when it runs. The steps that explain the phases go\n * beside it as their own block.\n *\n * @category content\n * @icon git-branch\n */\nexport class ImpaktBranchTimeline extends ImpaktElement {\n static properties = {\n lanes: { type: Array },\n marks: { type: Array },\n span: { type: Number },\n unit: { type: String },\n every: { type: Number },\n release: { type: String },\n releaseAt: { type: Number, attribute: 'release-at' },\n label: { type: String },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare lanes: TimelineLane[];\n declare marks: TimelineMark[];\n /** How long the whole timeline is, in its units. */\n declare span: number;\n /** The unit's short name on the scale, such as \"wk\". */\n declare unit: string;\n /** How often the scale is labelled. */\n declare every: number;\n /** The tag where it ships, such as \"v1.0 \u00B7 launch\". */\n declare release: string;\n declare releaseAt: number;\n /** What the picture shows, for a screen reader. */\n declare label: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.lanes = [];\n this.marks = [];\n this.span = 20;\n this.unit = '';\n this.every = 2;\n this.release = '';\n this.releaseAt = 0;\n this.label = '';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n spaceAround,\n mono,\n words,\n css`\n :host { display: block; }\n /* On a narrow screen the graph scrolls sideways, so the scroller takes focus and the arrow keys move it (2.1.1). */\n figure { margin: 0; overflow-x: auto; border-radius: ${t.radiusSm}; }\n svg { display: block; inline-size: 100%; min-inline-size: 640px; block-size: auto; overflow: visible; }\n text { font-family: ${t.fontMono}; font-size: 12px; fill: currentColor; }\n .faint { opacity: 0.5; }\n /* A lane's label keeps a band of the page colour around it, so a line crossing it stays legible. */\n .halo { paint-order: stroke; stroke: var(--impakt-color-surface-card, #fff); stroke-width: 5px; stroke-linejoin: round; }\n /* Graph draw: the graph opens left to right, so each demo appears as the line reaches it. */\n @media (prefers-reduced-motion: no-preference) {\n svg { clip-path: inset(0 100% 0 0); transition: clip-path 1400ms cubic-bezier(.25, 1, .5, 1); }\n :host([shown]) svg { clip-path: inset(0 -40px 0 0); }\n }\n `,\n ];\n\n private unwatch: () => void = () => undefined;\n connectedCallback(): void {\n super.connectedCallback();\n this.unwatch = revealOnView(this);\n }\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.unwatch();\n }\n\n render(): TemplateResult {\n const W = 1200;\n const left = 24;\n const right = W - 60;\n const span = this.span > 0 ? this.span : 20;\n const x = (v: number) => left + (Math.min(Math.max(v, 0), span) / span) * (right - left);\n const lanes = this.lanes ?? [];\n const rowH = 52;\n const H = 40 + (lanes.length + 1) * rowH + 40;\n const mainY = 40;\n const laneY = (i: number) => mainY + (i + 1) * rowH;\n const ticks: number[] = [];\n for (let v = 0; v <= span; v += Math.max(1, this.every || 2)) ticks.push(v);\n const laneOf = (at: number) => lanes.findIndex((l) => at >= l.from && at <= l.to);\n // A lane's label goes under it, out of the way of the curves, unless its marks are labelled there.\n const marked = (i: number) => (this.marks ?? []).some((m) => laneOf(m.at) === i);\n const unit = this.unit || say('wk');\n const label = this.label || say('Project timeline');\n const described = lanes.map((l) => `${l.label}: ${say('{unit} {from} to {to}', { unit, from: l.from, to: l.to })}`).join('; ');\n return html`<figure part=\"figure\" tabindex=\"0\">\n <svg viewBox=\"0 0 ${W} ${H}\" role=\"img\" aria-label=${`${label}. ${described}${this.release ? `. ${say('{name} at {unit} {at}', { name: this.release, unit, at: this.releaseAt })}` : ''}`}>\n <line x1=${left} y1=${mainY} x2=${right + 40} y2=${mainY} stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" />\n <path d=\"M${right + 28} ${mainY - 7} L${right + 40} ${mainY} L${right + 28} ${mainY + 7}\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" />\n ${lanes.map((l, i) => {\n const c = toneOf(l.tone, i);\n const y = laneY(i);\n const a = x(l.from);\n const b = x(l.to);\n const bend = Math.min(36, (b - a) / 3);\n return svg`<g>\n <path d=\"M${a} ${mainY} C${a} ${(mainY + y) / 2} ${a + bend} ${y} ${a + bend * 1.6} ${y} L${b - bend * 1.6} ${y} C${b - bend} ${y} ${b} ${(mainY + y) / 2} ${b} ${mainY}\" fill=\"none\" stroke=${c} stroke-width=\"3\" />\n <circle cx=${a} cy=${mainY} r=\"7\" fill=${c} />\n <text x=${a + bend * 1.6} y=${marked(i) ? y - 10 : y + 20} class=\"halo\" style=${`fill:${c}`}>${l.label}</text>\n </g>`;\n })}\n ${(this.marks ?? []).map((m) => {\n const i = laneOf(m.at);\n const y = i >= 0 ? laneY(i) : mainY;\n const c = i >= 0 ? toneOf(lanes[i]!.tone, i) : 'currentColor';\n return svg`<g><circle cx=${x(m.at)} cy=${y} r=\"6\" fill=\"var(--impakt-color-surface-card, #fff)\" stroke=${c} stroke-width=\"3\" /><text x=${x(m.at)} y=${y + 22} text-anchor=\"middle\" class=\"faint\">${m.label}</text></g>`;\n })}\n ${\n this.release\n ? svg`<g>\n <circle cx=${x(this.releaseAt)} cy=${mainY} r=\"10\" fill=${TONE.success} />\n <rect x=${x(this.releaseAt) - 8} y=${mainY - 36} rx=\"4\" width=${this.release.length * 7.6 + 16} height=\"22\" fill=${TONE.success} />\n <text x=${x(this.releaseAt)} y=${mainY - 21} style=\"fill:var(--impakt-color-surface-card, #fff)\">${this.release}</text>\n </g>`\n : nothing\n }\n ${ticks.map((v) => svg`<text x=${x(v)} y=${H - 10} text-anchor=\"middle\" class=\"faint\">${unit} ${v}</text>`)}\n </svg>\n </figure>`;\n }\n}\n\ncustomElements.define('impakt-release-card', ImpaktReleaseCard);\ncustomElements.define('impakt-release-list', ImpaktReleaseList);\ncustomElements.define('impakt-branch-list', ImpaktBranchList);\ncustomElements.define('impakt-check-list', ImpaktCheckList);\ncustomElements.define('impakt-branch-timeline', ImpaktBranchTimeline);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-release-card': ImpaktReleaseCard;\n 'impakt-release-list': ImpaktReleaseList;\n 'impakt-branch-list': ImpaktBranchList;\n 'impakt-check-list': ImpaktCheckList;\n 'impakt-branch-timeline': ImpaktBranchTimeline;\n }\n}\n", "/**\n * The G2 Noire site blocks: the stage tag and section head every section starts\n * with, the service card, the cursors and hand notes on the hero, the facts,\n * numbered and column lists, and the office card.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement, focusRing, fontWeight, say, space, spaceAround, t } from '@atomic-ui/ui';\nimport { accent, accentOn, accentOnInk, ink, inkLine, inkMuted, inkRaised, levelOf, monoLabel, pad, paper } from './g2-shared';\n\n/** The five stages of a project, as the stage tags name them. */\nexport type StageName = 'note' | 'wireframe' | 'component' | 'code' | 'live';\n\n/** Each stage's number, phase and name, in English; `say` puts them in the page's language. */\nexport const STAGE_WORDS: Record<StageName, readonly [string, string, string]> = {\n note: ['01', 'Discover', 'Note'],\n wireframe: ['02', 'Design low-fi', 'Wireframe'],\n component: ['03', 'Design hi-fi', 'Component'],\n code: ['04', 'Build', 'Code'],\n live: ['05', 'Launch', 'Live'],\n};\n\n/**\n * A small square mono tag that says which stage of a project a section shows,\n * such as \"01 Discover Note\": the number in the accent, the phase in paper and\n * the stage's name quieter, on ink.\n *\n * Set `stage` for one of the five stages, or `index`, `phase` and `label` for\n * your own words; each one set wins over the stage's. On an ink band, set\n * `on-ink`: the tag is raised off the band with a line round it.\n *\n * **It is decoration.** The section's heading says what the section is, so the\n * tag is hidden from a screen reader unless `announce` is set (1.3.1). The tag\n * stays ink in both themes, so the yellow on it stays readable (1.4.3).\n *\n * @category content\n * @icon tag\n */\nexport class ImpaktStageTag extends ImpaktElement {\n static properties = {\n stage: { type: String, reflect: true },\n index: { type: String },\n phase: { type: String },\n label: { type: String },\n onInk: { type: Boolean, reflect: true, attribute: 'on-ink' },\n announce: { type: Boolean },\n };\n /** One of the five stages, which fills in the words. Leave empty to give them yourself. */\n declare stage: StageName | '';\n /** The number, such as \"01\". */\n declare index: string;\n /** The phase, such as \"Discover\". */\n declare phase: string;\n /** The stage's name, such as \"Note\". */\n declare label: string;\n /** Raise the tag off an ink band, with a line round it. */\n declare onInk: boolean;\n /** Let a screen reader read the tag. Leave off when the heading beside it says the same. */\n declare announce: boolean;\n\n constructor() {\n super();\n this.stage = '';\n this.index = '';\n this.phase = '';\n this.label = '';\n this.onInk = false;\n this.announce = false;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: inline-block; vertical-align: middle; }\n .tag { display: inline-flex; align-items: baseline; gap: 0.6em; padding: 6px 10px; background: ${ink}; border: 1px solid ${ink}; ${monoLabel}; font-size: 0.75rem; font-weight: ${fontWeight('medium')}; white-space: nowrap; }\n :host([on-ink]) .tag { background: ${inkRaised}; border-color: ${inkLine}; }\n .index { color: ${accentOnInk}; }\n .phase { color: ${paper}; }\n .label { color: ${inkMuted}; }\n @media (prefers-color-scheme: dark) { .tag { border-color: ${inkLine}; } }\n @media (forced-colors: active) { .tag { border-color: CanvasText; } .index, .phase, .label { color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const words = this.stage && this.stage in STAGE_WORDS ? STAGE_WORDS[this.stage] : undefined;\n const index = this.index || words?.[0] || '';\n const phase = this.phase || (words ? say(words[1]) : '');\n const label = this.label || (words ? say(words[2]) : '');\n if (!index && !phase && !label) return html``;\n return html`<span class=\"tag\" part=\"tag\" aria-hidden=${this.announce ? nothing : 'true'}\n >${index ? html`<span class=\"index\" part=\"index\">${index}</span>` : nothing}${phase ? html`<span class=\"phase\" part=\"phase\">${phase}</span>` : nothing}${\n label ? html`<span class=\"label\" part=\"label\">${label}</span>` : nothing\n }</span\n >`;\n }\n}\n\n/**\n * The head of a section: a mono label such as \"# Services\" with an optional\n * stage tag on the right, then a display heading and a lead.\n *\n * `size` sets the heading: `xl` (120px) for a page's hero, `l` (64px), and `m`\n * (52px) for a section. Give the heading as `heading`, or in the `heading` slot\n * when part of it is picked out with `impakt-highlight` or an accent word. The\n * lead goes under the heading, or with `lead-position=\"side\"` at the foot of a\n * 340px column on the right. The `aside` slot holds a picture on the right,\n * such as a journey object at 448 by 288.\n *\n * **One heading, at the level the page needs.** `level` is 1 for a page's hero\n * and 2 for a section (1.3.1, 2.4.6). The \"#\" before the label is decoration.\n *\n * **It stacks in a narrow column**, measured against its own width: the label\n * row, the heading, the lead and the aside, in reading order (1.4.10). It takes\n * its colours from the band it is on, so it reads on paper, ink and accent.\n *\n * @category layout\n * @icon heading\n * @role heading\n * @slot heading - The heading, when it holds more than words, such as an `impakt-highlight`. Replaces `heading`.\n * @slot lead - The lead, when it holds more than words. Replaces `lead`.\n * @slot tag - Something on the right of the label row, in place of the stage tag.\n * @slot aside - A picture on the right of the heading, such as a journey object.\n */\nexport class ImpaktSectionHead extends ImpaktElement {\n static properties = {\n label: { type: String },\n heading: { type: String },\n lead: { type: String },\n size: { type: String, reflect: true },\n level: { type: Number, reflect: true },\n leadPosition: { type: String, reflect: true, attribute: 'lead-position' },\n stage: { type: String },\n stageOnInk: { type: Boolean, attribute: 'stage-on-ink' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The mono label above the heading, such as \"Services\". A \"#\" is drawn before it. */\n declare label: string;\n declare heading: string;\n /** A sentence or two about the section. */\n declare lead: string;\n /** How large the heading is: `xl` 120px, `l` 64px, `m` 52px. */\n declare size: 'xl' | 'l' | 'm';\n /** The heading's level: 1 for a page's hero, 2 for a section. */\n declare level: 1 | 2;\n /** Where the lead goes: under the heading, or at the foot of a column on the right. */\n declare leadPosition: 'below' | 'side';\n /** A stage tag on the right of the label row. Leave empty for none. */\n declare stage: StageName | '';\n /** Draw the stage tag for an ink band. */\n declare stageOnInk: boolean;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.label = '';\n this.heading = '';\n this.lead = '';\n this.size = 'm';\n this.level = 2;\n this.leadPosition = 'below';\n this.stage = '';\n this.stageOnInk = false;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n spaceAround,\n css`\n :host { display: block; container-type: inline-size; color: ${t.text}; }\n .top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: ${space(2)} ${space(4)}; min-block-size: 29px; }\n /* The label row in G2 Mono M: IBM Plex Mono 13px at 1.5 (14:728). */\n .label { margin: 0; font-family: ${t.fontMono}; font-size: var(--impakt-type-mono-m-size, 0.8125rem); line-height: var(--impakt-type-mono-m-line-height, 1.5); color: ${t.textMuted}; }\n .body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: ${space(10)}; row-gap: ${space(6)}; align-items: end; margin-block-start: ${space(6)}; }\n .heading { margin: 0; font-family: ${t.fontHeading}; font-weight: ${fontWeight('semibold')}; color: var(--impakt-color-text-heading, ${t.text}); text-wrap: balance; overflow-wrap: anywhere; }\n :host([size='m']) .heading { font-size: clamp(2.25rem, 1.2rem + 4cqi, 3.25rem); line-height: 1; letter-spacing: -0.04em; max-inline-size: 11.5em; }\n :host([size='l']) .heading { font-size: clamp(2.5rem, 1.2rem + 5cqi, 4rem); line-height: 1; letter-spacing: -0.04em; max-inline-size: 11.5em; }\n /* Display XL: 120px on a 1080px column and 52px on a 350px phone column, line height 1 and -5% (9:303, 14:734). */\n :host([size='xl']) .heading { font-size: clamp(3.25rem, 1.2128rem + 9.315cqi, 7.5rem); line-height: var(--impakt-type-display-xl-line-height, 1); letter-spacing: var(--impakt-type-display-xl-tracking, -0.05em); }\n .lead { margin: ${space(5)} 0 0; max-inline-size: 36rem; font-size: 1rem; line-height: 1.55; color: ${t.textMuted}; }\n .side { display: grid; gap: ${space(6)}; justify-items: end; }\n /* Beside a picture in the aside, such as the journey button, the heading sits level with the middle of it. */\n .body.aside { align-items: center; }\n .side .lead { margin: 0; max-inline-size: 340px; inline-size: 340px; }\n .side:not(:has(.lead)) { align-self: center; }\n ::slotted([slot='aside']) { display: block; max-inline-size: 100%; }\n @container (max-width: 47.99rem) {\n .body { grid-template-columns: minmax(0, 1fr); }\n .side { justify-items: stretch; }\n .side .lead { inline-size: auto; }\n }\n `,\n ];\n\n render(): TemplateResult {\n const lead = html`<p class=\"lead\" part=\"lead\"><slot name=\"lead\">${this.lead}</slot></p>`;\n const showLead = Boolean(this.lead) || this.hasSlot('lead');\n const inner = html`<slot name=\"heading\">${this.heading}</slot>`;\n const heading = Number(this.level) === 1 ? html`<h1 class=\"heading\" part=\"heading\">${inner}</h1>` : html`<h2 class=\"heading\" part=\"heading\">${inner}</h2>`;\n const side = this.leadPosition === 'side';\n return html`<header part=\"head\">\n <div class=\"top\">\n ${this.label ? html`<p class=\"label\" part=\"label\"><span aria-hidden=\"true\"># </span>${this.label}</p>` : html`<span></span>`}\n <slot name=\"tag\">${this.stage ? html`<impakt-stage-tag stage=${this.stage} ?on-ink=${this.stageOnInk}></impakt-stage-tag>` : nothing}</slot>\n </div>\n <div class=${this.hasSlot('aside') ? 'body aside' : 'body'}>\n <div class=\"main\">${heading}${showLead && !side ? lead : nothing}</div>\n <div class=\"side\">${showLead && side ? lead : nothing}<slot name=\"aside\"></slot></div>\n </div>\n </header>`;\n }\n\n /** Whether a child is in the named slot. On a server, where there are no children, only the attribute counts. */\n private hasSlot(name: string): boolean {\n const children = (this as unknown as { children?: HTMLCollection }).children;\n if (!children) return false;\n return Array.from(children).some((c) => c.getAttribute('slot') === name);\n }\n}\n\n/**\n * A service on the services grid: a number and a dot at the top, then at the\n * foot its name, a line about it, mono tags such as \"React Native \u00B7 Expo\" and\n * \"Learn more\".\n *\n * **The card is one link.** The link is on the service's name, a heading, and\n * stretched over the card (2.4.4, 2.5.8). The number, dot and \"Learn more\"\n * line are decoration. Pointing at the card and focusing it look the same: it\n * turns to ink with paper words and the dot and \"Learn more\" in the accent,\n * which holds 4.5:1 on ink, and the focus ring is drawn round it (2.4.7).\n *\n * `featured` draws a card inked all the time, as it is when pointed at, for\n * the one service a page picks out or a sheet that shows the state.\n *\n * Put cards in a four-column grid with a 10px gap. On a phone the words sit at\n * the top and the card is as tall as they are.\n *\n * @category content\n * @icon card\n */\nexport class ImpaktServiceCard extends ImpaktElement {\n static properties = {\n number: { type: String },\n heading: { type: String },\n text: { type: String },\n tags: { type: String },\n href: { type: String },\n linkText: { type: String, attribute: 'link-text' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n featured: { type: Boolean, reflect: true },\n };\n /** The number at the top, such as \"01\". */\n declare number: string;\n /** The service's name. */\n declare heading: string;\n /** A line about it. */\n declare text: string;\n /** What it uses or includes, such as \"React Native \u00B7 Expo \u00B7 Store launch\". Set in mono capitals. */\n declare tags: string;\n /** Where the card goes. Leave empty for a card that goes nowhere. */\n declare href: string;\n /** The line at the foot of a card that goes somewhere. */\n declare linkText: string;\n declare headingLevel: number;\n /** Draw the card inked, as when it is pointed at. */\n declare featured: boolean;\n\n constructor() {\n super();\n this.featured = false;\n this.number = '';\n this.heading = '';\n this.text = '';\n this.tags = '';\n this.href = '';\n this.linkText = 'Learn more';\n this.headingLevel = 3;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; block-size: 100%; }\n article { position: relative; box-sizing: border-box; block-size: 100%; min-block-size: 330px; display: flex; flex-direction: column; justify-content: space-between; gap: ${space(6)}; padding: ${space(6)}; background: ${t.surfaceCard}; color: ${t.text}; border: 1px solid ${t.text}; transition: background-color 140ms ease-out, color 140ms ease-out; }\n .top { display: flex; align-items: center; justify-content: space-between; }\n .number { font-family: ${t.fontMono}; font-size: 0.75rem; letter-spacing: 0.06em; }\n .dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: currentColor; }\n .foot { display: grid; gap: ${space(3)}; }\n .heading { margin: 0; font-family: ${t.fontHeading}; font-size: 1.5rem; font-weight: ${fontWeight('semibold')}; line-height: 1.15; letter-spacing: -0.02em; }\n .heading a { color: inherit; text-decoration: none; }\n .heading a::after { content: ''; position: absolute; inset: 0; }\n .heading a:focus-visible { outline: none; }\n .heading a:focus-visible::after { box-shadow: ${t.focusShadow}; }\n .text { margin: 0; font-size: 0.9375rem; line-height: 1.5; color: ${t.textMuted}; }\n .tags { margin: ${space(1)} 0 0; ${monoLabel}; color: ${t.textMuted}; }\n .more { margin-block-start: ${space(2)}; ${monoLabel}; font-weight: ${fontWeight('medium')}; }\n article:has(a):hover, article:focus-within, :host([featured]) article { background: ${ink}; color: ${paper}; border-color: ${ink}; }\n article:has(a):hover :is(.text, .tags), article:focus-within :is(.text, .tags), :host([featured]) :is(.text, .tags) { color: ${inkMuted}; }\n article:has(a):hover :is(.dot, .more), article:focus-within :is(.dot, .more), :host([featured]) :is(.dot, .more) { color: ${accentOnInk}; }\n @media (max-width: 47.99rem) { article { min-block-size: 0; justify-content: flex-start; } }\n @media (forced-colors: active) { article { border-color: CanvasText; } .dot { background: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const level = levelOf(this.headingLevel);\n return html`<article part=\"card\">\n <div class=\"top\" aria-hidden=\"true\">\n <span class=\"number\" part=\"number\">${this.number}</span>\n <span class=\"dot\" part=\"dot\"></span>\n </div>\n <div class=\"foot\">\n <div class=\"heading\" part=\"heading\" role=\"heading\" aria-level=${level}>\n ${this.href ? html`<a href=${this.href} part=\"link\">${this.heading}</a>` : this.heading}\n </div>\n ${this.text ? html`<p class=\"text\" part=\"text\">${this.text}</p>` : nothing}\n ${this.tags ? html`<p class=\"tags\" part=\"tags\">${this.tags}</p>` : nothing}\n ${this.href && this.linkText ? html`<span class=\"more\" part=\"more\" aria-hidden=\"true\">${this.linkText} \u2192</span>` : nothing}\n </div>\n </article>`;\n }\n}\n\n/**\n * A pointer with a name beside it, as if someone were working on the page with\n * you: the cursors round a hero's heading.\n *\n * The name is on ink, outlined, or on the accent. With `drift` it moves a few\n * pixels to and fro, slowly; it stays still for anyone who asks for less\n * motion (2.3.3), and it never moves more than 5 seconds without a way to stop\n * it mattering, because it carries nothing (2.2.2).\n *\n * **It is decoration**, hidden from a screen reader (1.3.1).\n *\n * @category media\n * @icon pointer\n */\nexport class ImpaktCursor extends ImpaktElement {\n static properties = {\n name: { type: String },\n variant: { type: String, reflect: true },\n drift: { type: Boolean, reflect: true },\n };\n /** The name beside the pointer, such as \"Client\". */\n declare name: string;\n /** How the name is drawn: on ink, outlined, or on the accent. */\n declare variant: 'ink' | 'outline' | 'accent';\n /** Move slowly to and fro. Still for anyone who asks for less motion. */\n declare drift: boolean;\n\n constructor() {\n super();\n this.name = '';\n this.variant = 'ink';\n this.drift = false;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: inline-block; position: relative; pointer-events: none; }\n .cursor { display: inline-flex; align-items: flex-start; }\n svg { display: block; flex: none; }\n .arrow { fill: ${ink}; stroke: ${paper}; }\n .name { margin: 16px 0 0 -2px; padding: 4px 7px; ${monoLabel}; font-weight: ${fontWeight('medium')}; white-space: nowrap; background: ${ink}; color: ${paper}; border: 1px solid ${ink}; }\n :host([variant='outline']) .name { background: ${t.surfaceCard}; color: ${t.text}; border-color: ${t.text}; }\n :host([variant='accent']) .name { background: ${accent}; color: ${accentOn}; border-color: ${accentOn}; }\n :host([drift]) .cursor { animation: drift 7s ease-in-out infinite alternate; }\n @keyframes drift { 0% { transform: translate(0, 0); } 50% { transform: translate(6px, -3px); } 100% { transform: translate(-3px, 4px); } }\n @media (prefers-reduced-motion: reduce) { :host([drift]) .cursor { animation: none; } }\n @media (forced-colors: active) { .arrow { fill: CanvasText; stroke: Canvas; } .name { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<span class=\"cursor\" part=\"cursor\" aria-hidden=\"true\">\n <svg viewBox=\"0 0 16 22\" width=\"16\" height=\"22\" focusable=\"false\"><path class=\"arrow\" d=\"M1.5 1.5v16.2l4.3-4.1 3 6.6 2.6-1.2-3-6.5h6z\" stroke-width=\"1.25\" stroke-linejoin=\"round\" /></svg>\n ${this.name ? html`<span class=\"name\" part=\"name\">${this.name}</span>` : nothing}\n </span>`;\n }\n}\n\n/**\n * A short note in handwriting, with an arrow if it points at something, such\n * as \"keep scrolling, this note becomes the real button.\"\n *\n * The face is `--impakt-font-family-hand` (Kalam in the G2 designs), and the\n * body face until a brand sets it. The note is real text and is read, unless\n * `decorative` is set because it repeats something said elsewhere (1.3.1).\n * The arrow is always decoration.\n *\n * @category content\n * @icon pen\n * @slot - The note, when it holds more than words. Replaces `text`.\n */\nexport class ImpaktHandNote extends ImpaktElement {\n static properties = {\n text: { type: String },\n arrow: { type: String, reflect: true },\n decorative: { type: Boolean, reflect: true },\n };\n /** The note. */\n declare text: string;\n /** Where an arrow points from the note. */\n declare arrow: 'none' | 'left' | 'right' | 'down' | 'up';\n /** Hide the note from a screen reader, when it repeats something said elsewhere. */\n declare decorative: boolean;\n\n constructor() {\n super();\n this.text = '';\n this.arrow = 'none';\n this.decorative = false;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: inline-block; max-inline-size: 18rem; }\n .note { display: inline-flex; align-items: center; gap: ${space(2)}; }\n :host(:is([arrow='down'], [arrow='up'])) .note { flex-direction: column; align-items: flex-start; }\n :host(:is([arrow='left'], [arrow='up'])) svg { order: -1; }\n p { margin: 0; font-family: var(--impakt-font-family-hand, ${t.fontBody}); font-size: 1.25rem; line-height: 1.2; color: ${t.textMuted}; }\n svg { flex: none; color: ${t.textMuted}; }\n :host([arrow='left']) svg { transform: scaleX(-1); }\n :host([arrow='down']) svg { transform: rotate(90deg); }\n :host([arrow='up']) svg { transform: rotate(-90deg); }\n @media (forced-colors: active) { p, svg { color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const arrow =\n this.arrow && this.arrow !== 'none'\n ? html`<svg viewBox=\"0 0 40 24\" width=\"40\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M2 16c8-10 20-12 34-6M30 4l6 6-7 4\" /></svg>`\n : nothing;\n return html`<div class=\"note\" part=\"note\" aria-hidden=${this.decorative ? 'true' : nothing}><p part=\"text\"><slot>${this.text}</slot></p>${arrow}</div>`;\n }\n}\n\n/** One fact: a label and its value. */\nexport interface FactItem {\n /** What it is, such as \"Client\". Set in mono capitals. */\n label: string;\n /** The fact, such as \"Vehicle importer \u00B7 UK \u2192 Cyprus\". */\n value: string;\n /** Make the value a link, such as `mailto:` for an email address. */\n href?: string;\n /** This value's size, in place of the block's. */\n size?: 'sm' | 'md' | 'lg' | 'xl';\n}\n\n/**\n * A few facts, each a mono label over its value: a case study's client, role,\n * platform and stack in four columns under an ink rule, or contact details\n * stacked with the email set large.\n *\n * A description list, so each value is read with its label (1.3.1). Columns\n * wrap to fit their width, so they stack on a phone (1.4.10).\n *\n * @category content\n * @icon list\n */\nexport class ImpaktFacts extends ImpaktElement {\n static properties = {\n items: { type: Array },\n layout: { type: String, reflect: true },\n size: { type: String, reflect: true },\n label: { type: String },\n };\n /** The facts, in order. */\n declare items: FactItem[];\n /** Side by side under a rule each, or stacked. */\n declare layout: 'columns' | 'stacked';\n /** The values' size: `sm` 16px, `md` 18px, `lg` 24px, `xl` 32px. An item can set its own. */\n declare size: 'sm' | 'md' | 'lg' | 'xl';\n /** A name for the list, for a screen reader. Leave empty for none. */\n declare label: string;\n\n constructor() {\n super();\n this.items = [];\n this.layout = 'columns';\n this.size = 'md';\n this.label = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; color: ${t.text}; }\n dl { margin: 0; display: grid; gap: ${space(5)}; }\n :host([layout='columns']) dl { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); column-gap: ${space(5)}; row-gap: ${space(6)}; }\n :host([layout='columns']) .fact { border-block-start: 1px solid ${t.text}; padding-block-start: ${space(4)}; }\n dt { ${monoLabel}; color: ${t.textMuted}; }\n dd { margin: ${space(2)} 0 0; font-family: ${t.fontBody}; line-height: 1.3; overflow-wrap: anywhere; }\n :host([layout='columns']) dd { margin-block-start: ${space(3)}; }\n .sm { font-size: 1rem; }\n .md { font-size: 1.125rem; }\n .lg { font-size: 1.5rem; letter-spacing: -0.01em; }\n .xl { font-size: clamp(1.5rem, 1rem + 2vw, 2rem); letter-spacing: -0.02em; }\n a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }\n a:hover { text-decoration-thickness: 2px; }\n @media (forced-colors: active) { :host([layout='columns']) .fact { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n if (!this.items.length) return html``;\n return html`<dl part=\"list\" aria-label=${this.label || nothing}>\n ${this.items.map(\n (item) => html`<div class=\"fact\" part=\"fact\">\n <dt part=\"label\">${item.label}</dt>\n <dd part=\"value\" class=${item.size ?? this.size}>${item.href ? html`<a href=${item.href}>${item.value}</a>` : item.value}</dd>\n </div>`,\n )}\n </dl>`;\n }\n}\n\n/** One row of a numbered list. */\nexport interface NumberedItem {\n heading: string;\n text?: string;\n}\n\n/**\n * A numbered list under an ink rule, each row split by a hairline: the number,\n * a heading and a line of quieter text in three columns. \"Three rules we don't\n * break\", the steps of a project, a tool's features.\n *\n * An ordered list, so a screen reader says how many rows there are and which\n * one this is, and the drawn numbers are hidden from it (1.3.1). Each heading\n * is at the level the page asks for. It stacks in a narrow column, measured\n * against its own width (1.4.10), and takes its colours from its band.\n *\n * @category content\n * @icon list-ordered\n */\nexport class ImpaktNumberedList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n start: { type: Number },\n headingLevel: { type: Number, attribute: 'heading-level' },\n label: { type: String },\n };\n declare items: NumberedItem[];\n /** The number the first row is given. */\n declare start: number;\n declare headingLevel: number;\n /** A name for the list, for a screen reader. Leave empty for none. */\n declare label: string;\n\n constructor() {\n super();\n this.items = [];\n this.start = 1;\n this.headingLevel = 3;\n this.label = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; container-type: inline-size; color: ${t.text}; }\n ol { margin: 0; padding: 0; list-style: none; border-block-start: 1px solid ${t.text}; }\n li { display: grid; grid-template-columns: 60px minmax(0, 520fr) minmax(0, 420fr); column-gap: ${space(10)}; align-items: center; padding-block: ${space(6)}; border-block-end: 1px solid ${t.rule}; }\n .n { font-family: ${t.fontMono}; font-size: 0.75rem; letter-spacing: 0.06em; color: ${t.textMuted}; }\n .heading { margin: 0; font-family: ${t.fontHeading}; font-size: clamp(1.5rem, 1rem + 2cqi, 2rem); font-weight: ${fontWeight('semibold')}; line-height: 1.15; letter-spacing: -0.025em; }\n .text { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: ${t.textMuted}; }\n @container (max-width: 47.99rem) {\n li { grid-template-columns: minmax(0, 1fr); row-gap: ${space(2)}; }\n }\n @media (forced-colors: active) { ol { border-color: CanvasText; } li { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n if (!this.items.length) return html``;\n const level = levelOf(this.headingLevel);\n const start = Number.isFinite(Number(this.start)) ? Number(this.start) : 1;\n return html`<ol part=\"list\" role=\"list\" start=${start} aria-label=${this.label || nothing}>\n ${this.items.map(\n (item, i) => html`<li part=\"item\">\n <span class=\"n\" aria-hidden=\"true\">${pad(start + i)}</span>\n <div class=\"heading\" role=\"heading\" aria-level=${level} part=\"heading\">${item.heading}</div>\n ${item.text ? html`<p class=\"text\" part=\"text\">${item.text}</p>` : html`<span></span>`}\n </li>`,\n )}\n </ol>`;\n }\n}\n\n/** One column of a column list. */\nexport interface ColumnListColumn {\n /** The column's heading, such as \"Design\". Set in mono capitals. */\n heading: string;\n /** What is in it, each a line set large. */\n items: string[];\n}\n\n/**\n * What a studio does, in four columns: each under an ink rule, with a mono\n * heading such as \"Engineering\" and a stack of what it covers set large. The\n * items are words, not links.\n *\n * Each column's heading is a heading at the level the page asks for, and its\n * items a list (1.3.1). The columns wrap to fit their width (1.4.10).\n *\n * @category content\n * @icon columns\n */\nexport class ImpaktColumnList extends ImpaktElement {\n static properties = {\n columns: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n };\n declare columns: ColumnListColumn[];\n declare headingLevel: number;\n\n constructor() {\n super();\n this.columns = [];\n this.headingLevel = 3;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; color: ${t.text}; }\n .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: ${space(8)} ${space(5)}; }\n section { border-block-start: 1px solid ${t.text}; padding-block-start: ${space(4)}; }\n .heading { margin: 0; ${monoLabel}; color: ${t.textMuted}; }\n ul { margin: ${space(3)} 0 0; padding: 0; list-style: none; display: grid; gap: ${space(2)}; }\n li { font-family: ${t.fontHeading}; font-size: 1.5rem; font-weight: ${fontWeight('semibold')}; line-height: 1.2; letter-spacing: -0.02em; }\n @media (forced-colors: active) { section { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n if (!this.columns.length) return html``;\n const level = levelOf(this.headingLevel);\n return html`<div class=\"grid\" part=\"grid\">\n ${this.columns.map(\n (col) => html`<section part=\"column\">\n <div class=\"heading\" role=\"heading\" aria-level=${level} part=\"heading\">${col.heading}</div>\n <ul role=\"list\" part=\"list\">${(col.items ?? []).map((item) => html`<li part=\"item\">${item}</li>`)}</ul>\n </section>`,\n )}\n </div>`;\n }\n}\n\n/**\n * An office: a mono line with its time zone and hours, its name set large, the\n * region under it and a line about it, on a white card with an ink border. An\n * accent tag at the top right can say how its hours meet another office's,\n * such as \"+2h \u00B7 same working day\".\n *\n * The name is a heading at the level the page asks for (1.3.1). The tag is\n * text and is read; on a narrow card it moves above the name (1.4.10).\n *\n * @category content\n * @icon map-pin\n */\nexport class ImpaktOfficeCard extends ImpaktElement {\n static properties = {\n hours: { type: String },\n name: { type: String },\n region: { type: String },\n text: { type: String },\n tag: { type: String },\n headingLevel: { type: Number, attribute: 'heading-level' },\n };\n /** The time zone and hours, such as \"GMT \u00B7 Mon\u2013Fri 9\u201318\". */\n declare hours: string;\n /** The office, such as \"UK\". */\n declare name: string;\n /** Where it is, such as \"United Kingdom\". */\n declare region: string;\n /** A line about it. */\n declare text: string;\n /** An accent tag at the top right, such as \"+2h \u00B7 same working day\". Leave empty for none. */\n declare tag: string;\n declare headingLevel: number;\n\n constructor() {\n super();\n this.hours = '';\n this.name = '';\n this.region = '';\n this.text = '';\n this.tag = '';\n this.headingLevel = 3;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; block-size: 100%; container-type: inline-size; }\n article { box-sizing: border-box; block-size: 100%; display: grid; align-content: start; gap: ${space(2)}; padding: ${space(8)}; background: ${t.surfaceCard}; color: ${t.text}; border: 1px solid ${t.text}; }\n .top { display: flex; flex-wrap: wrap-reverse; justify-content: space-between; align-items: center; gap: ${space(2)}; }\n .hours { margin: 0; ${monoLabel}; color: ${t.textMuted}; }\n .tag { margin: 0; padding: 3px 6px; ${monoLabel}; font-weight: ${fontWeight('medium')}; background: ${accent}; color: ${accentOn}; }\n .name { margin: ${space(2)} 0 0; font-family: ${t.fontHeading}; font-size: clamp(2.5rem, 1rem + 10cqi, 4rem); font-weight: ${fontWeight('semibold')}; line-height: 1; letter-spacing: -0.04em; overflow-wrap: anywhere; }\n .region { margin: ${space(2)} 0 0; font-size: 1rem; line-height: 1.4; }\n .text { margin: ${space(2)} 0 0; font-size: 0.9375rem; line-height: 1.5; color: ${t.textMuted}; }\n @container (max-width: 22rem) { article { padding: ${space(5)}; } }\n @media (forced-colors: active) { article { border-color: CanvasText; } .tag { border: 1px solid CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const level = levelOf(this.headingLevel);\n return html`<article part=\"card\">\n ${\n this.hours || this.tag\n ? html`<div class=\"top\">${this.hours ? html`<p class=\"hours\" part=\"hours\">${this.hours}</p>` : html`<span></span>`}${this.tag ? html`<p class=\"tag\" part=\"tag\">${this.tag}</p>` : nothing}</div>`\n : nothing\n }\n <div class=\"name\" role=\"heading\" aria-level=${level} part=\"name\">${this.name}</div>\n ${this.region ? html`<p class=\"region\" part=\"region\">${this.region}</p>` : nothing}\n ${this.text ? html`<p class=\"text\" part=\"text\">${this.text}</p>` : nothing}\n </article>`;\n }\n}\n\ncustomElements.define('impakt-stage-tag', ImpaktStageTag);\ncustomElements.define('impakt-section-head', ImpaktSectionHead);\ncustomElements.define('impakt-service-card', ImpaktServiceCard);\ncustomElements.define('impakt-cursor', ImpaktCursor);\ncustomElements.define('impakt-hand-note', ImpaktHandNote);\ncustomElements.define('impakt-facts', ImpaktFacts);\ncustomElements.define('impakt-numbered-list', ImpaktNumberedList);\ncustomElements.define('impakt-column-list', ImpaktColumnList);\ncustomElements.define('impakt-office-card', ImpaktOfficeCard);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-stage-tag': ImpaktStageTag;\n 'impakt-section-head': ImpaktSectionHead;\n 'impakt-service-card': ImpaktServiceCard;\n 'impakt-cursor': ImpaktCursor;\n 'impakt-hand-note': ImpaktHandNote;\n 'impakt-facts': ImpaktFacts;\n 'impakt-numbered-list': ImpaktNumberedList;\n 'impakt-column-list': ImpaktColumnList;\n 'impakt-office-card': ImpaktOfficeCard;\n }\n}\n", "/**\n * The colours the G2 Noire blocks share.\n *\n * Two kinds. The fixed ink set is for a surface that stays ink in both themes,\n * such as a stage tag or a callout, so the yellow on it stays readable in dark.\n * The band set follows the `impakt-section` band a block sits on: `tone=\"ink\"`\n * sets `--impakt-band` and `--impakt-band-on`, and a block drawn outside any band\n * falls back to the ink values, so it is drawn as an ink panel of its own.\n *\n * Every value is a token with the G2 literal as its fallback, so the theme can\n * take them over without a change here.\n */\nimport { css, unsafeCSS } from 'lit';\nimport { token } from '@atomic-ui/ui';\n\n/** Ink, `#111111`. It does not flip in dark. */\nexport const ink = token('color.ink', '#111111');\n/** Paper, `#EFEFED`: text on ink. */\nexport const paper = token('color.paper', '#EFEFED');\n/** A raised surface on ink, `#1C1C1C`. */\nexport const inkRaised = token('color.ink-raised', '#1C1C1C');\n/** A line on ink, `#2E2E2E`. */\nexport const inkLine = token('color.ink-line', '#2E2E2E');\n/** Quiet text on ink, 7:1 on `#111111`. */\nexport const inkMuted = token('color.ink-muted', '#A8A8A6');\nexport const accent = token('color.accent.default', '#FFD43B');\nexport const accentOn = token('color.accent.on', '#111111');\n/** The accent as a mark on the fixed ink, lifted for a brand whose accent is too dark to read there. */\nexport const accentOnInk = token('color.accent.on-ink', '#FFD43B');\n\n/** The band behind the block. */\nexport const band = unsafeCSS('var(--impakt-band, var(--impakt-color-ink, #111111))');\n/** Text on the band. */\nexport const bandOn = unsafeCSS('var(--impakt-band-on, var(--impakt-color-paper, #EFEFED))');\n/** Quiet text on the band. */\nexport const bandMuted = unsafeCSS('var(--impakt-band-muted, var(--impakt-color-ink-muted, #A8A8A6))');\n/** A tile raised off the band: `#1C1C1C` on an ink band. */\nexport const bandRaised = unsafeCSS(\n 'var(--impakt-color-band-raised, color-mix(in srgb, var(--impakt-band-on, #EFEFED) 6%, var(--impakt-band, var(--impakt-color-ink, #111111))))',\n);\n/** A line on the band: `#2E2E2E` on an ink band. */\nexport const bandLine = unsafeCSS(\n 'var(--impakt-color-band-line, color-mix(in srgb, var(--impakt-band-on, #EFEFED) 16%, var(--impakt-band, var(--impakt-color-ink, #111111))))',\n);\n\n/** Small uppercase mono, the G2 label: 11px, +6% tracking. */\nexport const monoLabel = css`\n font-family: var(--impakt-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);\n font-size: 0.6875rem;\n font-weight: 400;\n line-height: 1.4;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n`;\n\n/** The level a heading is given, kept between 1 and 6. */\nexport const levelOf = (n: number | undefined, fallback = 3): number => Math.min(Math.max(Number(n) || fallback, 1), 6);\n\n/** \"1\" \u2192 \"01\". */\nexport const pad = (n: number): string => String(n).padStart(2, '0');\n", "/**\n * The G2 Noire blocks for a case study and the studio's process: the process\n * line, the week strip, the \"how might we\" callout, the hypothesis card and the\n * browser frame a product screenshot sits in.\n */\nimport { css, html, nothing, svg, type TemplateResult } from 'lit';\nimport { ImpaktElement, fontWeight, say, space, t, visuallyHidden } from '@atomic-ui/ui';\nimport { accent, accentOn, accentOnInk, band, bandLine, bandMuted, bandOn, bandRaised, ink, inkLine, levelOf, monoLabel, paper } from './g2-shared';\n\n/** One point on the process line. */\nexport interface ProcessNode {\n /** What happens here, such as \"Discovery\". */\n label: string;\n /** How far the line dips here: 0 on the main line, 1 a step below, 2 two steps. */\n depth?: number;\n /** The point the project is at now, filled in the accent. */\n current?: boolean;\n /** A flag above the point, such as \"Build merged\" or \"v1.0 launch\". */\n flag?: string;\n}\n\nconst STEP = 40;\nconst TOP = 72;\n\n/**\n * A project's process drawn as one main line that dips to a different depth\n * for each phase, like a branch in version control: hollow rings for each\n * point, the current one filled in the accent, a mono label by each (above a\n * point on the main line, below one that dips) and accent flags such as\n * \"Build merged\" and \"v1.0 launch\". A flag on the main line stands in for\n * its point's label there.\n *\n * **The drawing is decoration; the list is the content.** A screen reader\n * meets an ordered list of the points, in order, with their flags and the\n * current one marked as the current step (1.1.1, 1.3.1). On a narrow column,\n * measured against its own width, the same list is drawn as a vertical rail\n * and the drawing is not shown, so nothing is lost at 320px (1.4.10).\n *\n * It is drawn for an ink band and takes the band's colours; outside one it\n * draws its own ink panel. The current point keeps a ring in the band's text\n * colour, so it is not told by its colour alone (1.4.1, 1.4.11).\n *\n * @category content\n * @icon git-commit\n */\nexport class ImpaktProcessLine extends ImpaktElement {\n static properties = {\n nodes: { type: Array },\n lineLabel: { type: String, attribute: 'line-label' },\n label: { type: String },\n };\n /** The points, left to right. */\n declare nodes: ProcessNode[];\n /** A label at the start of the line, such as \"main\". */\n declare lineLabel: string;\n /** A name for the list, for a screen reader, such as \"How a project runs\". */\n declare label: string;\n\n constructor() {\n super();\n this.nodes = [];\n this.lineLabel = '';\n this.label = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; container-type: inline-size; background: ${band}; color: ${bandOn}; }\n .visual { display: none; position: relative; }\n .visual svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; overflow: visible; }\n .visual path { fill: none; stroke: ${bandOn}; stroke-width: 1.5; vector-effect: non-scaling-stroke; }\n .ring { position: absolute; inline-size: 10px; block-size: 10px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid ${bandOn}; background: ${band}; transform: translate(-50%, -50%); }\n .ring.current { inline-size: 12px; block-size: 12px; background: ${accent}; }\n /* Each label keeps to the space between its point and the next, wrapping rather than running into its neighbour. */\n .vlabel { position: absolute; transform: translateX(-50%); ${monoLabel}; color: ${bandMuted}; inline-size: max-content; max-inline-size: var(--slot); text-align: center; text-wrap: balance; }\n .lineLabel { position: absolute; inset-inline-start: 0; ${monoLabel}; color: ${bandMuted}; }\n .flag { display: inline-block; padding: 4px 8px; ${monoLabel}; font-weight: ${fontWeight('medium')}; background: ${accent}; color: ${accentOn}; white-space: nowrap; }\n .visual .flag { position: absolute; transform: translate(-50%, -100%); }\n\n ol { margin: 0; padding: ${space(6)} ${space(4)}; list-style: none; }\n li { position: relative; padding: 0 0 ${space(5)} 28px; }\n li::before { content: ''; position: absolute; inset-inline-start: 0; inset-block-start: 4px; inline-size: 10px; block-size: 10px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid ${bandOn}; background: ${band}; }\n li[aria-current]::before { background: ${accent}; }\n li:not(:last-child)::after { content: ''; position: absolute; inset-inline-start: 4.25px; inset-block-start: 14px; inset-block-end: -4px; inline-size: 1.5px; background: ${bandOn}; }\n .rlabel { ${monoLabel}; font-size: 0.75rem; color: ${bandOn}; }\n li .flag { margin-inline-start: ${space(2)}; }\n\n @container (min-width: 60rem) {\n .visual { display: block; }\n ol { ${visuallyHidden} }\n }\n @media (forced-colors: active) {\n .visual path { stroke: CanvasText; }\n .ring, li::before { border-color: CanvasText; background: Canvas; }\n .ring.current, li[aria-current]::before { background: Highlight; }\n li::after { background: CanvasText; }\n .flag { border: 1px solid CanvasText; }\n }\n `,\n ];\n\n render(): TemplateResult {\n const nodes = this.nodes ?? [];\n if (!nodes.length) return html``;\n const n = nodes.length;\n const depthOf = (node: ProcessNode) => Math.max(0, Math.min(4, Number(node.depth) || 0));\n const maxDepth = Math.max(...nodes.map(depthOf));\n const height = TOP + maxDepth * STEP + 44;\n const pts = nodes.map((node, i) => ({ x: ((i + 0.5) / n) * 1000, y: TOP + depthOf(node) * STEP }));\n let d = `M0 ${pts[0]!.y} L${pts[0]!.x} ${pts[0]!.y}`;\n for (let i = 1; i < n; i++) {\n const a = pts[i - 1]!;\n const b = pts[i]!;\n if (a.y === b.y) d += ` L${b.x} ${b.y}`;\n else {\n const mid = (a.x + b.x) / 2;\n d += ` C${mid} ${a.y} ${mid} ${b.y} ${b.x} ${b.y}`;\n }\n }\n d += ` L1000 ${pts[n - 1]!.y}`;\n const pct = (i: number) => `${((i + 0.5) / n) * 100}%`;\n return html`<div class=\"visual\" part=\"drawing\" aria-hidden=\"true\" style=\"block-size:${height}px;--slot:calc(${100 / n}% - 0.5rem)\">\n <svg viewBox=\"0 0 1000 ${height}\" preserveAspectRatio=\"none\" focusable=\"false\">${svg`<path d=${d} />`}</svg>\n ${this.lineLabel ? html`<span class=\"lineLabel\" style=\"inset-block-start:${TOP - 64}px\">${this.lineLabel}</span>` : nothing}\n ${nodes.map((node, i) => {\n const y = pts[i]!.y;\n // On the main line the label sits above the point, clear of the curves that leave it; a\n // flag there stands in for it. Below the main line the label hangs under the point.\n const onMain = depthOf(node) === 0;\n const label = onMain\n ? node.flag\n ? nothing\n : html`<span class=\"vlabel\" style=\"inset-inline-start:${pct(i)};inset-block-end:${height - y + 12}px\">${node.label}</span>`\n : html`<span class=\"vlabel\" style=\"inset-inline-start:${pct(i)};inset-block-start:${y + 14}px\">${node.label}</span>`;\n return html`<span class=\"ring ${node.current ? 'current' : ''}\" style=\"inset-inline-start:${pct(i)};inset-block-start:${y}px\"></span>\n ${label}\n ${node.flag ? html`<span class=\"flag\" style=\"inset-inline-start:${pct(i)};inset-block-start:${y - 12}px\">${node.flag}</span>` : nothing}`;\n })}\n </div>\n <ol part=\"list\" role=\"list\" aria-label=${this.label || nothing}>\n ${nodes.map(\n (node) => html`<li part=\"item\" aria-current=${node.current ? 'step' : nothing}>\n <span class=\"rlabel\">${node.label}</span>${node.flag ? html`<span class=\"flag\">${node.flag}</span>` : nothing}\n </li>`,\n )}\n </ol>`;\n }\n}\n\n/** One day of the week strip. */\nexport interface WeekDay {\n /** The day, such as \"Mon\". Set in mono capitals. */\n day: string;\n /** What happens, such as \"Plan\". */\n heading: string;\n /** A line about it. */\n text?: string;\n /** Pick this day out in the accent, such as the demo. */\n highlight?: boolean;\n}\n\n/**\n * A working week in five tiles, such as Mon Plan, Tue Make, Wed Review, Thu\n * Make and Fri Demo: a mono day, a heading and a line, on tiles raised off an\n * ink band, with one day picked out in the accent.\n *\n * A list, each heading at the level the page asks for (1.3.1). The accent day\n * is also the only one with ink words, and its heading says what it is, so it\n * is not told by colour alone (1.4.1). The tiles wrap on a narrow screen\n * (1.4.10).\n *\n * @category content\n * @icon calendar\n */\nexport class ImpaktWeekStrip extends ImpaktElement {\n static properties = {\n days: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n label: { type: String },\n };\n declare days: WeekDay[];\n declare headingLevel: number;\n /** A name for the list, for a screen reader. Leave empty for none. */\n declare label: string;\n\n constructor() {\n super();\n this.days = [];\n this.headingLevel = 3;\n this.label = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; }\n ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr)); gap: 10px; }\n li { box-sizing: border-box; min-block-size: 150px; padding: ${space(5)}; background: ${bandRaised}; border: 1px solid ${bandLine}; color: ${bandOn}; }\n li.highlight { background: ${accent}; border-color: ${accent}; color: ${accentOn}; }\n .day { margin: 0; ${monoLabel}; color: ${bandMuted}; }\n .heading { margin: ${space(2)} 0 0; font-family: ${t.fontHeading}; font-size: 2rem; font-weight: ${fontWeight('semibold')}; line-height: 1.1; letter-spacing: -0.03em; }\n .text { margin: ${space(3)} 0 0; font-size: 0.875rem; line-height: 1.45; color: ${bandMuted}; }\n li.highlight :is(.day, .text) { color: ${accentOn}; }\n @media (forced-colors: active) { li, li.highlight { border-color: CanvasText; } li.highlight { border-width: 3px; } }\n `,\n ];\n\n render(): TemplateResult {\n if (!this.days?.length) return html``;\n const level = levelOf(this.headingLevel);\n return html`<ol part=\"list\" role=\"list\" aria-label=${this.label || nothing}>\n ${this.days.map(\n (day) => html`<li part=\"day\" class=${day.highlight ? 'highlight' : ''}>\n <p class=\"day\">${day.day}</p>\n <div class=\"heading\" role=\"heading\" aria-level=${level}>${day.heading}</div>\n ${day.text ? html`<p class=\"text\">${day.text}</p>` : nothing}\n </li>`,\n )}\n </ol>`;\n }\n}\n\n/**\n * A statement set apart on an ink panel, under a mono accent label: the \"How\n * might we\" of a case study.\n *\n * The panel stays ink in both themes, so the accent label on it keeps its\n * contrast (1.4.3). The label and statement are plain text, read in order.\n *\n * @category content\n * @icon quote\n * @slot - The statement, when it holds more than words. Replaces `text`.\n */\nexport class ImpaktCallout extends ImpaktElement {\n static properties = {\n label: { type: String },\n text: { type: String },\n };\n /** The label above, such as \"How might we\". */\n declare label: string;\n /** The statement. */\n declare text: string;\n\n constructor() {\n super();\n this.label = '';\n this.text = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; }\n .panel { padding: ${space(8)} ${space(8)} ${space(10)}; background: ${ink}; color: ${paper}; border: 1px solid ${ink}; }\n .label { margin: 0 0 ${space(4)}; ${monoLabel}; font-weight: ${fontWeight('medium')}; color: ${accentOnInk}; }\n .text { margin: 0; max-inline-size: 26em; font-family: ${t.fontHeading}; font-size: clamp(1.5rem, 1rem + 2vw, 2rem); font-weight: ${fontWeight('semibold')}; line-height: 1.2; letter-spacing: -0.02em; }\n @media (prefers-color-scheme: dark) { .panel { border-color: ${inkLine}; } }\n @media (max-width: 30rem) { .panel { padding: ${space(6)}; } }\n @media (forced-colors: active) { .panel { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"panel\" part=\"panel\">\n ${this.label ? html`<p class=\"label\" part=\"label\">${this.label}</p>` : nothing}\n <p class=\"text\" part=\"text\"><slot>${this.text}</slot></p>\n </div>`;\n }\n}\n\n/**\n * A hypothesis to test: its number such as \"H1\", how much it matters, a\n * statement, and the metric that will tell, on a white card with an ink border.\n * Lay six out two to a row.\n *\n * `impact` draws the tag: \"High impact\" on the accent, \"Medium impact\" and\n * \"Low impact\" outlined in ink. The tag says the impact in words, so it is not\n * told by its colour (1.4.1).\n *\n * @category content\n * @icon flask\n */\nexport class ImpaktHypothesisCard extends ImpaktElement {\n static properties = {\n number: { type: String },\n statement: { type: String },\n metric: { type: String },\n impact: { type: String, reflect: true },\n impactLabel: { type: String, attribute: 'impact-label' },\n };\n /** The hypothesis's number, such as \"H1\". */\n declare number: string;\n /** What the team believes, such as \"A jobs board grouped by stage shows stuck cars faster than a shared spreadsheet.\" */\n declare statement: string;\n /** What will be measured, such as \"Time a car waits unnoticed\". */\n declare metric: string;\n /** How much it matters. Leave empty for no tag. */\n declare impact: 'high' | 'medium' | 'low' | '';\n /** The tag's words, in place of the impact's own. */\n declare impactLabel: string;\n\n constructor() {\n super();\n this.number = '';\n this.statement = '';\n this.metric = '';\n this.impact = '';\n this.impactLabel = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; block-size: 100%; }\n article { box-sizing: border-box; block-size: 100%; display: grid; align-content: start; gap: ${space(4)}; padding: ${space(6)}; background: ${t.surfaceCard}; color: ${t.text}; border: 1px solid ${t.text}; }\n .top { display: flex; justify-content: space-between; align-items: center; gap: ${space(2)}; flex-wrap: wrap; min-block-size: 22px; }\n .number { font-family: ${t.fontMono}; font-size: 0.75rem; letter-spacing: 0.06em; }\n .impact { margin: 0; padding: 3px 7px; ${monoLabel}; font-weight: ${fontWeight('medium')}; border: 1px solid ${t.text}; color: ${t.text}; }\n :host([impact='high']) .impact { background: ${accent}; color: ${accentOn}; border-color: ${accentOn}; }\n .statement { margin: 0; font-family: ${t.fontHeading}; font-size: 1.25rem; line-height: 1.35; letter-spacing: -0.01em; }\n .metric { margin: 0; ${monoLabel}; color: ${t.textMuted}; }\n @media (forced-colors: active) { article, .impact { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const words: Record<string, string> = { high: 'High impact', medium: 'Medium impact', low: 'Low impact' };\n const impact = this.impactLabel || (this.impact && words[this.impact] ? say(words[this.impact]!) : '');\n return html`<article part=\"card\">\n ${\n this.number || impact\n ? html`<div class=\"top\">\n <span class=\"number\" part=\"number\">${this.number}</span>\n ${impact ? html`<p class=\"impact\" part=\"impact\">${impact}</p>` : nothing}\n </div>`\n : nothing\n }\n ${this.statement ? html`<p class=\"statement\" part=\"statement\">${this.statement}</p>` : nothing}\n ${this.metric ? html`<p class=\"metric\" part=\"metric\">${say('Metric')} \u00B7 ${this.metric}</p>` : nothing}\n </article>`;\n }\n}\n\n/**\n * A window frame for a product screenshot on an ink band: a 40px bar with\n * three dots, the first in the accent, and a mono caption, over a canvas that\n * holds the picture. With no picture in it, the canvas shows a grid, as a\n * placeholder.\n *\n * **The frame is decoration; the picture carries the words.** Give the image\n * its own `alt`. The bar is hidden from a screen reader (1.1.1).\n *\n * @category media\n * @icon browser\n * @slot - The picture, such as an `<img>` with its `alt`.\n */\nexport class ImpaktBrowserFrame extends ImpaktElement {\n static properties = {\n caption: { type: String },\n ratio: { type: String },\n filled: { state: true },\n };\n /** The caption in the bar, such as \"Harbour \u00B7 Cover\". It is decoration. */\n declare caption: string;\n /** The canvas's shape while it is empty, as a CSS aspect ratio. */\n declare ratio: string;\n declare protected filled: boolean;\n\n constructor() {\n super();\n this.caption = '';\n this.ratio = '16 / 9';\n this.filled = false;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; }\n .frame { border: 1px solid ${bandLine}; background: ${band}; color: ${bandOn}; }\n .bar { display: flex; align-items: center; gap: 6px; block-size: 40px; padding-inline: ${space(3)}; background: ${bandRaised}; border-block-end: 1px solid ${bandLine}; overflow: hidden; }\n .dot { flex: none; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${bandLine}; }\n .dot:first-child { background: ${accent}; }\n .caption { margin-inline-start: ${space(1.5)}; ${monoLabel}; color: ${bandMuted}; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .canvas { position: relative; }\n .canvas.empty { background-image: linear-gradient(to right, ${bandLine} 1px, transparent 1px), linear-gradient(to bottom, ${bandLine} 1px, transparent 1px); background-size: 28px 28px; }\n ::slotted(img), ::slotted(picture), ::slotted(video) { display: block; inline-size: 100%; block-size: auto; }\n @media (forced-colors: active) { .frame, .bar { border-color: CanvasText; } .dot { background: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`<div class=\"frame\" part=\"frame\">\n <div class=\"bar\" part=\"bar\" aria-hidden=\"true\">\n <span class=\"dot\"></span><span class=\"dot\"></span><span class=\"dot\"></span>\n ${this.caption ? html`<span class=\"caption\" part=\"caption\">${this.caption}</span>` : nothing}\n </div>\n <div class=\"canvas ${this.filled ? '' : 'empty'}\" part=\"canvas\" style=${this.filled ? '' : `aspect-ratio: ${this.ratio || '16 / 9'}`}>\n <slot @slotchange=${this.onSlot}></slot>\n </div>\n </div>`;\n }\n\n private onSlot(e: Event): void {\n this.filled = (e.target as HTMLSlotElement).assignedElements().length > 0;\n }\n}\n\ncustomElements.define('impakt-process-line', ImpaktProcessLine);\ncustomElements.define('impakt-week-strip', ImpaktWeekStrip);\ncustomElements.define('impakt-callout', ImpaktCallout);\ncustomElements.define('impakt-hypothesis-card', ImpaktHypothesisCard);\ncustomElements.define('impakt-browser-frame', ImpaktBrowserFrame);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-process-line': ImpaktProcessLine;\n 'impakt-week-strip': ImpaktWeekStrip;\n 'impakt-callout': ImpaktCallout;\n 'impakt-hypothesis-card': ImpaktHypothesisCard;\n 'impakt-browser-frame': ImpaktBrowserFrame;\n }\n}\n", "/**\n * The G2 Noire blocks for the AI tools pages: the flow that shows how a tool\n * works, or how a visitor gets from one page to the next.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement, fontWeight, space, t } from '@atomic-ui/ui';\nimport { accent, accentOn, bandLine, bandMuted, bandOn, bandRaised, ink, inkLine, inkMuted, levelOf, monoLabel, paper } from './g2-shared';\n\n/** One step of a flow. */\nexport interface FlowStep {\n /** A mono label, such as \"01 \u00B7 Model\". */\n label?: string;\n /** What happens, such as \"Reads and drafts\". */\n heading: string;\n /** A line about it. */\n text?: string;\n /** The box: white with an ink border, soft, ink, or the accent. */\n tone?: 'card' | 'soft' | 'ink' | 'accent';\n /** Words on the arrow that leads to this step, such as \"back\". */\n connector?: string;\n}\n\n/**\n * Steps in a row joined by arrows: how a tool works (\"Reads and drafts\",\n * \"Checks every answer\", \"Makes the call\"), or the pages a visitor passes\n * through. Each box has a tone, a mono label, a heading and a line; an arrow\n * can carry words such as \"back\".\n *\n * **An ordered list.** A screen reader meets the steps in order, each heading\n * at the level the page asks for; the arrows are decoration, and words on an\n * arrow are read before the step they lead to (1.3.1). In a narrow column,\n * measured against its own width, the steps stack and the arrows point down\n * (1.4.10).\n *\n * On an ink band, set `on-ink`: white boxes become tiles raised off the band.\n * The ink and accent boxes keep their colours in both themes, so their words\n * keep their contrast (1.4.3).\n *\n * @category content\n * @icon flow\n */\nexport class ImpaktFlow extends ImpaktElement {\n static properties = {\n steps: { type: Array },\n size: { type: String, reflect: true },\n onInk: { type: Boolean, reflect: true, attribute: 'on-ink' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n label: { type: String },\n };\n declare steps: FlowStep[];\n /** The headings' size: `md` 18px for a flow of pages, `lg` 32px for how a tool works. */\n declare size: 'md' | 'lg';\n /** Draw white boxes as tiles raised off an ink band. */\n declare onInk: boolean;\n declare headingLevel: number;\n /** A name for the list, for a screen reader. Leave empty for none. */\n declare label: string;\n\n constructor() {\n super();\n this.steps = [];\n this.size = 'md';\n this.onInk = false;\n this.headingLevel = 3;\n this.label = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: block; container-type: inline-size; }\n ol { margin: 0; padding: 0; list-style: none; display: flex; align-items: stretch; }\n li { flex: 1 1 0; min-inline-size: 0; display: flex; align-items: stretch; }\n li:not(:first-child) { flex-basis: 56px; }\n .arrow { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; inline-size: 56px; color: ${t.text}; }\n :host([on-ink]) .arrow { color: ${bandOn}; }\n .arrow svg { display: block; }\n .via { font-size: 0.75rem; line-height: 1.2; color: ${t.textMuted}; }\n :host([on-ink]) .via { color: ${bandMuted}; }\n .box { flex: 1 1 auto; min-inline-size: 0; box-sizing: border-box; padding: ${space(4)} ${space(5)}; border: 1px solid ${t.text}; background: ${t.surfaceCard}; color: ${t.text}; }\n :host([size='lg']) .box { padding: ${space(6)}; }\n .box.soft { background: ${t.surfaceSubtle}; }\n :host([on-ink]) .box.card, :host([on-ink]) .box.soft { background: ${bandRaised}; border-color: ${bandLine}; color: ${bandOn}; }\n .box.ink { background: ${ink}; border-color: ${inkLine}; color: ${paper}; }\n .box.accent { background: ${accent}; border-color: ${accent}; color: ${accentOn}; }\n .label { margin: 0 0 ${space(2)}; ${monoLabel}; color: ${t.textMuted}; }\n .text { margin: ${space(2)} 0 0; font-size: 0.875rem; line-height: 1.5; color: ${t.textMuted}; }\n /* On the soft fill the muted words are drawn a step toward the ink, so they read at 4.5:1 for a brand whose soft fill is its own tint. */\n .soft :is(.label, .text) { color: color-mix(in srgb, ${t.textMuted} 80%, ${t.text}); }\n :host([on-ink]) :is(.card, .soft) :is(.label, .text) { color: ${bandMuted}; }\n .ink :is(.label, .text) { color: ${inkMuted}; }\n .accent :is(.label, .text) { color: ${accentOn}; }\n .heading { margin: 0; font-family: ${t.fontHeading}; font-size: 1.125rem; font-weight: ${fontWeight('medium')}; line-height: 1.25; letter-spacing: -0.01em; }\n :host([size='lg']) .heading { font-size: clamp(1.5rem, 1rem + 2cqi, 2rem); font-weight: ${fontWeight('semibold')}; line-height: 1.1; letter-spacing: -0.03em; }\n @container (max-width: 47.99rem) {\n ol, li { flex-direction: column; }\n .arrow { inline-size: auto; block-size: 48px; flex-direction: row; }\n .arrow svg { transform: rotate(90deg); }\n }\n @media (forced-colors: active) { .box { border-color: CanvasText; } .accent { border-width: 3px; } }\n `,\n ];\n\n render(): TemplateResult {\n if (!this.steps?.length) return html``;\n const level = levelOf(this.headingLevel);\n return html`<ol part=\"list\" role=\"list\" aria-label=${this.label || nothing}>\n ${this.steps.map(\n (step, i) => html`<li part=\"step\">\n ${\n i > 0\n ? html`<span class=\"arrow\" part=\"arrow\">\n <svg viewBox=\"0 0 36 12\" width=\"36\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.25\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M0 6h34M29 1l5 5-5 5\" /></svg>\n ${step.connector ? html`<span class=\"via\">${step.connector}</span>` : nothing}\n </span>`\n : nothing\n }\n <div class=\"box ${step.tone ?? 'card'}\" part=\"box\">\n ${step.label ? html`<p class=\"label\">${step.label}</p>` : nothing}\n <div class=\"heading\" role=\"heading\" aria-level=${level}>${step.heading}</div>\n ${step.text ? html`<p class=\"text\">${step.text}</p>` : nothing}\n </div>\n </li>`,\n )}\n </ol>`;\n }\n}\n\ncustomElements.define('impakt-flow', ImpaktFlow);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-flow': ImpaktFlow;\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAUA,MAAO,iBCVP,OAAS,OAAAA,GAAK,QAAAC,EAAM,WAAAC,OAAoC,iBACxD,OAAS,iBAAAC,GAAe,YAAAC,GAAU,cAAAC,GAAY,cAAAC,GAAY,SAAAC,E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I,EAAK,SAAS,UAAYD,EAAO;AAAA,uBAE7EA,EACN;AAAA,4BACkBC,EAAK,MAAQ,MAAM;AAAA,cACjCA,EAAK,MAAQJ,sBAAwBI,EAAK,KAAK,OAASD,EAAO;AAAA,6DAChBF,CAAK,IAAIG,EAAK,OAAO;AAAA,cACpEA,EAAK,KAAOJ,qBAAuBI,EAAK,IAAI,OAASD,EAAO;AAAA;AAAA,cAGpE,CAAC;AAAA,UAEL,CACF,EAEA,eAAe,OAAO,cAAepB,EAAU",
|
|
6
|
+
"names": ["css", "html", "nothing", "ImpaktElement", "fontSize", "fontWeight", "lineHeight", "space", "spaceAround", "t", "token", "type", "iconSvg", "heading", "level", "text", "cls", "headingStyles", "ImpaktHero", "pictured", "ImpaktFeatureList", "numbered", "item", "index", "ImpaktQuote", "ImpaktStat", "ImpaktAnnouncement", "ImpaktSearchBar", "event", "data", "values", "value", "key", "field", "i", "id", "choices", "o", "c", "css", "html", "nothing", "ImpaktElement", "focusRing", "fontSize", "fontWeight", "lineHeight", "space", "spaceAround", "t", "iconSvg", "ImpaktCardGrid", "card", "css", "html", "nothing", "unsafeCSS", "ImpaktElement", "focusRing", "fontWeight", "say", "space", "t", "token", "JOURNEY_STAGES", "isStage", "value", "indexOf", "stage", "arrow", "pointer", "move", "name", "ms", "easing", "JOURNEY_MOVES", "P", "GAPS", "gapName", "i", "registered", "register", "api", "_", "cubicBezier", "x1", "y1", "x2", "y2", "at", "a", "b", "x", "lo", "hi", "v", "moveBetween", "w", "k", "toNote", "live", "over", "ImpaktJourneyButton", "changed", "view", "frame", "prop", "sections", "el", "entries", "section", "e", "timeline", "m", "overflowY", "fallback", "numbers", "middle", "tops", "stages", "top", "gaps", "g", "first", "terms", "list", "f", "s", "stageAt", "next", "span", "eased", "p", "lines", "line", "captions", "specs", "spec", "said", "words", "css", "html", "nothing", "ImpaktElement", "focusRing", "fontSize", "fontWeight", "lineHeight", "lockScroll", "space", "spaceAround", "t", "token", "unlockScroll", "arrow", "ImpaktWorkList", "event", "item", "box", "texts", "columns", "number", "name", "rest", "items", "preview", "index", "side", "ImpaktStatRow", "ImpaktFaq", "headingId", "level", "head", "accordion", "ImpaktSiteMenu", "changed", "dialog", "link", "current", "worded", "ImpaktOffer", "point", "ImpaktPostCard", "ImpaktHighlight", "css", "html", "nothing", "say", "ImpaktElement", "focusRing", "targetSize", "visuallyHidden", "fontWeight", "lineHeight", "space", "spaceAround", "t", "token", "type", "iconSvg", "token_accent", "reducedMotion", "roundButton", "headingStyles", "ImpaktCarousel", "track", "first", "width", "gap", "fits", "slide", "slides", "i", "to", "target", "arrived", "nearest", "distance", "d", "event", "held", "changed", "stops", "_", "gallerySpan", "index", "count", "layout", "last", "span", "extra", "ImpaktGallery", "by", "n", "items", "current", "item", "e", "ImpaktLogoCloud", "logo", "ImpaktSteps", "step", "ImpaktMediaSplit", "p", "ImpaktCtaBanner", "stars", "rating", "initials", "name", "w", "ImpaktReviews", "r", "ImpaktNewsletter", "form", "email", "field", "css", "html", "nothing", "say", "pageLocale", "ImpaktElement", "focusRing", "targetSize", "fontWeight", "space", "spaceAround", "t", "type", "iconSvg", "ImpaktSitePlan", "changed", "p", "status", "plot", "name", "monthlyPayment", "loan", "annualRate", "years", "months", "rate", "ImpaktMortgageCalculator", "amount", "key", "event", "deposit", "monthly", "ImpaktBeforeAfter", "e", "ImpaktStickyBar", "shown", "on", "height", "root", "ImpaktLocationCard", "directions", "item", "css", "html", "nothing", "say", "pageLocale", "ImpaktElement", "focusRing", "targetSize", "visuallyHidden", "fontWeight", "space", "spaceAround", "t", "token", "type", "card", "money", "amount", "currency", "digits", "arrow", "ImpaktPlanComparison", "plan", "row", "s", "event", "p", "r", "has", "embedOf", "src", "locale", "yt", "hl", "vimeo", "ImpaktVideo", "embed", "player", "frame", "paragraphs", "NOTICE_WORDS", "ImpaktRegulatoryNotice", "preset", "heading", "text", "SDLT", "taxOn", "price", "bands", "extra", "tax", "band", "i", "top", "stampDuty", "buyer", "calcStyles", "ImpaktStampDutyCalculator", "duty", "rate", "buyers", "e", "value", "label", "ImpaktAffordabilityCalculator", "key", "borrow", "input", "ImpaktContactBlock", "form", "data", "css", "html", "nothing", "unsafeCSS", "ImpaktElement", "pageLocale", "say", "focusRing", "targetSize", "visuallyHidden", "fontSize", "fontWeight", "space", "spaceAround", "t", "token", "type", "toneOf", "sum", "xs", "a", "b", "bandFor", "bands", "cost", "estimate", "questions", "answers", "rules", "chosen", "q", "id", "c", "weeks", "engineers", "phaseWeeks", "phases", "fixed", "p", "rest", "i", "ImpaktEstimator", "ids", "x", "changed", "n", "words", "qs", "best", "r", "one", "thing", "many", "name", "first", "choice", "on", "now", "to", "last", "parts", "picked", "labels", "result", "text", "l", "current", "index", "e", "k", "_", "arrow", "options", "phase", "group", "tip", "total", "done", "scale", "css", "html", "nothing", "ImpaktElement", "focusRing", "hideOn", "fontSize", "fontWeight", "space", "t", "token", "type", "toneOf", "STRIPE", "MONO", "ImpaktSiteHeader", "wordmark", "status", "presence", "person", "ImpaktWordmark", "ImpaktSiteFooter", "text", "level", "log", "line", "i", "column", "link", "html", "css", "nothing", "say", "ImpaktElement", "fontSize", "fontWeight", "space", "t", "token", "clamp", "ImpaktScene", "now", "p", "e", "r", "vh", "doc", "changed", "to", "ms", "paused", "loop", "over", "controls", "stage", "html", "css", "say", "ImpaktElement", "visuallyHidden", "fontSize", "fontWeight", "space", "t", "token", "TONES", "ImpaktScrubber", "v", "stop", "best", "gap", "s", "i", "d", "nearestIndex", "valueText", "current", "stops", "a", "b", "colour", "tone", "now", "segments", "from", "to", "g", "css", "html", "nothing", "svg", "say", "ImpaktElement", "focusRing", "visuallyHidden", "fontSize", "fontWeight", "space", "spaceAround", "t", "token", "type", "iconSvg", "toneOf", "TONE", "revealOnView", "el", "onShow", "show", "io", "entries", "e", "reduced", "mono", "css", "t", "fontSize", "heading", "level", "text", "cls", "html", "words", "fontWeight", "visuallyHidden", "ImpaktReleaseCard", "ImpaktElement", "spaceAround", "space", "to", "ba", "from", "SEAM", "start", "ease", "k", "step", "now", "both", "title", "SIGN", "SAID", "say", "nothing", "headingWith", "line", "ImpaktReleaseList", "here", "shown", "item", "content", "l", "ImpaktBranchList", "token", "branch", "colour", "svg", "i", "current", "toneOf", "ImpaktCheckList", "type", "items", "_", "shownFigure", "figure", "m", "eased", "iconSvg", "ImpaktBranchTimeline", "focusRing", "span", "x", "v", "lanes", "rowH", "H", "mainY", "laneY", "ticks", "laneOf", "at", "marked", "unit", "label", "described", "c", "y", "a", "b", "bend", "TONE", "css", "html", "nothing", "ImpaktElement", "focusRing", "fontWeight", "say", "space", "spaceAround", "t", "css", "unsafeCSS", "token", "ink", "paper", "inkRaised", "inkLine", "inkMuted", "accent", "accentOn", "accentOnInk", "band", "bandOn", "bandMuted", "bandRaised", "bandLine", "monoLabel", "levelOf", "fallback", "pad", "STAGE_WORDS", "ImpaktStageTag", "ImpaktElement", "css", "ink", "monoLabel", "fontWeight", "inkRaised", "inkLine", "accentOnInk", "paper", "inkMuted", "words", "index", "phase", "say", "label", "html", "nothing", "ImpaktSectionHead", "spaceAround", "t", "space", "lead", "showLead", "inner", "heading", "side", "name", "children", "c", "ImpaktServiceCard", "level", "levelOf", "ImpaktCursor", "accent", "accentOn", "ImpaktHandNote", "arrow", "ImpaktFacts", "focusRing", "item", "ImpaktNumberedList", "start", "i", "pad", "ImpaktColumnList", "col", "ImpaktOfficeCard", "css", "html", "nothing", "svg", "ImpaktElement", "fontWeight", "say", "space", "t", "visuallyHidden", "STEP", "TOP", "ImpaktProcessLine", "ImpaktElement", "css", "band", "bandOn", "accent", "monoLabel", "bandMuted", "fontWeight", "accentOn", "space", "visuallyHidden", "nodes", "html", "n", "depthOf", "node", "maxDepth", "height", "pts", "i", "d", "a", "b", "mid", "pct", "svg", "nothing", "y", "label", "ImpaktWeekStrip", "bandRaised", "bandLine", "t", "level", "levelOf", "day", "ImpaktCallout", "ink", "paper", "accentOnInk", "inkLine", "ImpaktHypothesisCard", "words", "impact", "say", "ImpaktBrowserFrame", "e", "css", "html", "nothing", "ImpaktElement", "fontWeight", "space", "t", "ImpaktFlow", "ImpaktElement", "css", "t", "bandOn", "bandMuted", "space", "bandRaised", "bandLine", "ink", "inkLine", "paper", "accent", "accentOn", "monoLabel", "inkMuted", "fontWeight", "html", "level", "levelOf", "nothing", "step", "i"]
|
|
7
7
|
}
|