@atomic-ui/blocks 0.7.2 → 0.9.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.
@@ -1,399 +1,611 @@
1
- /* @atomic-ui/blocks version 0.7.2, standalone. Load atomic-ui.js from @atomic-ui/ui first, from the same folder. */
2
- import"./atomic-ui.js";import{css as ye,html as L,nothing as W}from"./atomic-ui.js";import{ImpaktElement as Q,fontSize as $e,fontWeight as le,lineHeight as Xe,space as g,spaceAround as it,t as w,type as pe,iconSvg as Ve}from"./atomic-ui.js";var Ut=(o,t,e)=>L`<div class=${e} role="heading" aria-level=${o}>${t}</div>`,oi=ye`
3
- .h { margin: 0; color: ${w.textHeading}; font-family: ${w.fontHeading}; font-weight: ${le("bold")}; line-height: ${Xe("tight")}; }
4
- .eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${w.brand})); ${pe("sm")} font-size: var(--impakt-font-size-eyebrow, var(--impakt-font-size-sm, 0.875rem)); font-family: ${w.fontEyebrow}; font-weight: var(--impakt-font-weight-eyebrow, ${le("semibold")}); letter-spacing: ${w.trackingWide}; text-transform: uppercase; }
5
- .body { margin: 0; line-height: ${Xe("normal")}; max-inline-size: 65ch; }
6
- `,Qe=class extends Q{static{this.properties={eyebrow:{type:String},heading:{type:String},lead:{type:String},level:{type:Number,reflect:!0},imageSrc:{type:String,attribute:"image-src"},imageAlt:{type:String,attribute:"image-alt"},treatment:{type:String,reflect:!0},ratingText:{type:String,attribute:"rating-text"},eyebrowIcon:{type:String,attribute:"eyebrow-icon"},align:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.eyebrow="",this.heading="",this.lead="",this.level=1,this.imageSrc="",this.imageAlt="",this.treatment="split",this.ratingText="",this.eyebrowIcon="none",this.align="start",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...Q.styles,it,oi,ye`
1
+ /* @atomic-ui/blocks version 0.9.0, standalone. Load atomic-ui.js from @atomic-ui/ui first, from the same folder. */
2
+ import"./atomic-ui.js";import{css as Ae,html as C,nothing as G}from"./atomic-ui.js";import{ImpaktElement as ae,fontSize as Te,fontWeight as be,lineHeight as ot,space as b,spaceAround as gt,t as S,type as ye,iconSvg as lt}from"./atomic-ui.js";var gi=(n,t,e)=>C`<div class=${e} role="heading" aria-level=${n}>${t}</div>`,Ii=Ae`
3
+ .h { margin: 0; color: ${S.textHeading}; font-family: ${S.fontHeading}; font-weight: ${be("bold")}; line-height: ${ot("tight")}; }
4
+ .eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${S.brand})); ${ye("sm")} font-size: var(--impakt-font-size-eyebrow, var(--impakt-font-size-sm, 0.875rem)); font-family: ${S.fontEyebrow}; font-weight: var(--impakt-font-weight-eyebrow, ${be("semibold")}); letter-spacing: ${S.trackingWide}; text-transform: uppercase; }
5
+ .body { margin: 0; line-height: ${ot("normal")}; max-inline-size: 65ch; }
6
+ `,dt=class extends ae{static{this.properties={eyebrow:{type:String},heading:{type:String},lead:{type:String},level:{type:Number,reflect:!0},imageSrc:{type:String,attribute:"image-src"},imageAlt:{type:String,attribute:"image-alt"},treatment:{type:String,reflect:!0},ratingText:{type:String,attribute:"rating-text"},eyebrowIcon:{type:String,attribute:"eyebrow-icon"},align:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.eyebrow="",this.heading="",this.lead="",this.level=1,this.imageSrc="",this.imageAlt="",this.treatment="split",this.ratingText="",this.eyebrowIcon="none",this.align="start",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...ae.styles,gt,Ii,Ae`
7
7
  :host { display: block; container-type: inline-size; }
8
- .hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: ${g(8)}; align-items: center; }
8
+ .hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: ${b(8)}; align-items: center; }
9
9
  .hero.pictured { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
10
- .words { display: flex; flex-direction: column; gap: ${g(4)}; }
10
+ .words { display: flex; flex-direction: column; gap: ${b(4)}; }
11
11
  :host([align='center']) .words { align-items: center; text-align: center; margin-inline: auto; max-inline-size: 48rem; }
12
- .h { ${pe("5xl")} letter-spacing: ${w.trackingTight}; text-wrap: balance; }
13
- .body { ${pe("lg")} color: ${w.textMuted}; text-wrap: pretty; }
14
- @container (max-width: 40rem) { .h { ${pe("4xl")} } }
15
- .actions { display: flex; flex-wrap: wrap; gap: ${g(3)} ${g(4)}; align-items: center; margin-block-start: ${g(2)}; }
12
+ .h { ${ye("5xl")} letter-spacing: ${S.trackingTight}; text-wrap: balance; }
13
+ .body { ${ye("lg")} color: ${S.textMuted}; text-wrap: pretty; }
14
+ @container (max-width: 40rem) { .h { ${ye("4xl")} } }
15
+ .actions { display: flex; flex-wrap: wrap; gap: ${b(3)} ${b(4)}; align-items: center; margin-block-start: ${b(2)}; }
16
16
  :host([align='center']) .actions { justify-content: center; }
17
- img { display: block; inline-size: 100%; block-size: auto; border-radius: ${w.radius2xl}; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: ${w.shadowLg}; }
17
+ img { display: block; inline-size: 100%; block-size: auto; border-radius: ${S.radius2xl}; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: ${S.shadowLg}; }
18
18
  @container (max-width: 48rem) { .hero.pictured { grid-template-columns: minmax(0, 1fr); } }
19
19
  /* Cover: the picture fills the block edge to edge, a scrim keeps the words readable (1.4.3). */
20
- .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: ${g(32)} max(${g(8)}, calc(var(--impakt-bleed, 1) * (50vw - 50%))) ${g(24)}; overflow: hidden; color: #fff; --impakt-color-text-heading: #fff; }
20
+ .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: ${b(32)} max(${b(8)}, calc(var(--impakt-bleed, 1) * (50vw - 50%))) ${b(24)}; overflow: hidden; color: #fff; --impakt-color-text-heading: #fff; }
21
21
  .cover img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
22
22
  .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%); }
23
23
  .cover .words { position: relative; z-index: 1; max-inline-size: 48rem; }
24
- .cover .eyebrow { display: inline-flex; align-items: center; gap: ${g(2)}; align-self: flex-start; padding: ${g(2)} ${g(3.5)}; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: 999px; text-transform: none; letter-spacing: 0; }
24
+ .cover .eyebrow { display: inline-flex; align-items: center; gap: ${b(2)}; align-self: flex-start; padding: ${b(2)} ${b(3.5)}; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: 999px; text-transform: none; letter-spacing: 0; }
25
25
  .chip-line { position: relative; z-index: 1; block-size: 0; }
26
- .chip { position: absolute; inset-block-start: ${g(14)}; inset-inline-end: ${g(9)}; display: inline-flex; align-items: center; gap: ${g(2.5)}; padding: ${g(3)} ${g(4.5)}; ${pe("sm")} font-weight: ${le("semibold")}; white-space: nowrap; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: ${w.radiusXl}; }
27
- .finder { position: relative; z-index: 1; margin-block-start: ${g(12)}; }
26
+ .chip { position: absolute; inset-block-start: ${b(14)}; inset-inline-end: ${b(9)}; display: inline-flex; align-items: center; gap: ${b(2.5)}; padding: ${b(3)} ${b(4.5)}; ${ye("sm")} font-weight: ${be("semibold")}; white-space: nowrap; color: #fff; background: rgb(255 255 255 / 0.16); border-radius: ${S.radiusXl}; }
27
+ .finder { position: relative; z-index: 1; margin-block-start: ${b(12)}; }
28
28
  .cover .h { font-size: clamp(3rem, 6.4vw, 5.75rem); line-height: 1; }
29
29
  .cover .body { color: rgb(255 255 255 / 0.92); max-inline-size: 40rem; }
30
30
  @container (max-width: 64rem) { .chip { display: none; } }
31
31
  @container (max-width: 30rem) { .finder { display: none; } }
32
- @container (max-width: 48rem) { .finder { margin-block-start: ${g(6)}; } .cover { justify-content: flex-end; min-block-size: 43.75rem; padding-block: ${g(32)} ${g(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; } }
33
- `]}render(){if(this.treatment==="cover"&&this.imageSrc)return L`<div class="cover" part="hero">
34
- ${this.ratingText?L`<div class="chip-line"><div class="chip">${Ve("star","20px")}${this.ratingText}</div></div>`:W}
32
+ @container (max-width: 48rem) { .finder { margin-block-start: ${b(6)}; } .cover { justify-content: flex-end; min-block-size: 43.75rem; padding-block: ${b(32)} ${b(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; } }
33
+ `]}render(){if(this.treatment==="cover"&&this.imageSrc)return C`<div class="cover" part="hero">
34
+ ${this.ratingText?C`<div class="chip-line"><div class="chip">${lt("star","20px")}${this.ratingText}</div></div>`:G}
35
35
  <img src=${this.imageSrc} alt=${this.imageAlt} part="image" />
36
36
  <div class="words">
37
- ${this.eyebrow?L`<p class="eyebrow" part="eyebrow">${this.eyebrowIcon!=="none"?Ve(this.eyebrowIcon,"16px"):W}${this.eyebrow}</p>`:W}
38
- ${Ut(this.level,this.heading,"h")}
39
- ${this.lead?L`<p class="body">${this.lead}</p>`:W}
37
+ ${this.eyebrow?C`<p class="eyebrow" part="eyebrow">${this.eyebrowIcon!=="none"?lt(this.eyebrowIcon,"16px"):G}${this.eyebrow}</p>`:G}
38
+ ${gi(this.level,this.heading,"h")}
39
+ ${this.lead?C`<p class="body">${this.lead}</p>`:G}
40
40
  <div class="actions"><slot name="actions"></slot></div>
41
41
  </div>
42
42
  <div class="finder"><slot name="search"></slot></div>
43
- </div>`;let t=!!this.imageSrc&&this.align!=="center";return L`<div class="hero ${t?"pictured":""}" part="hero">
43
+ </div>`;let t=!!this.imageSrc&&this.align!=="center";return C`<div class="hero ${t?"pictured":""}" part="hero">
44
44
  <div class="words">
45
- ${this.eyebrow?L`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:W}
46
- ${Ut(this.level,this.heading,"h")}
47
- ${this.lead?L`<p class="body">${this.lead}</p>`:W}
45
+ ${this.eyebrow?C`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:G}
46
+ ${gi(this.level,this.heading,"h")}
47
+ ${this.lead?C`<p class="body">${this.lead}</p>`:G}
48
48
  <div class="actions"><slot name="actions"></slot></div>
49
49
  </div>
50
- ${t?L`<img src=${this.imageSrc} alt=${this.imageAlt} part="image" />`:W}
51
- </div>`}},Ke=class extends Q{static{this.properties={items:{type:Array},columns:{type:String,reflect:!0},headingLevel:{type:Number,attribute:"heading-level"},layout:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.items=[],this.columns="three",this.headingLevel=3,this.layout="stacked",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...Q.styles,it,oi,ye`
50
+ ${t?C`<img src=${this.imageSrc} alt=${this.imageAlt} part="image" />`:G}
51
+ </div>`}},ct=class extends ae{static{this.properties={items:{type:Array},columns:{type:String,reflect:!0},headingLevel:{type:Number,attribute:"heading-level"},layout:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.items=[],this.columns="three",this.headingLevel=3,this.layout="stacked",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...ae.styles,gt,Ii,Ae`
52
52
  :host { display: block; container-type: inline-size; }
53
- ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${g(8)} ${g(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }
53
+ ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${b(8)} ${b(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }
54
54
  :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
55
55
  :host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
56
- li { display: flex; flex-direction: column; gap: ${g(2)}; }
57
- :host([layout='inline']) li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: ${g(4)}; align-items: start; }
58
- :host([layout='inline']) .words { display: flex; flex-direction: column; gap: ${g(1)}; }
59
- .icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 48px; block-size: 48px; border-radius: ${w.radiusLg}; background: ${w.brandSubtle}; color: ${w.brand}; margin-block-end: ${g(2)}; }
56
+ li { display: flex; flex-direction: column; gap: ${b(2)}; }
57
+ :host([layout='inline']) li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: ${b(4)}; align-items: start; }
58
+ :host([layout='inline']) .words { display: flex; flex-direction: column; gap: ${b(1)}; }
59
+ .icon { display: inline-flex; align-items: center; justify-content: center; inline-size: 48px; block-size: 48px; border-radius: ${S.radiusLg}; background: ${S.brandSubtle}; color: ${S.brand}; margin-block-end: ${b(2)}; }
60
60
  :host([layout='inline']) .icon { margin: 0; }
61
- .h { font-size: ${$e("lg")}; }
62
- .body { color: ${w.text}; }
61
+ .h { font-size: ${Te("lg")}; }
62
+ .body { color: ${S.text}; }
63
63
  @container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
64
64
  @container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }
65
- `]}render(){return L`<ul part="list">${(this.items??[]).map(t=>L`<li part="item">
66
- ${t.icon?L`<span class="icon">${Ve(t.icon,"24px")}</span>`:W}
67
- <div class="words">${Ut(this.headingLevel,t.heading,"h")}${t.text?L`<p class="body">${t.text}</p>`:W}</div>
68
- </li>`)}</ul>`}},Ze=class extends Q{static{this.properties={quote:{type:String},person:{type:String},about:{type:String},imageSrc:{type:String,attribute:"image-src"},size:{type:String,reflect:!0},align:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.quote="",this.person="",this.about="",this.imageSrc="",this.size="md",this.align="start",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...Q.styles,it,ye`
65
+ `]}render(){return C`<ul part="list">${(this.items??[]).map(t=>C`<li part="item">
66
+ ${t.icon?C`<span class="icon">${lt(t.icon,"24px")}</span>`:G}
67
+ <div class="words">${gi(this.headingLevel,t.heading,"h")}${t.text?C`<p class="body">${t.text}</p>`:G}</div>
68
+ </li>`)}</ul>`}},pt=class extends ae{static{this.properties={quote:{type:String},person:{type:String},about:{type:String},imageSrc:{type:String,attribute:"image-src"},size:{type:String,reflect:!0},align:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.quote="",this.person="",this.about="",this.imageSrc="",this.size="md",this.align="start",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...ae.styles,gt,Ae`
69
69
  :host { display: block; }
70
- figure { margin: 0; display: flex; flex-direction: column; gap: ${g(4)}; max-inline-size: 48rem; }
70
+ figure { margin: 0; display: flex; flex-direction: column; gap: ${b(4)}; max-inline-size: 48rem; }
71
71
  :host([align='center']) figure { margin-inline: auto; align-items: center; text-align: center; }
72
- blockquote { margin: 0; font-family: ${w.fontHeading}; font-size: ${$e("lg")}; line-height: ${Xe("normal")}; color: inherit; }
73
- :host([size='lg']) blockquote { font-size: ${$e("2xl")}; line-height: ${Xe("tight")}; }
72
+ blockquote { margin: 0; font-family: ${S.fontHeading}; font-size: ${Te("lg")}; line-height: ${ot("normal")}; color: inherit; }
73
+ :host([size='lg']) blockquote { font-size: ${Te("2xl")}; line-height: ${ot("tight")}; }
74
74
  blockquote::before { content: '\\201C'; } blockquote::after { content: '\\201D'; }
75
- figcaption { display: flex; align-items: center; gap: ${g(3)}; }
75
+ figcaption { display: flex; align-items: center; gap: ${b(3)}; }
76
76
  img { inline-size: 48px; block-size: 48px; border-radius: 50%; object-fit: cover; }
77
- .name { font-weight: ${le("semibold")}; }
78
- .detail { color: ${w.textMuted}; font-size: ${$e("sm")}; }
79
- `]}render(){return L`<figure part="figure">
77
+ .name { font-weight: ${be("semibold")}; }
78
+ .detail { color: ${S.textMuted}; font-size: ${Te("sm")}; }
79
+ `]}render(){return C`<figure part="figure">
80
80
  <blockquote part="quote">${this.quote}</blockquote>
81
- ${this.person?L`<figcaption>${this.imageSrc?L`<img src=${this.imageSrc} alt="" />`:W}<span><span class="name">${this.person}</span>${this.about?L`<br /><span class="detail">${this.about}</span>`:W}</span></figcaption>`:W}
82
- </figure>`}},Je=class extends Q{static{this.properties={figure:{type:String},label:{type:String},note:{type:String},size:{type:String,reflect:!0},align:{type:String,reflect:!0}}}constructor(){super(),this.figure="",this.label="",this.note="",this.size="md",this.align="start"}static{this.styles=[...Q.styles,ye`
81
+ ${this.person?C`<figcaption>${this.imageSrc?C`<img src=${this.imageSrc} alt="" />`:G}<span><span class="name">${this.person}</span>${this.about?C`<br /><span class="detail">${this.about}</span>`:G}</span></figcaption>`:G}
82
+ </figure>`}},ht=class extends ae{static{this.properties={figure:{type:String},label:{type:String},note:{type:String},size:{type:String,reflect:!0},align:{type:String,reflect:!0}}}constructor(){super(),this.figure="",this.label="",this.note="",this.size="md",this.align="start"}static{this.styles=[...ae.styles,Ae`
83
83
  :host { display: block; }
84
- .stat { display: flex; flex-direction: column; gap: ${g(1)}; }
84
+ .stat { display: flex; flex-direction: column; gap: ${b(1)}; }
85
85
  :host([align='center']) .stat { align-items: center; text-align: center; }
86
- .value { font-family: ${w.fontHeading}; font-size: ${$e("3xl")}; font-weight: ${le("bold")}; line-height: 1; color: ${w.textHeading}; }
87
- :host([size='lg']) .value { font-size: ${$e("5xl")}; }
86
+ .value { font-family: ${S.fontHeading}; font-size: ${Te("3xl")}; font-weight: ${be("bold")}; line-height: 1; color: ${S.textHeading}; }
87
+ :host([size='lg']) .value { font-size: ${Te("5xl")}; }
88
88
  :host([size='xl']) .value { font-size: clamp(2.75rem, 6vw, 4rem); }
89
- .label { font-weight: ${le("semibold")}; }
90
- .detail { color: ${w.textMuted}; font-size: ${$e("sm")}; }
91
- `]}render(){return L`<p class="stat" part="stat" style="margin:0"><span class="value">${this.figure}</span> <span class="label">${this.label}</span>${this.note?L` <span class="detail">${this.note}</span>`:W}</p>`}},et=class extends Q{static{this.properties={message:{type:String},linkText:{type:String,attribute:"link-text"},href:{type:String}}}constructor(){super(),this.message="",this.linkText="",this.href=""}static{this.styles=[...Q.styles,ye`
89
+ .label { font-weight: ${be("semibold")}; }
90
+ .detail { color: ${S.textMuted}; font-size: ${Te("sm")}; }
91
+ `]}render(){return C`<p class="stat" part="stat" style="margin:0"><span class="value">${this.figure}</span> <span class="label">${this.label}</span>${this.note?C` <span class="detail">${this.note}</span>`:G}</p>`}},mt=class extends ae{static{this.properties={message:{type:String},linkText:{type:String,attribute:"link-text"},href:{type:String}}}constructor(){super(),this.message="",this.linkText="",this.href=""}static{this.styles=[...ae.styles,Ae`
92
92
  :host { display: block; }
93
- .bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: ${g(2)} ${g(3)}; padding: ${g(2.5)} ${g(5)}; ${pe("sm")} text-align: center; color: ${w.onBrand}; background: ${w.brand}; }
93
+ .bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: ${b(2)} ${b(3)}; padding: ${b(2.5)} ${b(5)}; ${ye("sm")} text-align: center; color: ${S.onBrand}; background: ${S.brand}; }
94
94
  :host { margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); }
95
- a { display: inline-flex; align-items: center; gap: ${g(1)}; min-block-size: ${w.targetMin}; color: inherit; font-weight: ${le("semibold")}; }
96
- `]}render(){return L`<div class="bar" part="bar"><span>${this.message}</span>${this.linkText&&this.href?L`<a href=${this.href}>${this.linkText}${Ve("arrow-right","14px")}</a>`:W}</div>`}},tt=class extends Q{static{this.properties={items:{type:Array},buttonText:{type:String,attribute:"button-text"},action:{type:String},label:{type:String},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.items=[],this.buttonText="Search",this.action="",this.label="Search",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...Q.styles,it,ye`
95
+ a { display: inline-flex; align-items: center; gap: ${b(1)}; min-block-size: ${S.targetMin}; color: inherit; font-weight: ${be("semibold")}; }
96
+ `]}render(){return C`<div class="bar" part="bar"><span>${this.message}</span>${this.linkText&&this.href?C`<a href=${this.href}>${this.linkText}${lt("arrow-right","14px")}</a>`:G}</div>`}},ut=class extends ae{static{this.properties={items:{type:Array},buttonText:{type:String,attribute:"button-text"},action:{type:String},label:{type:String},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.items=[],this.buttonText="Search",this.action="",this.label="Search",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...ae.styles,gt,Ae`
97
97
  :host { display: block; container-type: inline-size; }
98
- form { display: flex; align-items: center; padding: ${g(3)}; background: ${w.surfaceCard}; color: ${w.text}; border-radius: ${w.radius2xl}; box-shadow: ${w.shadowXl}; }
99
- .field { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${g(1)}; padding: ${g(1.5)} ${g(5)}; }
100
- label { ${pe("sm")} color: ${w.textMuted}; }
101
- select { inline-size: 100%; min-block-size: 28px; padding: 0; font: inherit; ${pe("sm")} font-weight: ${le("semibold")}; color: ${w.text}; background: transparent; border: 0; border-radius: ${w.radiusSm}; cursor: pointer; }
102
- select:focus-visible, button:focus-visible { outline: 2px solid ${w.brand}; outline-offset: 2px; }
103
- button { flex: none; min-block-size: 48px; padding: ${g(3)} ${g(6)}; font: inherit; font-weight: ${le("semibold")}; color: ${w.onBrand}; background: ${w.brand}; border: 0; border-radius: ${w.radiusLg}; cursor: pointer; }
104
- button:hover { background: ${w.brandHover}; }
98
+ form { display: flex; align-items: center; padding: ${b(3)}; background: ${S.surfaceCard}; color: ${S.text}; border-radius: ${S.radius2xl}; box-shadow: ${S.shadowXl}; }
99
+ .field { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${b(1)}; padding: ${b(1.5)} ${b(5)}; }
100
+ label { ${ye("sm")} color: ${S.textMuted}; }
101
+ select { inline-size: 100%; min-block-size: 28px; padding: 0; font: inherit; ${ye("sm")} font-weight: ${be("semibold")}; color: ${S.text}; background: transparent; border: 0; border-radius: ${S.radiusSm}; cursor: pointer; }
102
+ select:focus-visible, button:focus-visible { outline: 2px solid ${S.brand}; outline-offset: 2px; }
103
+ button { flex: none; min-block-size: 48px; padding: ${b(3)} ${b(6)}; font: inherit; font-weight: ${be("semibold")}; color: ${S.onBrand}; background: ${S.brand}; border: 0; border-radius: ${S.radiusLg}; cursor: pointer; }
104
+ button:hover { background: ${S.brandHover}; }
105
105
  @container (max-width: 56rem) { form { flex-wrap: wrap; } .field { flex: 1 1 40%; } button { inline-size: 100%; } }
106
- @container (max-width: 30rem) { form { flex-direction: column; align-items: stretch; gap: ${g(2)}; } .field { flex: none; } }
107
- `]}submit(t){let e=new FormData(t.currentTarget),i={};e.forEach((a,s)=>{a!==""&&(i[s]=String(a))}),this.dispatchEvent(new CustomEvent("impakt-submit",{detail:{values:i},bubbles:!0,composed:!0})),this.action||t.preventDefault()}render(){return L`<form role="search" aria-label=${this.label} method="get" action=${this.action||W} @submit=${this.submit} part="form">
108
- ${(this.items??[]).map((t,e)=>{let i=this.id_(`field-${e}`),a=String(t.options??"").split(",").map(s=>s.trim()).filter(Boolean);return L`<div class="field"><label for=${i}>${t.label}</label><select id=${i} name=${t.name||t.label.toLowerCase().replace(/[^a-z0-9]+/g,"-")}>
109
- <option value="">${t.placeholder||"Any"}</option>${a.map(s=>L`<option value=${s}>${s}</option>`)}
106
+ @container (max-width: 30rem) { form { flex-direction: column; align-items: stretch; gap: ${b(2)}; } .field { flex: none; } }
107
+ `]}submit(t){let e=new FormData(t.currentTarget),i={};e.forEach((a,r)=>{a!==""&&(i[r]=String(a))}),this.dispatchEvent(new CustomEvent("impakt-submit",{detail:{values:i},bubbles:!0,composed:!0})),this.action||t.preventDefault()}render(){return C`<form role="search" aria-label=${this.label} method="get" action=${this.action||G} @submit=${this.submit} part="form">
108
+ ${(this.items??[]).map((t,e)=>{let i=this.id_(`field-${e}`),a=String(t.options??"").split(",").map(r=>r.trim()).filter(Boolean);return C`<div class="field"><label for=${i}>${t.label}</label><select id=${i} name=${t.name||t.label.toLowerCase().replace(/[^a-z0-9]+/g,"-")}>
109
+ <option value="">${t.placeholder||"Any"}</option>${a.map(r=>C`<option value=${r}>${r}</option>`)}
110
110
  </select></div>`})}
111
111
  <button type="submit">${this.buttonText}</button>
112
- </form>`}};customElements.define("impakt-search-bar",tt);customElements.define("impakt-announcement",et);customElements.define("impakt-hero",Qe);customElements.define("impakt-feature-list",Ke);customElements.define("impakt-quote",Ze);customElements.define("impakt-stat",Je);import{css as Fi,html as xe,nothing as at}from"./atomic-ui.js";import{ImpaktElement as li,focusRing as Wi,fontSize as ci,fontWeight as Yt,lineHeight as di,space as Ae,spaceAround as _i,t as D,iconSvg as qi}from"./atomic-ui.js";var rt=class extends li{static{this.properties={items:{type:Array},columns:{type:String,reflect:!0},headingLevel:{type:Number,attribute:"heading-level"},ratio:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.items=[],this.columns="three",this.headingLevel=3,this.ratio="4:3",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...li.styles,Wi,_i,Fi`
112
+ </form>`}};customElements.define("impakt-search-bar",ut);customElements.define("impakt-announcement",mt);customElements.define("impakt-hero",dt);customElements.define("impakt-feature-list",ct);customElements.define("impakt-quote",pt);customElements.define("impakt-stat",ht);import{css as ba,html as Me,nothing as bt}from"./atomic-ui.js";import{ImpaktElement as Hi,focusRing as fa,fontSize as Ri,fontWeight as bi,lineHeight as Pi,space as Ne,spaceAround as $a,t as Q,iconSvg as ya}from"./atomic-ui.js";var ft=class extends Hi{static{this.properties={items:{type:Array},columns:{type:String,reflect:!0},headingLevel:{type:Number,attribute:"heading-level"},ratio:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.items=[],this.columns="three",this.headingLevel=3,this.ratio="4:3",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...Hi.styles,fa,$a,ba`
113
113
  :host { display: block; container-type: inline-size; --ratio: 4 / 3; }
114
114
  :host([ratio='16:9']) { --ratio: 16 / 9; }
115
115
  :host([ratio='3:2']) { --ratio: 3 / 2; }
116
116
  :host([ratio='1:1']) { --ratio: 1 / 1; }
117
- ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${Ae(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }
117
+ ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${Ne(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }
118
118
  :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
119
119
  :host([columns='four']) ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
120
- li { position: relative; display: flex; flex-direction: column; background: ${D.surfaceCard}; border: ${D.borderThin} solid ${D.hairline}; border-radius: ${D.radiusXl}; box-shadow: ${D.shadowSm}; overflow: hidden; transition: box-shadow 150ms ease-in-out, transform 150ms ease-in-out; }
121
- li.linked:hover { box-shadow: ${D.shadowLg}; transform: translateY(-2px); }
120
+ li { position: relative; display: flex; flex-direction: column; background: ${Q.surfaceCard}; border: ${Q.borderThin} solid ${Q.hairline}; border-radius: ${Q.radiusXl}; box-shadow: ${Q.shadowSm}; overflow: hidden; transition: box-shadow 150ms ease-in-out, transform 150ms ease-in-out; }
121
+ li.linked:hover { box-shadow: ${Q.shadowLg}; transform: translateY(-2px); }
122
122
  img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; }
123
- .words { display: flex; flex-direction: column; gap: ${Ae(2)}; padding: ${Ae(5)}; flex: 1; }
124
- .h { margin: 0; color: ${D.textHeading}; font-family: ${D.fontHeading}; font-size: ${ci("lg")}; font-weight: ${Yt("bold")}; line-height: ${di("tight")}; }
125
- .h a { color: inherit; text-decoration: none; border-radius: ${D.radiusSm}; }
123
+ .words { display: flex; flex-direction: column; gap: ${Ne(2)}; padding: ${Ne(5)}; flex: 1; }
124
+ .h { margin: 0; color: ${Q.textHeading}; font-family: ${Q.fontHeading}; font-size: ${Ri("lg")}; font-weight: ${bi("bold")}; line-height: ${Pi("tight")}; }
125
+ .h a { color: inherit; text-decoration: none; border-radius: ${Q.radiusSm}; }
126
126
  .h a::after { content: ''; position: absolute; inset: 0; }
127
127
  li.linked:hover .h a { text-decoration: underline; text-underline-offset: 0.2em; }
128
- .body { margin: 0; line-height: ${di("normal")}; }
129
- .badge { align-self: flex-start; padding: ${Ae(.5)} ${Ae(2)}; border-radius: ${D.radius}; font-size: ${ci("sm")}; font-weight: ${Yt("medium")}; background: ${D.brandSubtle}; color: ${D.brand}; box-shadow: inset 0 0 0 1px ${D.hairline}; }
130
- .more { margin-block-start: auto; display: inline-flex; align-items: center; gap: ${Ae(1)}; color: ${D.link}; font-weight: ${Yt("semibold")}; }
128
+ .body { margin: 0; line-height: ${Pi("normal")}; }
129
+ .badge { align-self: flex-start; padding: ${Ne(.5)} ${Ne(2)}; border-radius: ${Q.radius}; font-size: ${Ri("sm")}; font-weight: ${bi("medium")}; background: ${Q.brandSubtle}; color: ${Q.brand}; box-shadow: inset 0 0 0 1px ${Q.hairline}; }
130
+ .more { margin-block-start: auto; display: inline-flex; align-items: center; gap: ${Ne(1)}; color: ${Q.link}; font-weight: ${bi("semibold")}; }
131
131
  @container (max-width: 48rem) { ul, :host([columns='four']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
132
132
  @container (max-width: 32rem) { ul, :host([columns='two']) ul, :host([columns='four']) ul { grid-template-columns: minmax(0, 1fr); } }
133
- `]}render(){return xe`<ul part="list">${(this.items??[]).map(t=>xe`<li class=${t.href?"linked":""} part="card">
134
- ${t.imageSrc?xe`<img src=${t.imageSrc} alt=${t.imageAlt??""} loading="lazy" />`:at}
133
+ `]}render(){return Me`<ul part="list">${(this.items??[]).map(t=>Me`<li class=${t.href?"linked":""} part="card">
134
+ ${t.imageSrc?Me`<img src=${t.imageSrc} alt=${t.imageAlt??""} loading="lazy" />`:bt}
135
135
  <div class="words">
136
- ${t.badge?xe`<span class="badge">${t.badge}</span>`:at}
137
- <div class="h" role="heading" aria-level=${this.headingLevel}>${t.href?xe`<a href=${t.href}>${t.heading}</a>`:t.heading}</div>
138
- ${t.text?xe`<p class="body">${t.text}</p>`:at}
139
- ${t.href?xe`<span class="more" aria-hidden="true">${qi("arrow-right","1em")}</span>`:at}
136
+ ${t.badge?Me`<span class="badge">${t.badge}</span>`:bt}
137
+ <div class="h" role="heading" aria-level=${this.headingLevel}>${t.href?Me`<a href=${t.href}>${t.heading}</a>`:t.heading}</div>
138
+ ${t.text?Me`<p class="body">${t.text}</p>`:bt}
139
+ ${t.href?Me`<span class="more" aria-hidden="true">${ya("arrow-right","1em")}</span>`:bt}
140
140
  </div>
141
- </li>`)}</ul>`}};customElements.define("impakt-card-grid",rt);import{css as re,html as b,nothing as C}from"./atomic-ui.js";import{say as G,ImpaktElement as F,focusRing as mt,targetSize as Gt,visuallyHidden as Di,fontWeight as ae,lineHeight as mi,space as p,spaceAround as he,t as d,token as Ui,type as M,iconSvg as ve}from"./atomic-ui.js";var Yi=Ui("color.accent.default","#c8a15a"),pi=()=>typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches,ui=re`
142
- .round { ${Gt} display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; padding: 0; color: ${d.text}; background: ${d.surfaceCard}; border: ${d.borderThin} solid ${d.rule}; border-radius: 50%; box-shadow: ${d.shadowSm}; cursor: pointer; transition: box-shadow 120ms ease-in-out, background-color 120ms ease-in-out; }
143
- .round:hover:not(:disabled) { box-shadow: ${d.shadowMd}; }
141
+ </li>`)}</ul>`}};customElements.define("impakt-card-grid",ft);import{css as xa,html as Le,nothing as va}from"./atomic-ui.js";import{ImpaktElement as Ni,focusRing as ka,fontSize as Xe,fontWeight as $t,space as Ve,t as q,token as ji}from"./atomic-ui.js";var Oi=["note","wireframe","component","code","live"],fi=n=>Oi.includes(n),wa=Le`<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">
142
+ <path d="M0 6h18M13 1l5 5-5 5" />
143
+ </svg>`,yt=class extends Ni{static{this.properties={stage:{type:String,reflect:!0},label:{type:String},href:{type:String},decorative:{type:Boolean,reflect:!0},track:{type:String},code:{type:Array}}}constructor(){super(),this.stage="live",this.label="",this.href="",this.decorative=!1,this.track="",this.code={}}static{this.styles=[...Ni.styles,ka,xa`
144
+ :host { display: block; inline-size: min(100%, 26rem); --impakt-journey-accent: ${ji("color.accent.default","#ffd43b")}; --impakt-journey-on-accent: ${ji("color.accent.on","#1a1a1a")}; --impakt-journey-ease: cubic-bezier(0.65, 0, 0.35, 1); --impakt-journey-time: 600ms; }
145
+ .frame { position: relative; block-size: 15rem; }
146
+ /* Each plate is one stage's shape. Only its opacity and transform ever change. */
147
+ .plate { position: absolute; box-sizing: border-box; opacity: 0; pointer-events: none; transition: opacity var(--impakt-journey-time) var(--impakt-journey-ease), transform var(--impakt-journey-time) var(--impakt-journey-ease); }
148
+ .bar { inset-inline: 0; inset-block-start: calc(50% - 3rem); block-size: 6rem; }
149
+ .note { inset-inline-start: 12%; inset-block-start: 0.5rem; inline-size: min(14rem, 80%); block-size: 14rem; background: var(--impakt-journey-accent); box-shadow: 0 1.1rem 2.2rem rgb(0 0 0 / 0.18); transform: rotate(-4deg); }
150
+ .wire { background: ${q.surfaceCard}; border: ${q.borderThin} dashed ${q.textMuted}; }
151
+ .wire svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; color: ${q.rule}; }
152
+ .solid { background: var(--impakt-journey-accent); }
153
+ .shadow { box-shadow: 0 0.9rem 1.75rem rgb(0 0 0 / 0.22); }
154
+ .window { inset: 0; padding: ${Ve(5)}; background: ${q.text}; border-radius: ${q.radius}; font-family: ${q.fontMono}; font-size: ${Xe("sm")}; line-height: 1.6; color: color-mix(in srgb, ${q.surfaceCard} 78%, ${q.text}); white-space: pre; overflow: hidden; display: grid; grid-template-rows: 1fr 44px 1fr; }
155
+ .window .before { align-self: end; display: flex; flex-direction: column; }
156
+ .window .after { align-self: start; display: flex; flex-direction: column; }
157
+ .window .rule { display: block; block-size: 0.5em; margin-block: 0.55em; background: currentColor; opacity: 0.35; }
158
+ /* A measuring line above the bar, with a tick at each end. */
159
+ .marks { inset-inline: 0; inset-block-start: calc(50% - 4.5rem); block-size: 0.75rem; border-inline: 1.5px solid ${q.text}; }
160
+ .marks::before { content: ''; position: absolute; inset-inline: 0; inset-block-start: calc(50% - 0.75px); border-block-start: 1.5px solid ${q.text}; }
161
+
162
+ /* A stage that has passed shrinks toward the next shape as it fades; one still to come starts from the last. */
163
+ /* The note flattens without growing wider, so a shape that is not showing never reaches past the block (1.4.10). */
164
+ :host(:not([stage='note'])) .note { transform: rotate(0deg) scale(1, 0.45); }
165
+ :host([stage='note']) .wire { transform: rotate(-4deg) scale(0.6, 1.9); }
166
+ :host(:not([stage='code'])) .window { transform: scale(0.94, 0.5); }
167
+ :host([stage='note']) .note, :host([stage='wireframe']) .wire, :host(:is([stage='component'], [stage='live'])) .solid, :host([stage='code']) .window, :host([stage='component']) .marks, :host([stage='live']) .shadow { opacity: 1; }
168
+
169
+ /* The words. One element at every stage: a link, or a picture of one. */
170
+ .words { position: absolute; inset-inline: 0; inset-block-start: calc(50% - 3rem); box-sizing: border-box; min-block-size: 6rem; display: flex; align-items: center; justify-content: space-between; gap: ${Ve(4)}; padding-inline: ${Ve(8)}; font-family: ${q.fontBody}; font-size: ${Xe("lg")}; font-weight: ${$t("medium")}; line-height: 1.2; color: var(--impakt-journey-on-accent); text-decoration: none; transition: color var(--impakt-journey-time) var(--impakt-journey-ease), transform 180ms cubic-bezier(0.2, 0, 0, 1); }
171
+ .arrow { flex: none; }
172
+ :host([stage='note']) .words { inset-inline: 12% auto; inset-block-start: 0.5rem; inline-size: min(14rem, 80%); min-block-size: 14rem; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: ${Ve(6)}; font-size: ${Xe("2xl")}; font-weight: ${$t("semibold")}; letter-spacing: -0.02em; transform: rotate(-4deg); }
173
+ :host([stage='note']) .arrow { align-self: flex-end; }
174
+ :host([stage='wireframe']) .words { justify-content: center; font-family: ${q.fontMono}; font-size: ${Xe("sm")}; font-weight: ${$t("regular")}; color: ${q.textMuted}; }
175
+ :host([stage='code']) .words { inset-inline: ${Ve(5)}; justify-content: flex-start; min-block-size: 44px; inset-block-start: calc(50% - 22px); padding-inline: 3ch 0; font-family: ${q.fontMono}; font-size: ${Xe("sm")}; font-weight: ${$t("regular")}; color: var(--impakt-journey-code-words, ${q.surfaceCard}); }
176
+ /* Live, it answers a pointer: it lifts when pointed at and sits when pressed. */
177
+ :host([stage='live']) a.words:hover { transform: translateY(-2px); }
178
+ :host([stage='live']) a.words:active { transform: translateY(1px); }
179
+ a.words:focus-visible { outline: none; box-shadow: ${q.focusShadow}; }
180
+ @media (prefers-reduced-motion: reduce) { .plate, .words { transition: none; } :host([stage='live']) a.words:hover, :host([stage='live']) a.words:active { transform: none; } }
181
+ @media (forced-colors: active) {
182
+ .plate { forced-color-adjust: none; }
183
+ .note, .solid { background: Highlight; }
184
+ .marks, .marks::before { border-color: CanvasText; }
185
+ .window { background: Canvas; border: 1px solid CanvasText; color: CanvasText; }
186
+ .wire { background: Canvas; border-color: CanvasText; }
187
+ .words, :host([stage='wireframe']) .words, :host([stage='code']) .words { color: LinkText; forced-color-adjust: none; }
188
+ :host(:is([stage='note'], [stage='component'], [stage='live'])) .words { color: HighlightText; }
189
+ }
190
+ `]}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this.watch()}disconnectedCallback(){super.disconnectedCallback(),this.observer?.disconnect(),this.observer=void 0}willUpdate(t){t.has("stage")&&!fi(this.stage)&&(this.stage="live")}updated(t){t.has("track")&&this.watch()}watch(){if(this.observer?.disconnect(),this.observer=void 0,!this.track||!this.isConnected||typeof IntersectionObserver!="function")return;let t;try{t=Array.from(this.ownerDocument.querySelectorAll(this.track)).filter(e=>fi(e.getAttribute("data-journey-stage")))}catch{return}if(t.length){this.observer=new IntersectionObserver(e=>this.crossed(e),{rootMargin:"-50% 0px -50% 0px",threshold:0});for(let e of t)this.observer.observe(e)}}crossed(t){let i=t.find(a=>a.isIntersecting)?.target.getAttribute("data-journey-stage");!fi(i)||i===this.stage||(this.stage=i,this.dispatchEvent(new CustomEvent("impakt-journey-stage",{detail:{stage:i},bubbles:!0,composed:!0})))}lines(t,e){return t?.length?t.map(i=>Le`<span>${i}</span>`):Array.from({length:e},(i,a)=>Le`<span class="rule" style=${`inline-size:${[58,72,44][a%3]}%`}></span>`)}render(){let t=Le`<span>${this.label}</span>${wa}`;return Le`<div class="frame" part="frame" aria-hidden=${this.decorative?"true":va}>
191
+ <span class="plate note" aria-hidden="true"></span>
192
+ <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>
193
+ <span class="plate bar shadow" aria-hidden="true"></span>
194
+ <span class="plate bar solid" aria-hidden="true"></span>
195
+ <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>
196
+ <span class="plate marks" aria-hidden="true"></span>
197
+ ${this.decorative||!this.href?Le`<span class="words" part="button">${t}</span>`:Le`<a class="words" part="button" href=${this.href}>${t}</a>`}
198
+ </div>`}};customElements.define("impakt-journey-button",yt);import{css as Ee,html as k,nothing as U}from"./atomic-ui.js";import{ImpaktElement as J,focusRing as $i,fontSize as _,fontWeight as re,lineHeight as At,lockScroll as Sa,space as z,spaceAround as Mt,t as d,token as Qe,unlockScroll as Fi}from"./atomic-ui.js";var za=k`<svg viewBox="0 0 22 22" width="22" height="22" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true" focusable="false">
199
+ <path d="M5 17 17 5M8 5h9v9" />
200
+ </svg>`,xt=class extends J{static{this.properties={items:{type:Array},headingLevel:{type:Number,attribute:"heading-level"},start:{type:Number},label:{type:String},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.items=[],this.headingLevel=3,this.start=1,this.label="",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...J.styles,$i,Mt,Ee`
201
+ :host { display: block; container: impakt-work-list / inline-size; }
202
+ ol { list-style: none; margin: 0; padding: 0; border-block-start: ${d.borderThin} solid ${d.text}; }
203
+ li { position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto auto; align-items: center; column-gap: ${z(6)}; padding: ${z(5)} ${z(8)}; border-block-end: ${d.borderThin} solid ${d.text}; transition: background-color 140ms ease-out, color 140ms ease-out; }
204
+ .number { font-family: ${d.fontMono}; font-size: ${_("sm")}; font-variant-numeric: tabular-nums; color: ${d.textMuted}; }
205
+ .name { font-family: ${d.fontHeading}; font-size: clamp(2rem, 7cqi, 4.5rem); font-weight: ${re("semibold")}; line-height: 1; letter-spacing: -0.05em; color: ${d.text}; overflow-wrap: anywhere; }
206
+ .name a { color: inherit; text-decoration: none; }
207
+ /* The link is stretched over the row, so the row is one target. */
208
+ .name a::after { content: ''; position: absolute; inset: 0; }
209
+ .name a:focus-visible { outline: none; }
210
+ .name a:focus-visible::after { box-shadow: ${d.focusShadow}; }
211
+ .meta { font-family: ${d.fontMono}; font-size: ${_("sm")}; letter-spacing: ${d.trackingWide}; text-transform: uppercase; color: ${d.textMuted}; }
212
+ .arrow { display: flex; color: ${d.text}; }
213
+ /* Pointed at or focused, the row turns to ink. The card colour on the text colour is a pair every brand already holds at 4.5:1. */
214
+ li:has(a):hover, li:has(a:focus-visible) { background: ${d.text}; }
215
+ li:has(a):hover .name, li:has(a:focus-visible) .name { color: ${d.surfaceCard}; }
216
+ li:has(a):hover :is(.number, .meta), li:has(a:focus-visible) :is(.number, .meta) { color: color-mix(in srgb, ${d.surfaceCard} 78%, ${d.text}); }
217
+ li:has(a):hover .arrow, li:has(a:focus-visible) .arrow { color: ${Qe("color.accent.default","currentColor")}; }
218
+ @container impakt-work-list (max-width: 40rem) {
219
+ li { grid-template-columns: 2rem minmax(0, 1fr) auto; column-gap: ${z(3)}; padding-inline: ${z(4)}; }
220
+ .meta { grid-column: 2; grid-row: 2; margin-block-start: ${z(2)}; }
221
+ .arrow { grid-column: 3; grid-row: 1; }
222
+ }
223
+ @media (forced-colors: active) {
224
+ li:has(a):hover, li:has(a:focus-visible) { background: Canvas; outline: 2px solid Highlight; outline-offset: -2px; }
225
+ li:has(a):hover :is(.name, .number, .meta, .arrow), li:has(a:focus-visible) :is(.name, .number, .meta, .arrow) { color: CanvasText; }
226
+ }
227
+ `]}render(){return k`<ol role="list" part="list" aria-label=${this.label||U}>
228
+ ${this.items.map((t,e)=>{let i=String(this.start+e).padStart(2,"0");return k`<li part="row">
229
+ <span class="number" aria-hidden="true">${i}</span>
230
+ <div class="name" part="name" role="heading" aria-level=${this.headingLevel}>
231
+ ${t.href?k`<a href=${t.href} part="link">${t.name}</a>`:t.name}
232
+ </div>
233
+ ${t.meta?k`<span class="meta" part="meta">${t.meta}</span>`:k`<span></span>`}
234
+ ${t.href?k`<span class="arrow">${za}</span>`:k`<span></span>`}
235
+ </li>`})}
236
+ </ol>`}},vt=class extends J{static{this.properties={items:{type:Array},label:{type:String},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.items=[],this.label="",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...J.styles,Mt,Ee`
237
+ :host { display: block; container: impakt-stat-row / inline-size; }
238
+ ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: ${z(6)}; }
239
+ li { border-block-start: ${d.borderThin} solid ${d.rule}; padding-block-start: ${z(5)}; }
240
+ p { margin: 0; display: flex; flex-direction: column; gap: ${z(2)}; }
241
+ .value { font-family: ${d.fontHeading}; font-size: clamp(2.25rem, 6cqi, 3.25rem); font-weight: ${re("semibold")}; line-height: 1; letter-spacing: -0.04em; color: ${d.textHeading}; }
242
+ .label { font-size: ${_("sm")}; line-height: ${At("normal")}; color: ${d.textMuted}; }
243
+ .note { font-size: ${_("sm")}; color: ${d.textMuted}; }
244
+ `]}render(){return k`<ul role="list" part="list" aria-label=${this.label||U}>
245
+ ${this.items.map(t=>k`<li part="stat">
246
+ <p><span class="value" part="value">${t.figure}</span> <span class="label" part="label">${t.label}</span>${t.note?k` <span class="note">${t.note}</span>`:U}</p>
247
+ </li>`)}
248
+ </ul>`}},kt=class extends J{static{this.properties={eyebrow:{type:String},heading:{type:String},lead:{type:String},items:{type:Array},headingLevel:{type:Number,attribute:"heading-level"},open:{type:Array},multiple:{type:Boolean},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.eyebrow="",this.heading="",this.lead="",this.items=[],this.headingLevel=2,this.open=[],this.multiple=!0,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...J.styles,Mt,Ee`
249
+ :host { display: block; container: impakt-faq / inline-size; }
250
+ .head { display: flex; flex-direction: column; gap: ${z(4)}; margin-block-end: ${z(10)}; max-inline-size: 44rem; }
251
+ .eyebrow { margin: 0; font-family: ${d.fontEyebrow}; font-size: ${_("sm")}; color: var(--impakt-eyebrow, ${d.textMuted}); }
252
+ .heading { font-family: ${d.fontHeading}; font-size: clamp(2rem, 6cqi, 3.25rem); font-weight: ${re("semibold")}; line-height: 1.04; letter-spacing: -0.04em; color: ${d.textHeading}; }
253
+ .lead { margin: 0; font-size: ${_("md")}; line-height: ${At("normal")}; color: ${d.textMuted}; }
254
+ impakt-accordion { border-block-start: ${d.borderThin} solid ${d.rule}; }
255
+ `]}render(){let t=this.id_("heading"),e=Math.min(Math.max(this.headingLevel,1),5),i=this.eyebrow||this.heading||this.lead?k`<div class="head" part="head">
256
+ ${this.eyebrow?k`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:U}
257
+ ${this.heading?k`<div id=${t} class="heading" part="heading" role="heading" aria-level=${e}>${this.heading}</div>`:U}
258
+ ${this.lead?k`<p class="lead" part="lead">${this.lead}</p>`:U}
259
+ </div>`:U,a=k`<impakt-accordion part="questions" .items=${this.items} .headingLevel=${e+1} .open=${this.open} .multiple=${this.multiple}>
260
+ ${this.items.map(r=>k`<slot name=${`panel-${r.id}`} slot=${`panel-${r.id}`}>${r.body}</slot>`)}
261
+ </impakt-accordion>`;return this.heading?k`<section aria-labelledby=${t}>${i}${a}</section>`:k`<div>${i}${a}</div>`}},wt=class extends J{constructor(){super();this.hasFooter=!1;this.open=!1,this.links=[],this.current="",this.brand="",this.home="/",this.label="Menu",this.closeText="Close"}static{this.properties={open:{type:Boolean,reflect:!0},links:{type:Array},current:{type:String},brand:{type:String},home:{type:String},label:{type:String},closeText:{type:String,attribute:"close-text"}}}static{this.styles=[...J.styles,$i,Ee`
262
+ /* The ink colours are taken on the host, because the dialog repaints the text colour for what is inside it. */
263
+ :host { --impakt-menu: ${d.text}; --impakt-menu-on: ${d.surfaceCard}; --impakt-menu-muted: color-mix(in srgb, ${d.surfaceCard} 78%, ${d.text}); --impakt-menu-rule: color-mix(in srgb, ${d.surfaceCard} 18%, ${d.text}); }
264
+ 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); }
265
+ dialog[open] { display: flex; }
266
+ dialog::backdrop { background: var(--impakt-menu); }
267
+ .bar { display: flex; align-items: center; justify-content: space-between; gap: ${z(4)}; padding: ${z(2)} ${z(4)}; border-block-end: ${d.borderThin} solid var(--impakt-menu-rule); }
268
+ .brand { color: inherit; text-decoration: none; font-family: ${d.fontHeading}; font-size: ${_("md")}; font-weight: ${re("semibold")}; border-radius: ${d.radiusSm}; }
269
+ .close { display: inline-flex; align-items: center; gap: ${z(2)}; min-block-size: 44px; padding: 0 ${z(4)}; font: inherit; font-size: ${_("sm")}; font-weight: ${re("medium")}; color: var(--impakt-menu); background: var(--impakt-menu-on); border: 0; border-radius: ${d.radius}; cursor: pointer; }
270
+ nav { flex: 1; padding: ${z(6)} ${z(5)} 0; }
271
+ ol { list-style: none; margin: 0; padding: 0; }
272
+ li { border-block-end: ${d.borderThin} solid var(--impakt-menu-rule); }
273
+ li a { display: flex; align-items: center; justify-content: space-between; gap: ${z(4)}; padding-block: ${z(4)}; color: inherit; text-decoration: none; font-family: ${d.fontHeading}; font-size: clamp(2.25rem, 12vw, 3.5rem); font-weight: ${re("semibold")}; line-height: 1; letter-spacing: -0.05em; }
274
+ li a:hover .words { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }
275
+ .number { font-family: ${d.fontMono}; font-size: ${_("sm")}; font-weight: ${re("regular")}; letter-spacing: 0; color: var(--impakt-menu-muted); }
276
+ /*
277
+ * The current page is marked with a square. Its colour stays the menu's own text colour unless a brand sets
278
+ * --impakt-site-menu-current, because an accent is only readable on ink when the brand's ink is dark (1.4.3).
279
+ */
280
+ a[aria-current] { color: var(--impakt-site-menu-current, var(--impakt-menu-on)); }
281
+ a[aria-current] .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; }
282
+ .foot { display: flex; flex-direction: column; gap: ${z(4)}; padding: ${z(8)} ${z(5)} calc(${z(8)} + env(safe-area-inset-bottom)); }
283
+ .foot[hidden] { display: none; }
284
+ /* What is slotted at the foot is read on ink too. */
285
+ ::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); }
286
+ @media (forced-colors: active) { dialog { border: 1px solid CanvasText; } .close { border: 1px solid ButtonText; } }
287
+ `]}get dialog(){return this.renderRoot.querySelector("dialog")}updated(e){if(!e.has("open"))return;let i=this.dialog;i&&(this.open?(typeof i.showModal=="function"?i.showModal():i.setAttribute("open",""),Sa(this)):(typeof i.close=="function"&&i.open?i.close():i.removeAttribute("open"),Fi(this)))}disconnectedCallback(){super.disconnectedCallback(),Fi(this)}close(){this.open&&(this.open=!1,this.dispatchEvent(new CustomEvent("impakt-close",{bubbles:!0,composed:!0})))}footerChanged(e){this.hasFooter=e.target.assignedNodes().length>0,this.requestUpdate()}render(){return k`<dialog part="dialog" aria-label=${this.label} @cancel=${()=>this.close()} @close=${()=>this.close()}>
288
+ <div class="bar" part="bar">
289
+ ${this.brand?k`<a class="brand" href=${this.home||"/"} part="brand">${this.brand}</a>`:k`<span></span>`}
290
+ <button class="close" type="button" part="close" @click=${()=>this.close()}>
291
+ <span>${this.closeText}</span>
292
+ <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>
293
+ </button>
294
+ </div>
295
+ <nav aria-label=${this.label} part="nav">
296
+ <ol role="list">
297
+ ${(this.links??[]).map((e,i)=>{let a=!!this.current&&e.href===this.current;return k`<li>
298
+ <a href=${e.href} aria-current=${a?"page":U} part="link" @click=${()=>this.close()}>
299
+ <span class="words">${e.label}</span><span class="number" aria-hidden="true">${String(i+1).padStart(2,"0")}</span>
300
+ </a>
301
+ </li>`})}
302
+ </ol>
303
+ </nav>
304
+ <div class="foot" part="footer" ?hidden=${!this.hasFooter}><slot name="footer" @slotchange=${this.footerChanged}></slot></div>
305
+ </dialog>`}},St=class extends J{static{this.properties={eyebrow:{type:String},heading:{type:String},lead:{type:String},points:{type:Array},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.eyebrow="",this.heading="",this.lead="",this.points=[],this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...J.styles,Mt,Ee`
306
+ :host { display: block; container: impakt-offer / inline-size; }
307
+ .offer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${z(12)}; align-items: start; }
308
+ .copy { display: flex; flex-direction: column; align-items: flex-start; gap: ${z(5)}; }
309
+ .eyebrow { margin: 0; font-family: ${d.fontEyebrow}; font-size: ${_("sm")}; color: var(--impakt-eyebrow, ${d.textMuted}); }
310
+ .heading { font-family: ${d.fontHeading}; font-size: clamp(2rem, 6cqi, 3.75rem); font-weight: ${re("semibold")}; line-height: 1; letter-spacing: -0.04em; color: ${d.textHeading}; }
311
+ .lead { margin: 0; max-inline-size: 32rem; font-size: ${_("md")}; line-height: ${At("normal")}; color: ${d.text}; }
312
+ ol { list-style: none; margin: 0; padding: 0; }
313
+ li { display: flex; gap: ${z(5)}; padding-block: ${z(5)}; border-block-start: ${d.borderThin} solid ${d.text}; font-size: ${_("lg")}; font-weight: ${re("medium")}; line-height: 1.2; color: ${d.text}; }
314
+ .number { flex: none; font-family: ${d.fontMono}; font-size: ${_("sm")}; font-weight: ${re("regular")}; line-height: 1.6; }
315
+ @container impakt-offer (max-width: 44rem) { .offer { grid-template-columns: 1fr; gap: ${z(8)}; } }
316
+ `]}render(){let t=Math.min(Math.max(this.headingLevel,1),6);return k`<div class="offer" part="offer">
317
+ <div class="copy">
318
+ ${this.eyebrow?k`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:U}
319
+ ${this.heading?k`<div class="heading" part="heading" role="heading" aria-level=${t}>${this.heading}</div>`:U}
320
+ ${this.lead?k`<p class="lead" part="lead">${this.lead}</p>`:U}
321
+ <slot name="actions"></slot>
322
+ </div>
323
+ ${(this.points??[]).length?k`<ol role="list" part="points">
324
+ ${this.points.map((e,i)=>k`<li><span class="number" aria-hidden="true">${String(i+1).padStart(2,"0")}</span><span>${e}</span></li>`)}
325
+ </ol>`:U}
326
+ </div>`}},zt=class extends J{static{this.properties={heading:{type:String},text:{type:String},meta:{type:String},href:{type:String},linkText:{type:String,attribute:"link-text"},headingLevel:{type:Number,attribute:"heading-level"}}}constructor(){super(),this.heading="",this.text="",this.meta="",this.href="",this.linkText="",this.headingLevel=3}static{this.styles=[...J.styles,$i,Ee`
327
+ :host { display: block; block-size: 100%; }
328
+ article { position: relative; box-sizing: border-box; block-size: 100%; display: flex; flex-direction: column; gap: ${z(4)}; padding: ${z(6)}; background: ${d.surfaceCard}; border: ${d.borderThin} solid ${d.text}; border-radius: ${d.radius}; transition: background-color 140ms ease-out; }
329
+ .meta { margin: 0; font-family: ${d.fontMono}; font-size: ${_("sm")}; letter-spacing: ${d.trackingWide}; text-transform: uppercase; color: ${d.textMuted}; }
330
+ .heading { font-family: ${d.fontHeading}; font-size: ${_("xl")}; font-weight: ${re("semibold")}; line-height: 1.15; letter-spacing: -0.025em; color: ${d.text}; }
331
+ .heading a { color: inherit; text-decoration: none; }
332
+ .heading a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
333
+ .heading a:focus-visible { outline: none; }
334
+ .heading a:focus-visible::after { box-shadow: ${d.focusShadow}; }
335
+ article:has(a):hover .heading { text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
336
+ .text { margin: 0; font-size: ${_("sm")}; line-height: ${At("normal")}; color: ${d.textMuted}; }
337
+ .more { margin-block-start: auto; font-family: ${d.fontMono}; font-size: ${_("sm")}; letter-spacing: ${d.trackingWide}; text-transform: uppercase; color: ${d.text}; }
338
+ @media (forced-colors: active) { article { border-color: CanvasText; } }
339
+ `]}render(){let t=Math.min(Math.max(this.headingLevel,1),6);return k`<article part="card">
340
+ ${this.meta?k`<p class="meta" part="meta">${this.meta}</p>`:U}
341
+ <div class="heading" part="heading" role="heading" aria-level=${t}>${this.href?k`<a href=${this.href} part="link">${this.heading}</a>`:this.heading}</div>
342
+ ${this.text?k`<p class="text" part="text">${this.text}</p>`:U}
343
+ ${this.linkText&&this.href?k`<span class="more" aria-hidden="true">${this.linkText} →</span>`:U}
344
+ </article>`}},Tt=class extends J{static{this.properties={label:{type:String}}}constructor(){super(),this.label=""}static{this.styles=[...J.styles,Ee`
345
+ :host { display: inline-block; position: relative; padding-inline: 0.1em; margin-inline: -0.02em; background: ${Qe("color.accent.default","#ffd43b")}; color: ${Qe("color.accent.on","#1a1a1a")}; outline: 1.5px solid ${Qe("color.accent.on","#1a1a1a")}; outline-offset: -1px; }
346
+ .handle { position: absolute; inline-size: 8px; block-size: 8px; box-sizing: border-box; background: ${d.surfaceCard}; border: 1.5px solid ${Qe("color.accent.on","#1a1a1a")}; }
347
+ .handle:nth-of-type(1) { inset-block-start: -4px; inset-inline-start: -4px; }
348
+ .handle:nth-of-type(2) { inset-block-start: -4px; inset-inline-end: -4px; }
349
+ .handle:nth-of-type(3) { inset-block-end: -4px; inset-inline-start: -4px; }
350
+ .handle:nth-of-type(4) { inset-block-end: -4px; inset-inline-end: -4px; }
351
+ .label { position: absolute; inset-block-start: calc(100% + 8px); inset-inline-start: 0; padding: 3px 7px; white-space: nowrap; font-family: ${d.fontMono}; font-size: 0.6875rem; font-weight: ${re("medium")}; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: ${d.surfaceCard}; background: ${d.text}; border-radius: 3px; }
352
+ @media (forced-colors: active) { :host { forced-color-adjust: none; background: Highlight; color: HighlightText; outline-color: HighlightText; } .handle { border-color: HighlightText; background: Canvas; } .label { background: CanvasText; color: Canvas; } }
353
+ `]}render(){return k`<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>${this.label?k`<span class="label" part="label" aria-hidden="true">${this.label}</span>`:U}`}};customElements.define("impakt-work-list",xt);customElements.define("impakt-stat-row",vt);customElements.define("impakt-faq",kt);customElements.define("impakt-site-menu",wt);customElements.define("impakt-offer",St);customElements.define("impakt-post-card",zt);customElements.define("impakt-highlight",Tt);import{css as he,html as f,nothing as R}from"./atomic-ui.js";import{say as ee,ImpaktElement as Y,focusRing as Nt,targetSize as yi,visuallyHidden as Ta,fontWeight as pe,lineHeight as _i,space as h,spaceAround as xe,t as p,token as Aa,type as B,iconSvg as Ce}from"./atomic-ui.js";var Ma=Aa("color.accent.default","#c8a15a"),Wi=()=>typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches,Di=he`
354
+ .round { ${yi} display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; padding: 0; color: ${p.text}; background: ${p.surfaceCard}; border: ${p.borderThin} solid ${p.rule}; border-radius: 50%; box-shadow: ${p.shadowSm}; cursor: pointer; transition: box-shadow 120ms ease-in-out, background-color 120ms ease-in-out; }
355
+ .round:hover:not(:disabled) { box-shadow: ${p.shadowMd}; }
144
356
  .round:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
145
- `,ut=re`
146
- .eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${d.brand})); ${M("sm")} font-size: var(--impakt-font-size-eyebrow, var(--impakt-font-size-sm, 0.875rem)); font-family: ${d.fontEyebrow}; font-weight: var(--impakt-font-weight-eyebrow, ${ae("semibold")}); letter-spacing: ${d.trackingWide}; text-transform: uppercase; }
147
- .h { margin: 0; color: ${d.textHeading}; font-family: ${d.fontHeading}; font-weight: ${ae("bold")}; letter-spacing: ${d.trackingTight}; text-wrap: balance; }
148
- .lead { margin: 0; color: ${d.textMuted}; text-wrap: pretty; }
149
- `,st=class extends F{constructor(){super();this.index=0;this.count=0;this.visible=null;this.heading=null;this.paused=!1;this.held=!1;this.label="Slides",this.perView="1",this.arrows="below",this.autoplay=!1,this.seconds=6,this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={label:{type:String},perView:{type:String,reflect:!0,attribute:"per-view"},arrows:{type:String,reflect:!0},autoplay:{type:Boolean,reflect:!0},seconds:{type:Number},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...F.styles,mt,he,ui,re`
150
- :host { display: block; container-type: inline-size; --most: 1; --gap: ${p(6)}; }
357
+ `,jt=he`
358
+ .eyebrow { margin: 0; color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${p.brand})); ${B("sm")} font-size: var(--impakt-font-size-eyebrow, var(--impakt-font-size-sm, 0.875rem)); font-family: ${p.fontEyebrow}; font-weight: var(--impakt-font-weight-eyebrow, ${pe("semibold")}); letter-spacing: ${p.trackingWide}; text-transform: uppercase; }
359
+ .h { margin: 0; color: ${p.textHeading}; font-family: ${p.fontHeading}; font-weight: ${pe("bold")}; letter-spacing: ${p.trackingTight}; text-wrap: balance; }
360
+ .lead { margin: 0; color: ${p.textMuted}; text-wrap: pretty; }
361
+ `,Lt=class extends Y{constructor(){super();this.index=0;this.count=0;this.visible=null;this.heading=null;this.paused=!1;this.held=!1;this.label="Slides",this.perView="1",this.arrows="below",this.autoplay=!1,this.seconds=6,this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={label:{type:String},perView:{type:String,reflect:!0,attribute:"per-view"},arrows:{type:String,reflect:!0},autoplay:{type:Boolean,reflect:!0},seconds:{type:Number},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...Y.styles,Nt,xe,Di,he`
362
+ :host { display: block; container-type: inline-size; --most: 1; --gap: ${h(6)}; }
151
363
  :host([per-view='2']) { --most: 2; }
152
364
  :host([per-view='3']) { --most: 3; }
153
- .track { --per: var(--most); display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: ${p(1)} ${p(2)}; border-radius: ${d.radiusLg}; }
365
+ .track { --per: var(--most); display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: ${h(1)} ${h(2)}; border-radius: ${p.radiusLg}; }
154
366
  .track::-webkit-scrollbar { display: none; }
155
367
  ::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; }
156
368
  /* Whole slides only: a slice of the next one reads as content spilling out of the page. */
157
369
  @container (max-width: 60rem) { .track { --per: min(var(--most), 2); } }
158
- @container (max-width: 40rem) { .track { --per: 1; --gap: ${p(4)}; } }
159
- .controls { display: flex; align-items: center; justify-content: space-between; gap: ${p(4)}; margin-block-start: ${p(4)}; }
160
- .dots { display: flex; flex-wrap: wrap; gap: ${p(1)}; }
161
- .dot { ${Gt} display: inline-flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 0; cursor: pointer; border-radius: ${d.radiusSm}; }
162
- .dot span { display: block; inline-size: 8px; block-size: 8px; border-radius: 999px; background: ${d.rule}; transition: inline-size 150ms ease-in-out, background-color 150ms ease-in-out; }
163
- .dot[aria-current='true'] span { inline-size: 24px; background: ${d.brand}; }
164
- .buttons { display: flex; gap: ${p(2)}; }
370
+ @container (max-width: 40rem) { .track { --per: 1; --gap: ${h(4)}; } }
371
+ .controls { display: flex; align-items: center; justify-content: space-between; gap: ${h(4)}; margin-block-start: ${h(4)}; }
372
+ .dots { display: flex; flex-wrap: wrap; gap: ${h(1)}; }
373
+ .dot { ${yi} display: inline-flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 0; cursor: pointer; border-radius: ${p.radiusSm}; }
374
+ .dot span { display: block; inline-size: 8px; block-size: 8px; border-radius: 999px; background: ${p.rule}; transition: inline-size 150ms ease-in-out, background-color 150ms ease-in-out; }
375
+ .dot[aria-current='true'] span { inline-size: 24px; background: ${p.brand}; }
376
+ .buttons { display: flex; gap: ${h(2)}; }
165
377
  section { position: relative; }
166
- @container (min-width: 40.01rem) { :host([arrows='top']) .buttons { position: absolute; inset-block-end: calc(100% + ${p(4)}); inset-inline-end: 0; } }
167
- .sr-only { ${Di} }
378
+ @container (min-width: 40.01rem) { :host([arrows='top']) .buttons { position: absolute; inset-block-end: calc(100% + ${h(4)}); inset-inline-end: 0; } }
379
+ .sr-only { ${Ta} }
168
380
  @media (forced-colors: active) { .dot span { background: CanvasText; } .dot[aria-current='true'] span { background: Highlight; } }
169
- `]}get track(){return this.renderRoot.querySelector(".track")}get slides(){return Array.from(this.children)}get last(){return Math.max(0,this.count-(this.visible??Number(this.perView||1)))}measure(){let e=this.track,i=this.slides[0];if(!e||!i)return;let a=i.getBoundingClientRect().width;if(a<=0)return;let s=Number.parseFloat(getComputedStyle(e).columnGap)||0,n=Math.max(1,Math.round((e.clientWidth+s)/(a+s)));if(n===this.visible)return;this.visible=n,this.index=Math.min(this.index,this.last);let l=this.slides[this.index];l&&typeof e.scrollTo=="function"&&e.scrollTo({left:l.offsetLeft-e.offsetLeft,behavior:"auto"}),this.requestUpdate()}onSlots(){let e=this.slides;this.count=e.length,e.forEach((i,a)=>{i.setAttribute("role","group"),i.setAttribute("aria-roledescription",G("slide")),i.setAttribute("aria-label",G("{slide} of {slides}",{slide:a+1,slides:e.length}))}),this.measure(),this.requestUpdate()}go(e){let i=Math.min(this.last,Math.max(0,e));this.index=i,this.heading=i,clearTimeout(this.settle),this.settle=setTimeout(()=>{let n=this.heading===null;this.heading=null;let l=this.track,y=this.slides[this.index];!n&&l&&y&&typeof l.scrollTo=="function"&&l.scrollTo({left:y.offsetLeft-l.offsetLeft,behavior:"auto"})},900),this.requestUpdate();let a=this.track,s=this.slides[i];a&&s&&typeof a.scrollTo=="function"&&a.scrollTo({left:s.offsetLeft-a.offsetLeft,behavior:pi()?"auto":"smooth"})}onScroll(){let e=this.track,i=this.slides;if(!e||!i.length)return;let a=0,s=1/0;if(i.forEach((n,l)=>{let y=Math.abs(n.offsetLeft-e.offsetLeft-e.scrollLeft);y<s&&(s=y,a=l)}),this.heading!==null){a===this.heading&&s<2&&(this.heading=null,clearTimeout(this.settle));return}a!==this.index&&(this.index=Math.min(a,this.last),this.requestUpdate())}onKey(e){e.key==="ArrowRight"&&(e.preventDefault(),this.go(this.index+1)),e.key==="ArrowLeft"&&(e.preventDefault(),this.go(this.index-1))}get canPlay(){return this.autoplay&&!pi()}restart(){clearInterval(this.timer),this.timer=void 0,!(!this.canPlay||this.paused||this.held)&&(this.timer=setInterval(()=>this.go(this.index>=this.last?0:this.index+1),Math.max(2,this.seconds)*1e3))}hold(e){this.held=e,this.restart()}togglePause(){this.paused=!this.paused,this.restart(),this.requestUpdate()}firstUpdated(){typeof ResizeObserver=="function"&&this.track&&(this.observer=new ResizeObserver(()=>this.measure()),this.observer.observe(this.track))}updated(e){(e.has("autoplay")||e.has("seconds"))&&this.restart(),e.has("perView")&&this.measure()}connectedCallback(){super.connectedCallback(),this.track&&this.observer?.observe(this.track),this.restart()}disconnectedCallback(){super.disconnectedCallback(),this.observer?.disconnect(),clearInterval(this.timer),clearTimeout(this.settle)}render(){let e=Array.from({length:this.last+1},(i,a)=>a);return b`<section aria-roledescription=${G("carousel")} aria-label=${this.label} part="carousel" @keydown=${this.onKey}
381
+ `]}get track(){return this.renderRoot.querySelector(".track")}get slides(){return Array.from(this.children)}get last(){return Math.max(0,this.count-(this.visible??Number(this.perView||1)))}measure(){let e=this.track,i=this.slides[0];if(!e||!i)return;let a=i.getBoundingClientRect().width;if(a<=0)return;let r=Number.parseFloat(getComputedStyle(e).columnGap)||0,o=Math.max(1,Math.round((e.clientWidth+r)/(a+r)));if(o===this.visible)return;this.visible=o,this.index=Math.min(this.index,this.last);let l=this.slides[this.index];l&&typeof e.scrollTo=="function"&&e.scrollTo({left:l.offsetLeft-e.offsetLeft,behavior:"auto"}),this.requestUpdate()}onSlots(){let e=this.slides;this.count=e.length,e.forEach((i,a)=>{i.setAttribute("role","group"),i.setAttribute("aria-roledescription",ee("slide")),i.setAttribute("aria-label",ee("{slide} of {slides}",{slide:a+1,slides:e.length}))}),this.measure(),this.requestUpdate()}go(e){let i=Math.min(this.last,Math.max(0,e));this.index=i,this.heading=i,clearTimeout(this.settle),this.settle=setTimeout(()=>{let o=this.heading===null;this.heading=null;let l=this.track,x=this.slides[this.index];!o&&l&&x&&typeof l.scrollTo=="function"&&l.scrollTo({left:x.offsetLeft-l.offsetLeft,behavior:"auto"})},900),this.requestUpdate();let a=this.track,r=this.slides[i];a&&r&&typeof a.scrollTo=="function"&&a.scrollTo({left:r.offsetLeft-a.offsetLeft,behavior:Wi()?"auto":"smooth"})}onScroll(){let e=this.track,i=this.slides;if(!e||!i.length)return;let a=0,r=1/0;if(i.forEach((o,l)=>{let x=Math.abs(o.offsetLeft-e.offsetLeft-e.scrollLeft);x<r&&(r=x,a=l)}),this.heading!==null){a===this.heading&&r<2&&(this.heading=null,clearTimeout(this.settle));return}a!==this.index&&(this.index=Math.min(a,this.last),this.requestUpdate())}onKey(e){e.key==="ArrowRight"&&(e.preventDefault(),this.go(this.index+1)),e.key==="ArrowLeft"&&(e.preventDefault(),this.go(this.index-1))}get canPlay(){return this.autoplay&&!Wi()}restart(){clearInterval(this.timer),this.timer=void 0,!(!this.canPlay||this.paused||this.held)&&(this.timer=setInterval(()=>this.go(this.index>=this.last?0:this.index+1),Math.max(2,this.seconds)*1e3))}hold(e){this.held=e,this.restart()}togglePause(){this.paused=!this.paused,this.restart(),this.requestUpdate()}firstUpdated(){typeof ResizeObserver=="function"&&this.track&&(this.observer=new ResizeObserver(()=>this.measure()),this.observer.observe(this.track))}updated(e){(e.has("autoplay")||e.has("seconds"))&&this.restart(),e.has("perView")&&this.measure()}connectedCallback(){super.connectedCallback(),this.track&&this.observer?.observe(this.track),this.restart()}disconnectedCallback(){super.disconnectedCallback(),this.observer?.disconnect(),clearInterval(this.timer),clearTimeout(this.settle)}render(){let e=Array.from({length:this.last+1},(i,a)=>a);return f`<section aria-roledescription=${ee("carousel")} aria-label=${this.label} part="carousel" @keydown=${this.onKey}
170
382
  @mouseenter=${()=>this.hold(!0)} @mouseleave=${()=>this.hold(!1)} @focusin=${()=>this.hold(!0)} @focusout=${()=>this.hold(!1)}>
171
383
  <div class="track" part="track" tabindex="0" @scroll=${this.onScroll}><slot @slotchange=${this.onSlots}></slot></div>
172
384
  <div class="controls" part="controls">
173
- <div class="dots">${e.length>1?e.map(i=>b`<button class="dot" type="button" aria-label=${G("Go to slide {slide}",{slide:i+1})} aria-current=${i===this.index?"true":"false"} @click=${()=>this.go(i)}><span></span></button>`):C}</div>
385
+ <div class="dots">${e.length>1?e.map(i=>f`<button class="dot" type="button" aria-label=${ee("Go to slide {slide}",{slide:i+1})} aria-current=${i===this.index?"true":"false"} @click=${()=>this.go(i)}><span></span></button>`):R}</div>
174
386
  <div class="buttons">
175
- ${this.canPlay?b`<button class="round" type="button" aria-label=${G(this.paused?"Play the slides":"Pause the slides")} @click=${this.togglePause}>${this.paused?ve("arrow-right","18px"):b`<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>`:C}
176
- <button class="round" type="button" aria-label=${G("Previous slide")} ?disabled=${this.index===0} @click=${()=>this.go(this.index-1)}>${ve("arrow-left","18px")}</button>
177
- <button class="round" type="button" aria-label=${G("Next slide")} ?disabled=${this.index>=this.last} @click=${()=>this.go(this.index+1)}>${ve("arrow-right","18px")}</button>
387
+ ${this.canPlay?f`<button class="round" type="button" aria-label=${ee(this.paused?"Play the slides":"Pause the slides")} @click=${this.togglePause}>${this.paused?Ce("arrow-right","18px"):f`<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>`:R}
388
+ <button class="round" type="button" aria-label=${ee("Previous slide")} ?disabled=${this.index===0} @click=${()=>this.go(this.index-1)}>${Ce("arrow-left","18px")}</button>
389
+ <button class="round" type="button" aria-label=${ee("Next slide")} ?disabled=${this.index>=this.last} @click=${()=>this.go(this.index+1)}>${Ce("arrow-right","18px")}</button>
178
390
  </div>
179
391
  </div>
180
- <p class="sr-only" aria-live="polite">${G("Slide {slide} of {slides}",{slide:this.index+1,slides:this.count})}</p>
181
- </section>`}};function gi(o,t,e){let i=o===t-1,a={wide:1,narrow:1,rows:1};if(e==="grid")return i&&(a.wide=t%3?4-t%3:1,a.narrow=t%2?2:1),a;if(o===0)return a;if(t===2)return{wide:2,narrow:2,rows:2};if(t===3)return{...a,wide:2};if(i){let s=(t-5)%4;a.wide=t===4?2:t>5&&s?5-s:1,a.narrow=t%2?1:2}return a}var nt=class extends F{constructor(){super();this.shown=-1;this.opener=null;this.items=[],this.layout="feature",this.label="Gallery",this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={items:{type:Array},layout:{type:String,reflect:!0},label:{type:String},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...F.styles,mt,he,ui,re`
392
+ <p class="sr-only" aria-live="polite">${ee("Slide {slide} of {slides}",{slide:this.index+1,slides:this.count})}</p>
393
+ </section>`}};function Ui(n,t,e){let i=n===t-1,a={wide:1,narrow:1,rows:1};if(e==="grid")return i&&(a.wide=t%3?4-t%3:1,a.narrow=t%2?2:1),a;if(n===0)return a;if(t===2)return{wide:2,narrow:2,rows:2};if(t===3)return{...a,wide:2};if(i){let r=(t-5)%4;a.wide=t===4?2:t>5&&r?5-r:1,a.narrow=t%2?1:2}return a}var Et=class extends Y{constructor(){super();this.shown=-1;this.opener=null;this.items=[],this.layout="feature",this.label="Gallery",this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={items:{type:Array},layout:{type:String,reflect:!0},label:{type:String},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...Y.styles,Nt,xe,Di,he`
182
394
  :host { display: block; container-type: inline-size; }
183
- ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${p(3)}; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 180px; }
395
+ ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${h(3)}; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 180px; }
184
396
  :host([layout='grid']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 220px; }
185
397
  li { grid-column: span var(--span-wide, 1); grid-row: span var(--span-rows, 1); }
186
398
  :host([layout='feature']) li:first-child { grid-column: span 2; grid-row: span 2; }
187
- .open { position: relative; display: block; inline-size: 100%; block-size: 100%; padding: 0; border: 0; background: ${d.surfaceInset}; border-radius: ${d.radiusXl}; overflow: hidden; cursor: zoom-in; }
399
+ .open { position: relative; display: block; inline-size: 100%; block-size: 100%; padding: 0; border: 0; background: ${p.surfaceInset}; border-radius: ${p.radiusXl}; overflow: hidden; cursor: zoom-in; }
188
400
  .open img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 300ms ease-out; }
189
401
  .open:hover img { transform: scale(1.03); }
190
402
  @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); } }
191
403
  dialog { padding: 0; border: 0; background: transparent; max-inline-size: none; max-block-size: none; inline-size: 100vw; block-size: 100dvh; }
192
404
  dialog::backdrop { background: rgb(10 14 12 / 0.9); }
193
- .stage { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; block-size: 100%; box-sizing: border-box; padding: ${p(4)}; gap: ${p(3)}; color: #fff; }
194
- .bar { display: flex; align-items: center; justify-content: space-between; ${M("sm")} }
195
- .middle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: ${p(3)}; min-block-size: 0; }
196
- .middle img { display: block; margin: auto; max-inline-size: 100%; max-block-size: 100%; object-fit: contain; border-radius: ${d.radiusLg}; }
405
+ .stage { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; block-size: 100%; box-sizing: border-box; padding: ${h(4)}; gap: ${h(3)}; color: #fff; }
406
+ .bar { display: flex; align-items: center; justify-content: space-between; ${B("sm")} }
407
+ .middle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: ${h(3)}; min-block-size: 0; }
408
+ .middle img { display: block; margin: auto; max-inline-size: 100%; max-block-size: 100%; object-fit: contain; border-radius: ${p.radiusLg}; }
197
409
  figure { margin: 0; display: flex; min-block-size: 0; block-size: 100%; }
198
- .caption { margin: 0; text-align: center; ${M("sm")} }
199
- `]}get dialog(){return this.renderRoot.querySelector("dialog")}open(e,i){this.opener=i.currentTarget,this.shown=e,this.requestUpdate(),this.updateComplete.then(()=>{let a=this.dialog;a&&!a.open&&(typeof a.showModal=="function"?a.showModal():a.setAttribute("open",""))})}close(){let e=this.dialog;e?.open&&(typeof e.close=="function"?e.close():e.removeAttribute("open")),this.onClosed()}onClosed(){this.shown!==-1&&(this.shown=-1,this.requestUpdate(),this.opener?.focus())}step(e){let i=(this.items??[]).length;!i||this.shown<0||(this.shown=(this.shown+e+i)%i,this.requestUpdate())}onKey(e){e.key==="ArrowRight"&&(e.preventDefault(),this.step(1)),e.key==="ArrowLeft"&&(e.preventDefault(),this.step(-1))}render(){let e=this.items??[],i=this.shown>=0?e[this.shown]:void 0;return b`<ul aria-label=${this.label} part="list">${e.map((a,s)=>{let n=gi(s,e.length,this.layout);return b`<li style=${`--span-wide:${n.wide};--span-narrow:${n.narrow};--span-rows:${n.rows}`}>
200
- <button class="open" type="button" aria-label=${G("View larger: {picture}",{picture:a.alt})} @click=${l=>this.open(s,l)}><img src=${a.src} alt=${a.alt} loading="lazy" /></button>
410
+ .caption { margin: 0; text-align: center; ${B("sm")} }
411
+ `]}get dialog(){return this.renderRoot.querySelector("dialog")}open(e,i){this.opener=i.currentTarget,this.shown=e,this.requestUpdate(),this.updateComplete.then(()=>{let a=this.dialog;a&&!a.open&&(typeof a.showModal=="function"?a.showModal():a.setAttribute("open",""))})}close(){let e=this.dialog;e?.open&&(typeof e.close=="function"?e.close():e.removeAttribute("open")),this.onClosed()}onClosed(){this.shown!==-1&&(this.shown=-1,this.requestUpdate(),this.opener?.focus())}step(e){let i=(this.items??[]).length;!i||this.shown<0||(this.shown=(this.shown+e+i)%i,this.requestUpdate())}onKey(e){e.key==="ArrowRight"&&(e.preventDefault(),this.step(1)),e.key==="ArrowLeft"&&(e.preventDefault(),this.step(-1))}render(){let e=this.items??[],i=this.shown>=0?e[this.shown]:void 0;return f`<ul aria-label=${this.label} part="list">${e.map((a,r)=>{let o=Ui(r,e.length,this.layout);return f`<li style=${`--span-wide:${o.wide};--span-narrow:${o.narrow};--span-rows:${o.rows}`}>
412
+ <button class="open" type="button" aria-label=${ee("View larger: {picture}",{picture:a.alt})} @click=${l=>this.open(r,l)}><img src=${a.src} alt=${a.alt} loading="lazy" /></button>
201
413
  </li>`})}</ul>
202
414
  <dialog aria-label=${this.label} @keydown=${this.onKey} @close=${this.onClosed}>
203
- ${i?b`<div class="stage">
204
- <div class="bar"><span>${this.shown+1} of ${e.length}</span><button class="round" type="button" aria-label=${G("Close")} @click=${this.close}>${ve("close","18px")}</button></div>
415
+ ${i?f`<div class="stage">
416
+ <div class="bar"><span>${this.shown+1} of ${e.length}</span><button class="round" type="button" aria-label=${ee("Close")} @click=${this.close}>${Ce("close","18px")}</button></div>
205
417
  <div class="middle">
206
- <button class="round" type="button" aria-label=${G("Previous picture")} @click=${()=>this.step(-1)}>${ve("arrow-left","18px")}</button>
418
+ <button class="round" type="button" aria-label=${ee("Previous picture")} @click=${()=>this.step(-1)}>${Ce("arrow-left","18px")}</button>
207
419
  <figure><img src=${i.src} alt=${i.alt} /></figure>
208
- <button class="round" type="button" aria-label=${G("Next picture")} @click=${()=>this.step(1)}>${ve("arrow-right","18px")}</button>
420
+ <button class="round" type="button" aria-label=${ee("Next picture")} @click=${()=>this.step(1)}>${Ce("arrow-right","18px")}</button>
209
421
  </div>
210
422
  <p class="caption">${i.caption??i.alt}</p>
211
- </div>`:C}
212
- </dialog>`}},ot=class extends F{static{this.properties={heading:{type:String},items:{type:Array},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="",this.items=[],this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...F.styles,mt,he,re`
423
+ </div>`:R}
424
+ </dialog>`}},Ct=class extends Y{static{this.properties={heading:{type:String},items:{type:Array},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="",this.items=[],this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...Y.styles,Nt,xe,he`
213
425
  :host { display: block; }
214
- p { margin: 0 0 ${p(6)}; text-align: center; color: ${d.textMuted}; ${M("sm")} font-weight: ${ae("medium")}; }
215
- ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: ${p(8)} ${p(12)}; }
426
+ p { margin: 0 0 ${h(6)}; text-align: center; color: ${p.textMuted}; ${B("sm")} font-weight: ${pe("medium")}; }
427
+ ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: ${h(8)} ${h(12)}; }
216
428
  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; }
217
429
  li:hover img { filter: none; opacity: 1; }
218
- a { display: block; border-radius: ${d.radiusSm}; }
219
- `]}render(){return b`${this.heading?b`<p part="heading">${this.heading}</p>`:C}
220
- <ul part="list">${(this.items??[]).map(t=>b`<li>${t.href?b`<a href=${t.href}><img src=${t.src} alt=${t.alt} /></a>`:b`<img src=${t.src} alt=${t.alt} />`}</li>`)}</ul>`}},lt=class extends F{static{this.properties={items:{type:Array},orientation:{type:String,reflect:!0},look:{type:String,reflect:!0},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.items=[],this.orientation="horizontal",this.look="numbered",this.headingLevel=3,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...F.styles,he,ut,re`
430
+ a { display: block; border-radius: ${p.radiusSm}; }
431
+ `]}render(){return f`${this.heading?f`<p part="heading">${this.heading}</p>`:R}
432
+ <ul part="list">${(this.items??[]).map(t=>f`<li>${t.href?f`<a href=${t.href}><img src=${t.src} alt=${t.alt} /></a>`:f`<img src=${t.src} alt=${t.alt} />`}</li>`)}</ul>`}},Bt=class extends Y{static{this.properties={items:{type:Array},orientation:{type:String,reflect:!0},look:{type:String,reflect:!0},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.items=[],this.orientation="horizontal",this.look="numbered",this.headingLevel=3,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...Y.styles,xe,jt,he`
221
433
  :host { display: block; container-type: inline-size; }
222
- ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: ${p(6)}; }
223
- li { position: relative; counter-increment: step; display: flex; flex-direction: column; gap: ${p(2)}; }
224
- li::before { content: counter(step); display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; border-radius: 50%; background: ${d.brand}; color: ${d.onBrand}; ${M("sm")} font-weight: ${ae("bold")}; position: relative; z-index: 1; margin-block-end: ${p(2)}; }
225
- li:not(:last-child)::after { content: ''; position: absolute; inset-block-start: 20px; inset-inline-start: 48px; inset-inline-end: calc(-1 * ${p(6)} + 8px); block-size: 2px; background: ${d.rule}; }
226
- .h { ${M("lg")} letter-spacing: 0; }
227
- .meta { margin: 0; ${M("sm")} color: ${d.textMuted}; font-family: ${d.fontMono}; letter-spacing: 0.02em; }
228
- .body { margin: 0; color: ${d.textMuted}; line-height: ${mi("normal")}; text-wrap: pretty; }
434
+ ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: ${h(6)}; }
435
+ li { position: relative; counter-increment: step; display: flex; flex-direction: column; gap: ${h(2)}; }
436
+ li::before { content: counter(step); display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; border-radius: 50%; background: ${p.brand}; color: ${p.onBrand}; ${B("sm")} font-weight: ${pe("bold")}; position: relative; z-index: 1; margin-block-end: ${h(2)}; }
437
+ li:not(:last-child)::after { content: ''; position: absolute; inset-block-start: 20px; inset-inline-start: 48px; inset-inline-end: calc(-1 * ${h(6)} + 8px); block-size: 2px; background: ${p.rule}; }
438
+ .h { ${B("lg")} letter-spacing: 0; }
439
+ .meta { margin: 0; ${B("sm")} color: ${p.textMuted}; font-family: ${p.fontMono}; letter-spacing: 0.02em; }
440
+ .body { margin: 0; color: ${p.textMuted}; line-height: ${_i("normal")}; text-wrap: pretty; }
229
441
  :host([orientation='vertical']) ol { grid-auto-flow: row; }
230
442
  :host([orientation='vertical']) li { padding-inline-start: 56px; min-block-size: 56px; }
231
443
  :host([orientation='vertical']) li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }
232
- :host([orientation='vertical']) li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${p(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }
444
+ :host([orientation='vertical']) li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${h(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }
233
445
  @container (max-width: 40rem) {
234
446
  ol { grid-auto-flow: row; }
235
447
  li { padding-inline-start: 56px; min-block-size: 56px; }
236
448
  li::before { position: absolute; inset-inline-start: 0; inset-block-start: 0; margin: 0; }
237
- li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${p(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }
449
+ li:not(:last-child)::after { inset-block-start: 48px; inset-block-end: calc(-1 * ${h(6)} + 8px); inset-inline-start: 19px; inset-inline-end: auto; inline-size: 2px; block-size: auto; }
238
450
  }
239
- :host([look='ruled']) li { padding-block-start: ${p(5)}; border-block-start: 3px solid var(--rule); }
451
+ :host([look='ruled']) li { padding-block-start: ${h(5)}; border-block-start: 3px solid var(--rule); }
240
452
  :host([look='ruled']) li::before, :host([look='ruled']) li::after { display: none; }
241
- :host([look='ruled']) ol { gap: ${p(5)}; }
453
+ :host([look='ruled']) ol { gap: ${h(5)}; }
242
454
  /* On a phone the ruled steps become a branch graph: one trunk down the left, and each step a coloured branch off it with a dot. */
243
455
  @container (max-width: 40rem) {
244
456
  :host([look='ruled']) ol { gap: 0; }
245
- :host([look='ruled']) li { padding-inline-start: 40px; padding-block: ${p(6)}; min-block-size: 0; border-block-start: 0; }
246
- :host([look='ruled']) li::before { display: block; content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: 2px; block-size: auto; border-radius: 0; margin: 0; background: ${d.text}; }
247
- :host([look='ruled']) li::after { display: block; content: ''; position: absolute; inset-block: ${p(3)}; inset-inline-start: 2px; inset-inline-end: auto; 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; }
457
+ :host([look='ruled']) li { padding-inline-start: 40px; padding-block: ${h(6)}; min-block-size: 0; border-block-start: 0; }
458
+ :host([look='ruled']) li::before { display: block; content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: 2px; block-size: auto; border-radius: 0; margin: 0; background: ${p.text}; }
459
+ :host([look='ruled']) li::after { display: block; content: ''; position: absolute; inset-block: ${h(3)}; inset-inline-start: 2px; inset-inline-end: auto; 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; }
248
460
  }
249
461
  @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; } }
250
- `]}render(){return b`<ol part="list">${(this.items??[]).map((t,e)=>b`<li part="step" style=${this.look==="ruled"?`--rule:var(--impakt-color-chart-${e%5+1}, var(--impakt-color-brand-default, #1f4ed8))`:C}>
251
- ${t.meta?b`<p class="meta">${t.meta}</p>`:C}
462
+ `]}render(){return f`<ol part="list">${(this.items??[]).map((t,e)=>f`<li part="step" style=${this.look==="ruled"?`--rule:var(--impakt-color-chart-${e%5+1}, var(--impakt-color-brand-default, #1f4ed8))`:R}>
463
+ ${t.meta?f`<p class="meta">${t.meta}</p>`:R}
252
464
  <div class="h" role="heading" aria-level=${this.headingLevel}>${t.heading}</div>
253
- ${t.text?b`<p class="body">${t.text}</p>`:C}
254
- </li>`)}</ol>`}},ct=class extends F{static{this.properties={eyebrow:{type:String},heading:{type:String},lead:{type:String},points:{type:Array},level:{type:Number,reflect:!0},imageSrc:{type:String,attribute:"image-src"},imageAlt:{type:String,attribute:"image-alt"},imageSide:{type:String,reflect:!0,attribute:"image-side"},insetSrc:{type:String,attribute:"inset-src"},insetAlt:{type:String,attribute:"inset-alt"},ratio:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.eyebrow="",this.heading="",this.lead="",this.points=[],this.level=2,this.imageSrc="",this.imageAlt="",this.imageSide="end",this.insetSrc="",this.insetAlt="",this.ratio="4:3",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...F.styles,he,ut,re`
465
+ ${t.text?f`<p class="body">${t.text}</p>`:R}
466
+ </li>`)}</ol>`}},It=class extends Y{static{this.properties={eyebrow:{type:String},heading:{type:String},lead:{type:String},points:{type:Array},level:{type:Number,reflect:!0},imageSrc:{type:String,attribute:"image-src"},imageAlt:{type:String,attribute:"image-alt"},imageSide:{type:String,reflect:!0,attribute:"image-side"},insetSrc:{type:String,attribute:"inset-src"},insetAlt:{type:String,attribute:"inset-alt"},ratio:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.eyebrow="",this.heading="",this.lead="",this.points=[],this.level=2,this.imageSrc="",this.imageAlt="",this.imageSide="end",this.insetSrc="",this.insetAlt="",this.ratio="4:3",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...Y.styles,xe,jt,he`
255
467
  :host { display: block; container-type: inline-size; --ratio: 4 / 3; }
256
468
  :host([ratio='1:1']) { --ratio: 1 / 1; }
257
469
  :host([ratio='3:2']) { --ratio: 3 / 2; }
258
470
  :host([ratio='16:9']) { --ratio: 16 / 9; }
259
- .split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${p(16)}; align-items: center; }
471
+ .split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${h(16)}; align-items: center; }
260
472
  :host([image-side='start']) .picture { order: -1; }
261
- .words { display: flex; flex-direction: column; gap: ${p(4)}; }
262
- .h { ${M("4xl")} }
263
- .lead { ${M("lg")} }
264
- ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: ${p(3)}; }
265
- li { display: flex; gap: ${p(3)}; align-items: flex-start; line-height: ${mi("normal")}; }
266
- .tick { flex: none; display: inline-flex; align-items: center; justify-content: center; inline-size: 24px; block-size: 24px; border-radius: 50%; background: ${d.brandSubtle}; color: ${d.brand}; }
267
- .actions { display: flex; flex-wrap: wrap; gap: ${p(3)} ${p(4)}; align-items: center; margin-block-start: ${p(2)}; }
268
- img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; border-radius: ${d.radius2xl}; box-shadow: ${d.shadowXl}; }
473
+ .words { display: flex; flex-direction: column; gap: ${h(4)}; }
474
+ .h { ${B("4xl")} }
475
+ .lead { ${B("lg")} }
476
+ ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: ${h(3)}; }
477
+ li { display: flex; gap: ${h(3)}; align-items: flex-start; line-height: ${_i("normal")}; }
478
+ .tick { flex: none; display: inline-flex; align-items: center; justify-content: center; inline-size: 24px; block-size: 24px; border-radius: 50%; background: ${p.brandSubtle}; color: ${p.brand}; }
479
+ .actions { display: flex; flex-wrap: wrap; gap: ${h(3)} ${h(4)}; align-items: center; margin-block-start: ${h(2)}; }
480
+ img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; border-radius: ${p.radius2xl}; box-shadow: ${p.shadowXl}; }
269
481
  .picture { position: relative; }
270
482
  .picture.has-inset { padding-block-end: 8%; padding-inline-end: 4%; }
271
- .inset { position: absolute; inset-block-end: 0; inset-inline-end: 0; inline-size: 42%; aspect-ratio: 10 / 7; border: 6px solid ${d.surfaceCard}; border-radius: ${d.radiusXl}; box-sizing: border-box; }
483
+ .inset { position: absolute; inset-block-end: 0; inset-inline-end: 0; inline-size: 42%; aspect-ratio: 10 / 7; border: 6px solid ${p.surfaceCard}; border-radius: ${p.radiusXl}; box-sizing: border-box; }
272
484
  @container (max-width: 48rem) {
273
- .split { grid-template-columns: minmax(0, 1fr); gap: ${p(8)}; }
485
+ .split { grid-template-columns: minmax(0, 1fr); gap: ${h(8)}; }
274
486
  :host([image-side='start']) .picture { order: 0; }
275
- .h { ${M("3xl")} }
487
+ .h { ${B("3xl")} }
276
488
  }
277
- `]}render(){return b`<div class="split" part="split">
489
+ `]}render(){return f`<div class="split" part="split">
278
490
  <div class="words">
279
- ${this.eyebrow?b`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:C}
491
+ ${this.eyebrow?f`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:R}
280
492
  <div class="h" role="heading" aria-level=${this.level}>${this.heading}</div>
281
- ${this.lead?b`<p class="lead">${this.lead}</p>`:C}
282
- ${this.points?.length?b`<ul>${this.points.map(t=>b`<li><span class="tick">${ve("check","14px")}</span><span>${t}</span></li>`)}</ul>`:C}
493
+ ${this.lead?f`<p class="lead">${this.lead}</p>`:R}
494
+ ${this.points?.length?f`<ul>${this.points.map(t=>f`<li><span class="tick">${Ce("check","14px")}</span><span>${t}</span></li>`)}</ul>`:R}
283
495
  <div class="actions"><slot name="actions"></slot></div>
284
496
  </div>
285
- ${this.imageSrc?b`<div class="picture ${this.insetSrc?"has-inset":""}"><img src=${this.imageSrc} alt=${this.imageAlt} loading="lazy" part="image" />${this.insetSrc?b`<img class="inset" src=${this.insetSrc} alt=${this.insetAlt} loading="lazy" />`:C}</div>`:C}
286
- </div>`}},dt=class extends F{static{this.properties={heading:{type:String},lead:{type:String},tone:{type:String,reflect:!0},align:{type:String,reflect:!0},imageSrc:{type:String,attribute:"image-src"},imageAlt:{type:String,attribute:"image-alt"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="",this.lead="",this.tone="brand",this.align="split",this.imageSrc="",this.imageAlt="",this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...F.styles,he,ut,re`
497
+ ${this.imageSrc?f`<div class="picture ${this.insetSrc?"has-inset":""}"><img src=${this.imageSrc} alt=${this.imageAlt} loading="lazy" part="image" />${this.insetSrc?f`<img class="inset" src=${this.insetSrc} alt=${this.insetAlt} loading="lazy" />`:R}</div>`:R}
498
+ </div>`}},Ht=class extends Y{static{this.properties={heading:{type:String},lead:{type:String},tone:{type:String,reflect:!0},align:{type:String,reflect:!0},imageSrc:{type:String,attribute:"image-src"},imageAlt:{type:String,attribute:"image-alt"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="",this.lead="",this.tone="brand",this.align="split",this.imageSrc="",this.imageAlt="",this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...Y.styles,xe,jt,he`
287
499
  :host { display: block; container-type: inline-size; }
288
- .panel { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: ${p(8)}; padding: ${p(16)}; border-radius: ${d.radius2xl}; background: ${d.surfaceCard}; box-shadow: ${d.shadowSm}, inset 0 0 0 1px ${d.hairline}; }
289
- :host([tone='subtle']) .panel { background: ${d.surfaceSubtle}; box-shadow: none; }
290
- :host([tone='brand']) .panel { background: ${d.brand}; color: ${d.onBrand}; box-shadow: ${d.shadowLg}; }
500
+ .panel { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: ${h(8)}; padding: ${h(16)}; border-radius: ${p.radius2xl}; background: ${p.surfaceCard}; box-shadow: ${p.shadowSm}, inset 0 0 0 1px ${p.hairline}; }
501
+ :host([tone='subtle']) .panel { background: ${p.surfaceSubtle}; box-shadow: none; }
502
+ :host([tone='brand']) .panel { background: ${p.brand}; color: ${p.onBrand}; box-shadow: ${p.shadowLg}; }
291
503
  /* Only the words take the light colours: a button in the actions keeps its own. */
292
- :host([tone='brand']) .words { --impakt-color-text-heading: ${d.onBrand}; --impakt-color-text-default: ${d.onBrand}; --impakt-color-text-muted: ${d.onBrand}; --impakt-color-text-link: ${d.onBrand}; }
504
+ :host([tone='brand']) .words { --impakt-color-text-heading: ${p.onBrand}; --impakt-color-text-default: ${p.onBrand}; --impakt-color-text-muted: ${p.onBrand}; --impakt-color-text-link: ${p.onBrand}; }
293
505
  /* A soft glow in the corner, so a flat colour has some depth. Decoration only. */
294
- :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, ${d.onBrand} 18%, transparent), transparent); pointer-events: none; }
506
+ :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, ${p.onBrand} 18%, transparent), transparent); pointer-events: none; }
295
507
  .photo { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
296
508
  .panel.pictured { min-block-size: 26rem; color: #fff; background: #12211a; --impakt-color-text-heading: #fff; }
297
509
  .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%); }
298
510
  .panel.pictured .words, .panel.pictured .actions { z-index: 1; }
299
511
  @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%); } }
300
- .words { position: relative; display: flex; flex-direction: column; gap: ${p(3)}; max-inline-size: 40rem; }
301
- .h { ${M("4xl")} }
302
- .lead { ${M("lg")} }
303
- .actions { position: relative; flex: none; display: flex; flex-wrap: wrap; gap: ${p(3)}; }
512
+ .words { position: relative; display: flex; flex-direction: column; gap: ${h(3)}; max-inline-size: 40rem; }
513
+ .h { ${B("4xl")} }
514
+ .lead { ${B("lg")} }
515
+ .actions { position: relative; flex: none; display: flex; flex-wrap: wrap; gap: ${h(3)}; }
304
516
  :host([align='stacked']) .panel { flex-direction: column; align-items: flex-start; justify-content: center; }
305
517
  :host([align='center']) .panel { flex-direction: column; text-align: center; }
306
518
  :host([align='center']) .words { align-items: center; }
307
- @container (max-width: 48rem) { .panel { flex-direction: column; align-items: flex-start; padding: ${p(8)} ${p(6)}; } .h { ${M("3xl")} } :host([align='center']) .panel { align-items: center; } }
519
+ @container (max-width: 48rem) { .panel { flex-direction: column; align-items: flex-start; padding: ${h(8)} ${h(6)}; } .h { ${B("3xl")} } :host([align='center']) .panel { align-items: center; } }
308
520
  @media (forced-colors: active) { .panel { border: 1px solid CanvasText; } }
309
- `]}render(){return b`<div class="panel ${this.imageSrc?"pictured":""}" part="panel">
310
- ${this.imageSrc?b`<img class="photo" src=${this.imageSrc} alt=${this.imageAlt} />`:C}
521
+ `]}render(){return f`<div class="panel ${this.imageSrc?"pictured":""}" part="panel">
522
+ ${this.imageSrc?f`<img class="photo" src=${this.imageSrc} alt=${this.imageAlt} />`:R}
311
523
  <div class="words">
312
524
  <div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>
313
- ${this.lead?b`<p class="lead">${this.lead}</p>`:C}
525
+ ${this.lead?f`<p class="lead">${this.lead}</p>`:R}
314
526
  </div>
315
527
  <div class="actions"><slot name="actions"></slot></div>
316
- </div>`}},hi=o=>b`<span class="stars" role="img" aria-label=${G("Rated {rating} out of 5",{rating:o})}>${[1,2,3,4,5].map(t=>b`<svg width="18" height="18" viewBox="0 0 24 24" aria-hidden="true" fill=${t<=o?"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>`,Gi=o=>o.split(/\s+/).filter(t=>/^[A-Za-z]/.test(t)&&t.toLowerCase()!=="and").slice(0,2).map(t=>t[0].toUpperCase()).join(""),pt=class extends F{static{this.properties={summary:{type:String},rating:{type:Number},items:{type:Array},columns:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.summary="",this.rating=void 0,this.items=[],this.columns="three",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...F.styles,he,re`
528
+ </div>`}},qi=n=>f`<span class="stars" role="img" aria-label=${ee("Rated {rating} out of 5",{rating:n})}>${[1,2,3,4,5].map(t=>f`<svg width="18" height="18" viewBox="0 0 24 24" aria-hidden="true" fill=${t<=n?"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>`,La=n=>n.split(/\s+/).filter(t=>/^[A-Za-z]/.test(t)&&t.toLowerCase()!=="and").slice(0,2).map(t=>t[0].toUpperCase()).join(""),Rt=class extends Y{static{this.properties={summary:{type:String},rating:{type:Number},items:{type:Array},columns:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.summary="",this.rating=void 0,this.items=[],this.columns="three",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...Y.styles,xe,he`
317
529
  :host { display: block; container-type: inline-size; }
318
- .top { display: flex; align-items: center; gap: ${p(3)}; margin-block-end: ${p(6)}; ${M("sm")} font-weight: ${ae("medium")}; }
319
- .stars { display: inline-flex; gap: 2px; color: ${Yi}; }
320
- ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${p(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }
530
+ .top { display: flex; align-items: center; gap: ${h(3)}; margin-block-end: ${h(6)}; ${B("sm")} font-weight: ${pe("medium")}; }
531
+ .stars { display: inline-flex; gap: 2px; color: ${Ma}; }
532
+ ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${h(6)}; grid-template-columns: repeat(3, minmax(0, 1fr)); }
321
533
  :host([columns='two']) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
322
- li { display: flex; flex-direction: column; gap: ${p(4)}; padding: ${p(6)}; background: ${d.surfaceCard}; border-radius: ${d.radiusXl}; box-shadow: ${d.shadowSm}, inset 0 0 0 1px ${d.hairline}; }
323
- blockquote { margin: 0; flex: 1; ${M("md")} text-wrap: pretty; }
324
- .who { display: flex; align-items: center; gap: ${p(3)}; }
325
- .face { flex: none; display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; border-radius: 50%; overflow: hidden; background: ${d.brandSubtle}; color: ${d.brand}; ${M("sm")} font-weight: ${ae("bold")}; }
534
+ li { display: flex; flex-direction: column; gap: ${h(4)}; padding: ${h(6)}; background: ${p.surfaceCard}; border-radius: ${p.radiusXl}; box-shadow: ${p.shadowSm}, inset 0 0 0 1px ${p.hairline}; }
535
+ blockquote { margin: 0; flex: 1; ${B("md")} text-wrap: pretty; }
536
+ .who { display: flex; align-items: center; gap: ${h(3)}; }
537
+ .face { flex: none; display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; border-radius: 50%; overflow: hidden; background: ${p.brandSubtle}; color: ${p.brand}; ${B("sm")} font-weight: ${pe("bold")}; }
326
538
  .face img { inline-size: 100%; block-size: 100%; object-fit: cover; }
327
- .name { font-weight: ${ae("semibold")}; ${M("sm")} }
328
- .about { color: ${d.textMuted}; ${M("sm")} }
539
+ .name { font-weight: ${pe("semibold")}; ${B("sm")} }
540
+ .about { color: ${p.textMuted}; ${B("sm")} }
329
541
  @container (max-width: 56rem) { ul, :host([columns='two']) ul { grid-template-columns: minmax(0, 1fr); } }
330
- `]}render(){return b`${this.summary||this.rating?b`<p class="top" part="summary" style="margin-block-start:0">${this.rating?hi(Math.round(this.rating)):C}<span>${this.summary}</span></p>`:C}
331
- <ul part="list">${(this.items??[]).map(t=>b`<li part="review">
332
- ${t.rating?hi(t.rating):C}
542
+ `]}render(){return f`${this.summary||this.rating?f`<p class="top" part="summary" style="margin-block-start:0">${this.rating?qi(Math.round(this.rating)):R}<span>${this.summary}</span></p>`:R}
543
+ <ul part="list">${(this.items??[]).map(t=>f`<li part="review">
544
+ ${t.rating?qi(t.rating):R}
333
545
  <blockquote>${t.quote}</blockquote>
334
- <div class="who"><span class="face" aria-hidden="true">${t.avatarSrc?b`<img src=${t.avatarSrc} alt="" />`:Gi(t.person)}</span><span><span class="name">${t.person}</span>${t.about?b`<br /><span class="about">${t.about}</span>`:C}</span></div>
335
- </li>`)}</ul>`}},ht=class extends F{constructor(){super();this.done=!1;this.heading="",this.lead="",this.label="Email address",this.buttonText="Sign up",this.smallPrint="",this.doneText="Thank you. You\u2019re on the list.",this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={heading:{type:String},lead:{type:String},label:{type:String},buttonText:{type:String,attribute:"button-text"},smallPrint:{type:String,attribute:"small-print"},doneText:{type:String,attribute:"done-text"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...F.styles,mt,he,ut,re`
546
+ <div class="who"><span class="face" aria-hidden="true">${t.avatarSrc?f`<img src=${t.avatarSrc} alt="" />`:La(t.person)}</span><span><span class="name">${t.person}</span>${t.about?f`<br /><span class="about">${t.about}</span>`:R}</span></div>
547
+ </li>`)}</ul>`}},Pt=class extends Y{constructor(){super();this.done=!1;this.heading="",this.lead="",this.label="Email address",this.buttonText="Sign up",this.smallPrint="",this.doneText="Thank you. You\u2019re on the list.",this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={heading:{type:String},lead:{type:String},label:{type:String},buttonText:{type:String,attribute:"button-text"},smallPrint:{type:String,attribute:"small-print"},doneText:{type:String,attribute:"done-text"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...Y.styles,Nt,xe,jt,he`
336
548
  :host { display: block; container-type: inline-size; }
337
- .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${p(8)}; align-items: center; }
338
- .words { display: flex; flex-direction: column; gap: ${p(2)}; }
339
- .h { ${M("2xl")} }
340
- form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: ${p(1)} ${p(3)}; }
341
- label { grid-column: 1 / -1; ${M("sm")} font-weight: ${ae("semibold")}; }
342
- input { min-block-size: 44px; box-sizing: border-box; inline-size: 100%; padding: ${p(2.5)} ${p(3)}; font: inherit; color: ${d.text}; background: ${d.surfaceCard}; border: ${d.borderThin} solid ${d.border}; border-radius: ${d.radiusLg}; box-shadow: ${d.shadowXs}; }
343
- button { ${Gt} min-block-size: 44px; padding: ${p(2)} ${p(5)}; font: inherit; ${M("sm")} font-weight: ${ae("semibold")}; color: ${d.onBrand}; background: ${d.brand}; border: 0; border-radius: ${d.radiusLg}; box-shadow: ${d.shadowXs}; cursor: pointer; }
344
- button:hover { background: ${d.brandHover}; }
345
- .note { grid-column: 1 / -1; margin: ${p(1)} 0 0; color: ${d.textMuted}; ${M("sm")} }
346
- .done { margin: 0; ${M("md")} font-weight: ${ae("semibold")}; }
549
+ .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${h(8)}; align-items: center; }
550
+ .words { display: flex; flex-direction: column; gap: ${h(2)}; }
551
+ .h { ${B("2xl")} }
552
+ form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: ${h(1)} ${h(3)}; }
553
+ label { grid-column: 1 / -1; ${B("sm")} font-weight: ${pe("semibold")}; }
554
+ input { min-block-size: 44px; box-sizing: border-box; inline-size: 100%; padding: ${h(2.5)} ${h(3)}; font: inherit; color: ${p.text}; background: ${p.surfaceCard}; border: ${p.borderThin} solid ${p.border}; border-radius: ${p.radiusLg}; box-shadow: ${p.shadowXs}; }
555
+ button { ${yi} min-block-size: 44px; padding: ${h(2)} ${h(5)}; font: inherit; ${B("sm")} font-weight: ${pe("semibold")}; color: ${p.onBrand}; background: ${p.brand}; border: 0; border-radius: ${p.radiusLg}; box-shadow: ${p.shadowXs}; cursor: pointer; }
556
+ button:hover { background: ${p.brandHover}; }
557
+ .note { grid-column: 1 / -1; margin: ${h(1)} 0 0; color: ${p.textMuted}; ${B("sm")} }
558
+ .done { margin: 0; ${B("md")} font-weight: ${pe("semibold")}; }
347
559
  @container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }
348
- `]}submit(e){e.preventDefault();let i=e.currentTarget;if(typeof i.reportValidity=="function"&&!i.reportValidity())return;let a=i.querySelector("input").value.trim();this.dispatchEvent(new CustomEvent("impakt-submit",{detail:{email:a},bubbles:!0,composed:!0})),this.done=!0,this.requestUpdate()}render(){let e=this.id_("email");return b`<div class="wrap" part="wrap">
560
+ `]}submit(e){e.preventDefault();let i=e.currentTarget;if(typeof i.reportValidity=="function"&&!i.reportValidity())return;let a=i.querySelector("input").value.trim();this.dispatchEvent(new CustomEvent("impakt-submit",{detail:{email:a},bubbles:!0,composed:!0})),this.done=!0,this.requestUpdate()}render(){let e=this.id_("email");return f`<div class="wrap" part="wrap">
349
561
  <div class="words">
350
- ${this.heading?b`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:C}
351
- ${this.lead?b`<p class="lead">${this.lead}</p>`:C}
562
+ ${this.heading?f`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:R}
563
+ ${this.lead?f`<p class="lead">${this.lead}</p>`:R}
352
564
  </div>
353
- <div aria-live="polite">${this.done?b`<p class="done">${this.doneText}</p>`:b`<form @submit=${this.submit}>
565
+ <div aria-live="polite">${this.done?f`<p class="done">${this.doneText}</p>`:f`<form @submit=${this.submit}>
354
566
  <label for=${e}>${this.label}</label>
355
567
  <input id=${e} type="email" name="email" autocomplete="email" required />
356
568
  <button type="submit">${this.buttonText}</button>
357
- ${this.smallPrint?b`<p class="note">${this.smallPrint}</p>`:C}
569
+ ${this.smallPrint?f`<p class="note">${this.smallPrint}</p>`:R}
358
570
  </form>`}</div>
359
- </div>`}};customElements.define("impakt-carousel",st);customElements.define("impakt-gallery",nt);customElements.define("impakt-logo-cloud",ot);customElements.define("impakt-steps",lt);customElements.define("impakt-media-split",ct);customElements.define("impakt-cta-banner",dt);customElements.define("impakt-reviews",pt);customElements.define("impakt-newsletter",ht);import{css as Ne,html as E,nothing as U}from"./atomic-ui.js";import{say as me,pageLocale as Xi,ImpaktElement as se,focusRing as je,targetSize as bi,fontWeight as Y,space as h,spaceAround as xt,t as r,type as j,iconSvg as we}from"./atomic-ui.js";var gt=class extends se{static{this.properties={imageSrc:{type:String,attribute:"image-src"},imageAlt:{type:String,attribute:"image-alt"},plots:{type:Array},hint:{type:String},selectedPlot:{type:String,attribute:"selected-plot"},panel:{type:String,reflect:!0},plotWord:{type:String,attribute:"plot-word"},actionText:{type:String,attribute:"action-text"},availableText:{type:String,attribute:"available-text"},reservedText:{type:String,attribute:"reserved-text"},soldText:{type:String,attribute:"sold-text"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.imageSrc="",this.imageAlt="",this.plots=[],this.hint="Choose a plot to see its price and availability.",this.selectedPlot="",this.panel="beside",this.plotWord="Plot",this.actionText="View this home",this.availableText="Available",this.reservedText="Reserved",this.soldText="Sold",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...se.styles,je,xt,Ne`
571
+ </div>`}};customElements.define("impakt-carousel",Lt);customElements.define("impakt-gallery",Et);customElements.define("impakt-logo-cloud",Ct);customElements.define("impakt-steps",Bt);customElements.define("impakt-media-split",It);customElements.define("impakt-cta-banner",Ht);customElements.define("impakt-reviews",Rt);customElements.define("impakt-newsletter",Pt);import{css as Je,html as I,nothing as K}from"./atomic-ui.js";import{say as ve,pageLocale as Ea,ImpaktElement as me,focusRing as Ke,targetSize as Yi,fontWeight as Z,space as m,spaceAround as Dt,t as s,type as W,iconSvg as Be}from"./atomic-ui.js";var Ot=class extends me{static{this.properties={imageSrc:{type:String,attribute:"image-src"},imageAlt:{type:String,attribute:"image-alt"},plots:{type:Array},hint:{type:String},selectedPlot:{type:String,attribute:"selected-plot"},panel:{type:String,reflect:!0},plotWord:{type:String,attribute:"plot-word"},actionText:{type:String,attribute:"action-text"},availableText:{type:String,attribute:"available-text"},reservedText:{type:String,attribute:"reserved-text"},soldText:{type:String,attribute:"sold-text"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.imageSrc="",this.imageAlt="",this.plots=[],this.hint="Choose a plot to see its price and availability.",this.selectedPlot="",this.panel="beside",this.plotWord="Plot",this.actionText="View this home",this.availableText="Available",this.reservedText="Reserved",this.soldText="Sold",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...me.styles,Ke,Dt,Je`
360
572
  :host { display: block; container-type: inline-size; }
361
- .wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: ${h(6)}; align-items: start; }
362
- .plan { position: relative; overflow: hidden; border-radius: ${r.radius2xl}; background: ${r.surfaceSubtle}; box-shadow: ${r.shadowMd}; line-height: 0; }
573
+ .wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: ${m(6)}; align-items: start; }
574
+ .plan { position: relative; overflow: hidden; border-radius: ${s.radius2xl}; background: ${s.surfaceSubtle}; box-shadow: ${s.shadowMd}; line-height: 0; }
363
575
  .plan img { inline-size: 100%; block-size: auto; }
364
- .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; ${j("xs")} line-height: 1; font-weight: ${Y("bold")}; color: ${r.onBrand}; background: ${r.brand}; border: 2px solid ${r.surfaceCard}; border-radius: 50%; box-shadow: ${r.shadowMd}; cursor: pointer; transition: transform 120ms ease-in-out; }
576
+ .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; ${W("xs")} line-height: 1; font-weight: ${Z("bold")}; color: ${s.onBrand}; background: ${s.brand}; border: 2px solid ${s.surfaceCard}; border-radius: 50%; box-shadow: ${s.shadowMd}; cursor: pointer; transition: transform 120ms ease-in-out; }
365
577
  .pin:hover { transform: scale(1.12); }
366
- .pin.reserved { color: ${r.text}; background: ${r.warningSubtle}; border-color: ${r.warning}; border-style: dashed; }
367
- .pin.sold { color: ${r.textMuted}; background: ${r.surfaceCard}; border-color: ${r.border}; border-radius: ${r.radius}; }
368
- .pin[aria-pressed='true'] { transform: scale(1.22); box-shadow: ${r.shadowLg}, 0 0 0 3px ${r.brand}; }
369
- .panel { display: flex; flex-direction: column; gap: ${h(3)}; padding: ${h(6)}; background: ${r.surfaceCard}; border-radius: ${r.radius2xl}; box-shadow: ${r.shadowSm}, 0 0 0 1px color-mix(in srgb, ${r.text} 6%, transparent); }
370
- .hint { margin: 0; color: ${r.textMuted}; }
371
- .name { margin: 0; font-family: ${r.fontHeading}; ${j("2xl")} font-weight: ${Y("bold")}; color: ${r.textHeading}; }
372
- .sub { margin: 0; color: ${r.textMuted}; }
373
- .price { margin: 0; ${j("xl")} font-weight: ${Y("semibold")}; }
374
- .status { align-self: flex-start; padding: ${h(.5)} ${h(2.5)}; ${j("xs")} font-weight: ${Y("semibold")}; color: ${r.successText}; background: ${r.successSubtle}; border-radius: 999px; }
375
- .status.reserved { color: ${r.warningText}; background: ${r.warningSubtle}; }
376
- .status.sold { color: ${r.text}; background: ${r.surfaceSubtle}; }
377
- .go { ${bi} display: inline-flex; align-items: center; justify-content: center; gap: ${h(2)}; padding: ${h(2)} ${h(4)}; ${j("sm")} font-weight: ${Y("semibold")}; color: ${r.onBrand}; text-decoration: none; background: ${r.brand}; border-radius: ${r.radiusLg}; }
378
- .go:hover { background: ${r.brandHover}; }
379
- .legend { display: flex; flex-wrap: wrap; gap: ${h(4)}; margin: ${h(3)} 0 0; padding: 0; list-style: none; ${j("sm")} color: ${r.textMuted}; }
380
- .legend li { display: inline-flex; align-items: center; gap: ${h(2)}; }
381
- .key { box-sizing: border-box; inline-size: 14px; block-size: 14px; background: ${r.brand}; border: 2px solid ${r.surfaceCard}; border-radius: 50%; outline: 1px solid color-mix(in srgb, currentColor 55%, transparent); }
382
- .key.reserved { background: ${r.warningSubtle}; border: 2px dashed ${r.warning}; }
383
- .key.sold { background: ${r.surfaceCard}; border: 2px solid ${r.border}; border-radius: 3px; }
384
- :host { --plan-card: var(--impakt-solid-card, ${r.surfaceCard}); --plan-text: var(--impakt-solid-text, ${r.text}); --plan-heading: var(--impakt-solid-heading, ${r.text}); --plan-muted: var(--impakt-solid-muted, ${r.textMuted}); }
578
+ .pin.reserved { color: ${s.text}; background: ${s.warningSubtle}; border-color: ${s.warning}; border-style: dashed; }
579
+ .pin.sold { color: ${s.textMuted}; background: ${s.surfaceCard}; border-color: ${s.border}; border-radius: ${s.radius}; }
580
+ .pin[aria-pressed='true'] { transform: scale(1.22); box-shadow: ${s.shadowLg}, 0 0 0 3px ${s.brand}; }
581
+ .panel { display: flex; flex-direction: column; gap: ${m(3)}; padding: ${m(6)}; background: ${s.surfaceCard}; border-radius: ${s.radius2xl}; box-shadow: ${s.shadowSm}, 0 0 0 1px color-mix(in srgb, ${s.text} 6%, transparent); }
582
+ .hint { margin: 0; color: ${s.textMuted}; }
583
+ .name { margin: 0; font-family: ${s.fontHeading}; ${W("2xl")} font-weight: ${Z("bold")}; color: ${s.textHeading}; }
584
+ .sub { margin: 0; color: ${s.textMuted}; }
585
+ .price { margin: 0; ${W("xl")} font-weight: ${Z("semibold")}; }
586
+ .status { align-self: flex-start; padding: ${m(.5)} ${m(2.5)}; ${W("xs")} font-weight: ${Z("semibold")}; color: ${s.successText}; background: ${s.successSubtle}; border-radius: 999px; }
587
+ .status.reserved { color: ${s.warningText}; background: ${s.warningSubtle}; }
588
+ .status.sold { color: ${s.text}; background: ${s.surfaceSubtle}; }
589
+ .go { ${Yi} display: inline-flex; align-items: center; justify-content: center; gap: ${m(2)}; padding: ${m(2)} ${m(4)}; ${W("sm")} font-weight: ${Z("semibold")}; color: ${s.onBrand}; text-decoration: none; background: ${s.brand}; border-radius: ${s.radiusLg}; }
590
+ .go:hover { background: ${s.brandHover}; }
591
+ .legend { display: flex; flex-wrap: wrap; gap: ${m(4)}; margin: ${m(3)} 0 0; padding: 0; list-style: none; ${W("sm")} color: ${s.textMuted}; }
592
+ .legend li { display: inline-flex; align-items: center; gap: ${m(2)}; }
593
+ .key { box-sizing: border-box; inline-size: 14px; block-size: 14px; background: ${s.brand}; border: 2px solid ${s.surfaceCard}; border-radius: 50%; outline: 1px solid color-mix(in srgb, currentColor 55%, transparent); }
594
+ .key.reserved { background: ${s.warningSubtle}; border: 2px dashed ${s.warning}; }
595
+ .key.sold { background: ${s.surfaceCard}; border: 2px solid ${s.border}; border-radius: 3px; }
596
+ :host { --plan-card: var(--impakt-solid-card, ${s.surfaceCard}); --plan-text: var(--impakt-solid-text, ${s.text}); --plan-heading: var(--impakt-solid-heading, ${s.text}); --plan-muted: var(--impakt-solid-muted, ${s.textMuted}); }
385
597
  :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); }
386
- @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: ${h(8)}; inline-size: 22.5rem; box-sizing: border-box; box-shadow: ${r.shadowXl}; } }
598
+ @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: ${m(8)}; inline-size: 22.5rem; box-sizing: border-box; box-shadow: ${s.shadowXl}; } }
387
599
  @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }
388
- `]}willUpdate(t){(t.has("selectedPlot")||t.has("plots"))&&this.selectedPlot&&!this.chosen&&(this.chosen=this.plots.find(e=>String(e.number)===this.selectedPlot))}word(t){return t==="sold"?this.soldText:t==="reserved"?this.reservedText:this.availableText}choose(t){this.chosen=t,this.requestUpdate(),this.dispatchEvent(new CustomEvent("impakt-select",{detail:{plot:t},bubbles:!0,composed:!0}))}renderPanel(){let t=this.chosen;if(!t)return E`<p class="hint">${this.hint}</p>`;let e=t.status??"available";return E`<span class="status ${e}">${this.word(e)}</span>
600
+ `]}willUpdate(t){(t.has("selectedPlot")||t.has("plots"))&&this.selectedPlot&&!this.chosen&&(this.chosen=this.plots.find(e=>String(e.number)===this.selectedPlot))}word(t){return t==="sold"?this.soldText:t==="reserved"?this.reservedText:this.availableText}choose(t){this.chosen=t,this.requestUpdate(),this.dispatchEvent(new CustomEvent("impakt-select",{detail:{plot:t},bubbles:!0,composed:!0}))}renderPanel(){let t=this.chosen;if(!t)return I`<p class="hint">${this.hint}</p>`;let e=t.status??"available";return I`<span class="status ${e}">${this.word(e)}</span>
389
601
  <p class="name">${this.plotWord} ${t.number}</p>
390
- ${t.name||t.beds?E`<p class="sub">${[t.name,t.beds].filter(Boolean).join(" \xB7 ")}</p>`:U}
391
- ${t.price?E`<p class="price">${t.price}</p>`:U}
392
- ${t.href&&e!=="sold"?E`<a class="go" href=${t.href}>${this.actionText}${we("arrow-right","16px")}</a>`:U}`}render(){return E`<div class="wrap" part="wrap">
602
+ ${t.name||t.beds?I`<p class="sub">${[t.name,t.beds].filter(Boolean).join(" \xB7 ")}</p>`:K}
603
+ ${t.price?I`<p class="price">${t.price}</p>`:K}
604
+ ${t.href&&e!=="sold"?I`<a class="go" href=${t.href}>${this.actionText}${Be("arrow-right","16px")}</a>`:K}`}render(){return I`<div class="wrap" part="wrap">
393
605
  <div>
394
606
  <div class="plan" part="plan">
395
607
  <img src=${this.imageSrc} alt=${this.imageAlt} />
396
- ${this.plots.map(t=>{let e=t.status??"available",i=[`${this.plotWord} ${t.number}`,t.name,this.word(e),t.price].filter(Boolean).join(", ");return E`<button class="pin ${e}" type="button" style="left:${Number(t.x)}%;top:${Number(t.y)}%" aria-label=${i} aria-pressed=${String(this.chosen===t)} @click=${()=>this.choose(t)}>${t.number}</button>`})}
608
+ ${this.plots.map(t=>{let e=t.status??"available",i=[`${this.plotWord} ${t.number}`,t.name,this.word(e),t.price].filter(Boolean).join(", ");return I`<button class="pin ${e}" type="button" style="left:${Number(t.x)}%;top:${Number(t.y)}%" aria-label=${i} aria-pressed=${String(this.chosen===t)} @click=${()=>this.choose(t)}>${t.number}</button>`})}
397
609
  </div>
398
610
  <ul class="legend">
399
611
  <li><span class="key"></span>${this.availableText}</li>
@@ -402,145 +614,145 @@ import"./atomic-ui.js";import{css as ye,html as L,nothing as W}from"./atomic-ui.
402
614
  </ul>
403
615
  </div>
404
616
  <div class="panel" part="panel" aria-live="polite">${this.renderPanel()}</div>
405
- </div>`}};function fi(o,t,e){let i=e*12;if(o<=0||i<=0)return 0;let a=t/100/12;return a===0?o/i:o*a/(1-(1+a)**-i)}var bt=class extends se{static{this.properties={heading:{type:String},price:{type:Number},depositPercent:{type:Number,attribute:"deposit-percent"},rate:{type:Number},years:{type:Number},currency:{type:String},smallPrint:{type:String,attribute:"small-print"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="What would it cost each month?",this.price=385e3,this.depositPercent=10,this.rate=4.5,this.years=30,this.currency="GBP",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.",this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...se.styles,je,xt,Ne`
617
+ </div>`}};function Gi(n,t,e){let i=e*12;if(n<=0||i<=0)return 0;let a=t/100/12;return a===0?n/i:n*a/(1-(1+a)**-i)}var Ft=class extends me{static{this.properties={heading:{type:String},price:{type:Number},depositPercent:{type:Number,attribute:"deposit-percent"},rate:{type:Number},years:{type:Number},currency:{type:String},smallPrint:{type:String,attribute:"small-print"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="What would it cost each month?",this.price=385e3,this.depositPercent=10,this.rate=4.5,this.years=30,this.currency="GBP",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.",this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...me.styles,Ke,Dt,Je`
406
618
  :host { display: block; container-type: inline-size; }
407
- .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; background: ${r.surfaceCard}; border-radius: ${r.radius2xl}; box-shadow: ${r.shadowMd}, 0 0 0 1px color-mix(in srgb, ${r.text} 6%, transparent); }
408
- .inputs { display: flex; flex-direction: column; gap: ${h(5)}; padding: ${h(8)}; }
409
- .h { margin: 0; font-family: ${r.fontHeading}; ${j("2xl")} font-weight: ${Y("bold")}; color: ${r.textHeading}; }
410
- label { display: flex; justify-content: space-between; gap: ${h(3)}; ${j("sm")} font-weight: ${Y("semibold")}; margin-block-end: ${h(1.5)}; }
411
- .read { font-weight: ${Y("regular")}; color: ${r.textMuted}; }
412
- input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${h(2)} ${h(3)}; font: inherit; color: ${r.text}; background: ${r.surfaceCard}; border: ${r.borderThin} solid ${r.border}; border-radius: ${r.radiusLg}; }
413
- input[type='range'] { inline-size: 100%; min-block-size: 24px; margin: 0; accent-color: ${r.brand}; }
414
- .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${h(4)}; }
415
- .result { display: flex; flex-direction: column; justify-content: center; gap: ${h(2)}; padding: ${h(8)}; color: ${r.onBrand}; background: ${r.brand}; }
416
- .caption { margin: 0; ${j("sm")} opacity: 0.85; }
417
- output { display: block; font-family: ${r.fontHeading}; ${j("4xl")} font-weight: ${Y("bold")}; }
418
- dl { display: grid; gap: ${h(2)}; margin: ${h(4)} 0 0; padding-block-start: ${h(4)}; border-block-start: 1px solid color-mix(in srgb, ${r.onBrand} 25%, transparent); ${j("sm")} }
419
- dl div { display: flex; justify-content: space-between; gap: ${h(3)}; }
619
+ .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; background: ${s.surfaceCard}; border-radius: ${s.radius2xl}; box-shadow: ${s.shadowMd}, 0 0 0 1px color-mix(in srgb, ${s.text} 6%, transparent); }
620
+ .inputs { display: flex; flex-direction: column; gap: ${m(5)}; padding: ${m(8)}; }
621
+ .h { margin: 0; font-family: ${s.fontHeading}; ${W("2xl")} font-weight: ${Z("bold")}; color: ${s.textHeading}; }
622
+ label { display: flex; justify-content: space-between; gap: ${m(3)}; ${W("sm")} font-weight: ${Z("semibold")}; margin-block-end: ${m(1.5)}; }
623
+ .read { font-weight: ${Z("regular")}; color: ${s.textMuted}; }
624
+ input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${m(2)} ${m(3)}; font: inherit; color: ${s.text}; background: ${s.surfaceCard}; border: ${s.borderThin} solid ${s.border}; border-radius: ${s.radiusLg}; }
625
+ input[type='range'] { inline-size: 100%; min-block-size: 24px; margin: 0; accent-color: ${s.brand}; }
626
+ .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${m(4)}; }
627
+ .result { display: flex; flex-direction: column; justify-content: center; gap: ${m(2)}; padding: ${m(8)}; color: ${s.onBrand}; background: ${s.brand}; }
628
+ .caption { margin: 0; ${W("sm")} opacity: 0.85; }
629
+ output { display: block; font-family: ${s.fontHeading}; ${W("4xl")} font-weight: ${Z("bold")}; }
630
+ dl { display: grid; gap: ${m(2)}; margin: ${m(4)} 0 0; padding-block-start: ${m(4)}; border-block-start: 1px solid color-mix(in srgb, ${s.onBrand} 25%, transparent); ${W("sm")} }
631
+ dl div { display: flex; justify-content: space-between; gap: ${m(3)}; }
420
632
  dt { opacity: 0.85; }
421
- dd { margin: 0; font-weight: ${Y("semibold")}; }
633
+ dd { margin: 0; font-weight: ${Z("semibold")}; }
422
634
  /* Muted text is proved against the card colour, not this band, so the small print here is in the text colour (1.4.3). */
423
- .small { grid-column: 1 / -1; margin: 0; padding: ${h(4)} ${h(8)}; ${j("xs")} color: ${r.text}; background: ${r.surfaceSubtle}; }
424
- @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${h(5)}; } .small { padding: ${h(4)} ${h(5)}; } }
425
- `]}money(t){try{return new Intl.NumberFormat(Xi(this),{style:"currency",currency:this.currency,maximumFractionDigits:0}).format(t)}catch{return String(Math.round(t))}}field(t){return e=>{this[t]=Number(e.target.value)||0}}render(){let t=this.price*this.depositPercent/100,e=Math.max(this.price-t,0),i=fi(e,this.rate,this.years);return E`<div class="wrap" part="wrap">
635
+ .small { grid-column: 1 / -1; margin: 0; padding: ${m(4)} ${m(8)}; ${W("xs")} color: ${s.text}; background: ${s.surfaceSubtle}; }
636
+ @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${m(5)}; } .small { padding: ${m(4)} ${m(5)}; } }
637
+ `]}money(t){try{return new Intl.NumberFormat(Ea(this),{style:"currency",currency:this.currency,maximumFractionDigits:0}).format(t)}catch{return String(Math.round(t))}}field(t){return e=>{this[t]=Number(e.target.value)||0}}render(){let t=this.price*this.depositPercent/100,e=Math.max(this.price-t,0),i=Gi(e,this.rate,this.years);return I`<div class="wrap" part="wrap">
426
638
  <div class="inputs">
427
- ${this.heading?E`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:U}
428
- <div><label for=${this.id_("price")}>${me("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>
429
- <div><label for=${this.id_("deposit")}>${me("Deposit")} <span class="read">${this.depositPercent}% · ${this.money(t)}</span></label><input id=${this.id_("deposit")} type="range" min="5" max="60" step="1" .value=${String(this.depositPercent)} @input=${this.field("depositPercent")} /></div>
639
+ ${this.heading?I`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:K}
640
+ <div><label for=${this.id_("price")}>${ve("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>
641
+ <div><label for=${this.id_("deposit")}>${ve("Deposit")} <span class="read">${this.depositPercent}% · ${this.money(t)}</span></label><input id=${this.id_("deposit")} type="range" min="5" max="60" step="1" .value=${String(this.depositPercent)} @input=${this.field("depositPercent")} /></div>
430
642
  <div class="two">
431
- <div><label for=${this.id_("years")}>${me("Term")} <span class="read">${me("{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>
432
- <div><label for=${this.id_("rate")}>${me("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>
643
+ <div><label for=${this.id_("years")}>${ve("Term")} <span class="read">${ve("{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>
644
+ <div><label for=${this.id_("rate")}>${ve("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>
433
645
  </div>
434
646
  </div>
435
647
  <div class="result">
436
- <p class="caption">${me("Estimated monthly repayment")}</p>
648
+ <p class="caption">${ve("Estimated monthly repayment")}</p>
437
649
  <output for=${`${this.id_("price")} ${this.id_("deposit")} ${this.id_("years")} ${this.id_("rate")}`}>${this.money(i)}</output>
438
650
  <dl>
439
- <div><dt>${me("You would borrow")}</dt><dd>${this.money(e)}</dd></div>
440
- <div><dt>${me("Total repayable")}</dt><dd>${this.money(i*this.years*12)}</dd></div>
651
+ <div><dt>${ve("You would borrow")}</dt><dd>${this.money(e)}</dd></div>
652
+ <div><dt>${ve("Total repayable")}</dt><dd>${this.money(i*this.years*12)}</dd></div>
441
653
  </dl>
442
654
  </div>
443
- ${this.smallPrint?E`<p class="small">${this.smallPrint}</p>`:U}
444
- </div>`}},ft=class extends se{static{this.properties={beforeSrc:{type:String,attribute:"before-src"},beforeAlt:{type:String,attribute:"before-alt"},afterSrc:{type:String,attribute:"after-src"},afterAlt:{type:String,attribute:"after-alt"},beforeLabel:{type:String,attribute:"before-label"},afterLabel:{type:String,attribute:"after-label"},label:{type:String},position:{type:Number},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.beforeSrc="",this.beforeAlt="",this.afterSrc="",this.afterAlt="",this.beforeLabel="Before",this.afterLabel="After",this.label="Compare the two pictures",this.position=50,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...se.styles,je,xt,Ne`
445
- .frame { position: relative; overflow: hidden; border-radius: ${r.radius2xl}; box-shadow: ${r.shadowLg}; line-height: 0; --at: 50%; }
655
+ ${this.smallPrint?I`<p class="small">${this.smallPrint}</p>`:K}
656
+ </div>`}},Wt=class extends me{static{this.properties={beforeSrc:{type:String,attribute:"before-src"},beforeAlt:{type:String,attribute:"before-alt"},afterSrc:{type:String,attribute:"after-src"},afterAlt:{type:String,attribute:"after-alt"},beforeLabel:{type:String,attribute:"before-label"},afterLabel:{type:String,attribute:"after-label"},label:{type:String},position:{type:Number},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.beforeSrc="",this.beforeAlt="",this.afterSrc="",this.afterAlt="",this.beforeLabel="Before",this.afterLabel="After",this.label="Compare the two pictures",this.position=50,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...me.styles,Ke,Dt,Je`
657
+ .frame { position: relative; overflow: hidden; border-radius: ${s.radius2xl}; box-shadow: ${s.shadowLg}; line-height: 0; --at: 50%; }
446
658
  img { display: block; inline-size: 100%; block-size: auto; }
447
659
  .after { position: absolute; inset: 0; block-size: 100%; object-fit: cover; clip-path: inset(0 0 0 var(--at)); }
448
- .tag { position: absolute; inset-block-start: ${h(3)}; padding: ${h(1)} ${h(3)}; ${j("xs")} line-height: 1.4; font-weight: ${Y("semibold")}; color: ${r.text}; background: ${r.surfaceCard}; border-radius: 999px; box-shadow: ${r.shadowSm}; }
449
- .tag.b { inset-inline-start: ${h(3)}; }
450
- .tag.a { inset-inline-end: ${h(3)}; }
451
- .line { position: absolute; inset-block: 0; inset-inline-start: var(--at); inline-size: 2px; margin-inline-start: -1px; background: ${r.surfaceCard}; pointer-events: none; }
452
- .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: ${r.text}; background: ${r.surfaceCard}; border-radius: 50%; box-shadow: ${r.shadowMd}; }
660
+ .tag { position: absolute; inset-block-start: ${m(3)}; padding: ${m(1)} ${m(3)}; ${W("xs")} line-height: 1.4; font-weight: ${Z("semibold")}; color: ${s.text}; background: ${s.surfaceCard}; border-radius: 999px; box-shadow: ${s.shadowSm}; }
661
+ .tag.b { inset-inline-start: ${m(3)}; }
662
+ .tag.a { inset-inline-end: ${m(3)}; }
663
+ .line { position: absolute; inset-block: 0; inset-inline-start: var(--at); inline-size: 2px; margin-inline-start: -1px; background: ${s.surfaceCard}; pointer-events: none; }
664
+ .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: ${s.text}; background: ${s.surfaceCard}; border-radius: 50%; box-shadow: ${s.shadowMd}; }
453
665
  input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
454
- .frame:has(input:focus-visible) .grip { box-shadow: ${r.focusShadow}; }
455
- `]}render(){return E`<div class="frame" part="frame" style="--at:${this.position}%">
666
+ .frame:has(input:focus-visible) .grip { box-shadow: ${s.focusShadow}; }
667
+ `]}render(){return I`<div class="frame" part="frame" style="--at:${this.position}%">
456
668
  <img src=${this.beforeSrc} alt=${this.beforeAlt} />
457
669
  <img class="after" src=${this.afterSrc} alt=${this.afterAlt} />
458
670
  <span class="tag b" aria-hidden="true">${this.beforeLabel}</span>
459
671
  <span class="tag a" aria-hidden="true">${this.afterLabel}</span>
460
- <span class="line"><span class="grip">${we("arrow-left","14px")}${we("arrow-right","14px")}</span></span>
672
+ <span class="line"><span class="grip">${Be("arrow-left","14px")}${Be("arrow-right","14px")}</span></span>
461
673
  <input type="range" min="0" max="100" aria-label=${this.label} .value=${String(this.position)} @input=${t=>{this.position=Number(t.target.value)}} />
462
- </div>`}},$t=class extends se{constructor(){super();this.shown=!1;this.check=()=>{let e=window.scrollY>=this.revealAfter;e!==this.shown&&(this.shown=e,this.requestUpdate(),this.clearance(e))};this.label="Quick actions",this.heading="",this.lead="",this.showOn="phones",this.revealAfter=400}static{this.properties={label:{type:String},heading:{type:String},lead:{type:String},showOn:{type:String,reflect:!0,attribute:"show-on"},revealAfter:{type:Number,attribute:"reveal-after"}}}static{this.styles=[...se.styles,je,Ne`
674
+ </div>`}},qt=class extends me{constructor(){super();this.shown=!1;this.check=()=>{let e=window.scrollY>=this.revealAfter;e!==this.shown&&(this.shown=e,this.requestUpdate(),this.clearance(e))};this.label="Quick actions",this.heading="",this.lead="",this.showOn="phones",this.revealAfter=400}static{this.properties={label:{type:String},heading:{type:String},lead:{type:String},showOn:{type:String,reflect:!0,attribute:"show-on"},revealAfter:{type:Number,attribute:"reveal-after"}}}static{this.styles=[...me.styles,Ke,Je`
463
675
  :host { display: block; }
464
- .bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: ${h(4)}; padding: ${h(3)} ${h(4)} calc(${h(3)} + env(safe-area-inset-bottom)); background: ${r.surfaceCard}; box-shadow: ${r.shadowXl}, 0 -1px 0 color-mix(in srgb, ${r.text} 8%, transparent); transform: translateY(110%); visibility: hidden; transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 220ms; }
676
+ .bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: ${m(4)}; padding: ${m(3)} ${m(4)} calc(${m(3)} + env(safe-area-inset-bottom)); background: ${s.surfaceCard}; box-shadow: ${s.shadowXl}, 0 -1px 0 color-mix(in srgb, ${s.text} 8%, transparent); transform: translateY(110%); visibility: hidden; transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 220ms; }
465
677
  .bar.on { transform: none; visibility: visible; }
466
678
  .spacer { block-size: 5rem; }
467
- .h { font-family: ${r.fontHeading}; ${j("md")} font-weight: ${Y("bold")}; color: ${r.textHeading}; }
468
- .t { ${j("xs")} color: ${r.textMuted}; }
679
+ .h { font-family: ${s.fontHeading}; ${W("md")} font-weight: ${Z("bold")}; color: ${s.textHeading}; }
680
+ .t { ${W("xs")} color: ${s.textMuted}; }
469
681
  .words { min-inline-size: 0; }
470
- .actions { display: flex; flex: none; gap: ${h(2)}; }
682
+ .actions { display: flex; flex: none; gap: ${m(2)}; }
471
683
  @media (min-width: 48rem) { :host([show-on='phones']) { display: none; } }
472
- `]}clearance(e){let a=e&&getComputedStyle(this).display!=="none"?`${this.renderRoot.querySelector(".bar")?.getBoundingClientRect().height??80}px`:"",s=document.documentElement.style;s.scrollPaddingBlockEnd=a,a?s.setProperty("--impakt-bottom-bar",a):s.removeProperty("--impakt-bottom-bar")}connectedCallback(){super.connectedCallback(),window.addEventListener("scroll",this.check,{passive:!0}),this.check()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("scroll",this.check),this.clearance(!1)}render(){return E`<div class="spacer"></div>
684
+ `]}clearance(e){let a=e&&getComputedStyle(this).display!=="none"?`${this.renderRoot.querySelector(".bar")?.getBoundingClientRect().height??80}px`:"",r=document.documentElement.style;r.scrollPaddingBlockEnd=a,a?r.setProperty("--impakt-bottom-bar",a):r.removeProperty("--impakt-bottom-bar")}connectedCallback(){super.connectedCallback(),window.addEventListener("scroll",this.check,{passive:!0}),this.check()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("scroll",this.check),this.clearance(!1)}render(){return I`<div class="spacer"></div>
473
685
  <section class="bar ${this.shown?"on":""}" part="bar" aria-label=${this.label}>
474
686
  <div class="words">
475
- ${this.heading?E`<div class="h">${this.heading}</div>`:U}
476
- ${this.lead?E`<div class="t">${this.lead}</div>`:U}
687
+ ${this.heading?I`<div class="h">${this.heading}</div>`:K}
688
+ ${this.lead?I`<div class="t">${this.lead}</div>`:K}
477
689
  </div>
478
690
  <div class="actions"><slot name="actions"></slot></div>
479
- </section>`}},yt=class extends se{static{this.properties={heading:{type:String},address:{type:String},hours:{type:String},phone:{type:String},mapSrc:{type:String,attribute:"map-src"},mapAlt:{type:String,attribute:"map-alt"},directionsText:{type:String,attribute:"directions-text"},directionsHref:{type:String,attribute:"directions-href"},nearby:{type:Array},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="",this.address="",this.hours="",this.phone="",this.mapSrc="",this.mapAlt="",this.directionsText="Get directions",this.directionsHref="",this.nearby=[],this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...se.styles,je,xt,Ne`
691
+ </section>`}},_t=class extends me{static{this.properties={heading:{type:String},address:{type:String},hours:{type:String},phone:{type:String},mapSrc:{type:String,attribute:"map-src"},mapAlt:{type:String,attribute:"map-alt"},directionsText:{type:String,attribute:"directions-text"},directionsHref:{type:String,attribute:"directions-href"},nearby:{type:Array},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="",this.address="",this.hours="",this.phone="",this.mapSrc="",this.mapAlt="",this.directionsText="Get directions",this.directionsHref="",this.nearby=[],this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...me.styles,Ke,Dt,Je`
480
692
  :host { display: block; container-type: inline-size; }
481
- .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; background: ${r.surfaceCard}; border-radius: ${r.radius2xl}; box-shadow: ${r.shadowMd}, 0 0 0 1px color-mix(in srgb, ${r.text} 6%, transparent); }
693
+ .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; background: ${s.surfaceCard}; border-radius: ${s.radius2xl}; box-shadow: ${s.shadowMd}, 0 0 0 1px color-mix(in srgb, ${s.text} 6%, transparent); }
482
694
  .wrap.solo { grid-template-columns: minmax(0, 1fr); }
483
- .map { min-block-size: 16rem; background: ${r.surfaceSubtle}; }
695
+ .map { min-block-size: 16rem; background: ${s.surfaceSubtle}; }
484
696
  .map img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
485
- .info { display: flex; flex-direction: column; gap: ${h(3)}; padding: ${h(8)}; }
486
- .h { margin: 0; font-family: ${r.fontHeading}; ${j("2xl")} font-weight: ${Y("bold")}; color: ${r.textHeading}; }
487
- .row { display: flex; gap: ${h(3)}; margin: 0; white-space: pre-line; }
488
- .row svg { flex: none; margin-block-start: ${h(.5)}; color: ${r.brand}; }
489
- .row a { display: inline-flex; align-items: center; min-block-size: ${r.targetMin}; margin-block-start: -2px; }
490
- a { color: ${r.link}; }
491
- ul { display: grid; gap: ${h(1.5)}; margin: ${h(1)} 0; padding: ${h(3)} 0 0; list-style: none; border-block-start: 1px solid color-mix(in srgb, ${r.text} 10%, transparent); ${j("sm")} }
492
- li { display: flex; justify-content: space-between; gap: ${h(3)}; }
493
- li span:last-child { color: ${r.textMuted}; text-align: end; }
494
- .go { ${bi} align-self: flex-start; display: inline-flex; align-items: center; gap: ${h(2)}; padding: ${h(2)} ${h(4)}; ${j("sm")} font-weight: ${Y("semibold")}; color: ${r.onBrand}; text-decoration: none; background: ${r.brand}; border-radius: ${r.radiusLg}; }
495
- .go:hover { background: ${r.brandHover}; }
496
- @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .info { padding: ${h(5)}; } }
497
- `]}render(){let t=this.directionsHref||(this.address?`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(this.address)}`:"");return E`<div class="wrap ${this.mapSrc?"":"solo"}" part="wrap">
498
- ${this.mapSrc?E`<div class="map"><img src=${this.mapSrc} alt=${this.mapAlt} /></div>`:U}
697
+ .info { display: flex; flex-direction: column; gap: ${m(3)}; padding: ${m(8)}; }
698
+ .h { margin: 0; font-family: ${s.fontHeading}; ${W("2xl")} font-weight: ${Z("bold")}; color: ${s.textHeading}; }
699
+ .row { display: flex; gap: ${m(3)}; margin: 0; white-space: pre-line; }
700
+ .row svg { flex: none; margin-block-start: ${m(.5)}; color: ${s.brand}; }
701
+ .row a { display: inline-flex; align-items: center; min-block-size: ${s.targetMin}; margin-block-start: -2px; }
702
+ a { color: ${s.link}; }
703
+ ul { display: grid; gap: ${m(1.5)}; margin: ${m(1)} 0; padding: ${m(3)} 0 0; list-style: none; border-block-start: 1px solid color-mix(in srgb, ${s.text} 10%, transparent); ${W("sm")} }
704
+ li { display: flex; justify-content: space-between; gap: ${m(3)}; }
705
+ li span:last-child { color: ${s.textMuted}; text-align: end; }
706
+ .go { ${Yi} align-self: flex-start; display: inline-flex; align-items: center; gap: ${m(2)}; padding: ${m(2)} ${m(4)}; ${W("sm")} font-weight: ${Z("semibold")}; color: ${s.onBrand}; text-decoration: none; background: ${s.brand}; border-radius: ${s.radiusLg}; }
707
+ .go:hover { background: ${s.brandHover}; }
708
+ @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .info { padding: ${m(5)}; } }
709
+ `]}render(){let t=this.directionsHref||(this.address?`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(this.address)}`:"");return I`<div class="wrap ${this.mapSrc?"":"solo"}" part="wrap">
710
+ ${this.mapSrc?I`<div class="map"><img src=${this.mapSrc} alt=${this.mapAlt} /></div>`:K}
499
711
  <div class="info">
500
- ${this.heading?E`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:U}
501
- ${this.address?E`<p class="row">${we("map-pin","20px")}<span>${this.address}</span></p>`:U}
502
- ${this.hours?E`<p class="row">${we("clock","20px")}<span>${this.hours}</span></p>`:U}
503
- ${this.phone?E`<p class="row">${we("phone","20px")}<a href=${`tel:${this.phone.replace(/\s+/g,"")}`}>${this.phone}</a></p>`:U}
504
- ${this.nearby.length?E`<ul>${this.nearby.map(e=>E`<li><span>${e.place}</span><span>${e.distance}</span></li>`)}</ul>`:U}
505
- ${t?E`<a class="go" href=${t}>${this.directionsText}${we("arrow-right","16px")}</a>`:U}
712
+ ${this.heading?I`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:K}
713
+ ${this.address?I`<p class="row">${Be("map-pin","20px")}<span>${this.address}</span></p>`:K}
714
+ ${this.hours?I`<p class="row">${Be("clock","20px")}<span>${this.hours}</span></p>`:K}
715
+ ${this.phone?I`<p class="row">${Be("phone","20px")}<a href=${`tel:${this.phone.replace(/\s+/g,"")}`}>${this.phone}</a></p>`:K}
716
+ ${this.nearby.length?I`<ul>${this.nearby.map(e=>I`<li><span>${e.place}</span><span>${e.distance}</span></li>`)}</ul>`:K}
717
+ ${t?I`<a class="go" href=${t}>${this.directionsText}${Be("arrow-right","16px")}</a>`:K}
506
718
  </div>
507
- </div>`}};customElements.define("impakt-site-plan",gt);customElements.define("impakt-mortgage-calculator",bt);customElements.define("impakt-before-after",ft);customElements.define("impakt-sticky-bar",$t);customElements.define("impakt-location-card",yt);import{css as Le,html as f,nothing as I}from"./atomic-ui.js";import{say as z,pageLocale as yi,ImpaktElement as K,focusRing as We,targetSize as Vi,visuallyHidden as Qi,fontWeight as _,space as m,spaceAround as Me,t as c,type as P}from"./atomic-ui.js";var _e=Le`
719
+ </div>`}};customElements.define("impakt-site-plan",Ot);customElements.define("impakt-mortgage-calculator",Ft);customElements.define("impakt-before-after",Wt);customElements.define("impakt-sticky-bar",qt);customElements.define("impakt-location-card",_t);import{css as je,html as $,nothing as P}from"./atomic-ui.js";import{say as M,pageLocale as Vi,ImpaktElement as se,focusRing as tt,targetSize as Ca,visuallyHidden as Ba,fontWeight as X,space as u,spaceAround as Oe,t as c,type as O}from"./atomic-ui.js";var it=je`
508
720
  .card { background: ${c.surfaceCard}; border-radius: ${c.radiusXl}; box-shadow: ${c.shadowSm}, 0 0 0 1px ${c.hairline}; }
509
- .h { margin: 0; font-family: ${c.fontHeading}; ${P("2xl")} font-weight: ${_("bold")}; color: ${c.textHeading}; }
510
- .btn { display: inline-flex; justify-content: center; align-items: center; min-block-size: 44px; padding: ${m(2.5)} ${m(5)}; font: inherit; font-weight: ${_("semibold")}; color: ${c.onBrand}; text-decoration: none; background: ${c.brand}; border: 0; border-radius: ${c.radiusLg}; cursor: pointer; }
721
+ .h { margin: 0; font-family: ${c.fontHeading}; ${O("2xl")} font-weight: ${X("bold")}; color: ${c.textHeading}; }
722
+ .btn { display: inline-flex; justify-content: center; align-items: center; min-block-size: 44px; padding: ${u(2.5)} ${u(5)}; font: inherit; font-weight: ${X("semibold")}; color: ${c.onBrand}; text-decoration: none; background: ${c.brand}; border: 0; border-radius: ${c.radiusLg}; cursor: pointer; }
511
723
  .btn:hover { background: ${c.brandHover}; }
512
724
  .btn.quiet { color: ${c.link}; background: transparent; box-shadow: inset 0 0 0 ${c.borderThin} ${c.border}; }
513
- .small { margin: 0; ${P("xs")} color: ${c.textMuted}; }
514
- .visually-hidden { ${Qi} }
515
- `,vt=(o,t="GBP",e=0)=>{try{return new Intl.NumberFormat(yi(),{style:"currency",currency:t,maximumFractionDigits:e,minimumFractionDigits:e}).format(o)}catch{return String(Math.round(o))}},wt=class extends K{static{this.properties={heading:{type:String},plans:{type:Array},rows:{type:Array},buttonText:{type:String,attribute:"button-text"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="Compare cover",this.plans=[],this.rows=[],this.buttonText="Choose",this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...K.styles,We,Vi,Me,_e,Le`
725
+ .small { margin: 0; ${O("xs")} color: ${c.textMuted}; }
726
+ .visually-hidden { ${Ba} }
727
+ `,Ut=(n,t="GBP",e=0)=>{try{return new Intl.NumberFormat(Vi(),{style:"currency",currency:t,maximumFractionDigits:e,minimumFractionDigits:e}).format(n)}catch{return String(Math.round(n))}},Yt=class extends se{static{this.properties={heading:{type:String},plans:{type:Array},rows:{type:Array},buttonText:{type:String,attribute:"button-text"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="Compare cover",this.plans=[],this.rows=[],this.buttonText="Choose",this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...se.styles,tt,Ca,Oe,it,je`
516
728
  :host { display: block; container-type: inline-size; }
517
- .h { margin-block-end: ${m(5)}; }
518
- .grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: ${m(4)}; }
519
- .plan { position: relative; display: flex; flex-direction: column; gap: ${m(3)}; padding: ${m(6)}; }
729
+ .h { margin-block-end: ${u(5)}; }
730
+ .grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: ${u(4)}; }
731
+ .plan { position: relative; display: flex; flex-direction: column; gap: ${u(3)}; padding: ${u(6)}; }
520
732
  .plan.top { box-shadow: 0 0 0 2px ${c.brand}, ${c.shadowMd}; }
521
- .badge { position: absolute; inset-block-start: 0; inset-inline-start: 50%; transform: translate(-50%, -50%); padding: ${m(1)} ${m(3)}; border-radius: 999px; ${P("xs")} font-weight: ${_("bold")}; color: ${c.onBrand}; background: ${c.brand}; white-space: nowrap; }
522
- .name { margin: 0; ${P("lg")} font-weight: ${_("bold")}; color: ${c.text}; }
523
- .price { margin: 0; font-family: ${c.fontHeading}; ${P("3xl")} font-weight: ${_("bold")}; color: ${c.text}; }
524
- .period { ${P("sm")} font-weight: ${_("regular")}; color: ${c.textMuted}; }
525
- .note { margin: 0; ${P("sm")} color: ${c.textMuted}; }
526
- ul { flex: 1; margin: 0; padding: ${m(3)} 0 0; list-style: none; display: grid; gap: ${m(2)}; border-block-start: 1px solid ${c.rule}; align-content: start; }
527
- li { display: flex; gap: ${m(2)}; ${P("sm")} }
733
+ .badge { position: absolute; inset-block-start: 0; inset-inline-start: 50%; transform: translate(-50%, -50%); padding: ${u(1)} ${u(3)}; border-radius: 999px; ${O("xs")} font-weight: ${X("bold")}; color: ${c.onBrand}; background: ${c.brand}; white-space: nowrap; }
734
+ .name { margin: 0; ${O("lg")} font-weight: ${X("bold")}; color: ${c.text}; }
735
+ .price { margin: 0; font-family: ${c.fontHeading}; ${O("3xl")} font-weight: ${X("bold")}; color: ${c.text}; }
736
+ .period { ${O("sm")} font-weight: ${X("regular")}; color: ${c.textMuted}; }
737
+ .note { margin: 0; ${O("sm")} color: ${c.textMuted}; }
738
+ ul { flex: 1; margin: 0; padding: ${u(3)} 0 0; list-style: none; display: grid; gap: ${u(2)}; border-block-start: 1px solid ${c.rule}; align-content: start; }
739
+ li { display: flex; gap: ${u(2)}; ${O("sm")} }
528
740
  li[data-has='false'] { color: ${c.textMuted}; }
529
- .mark { flex-shrink: 0; inline-size: 1.25em; font-weight: ${_("bold")}; text-align: center; }
741
+ .mark { flex-shrink: 0; inline-size: 1.25em; font-weight: ${X("bold")}; text-align: center; }
530
742
  li[data-has='true'] .mark { color: ${c.successText}; }
531
- @container (max-width: 40rem) { .grid { grid-template-columns: minmax(0, 1fr); gap: ${m(6)}; } }
532
- `]}has(t,e){return t.includes.split(",").map(i=>i.trim().toLowerCase()).includes(e.label.trim().toLowerCase())}choose(t,e){this.dispatchEvent(new CustomEvent("impakt-select",{detail:{plan:t},bubbles:!0,composed:!0,cancelable:!0}))||e.preventDefault()}render(){return f`
533
- ${this.heading?f`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:I}
743
+ @container (max-width: 40rem) { .grid { grid-template-columns: minmax(0, 1fr); gap: ${u(6)}; } }
744
+ `]}has(t,e){return t.includes.split(",").map(i=>i.trim().toLowerCase()).includes(e.label.trim().toLowerCase())}choose(t,e){this.dispatchEvent(new CustomEvent("impakt-select",{detail:{plan:t},bubbles:!0,composed:!0,cancelable:!0}))||e.preventDefault()}render(){return $`
745
+ ${this.heading?$`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:P}
534
746
  <div class="grid" style=${`--cols: ${Math.max(1,this.plans.length)}`}>
535
- ${this.plans.map(t=>f`<section class="card plan ${t.badge?"top":""}" aria-labelledby=${this.id_(`n-${t.id}`)}>
536
- ${t.badge?f`<span class="badge">${t.badge}</span>`:I}
747
+ ${this.plans.map(t=>$`<section class="card plan ${t.badge?"top":""}" aria-labelledby=${this.id_(`n-${t.id}`)}>
748
+ ${t.badge?$`<span class="badge">${t.badge}</span>`:P}
537
749
  <h3 class="name" id=${this.id_(`n-${t.id}`)}>${t.name}</h3>
538
- <p class="price">${t.price}${t.period?f` <span class="period">${t.period}</span>`:I}</p>
539
- ${t.note?f`<p class="note">${t.note}</p>`:I}
540
- <ul>${this.rows.map(e=>{let i=this.has(t,e);return f`<li data-has=${String(i)}><span class="mark" aria-hidden="true">${i?"\u2713":"\u2013"}</span><span>${e.label}<span class="visually-hidden">: ${z(i?"included":"not included")}</span></span></li>`})}</ul>
541
- ${t.href?f`<a class="btn ${t.badge?"":"quiet"}" href=${t.href} @click=${e=>this.choose(t,e)}>${this.buttonText}<span class="visually-hidden"> ${t.name}</span></a>`:f`<button class="btn ${t.badge?"":"quiet"}" type="button" @click=${e=>this.choose(t,e)}>${this.buttonText}<span class="visually-hidden"> ${t.name}</span></button>`}
750
+ <p class="price">${t.price}${t.period?$` <span class="period">${t.period}</span>`:P}</p>
751
+ ${t.note?$`<p class="note">${t.note}</p>`:P}
752
+ <ul>${this.rows.map(e=>{let i=this.has(t,e);return $`<li data-has=${String(i)}><span class="mark" aria-hidden="true">${i?"\u2713":"\u2013"}</span><span>${e.label}<span class="visually-hidden">: ${M(i?"included":"not included")}</span></span></li>`})}</ul>
753
+ ${t.href?$`<a class="btn ${t.badge?"":"quiet"}" href=${t.href} @click=${e=>this.choose(t,e)}>${this.buttonText}<span class="visually-hidden"> ${t.name}</span></a>`:$`<button class="btn ${t.badge?"":"quiet"}" type="button" @click=${e=>this.choose(t,e)}>${this.buttonText}<span class="visually-hidden"> ${t.name}</span></button>`}
542
754
  </section>`)}
543
- </div>`}};function xi(o,t){let e=/(?:youtube\.com\/(?:watch\?v=|embed\/|shorts\/)|youtu\.be\/)([\w-]{6,})/.exec(o),i=t&&!/^en\b/i.test(t)?`&hl=${encodeURIComponent(t.split("-")[0])}&cc_lang_pref=${encodeURIComponent(t.split("-")[0])}`:"";if(e)return`https://www.youtube-nocookie.com/embed/${e[1]}?autoplay=1&rel=0${i}`;let a=/vimeo\.com\/(?:video\/)?(\d+)/.exec(o);return a?`https://player.vimeo.com/video/${a[1]}?autoplay=1&dnt=1`:null}var Oe=class extends K{static{this.properties={videoSrc:{type:String,attribute:"video-src"},label:{type:String},posterSrc:{type:String,attribute:"poster-src"},captionsSrc:{type:String,attribute:"captions-src"},transcriptHref:{type:String,attribute:"transcript-href"},playText:{type:String,attribute:"play-text"},ratio:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.videoSrc="",this.label="Video",this.posterSrc="",this.captionsSrc="",this.transcriptHref="",this.playText="Play video",this.ratio="16:9",this.playing=!1,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...K.styles,We,Me,_e,Le`
755
+ </div>`}};function Qi(n,t){let e=/(?:youtube\.com\/(?:watch\?v=|embed\/|shorts\/)|youtu\.be\/)([\w-]{6,})/.exec(n),i=t&&!/^en\b/i.test(t)?`&hl=${encodeURIComponent(t.split("-")[0])}&cc_lang_pref=${encodeURIComponent(t.split("-")[0])}`:"";if(e)return`https://www.youtube-nocookie.com/embed/${e[1]}?autoplay=1&rel=0${i}`;let a=/vimeo\.com\/(?:video\/)?(\d+)/.exec(n);return a?`https://player.vimeo.com/video/${a[1]}?autoplay=1&dnt=1`:null}var Ze=class extends se{static{this.properties={videoSrc:{type:String,attribute:"video-src"},label:{type:String},posterSrc:{type:String,attribute:"poster-src"},captionsSrc:{type:String,attribute:"captions-src"},transcriptHref:{type:String,attribute:"transcript-href"},playText:{type:String,attribute:"play-text"},ratio:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.videoSrc="",this.label="Video",this.posterSrc="",this.captionsSrc="",this.transcriptHref="",this.playText="Play video",this.ratio="16:9",this.playing=!1,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...se.styles,tt,Oe,it,je`
544
756
  :host { display: block; }
545
757
  .frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: ${c.radiusXl}; background: #111; }
546
758
  :host([ratio='4:3']) .frame { aspect-ratio: 4 / 3; }
@@ -550,170 +762,170 @@ import"./atomic-ui.js";import{css as ye,html as L,nothing as W}from"./atomic-ui.
550
762
  .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; }
551
763
  .disc { display: grid; place-items: center; inline-size: 72px; block-size: 72px; border-radius: 50%; background: ${c.brand}; box-shadow: ${c.shadowLg}; }
552
764
  /* Held inside the frame at both edges, so loosened or long words wrap rather than run out of it (1.4.12). */
553
- .label { position: absolute; inset-inline: ${m(5)}; inset-block-end: ${m(4)}; ${P("lg")} font-weight: ${_("semibold")}; text-align: start; }
554
- .foot { margin: ${m(2)} 0 0; ${P("sm")} }
765
+ .label { position: absolute; inset-inline: ${u(5)}; inset-block-end: ${u(4)}; ${O("lg")} font-weight: ${X("semibold")}; text-align: start; }
766
+ .foot { margin: ${u(2)} 0 0; ${O("sm")} }
555
767
  .foot a { color: ${c.link}; }
556
768
  .empty { display: grid; place-items: center; block-size: 100%; color: #ccc; }
557
- `]}render(){let t=xi(this.videoSrc,yi(this)),e;return this.videoSrc?t&&this.playing?e=f`<iframe src=${t} title=${this.label} allow="autoplay; encrypted-media; picture-in-picture; fullscreen" allowfullscreen></iframe>`:t?e=f`${this.posterSrc?f`<img src=${this.posterSrc} alt="" />`:I}
769
+ `]}render(){let t=Qi(this.videoSrc,Vi(this)),e;return this.videoSrc?t&&this.playing?e=$`<iframe src=${t} title=${this.label} allow="autoplay; encrypted-media; picture-in-picture; fullscreen" allowfullscreen></iframe>`:t?e=$`${this.posterSrc?$`<img src=${this.posterSrc} alt="" />`:P}
558
770
  <button class="play" type="button" @click=${()=>{this.playing=!0}}>
559
771
  <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>
560
772
  <span class="label">${this.playText}<span class="visually-hidden">: ${this.label}</span></span>
561
- </button>`:e=f`<video controls preload="metadata" poster=${this.posterSrc||I} aria-label=${this.label}>
773
+ </button>`:e=$`<video controls preload="metadata" poster=${this.posterSrc||P} aria-label=${this.label}>
562
774
  <source src=${this.videoSrc} />
563
- ${this.captionsSrc?f`<track kind="captions" src=${this.captionsSrc} srclang="en" label="English" default />`:I}
564
- </video>`:e=f`<div class="empty">${z("Add a video address")}</div>`,f`<div class="frame" part="frame">${e}</div>
565
- ${this.transcriptHref?f`<p class="foot"><a href=${this.transcriptHref}>${z("Read the transcript")}<span class="visually-hidden">${z(" of {video}",{video:this.label})}</span></a></p>`:I}`}},$i={mortgage:{heading:"Your home may be repossessed",text:"Your home may be repossessed if you do not keep up repayments on your mortgage."},"secured-loan":{heading:"Think carefully before securing other debts against your home",text:"Your home may be repossessed if you do not keep up repayments on a mortgage or any other debt secured on it."},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."},insurance:{heading:"Important information",text:"Read the policy documents to check the cover suits your needs. Limits and exclusions apply."},custom:{heading:"",text:""}},kt=class extends K{static{this.properties={kind:{type:String,reflect:!0},heading:{type:String},text:{type:String},firm:{type:String},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.kind="mortgage",this.heading="",this.text="",this.firm="",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...K.styles,Me,Le`
775
+ ${this.captionsSrc?$`<track kind="captions" src=${this.captionsSrc} srclang="en" label="English" default />`:P}
776
+ </video>`:e=$`<div class="empty">${M("Add a video address")}</div>`,$`<div class="frame" part="frame">${e}</div>
777
+ ${this.transcriptHref?$`<p class="foot"><a href=${this.transcriptHref}>${M("Read the transcript")}<span class="visually-hidden">${M(" of {video}",{video:this.label})}</span></a></p>`:P}`}},Xi={mortgage:{heading:"Your home may be repossessed",text:"Your home may be repossessed if you do not keep up repayments on your mortgage."},"secured-loan":{heading:"Think carefully before securing other debts against your home",text:"Your home may be repossessed if you do not keep up repayments on a mortgage or any other debt secured on it."},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."},insurance:{heading:"Important information",text:"Read the policy documents to check the cover suits your needs. Limits and exclusions apply."},custom:{heading:"",text:""}},Gt=class extends se{static{this.properties={kind:{type:String,reflect:!0},heading:{type:String},text:{type:String},firm:{type:String},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.kind="mortgage",this.heading="",this.text="",this.firm="",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...se.styles,Oe,je`
566
778
  :host { display: block; }
567
- .box { padding: ${m(5)}; border-inline-start: 6px solid ${c.warning}; border-radius: ${c.radiusLg}; background: ${c.warningSubtle}; }
779
+ .box { padding: ${u(5)}; border-inline-start: 6px solid ${c.warning}; border-radius: ${c.radiusLg}; background: ${c.warningSubtle}; }
568
780
  :host([kind='insurance']) .box { border-color: ${c.info}; background: ${c.infoSubtle}; }
569
- strong { display: block; margin-block-end: ${m(1)}; ${P("md")} color: ${c.text}; }
781
+ strong { display: block; margin-block-end: ${u(1)}; ${O("md")} color: ${c.text}; }
570
782
  p { margin: 0; color: ${c.text}; }
571
783
  /* 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). */
572
- .firm { margin-block-start: ${m(3)}; ${P("sm")} color: ${c.text}; }
573
- `]}render(){let t=$i[this.kind]??$i.custom,e=this.heading||(t.heading?z(t.heading):""),i=this.text||(t.text?z(t.text):"");return f`<aside class="box" part="box" aria-label=${e||z("Important information")}>
574
- ${e?f`<strong>${e}</strong>`:I}
575
- ${i?f`<p>${i}</p>`:I}
576
- ${this.firm?f`<p class="firm">${this.firm}</p>`:I}
577
- </aside>`}},ue={standard:[{from:0,rate:0},{from:125e3,rate:2},{from:25e4,rate:5},{from:925e3,rate:10},{from:15e5,rate:12}],firstTime:[{from:0,rate:0},{from:3e5,rate:5}],firstTimeLimit:5e5,additionalSurcharge:5};function Xt(o,t,e=0){let i=0;return t.forEach((a,s)=>{let n=t[s+1]?.from??1/0;o>a.from&&(i+=(Math.min(o,n)-a.from)*(a.rate+e)/100)}),Math.round(i)}function vi(o,t){return o<=0?0:t==="first-time"&&o<=ue.firstTimeLimit?Xt(o,ue.firstTime):t==="additional"?o<4e4?0:Xt(o,ue.standard,ue.additionalSurcharge):Xt(o,ue.standard)}var wi=Le`
784
+ .firm { margin-block-start: ${u(3)}; ${O("sm")} color: ${c.text}; }
785
+ `]}render(){let t=Xi[this.kind]??Xi.custom,e=this.heading||(t.heading?M(t.heading):""),i=this.text||(t.text?M(t.text):"");return $`<aside class="box" part="box" aria-label=${e||M("Important information")}>
786
+ ${e?$`<strong>${e}</strong>`:P}
787
+ ${i?$`<p>${i}</p>`:P}
788
+ ${this.firm?$`<p class="firm">${this.firm}</p>`:P}
789
+ </aside>`}},ke={standard:[{from:0,rate:0},{from:125e3,rate:2},{from:25e4,rate:5},{from:925e3,rate:10},{from:15e5,rate:12}],firstTime:[{from:0,rate:0},{from:3e5,rate:5}],firstTimeLimit:5e5,additionalSurcharge:5};function xi(n,t,e=0){let i=0;return t.forEach((a,r)=>{let o=t[r+1]?.from??1/0;n>a.from&&(i+=(Math.min(n,o)-a.from)*(a.rate+e)/100)}),Math.round(i)}function Ji(n,t){return n<=0?0:t==="first-time"&&n<=ke.firstTimeLimit?xi(n,ke.firstTime):t==="additional"?n<4e4?0:xi(n,ke.standard,ke.additionalSurcharge):xi(n,ke.standard)}var Ki=je`
578
790
  :host { display: block; container-type: inline-size; }
579
791
  .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; }
580
- .inputs { display: flex; flex-direction: column; gap: ${m(5)}; padding: ${m(8)}; }
581
- label, legend { display: block; ${P("sm")} font-weight: ${_("semibold")}; margin-block-end: ${m(1.5)}; padding: 0; }
792
+ .inputs { display: flex; flex-direction: column; gap: ${u(5)}; padding: ${u(8)}; }
793
+ label, legend { display: block; ${O("sm")} font-weight: ${X("semibold")}; margin-block-end: ${u(1.5)}; padding: 0; }
582
794
  fieldset { margin: 0; padding: 0; border: 0; }
583
- .choices { display: flex; flex-wrap: wrap; gap: ${m(2)}; }
584
- .choices label { display: inline-flex; align-items: center; gap: ${m(2)}; margin: 0; padding: ${m(2)} ${m(3)}; font-weight: ${_("regular")}; border: ${c.borderThin} solid ${c.border}; border-radius: ${c.radiusLg}; cursor: pointer; }
795
+ .choices { display: flex; flex-wrap: wrap; gap: ${u(2)}; }
796
+ .choices label { display: inline-flex; align-items: center; gap: ${u(2)}; margin: 0; padding: ${u(2)} ${u(3)}; font-weight: ${X("regular")}; border: ${c.borderThin} solid ${c.border}; border-radius: ${c.radiusLg}; cursor: pointer; }
585
797
  .choices input { accent-color: ${c.brand}; }
586
- input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${m(2)} ${m(3)}; font: inherit; color: ${c.text}; background: ${c.surfaceCard}; border: ${c.borderThin} solid ${c.border}; border-radius: ${c.radiusLg}; }
587
- .result { display: flex; flex-direction: column; justify-content: center; gap: ${m(2)}; padding: ${m(8)}; color: ${c.onBrand}; background: ${c.brand}; }
588
- .caption { margin: 0; ${P("sm")} opacity: 0.85; }
589
- output { display: block; font-family: ${c.fontHeading}; ${P("4xl")} font-weight: ${_("bold")}; }
590
- .line { margin: 0; ${P("sm")} }
591
- .foot { grid-column: 1 / -1; padding: ${m(4)} ${m(8)}; background: ${c.surfaceSubtle}; }
798
+ input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${u(2)} ${u(3)}; font: inherit; color: ${c.text}; background: ${c.surfaceCard}; border: ${c.borderThin} solid ${c.border}; border-radius: ${c.radiusLg}; }
799
+ .result { display: flex; flex-direction: column; justify-content: center; gap: ${u(2)}; padding: ${u(8)}; color: ${c.onBrand}; background: ${c.brand}; }
800
+ .caption { margin: 0; ${O("sm")} opacity: 0.85; }
801
+ output { display: block; font-family: ${c.fontHeading}; ${O("4xl")} font-weight: ${X("bold")}; }
802
+ .line { margin: 0; ${O("sm")} }
803
+ .foot { grid-column: 1 / -1; padding: ${u(4)} ${u(8)}; background: ${c.surfaceSubtle}; }
592
804
  /* Muted text is proved against the card colour, not this band, so the small print here is in the text colour (1.4.3). */
593
805
  .foot .small { color: ${c.text}; }
594
- @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${m(5)}; } .foot { padding: ${m(4)} ${m(5)}; } }
595
- `,St=class extends K{static{this.properties={heading:{type:String},price:{type:Number},buyer:{type:String},smallPrint:{type:String,attribute:"small-print"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="How much stamp duty would you pay?",this.price=385e3,this.buyer="first-time",this.smallPrint="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.",this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...K.styles,We,Me,_e,wi]}render(){let t=vi(this.price,this.buyer),e=this.price>0?t/this.price*100:0,i=[["first-time",z("First home")],["mover",z("Moving home")],["additional",z("Second home")]];return f`<div class="card wrap" part="wrap">
806
+ @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${u(5)}; } .foot { padding: ${u(4)} ${u(5)}; } }
807
+ `,Xt=class extends se{static{this.properties={heading:{type:String},price:{type:Number},buyer:{type:String},smallPrint:{type:String,attribute:"small-print"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="How much stamp duty would you pay?",this.price=385e3,this.buyer="first-time",this.smallPrint="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.",this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...se.styles,tt,Oe,it,Ki]}render(){let t=Ji(this.price,this.buyer),e=this.price>0?t/this.price*100:0,i=[["first-time",M("First home")],["mover",M("Moving home")],["additional",M("Second home")]];return $`<div class="card wrap" part="wrap">
596
808
  <div class="inputs">
597
- ${this.heading?f`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:I}
598
- <div><label for=${this.id_("price")}>${z("Price of the home (\xA3)")}</label>
809
+ ${this.heading?$`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:P}
810
+ <div><label for=${this.id_("price")}>${M("Price of the home (\xA3)")}</label>
599
811
  <input id=${this.id_("price")} type="number" min="0" step="1000" inputmode="numeric" .value=${String(this.price)} @input=${a=>{this.price=Number(a.target.value)||0}} /></div>
600
- <fieldset><legend>${z("Are you buying")}</legend><div class="choices">
601
- ${i.map(([a,s])=>f`<label><input type="radio" name=${this.id_("buyer")} .checked=${this.buyer===a} @change=${()=>{this.buyer=a}} />${s}</label>`)}
812
+ <fieldset><legend>${M("Are you buying")}</legend><div class="choices">
813
+ ${i.map(([a,r])=>$`<label><input type="radio" name=${this.id_("buyer")} .checked=${this.buyer===a} @change=${()=>{this.buyer=a}} />${r}</label>`)}
602
814
  </div></fieldset>
603
815
  </div>
604
816
  <div class="result" aria-live="polite">
605
- <p class="caption">${z("Stamp duty to pay")}</p>
606
- <output for=${this.id_("price")}>${vt(t)}</output>
607
- <p class="line">${t?z("About {rate}% of the price",{rate:e.toFixed(1)}):z("Nothing to pay at this price")}</p>
608
- ${this.buyer==="first-time"&&this.price>ue.firstTimeLimit?f`<p class="line">${z("First-time buyer relief stops above {limit}, so the usual rates apply.",{limit:vt(ue.firstTimeLimit)})}</p>`:I}
817
+ <p class="caption">${M("Stamp duty to pay")}</p>
818
+ <output for=${this.id_("price")}>${Ut(t)}</output>
819
+ <p class="line">${t?M("About {rate}% of the price",{rate:e.toFixed(1)}):M("Nothing to pay at this price")}</p>
820
+ ${this.buyer==="first-time"&&this.price>ke.firstTimeLimit?$`<p class="line">${M("First-time buyer relief stops above {limit}, so the usual rates apply.",{limit:Ut(ke.firstTimeLimit)})}</p>`:P}
609
821
  </div>
610
- ${this.smallPrint?f`<div class="foot"><p class="small">${this.smallPrint}</p></div>`:I}
611
- </div>`}},zt=class extends K{static{this.properties={heading:{type:String},income:{type:Number},secondIncome:{type:Number,attribute:"second-income"},deposit:{type:Number},timesIncome:{type:Number,attribute:"times-income"},smallPrint:{type:String,attribute:"small-print"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="How much could you borrow?",this.income=45e3,this.secondIncome=0,this.deposit=3e4,this.timesIncome=4.5,this.smallPrint="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.",this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...K.styles,We,Me,_e,wi]}field(t){return e=>{this[t]=Number(e.target.value)||0}}render(){let t=Math.max(0,(this.income+this.secondIncome)*this.timesIncome),e=(i,a)=>f`<div><label for=${this.id_(i)}>${a}</label>
612
- <input id=${this.id_(i)} type="number" min="0" step="1000" inputmode="numeric" .value=${String(this[i])} @input=${this.field(i)} /></div>`;return f`<div class="card wrap" part="wrap">
822
+ ${this.smallPrint?$`<div class="foot"><p class="small">${this.smallPrint}</p></div>`:P}
823
+ </div>`}},Vt=class extends se{static{this.properties={heading:{type:String},income:{type:Number},secondIncome:{type:Number,attribute:"second-income"},deposit:{type:Number},timesIncome:{type:Number,attribute:"times-income"},smallPrint:{type:String,attribute:"small-print"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="How much could you borrow?",this.income=45e3,this.secondIncome=0,this.deposit=3e4,this.timesIncome=4.5,this.smallPrint="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.",this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...se.styles,tt,Oe,it,Ki]}field(t){return e=>{this[t]=Number(e.target.value)||0}}render(){let t=Math.max(0,(this.income+this.secondIncome)*this.timesIncome),e=(i,a)=>$`<div><label for=${this.id_(i)}>${a}</label>
824
+ <input id=${this.id_(i)} type="number" min="0" step="1000" inputmode="numeric" .value=${String(this[i])} @input=${this.field(i)} /></div>`;return $`<div class="card wrap" part="wrap">
613
825
  <div class="inputs">
614
- ${this.heading?f`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:I}
615
- ${e("income",z("Your yearly income before tax (\xA3)"))}
616
- ${e("secondIncome",z("A second person\u2019s income, if buying together (\xA3)"))}
617
- ${e("deposit",z("Your deposit (\xA3)"))}
826
+ ${this.heading?$`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:P}
827
+ ${e("income",M("Your yearly income before tax (\xA3)"))}
828
+ ${e("secondIncome",M("A second person\u2019s income, if buying together (\xA3)"))}
829
+ ${e("deposit",M("Your deposit (\xA3)"))}
618
830
  </div>
619
831
  <div class="result" aria-live="polite">
620
- <p class="caption">${z("You could borrow about")}</p>
621
- <output>${vt(t)}</output>
622
- <p class="line">${z("With your deposit, that\u2019s a home of about {amount}.",{amount:vt(t+this.deposit)})}</p>
832
+ <p class="caption">${M("You could borrow about")}</p>
833
+ <output>${Ut(t)}</output>
834
+ <p class="line">${M("With your deposit, that\u2019s a home of about {amount}.",{amount:Ut(t+this.deposit)})}</p>
623
835
  </div>
624
- ${this.smallPrint?f`<div class="foot"><p class="small">${this.smallPrint}</p></div>`:I}
625
- </div>`}},Fe=class extends K{static{this.properties={heading:{type:String},phone:{type:String},hours:{type:String},email:{type:String},callbackHeading:{type:String,attribute:"callback-heading"},buttonText:{type:String,attribute:"button-text"},doneText:{type:String,attribute:"done-text"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="Talk to us",this.phone="0800 000 0000",this.hours=`Monday to Friday, 9am to 6pm
626
- Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",this.buttonText="Ask for a call back",this.doneText="Thanks. We\u2019ll call you at the time you chose.",this.headingLevel=2,this.sent=!1,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...K.styles,We,Me,_e,Le`
836
+ ${this.smallPrint?$`<div class="foot"><p class="small">${this.smallPrint}</p></div>`:P}
837
+ </div>`}},et=class extends se{static{this.properties={heading:{type:String},phone:{type:String},hours:{type:String},email:{type:String},callbackHeading:{type:String,attribute:"callback-heading"},buttonText:{type:String,attribute:"button-text"},doneText:{type:String,attribute:"done-text"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="Talk to us",this.phone="0800 000 0000",this.hours=`Monday to Friday, 9am to 6pm
838
+ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",this.buttonText="Ask for a call back",this.doneText="Thanks. We\u2019ll call you at the time you chose.",this.headingLevel=2,this.sent=!1,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...se.styles,tt,Oe,it,je`
627
839
  :host { display: block; container-type: inline-size; }
628
- .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${m(6)}; padding: ${m(8)}; }
629
- .phone { display: inline-block; margin: ${m(3)} 0; font-family: ${c.fontHeading}; ${P("3xl")} font-weight: ${_("bold")}; color: ${c.link}; text-decoration: none; }
840
+ .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${u(6)}; padding: ${u(8)}; }
841
+ .phone { display: inline-block; margin: ${u(3)} 0; font-family: ${c.fontHeading}; ${O("3xl")} font-weight: ${X("bold")}; color: ${c.link}; text-decoration: none; }
630
842
  .hours { margin: 0; white-space: pre-line; color: ${c.textMuted}; }
631
- .email { display: inline-flex; align-items: center; min-block-size: ${c.targetMin}; margin-block-start: ${m(3)}; color: ${c.link}; overflow-wrap: anywhere; }
632
- form { display: grid; gap: ${m(3)}; padding: ${m(5)}; border-radius: ${c.radiusLg}; background: ${c.surfaceInset}; }
633
- .sub { margin: 0; ${P("lg")} font-weight: ${_("bold")}; color: ${c.text}; }
634
- label { display: block; ${P("sm")} font-weight: ${_("semibold")}; margin-block-end: ${m(1)}; }
635
- input, select { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${m(2)} ${m(3)}; font: inherit; color: ${c.text}; background: ${c.surfaceCard}; border: ${c.borderThin} solid ${c.border}; border-radius: ${c.radiusLg}; }
636
- .done { margin: 0; padding: ${m(5)}; border-radius: ${c.radiusLg}; background: ${c.successSubtle}; color: ${c.successText}; font-weight: ${_("semibold")}; }
637
- @container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); padding: ${m(5)}; } }
638
- `]}submit(t){t.preventDefault();let e=new FormData(t.target),i={name:String(e.get("name")??""),phone:String(e.get("phone")??""),when:String(e.get("when")??"")};this.dispatchEvent(new CustomEvent("impakt-submit",{detail:i,bubbles:!0,composed:!0})),this.sent=!0}render(){return f`<div class="card wrap" part="wrap">
843
+ .email { display: inline-flex; align-items: center; min-block-size: ${c.targetMin}; margin-block-start: ${u(3)}; color: ${c.link}; overflow-wrap: anywhere; }
844
+ form { display: grid; gap: ${u(3)}; padding: ${u(5)}; border-radius: ${c.radiusLg}; background: ${c.surfaceInset}; }
845
+ .sub { margin: 0; ${O("lg")} font-weight: ${X("bold")}; color: ${c.text}; }
846
+ label { display: block; ${O("sm")} font-weight: ${X("semibold")}; margin-block-end: ${u(1)}; }
847
+ input, select { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${u(2)} ${u(3)}; font: inherit; color: ${c.text}; background: ${c.surfaceCard}; border: ${c.borderThin} solid ${c.border}; border-radius: ${c.radiusLg}; }
848
+ .done { margin: 0; padding: ${u(5)}; border-radius: ${c.radiusLg}; background: ${c.successSubtle}; color: ${c.successText}; font-weight: ${X("semibold")}; }
849
+ @container (max-width: 40rem) { .wrap { grid-template-columns: minmax(0, 1fr); padding: ${u(5)}; } }
850
+ `]}submit(t){t.preventDefault();let e=new FormData(t.target),i={name:String(e.get("name")??""),phone:String(e.get("phone")??""),when:String(e.get("when")??"")};this.dispatchEvent(new CustomEvent("impakt-submit",{detail:i,bubbles:!0,composed:!0})),this.sent=!0}render(){return $`<div class="card wrap" part="wrap">
639
851
  <div>
640
- ${this.heading?f`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:I}
641
- ${this.phone?f`<a class="phone" href=${`tel:${this.phone.replace(/[^\d+]/g,"")}`}>${this.phone}</a>`:I}
642
- ${this.hours?f`<p class="hours">${this.hours}</p>`:I}
643
- ${this.email?f`<a class="email" href=${`mailto:${this.email}`}>${this.email}</a>`:I}
852
+ ${this.heading?$`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:P}
853
+ ${this.phone?$`<a class="phone" href=${`tel:${this.phone.replace(/[^\d+]/g,"")}`}>${this.phone}</a>`:P}
854
+ ${this.hours?$`<p class="hours">${this.hours}</p>`:P}
855
+ ${this.email?$`<a class="email" href=${`mailto:${this.email}`}>${this.email}</a>`:P}
644
856
  </div>
645
- ${this.callbackHeading?this.sent?f`<p class="done" role="status">${this.doneText}</p>`:f`<form @submit=${this.submit} aria-labelledby=${this.id_("cb")}>
857
+ ${this.callbackHeading?this.sent?$`<p class="done" role="status">${this.doneText}</p>`:$`<form @submit=${this.submit} aria-labelledby=${this.id_("cb")}>
646
858
  <p class="sub" id=${this.id_("cb")}>${this.callbackHeading}</p>
647
- <div><label for=${this.id_("name")}>${z("Your name")}</label><input id=${this.id_("name")} name="name" autocomplete="name" required /></div>
648
- <div><label for=${this.id_("tel")}>${z("Phone number")}</label><input id=${this.id_("tel")} name="phone" type="tel" autocomplete="tel" required /></div>
649
- <div><label for=${this.id_("when")}>${z("Best time to call")}</label><select id=${this.id_("when")} name="when"><option value="Morning">${z("Morning")}</option><option value="Afternoon">${z("Afternoon")}</option><option value="Evening">${z("Evening")}</option></select></div>
859
+ <div><label for=${this.id_("name")}>${M("Your name")}</label><input id=${this.id_("name")} name="name" autocomplete="name" required /></div>
860
+ <div><label for=${this.id_("tel")}>${M("Phone number")}</label><input id=${this.id_("tel")} name="phone" type="tel" autocomplete="tel" required /></div>
861
+ <div><label for=${this.id_("when")}>${M("Best time to call")}</label><select id=${this.id_("when")} name="when"><option value="Morning">${M("Morning")}</option><option value="Afternoon">${M("Afternoon")}</option><option value="Evening">${M("Evening")}</option></select></div>
650
862
  <button class="btn" type="submit">${this.buttonText}</button>
651
- </form>`:I}
652
- </div>`}};Oe.createProperty("playing",{state:!0});Fe.createProperty("sent",{state:!0});customElements.define("impakt-plan-comparison",wt);customElements.define("impakt-video",Oe);customElements.define("impakt-regulatory-notice",kt);customElements.define("impakt-stamp-duty-calculator",St);customElements.define("impakt-affordability-calculator",zt);customElements.define("impakt-contact-block",Fe);import{css as Ki,html as N,nothing as ee,unsafeCSS as ki}from"./atomic-ui.js";import{ImpaktElement as Si,pageLocale as zi,say as O,focusRing as Zi,targetSize as Ti,visuallyHidden as Ai,fontSize as Vt,fontWeight as ke,space as k,spaceAround as Ji,t as $,type as Se,toneOf as Tt}from"./atomic-ui.js";var At=o=>o.reduce((t,e)=>t+e,0),Li=(o,t)=>o.find(e=>typeof e.below=="number"&&t<e.below)??o.at(-1);function Lt(o,t,e){let i=o.flatMap(l=>(t[l.id]??[]).flatMap(y=>l.choices.filter(x=>x.id===y))),a=At(i.map(l=>l.cost??0)),s=At(i.map(l=>l.weeks??0));for(let l of i)a*=l.costFactor??1,s*=l.weeksFactor??1;let n=(Li(e.teams,a)?.engineers??1)+At(i.map(l=>l.engineers??0));return{cost:a,low:Math.round(a*e.low),high:Math.round(a*e.high),weeks:Math.max(e.minWeeks,Math.round(s)),engineers:n,way:Li(e.ways,a)?.text??""}}function Mi(o,t){let e=o.map(a=>typeof a.share=="number"?Math.max(1,Math.round(t*a.share)):0),i=Math.max(1,t-At(e));return o.map((a,s)=>typeof a.share=="number"?e[s]:i)}var Mt=class extends Si{constructor(){super();this.at=0;this.answers={};this.tip="";this.copied="";this.started=!1;this.questions=[],this.teams=[],this.ways=[],this.phases=[],this.low=.85,this.high=1.25,this.minWeeks=1,this.currency="GBP",this.unit=1,this.intro="",this.budgetLabel="Indicative budget",this.resultHeading="Your estimate",this.teamText="{n} engineers",this.teamTextOne="1 engineer",this.note="",this.contactHref="",this.sendLabel="Send this to us",this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={questions:{type:Array},teams:{type:Array},ways:{type:Array},phases:{type:Array},low:{type:Number},high:{type:Number},minWeeks:{type:Number,attribute:"min-weeks"},currency:{type:String},unit:{type:Number},intro:{type:String},budgetLabel:{type:String,attribute:"budget-label"},resultHeading:{type:String,attribute:"result-heading"},teamText:{type:String,attribute:"team-text"},teamTextOne:{type:String,attribute:"team-text-one"},note:{type:String},contactHref:{type:String,attribute:"contact-href"},sendLabel:{type:String,attribute:"send-label"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...Si.styles,Ji,Zi,Ki`
863
+ </form>`:P}
864
+ </div>`}};Ze.createProperty("playing",{state:!0});et.createProperty("sent",{state:!0});customElements.define("impakt-plan-comparison",Yt);customElements.define("impakt-video",Ze);customElements.define("impakt-regulatory-notice",Gt);customElements.define("impakt-stamp-duty-calculator",Xt);customElements.define("impakt-affordability-calculator",Vt);customElements.define("impakt-contact-block",et);import{css as Ia,html as F,nothing as le,unsafeCSS as Zi}from"./atomic-ui.js";import{ImpaktElement as ea,pageLocale as ta,say as D,focusRing as Ha,targetSize as ia,visuallyHidden as aa,fontSize as vi,fontWeight as Ie,space as T,spaceAround as Ra,t as y,type as He,toneOf as Qt}from"./atomic-ui.js";var Jt=n=>n.reduce((t,e)=>t+e,0),ra=(n,t)=>n.find(e=>typeof e.below=="number"&&t<e.below)??n.at(-1);function Kt(n,t,e){let i=n.flatMap(l=>(t[l.id]??[]).flatMap(x=>l.choices.filter(v=>v.id===x))),a=Jt(i.map(l=>l.cost??0)),r=Jt(i.map(l=>l.weeks??0));for(let l of i)a*=l.costFactor??1,r*=l.weeksFactor??1;let o=(ra(e.teams,a)?.engineers??1)+Jt(i.map(l=>l.engineers??0));return{cost:a,low:Math.round(a*e.low),high:Math.round(a*e.high),weeks:Math.max(e.minWeeks,Math.round(r)),engineers:o,way:ra(e.ways,a)?.text??""}}function sa(n,t){let e=n.map(a=>typeof a.share=="number"?Math.max(1,Math.round(t*a.share)):0),i=Math.max(1,t-Jt(e));return n.map((a,r)=>typeof a.share=="number"?e[r]:i)}var Zt=class extends ea{constructor(){super();this.at=0;this.answers={};this.tip="";this.copied="";this.started=!1;this.questions=[],this.teams=[],this.ways=[],this.phases=[],this.low=.85,this.high=1.25,this.minWeeks=1,this.currency="GBP",this.unit=1,this.intro="",this.budgetLabel="Indicative budget",this.resultHeading="Your estimate",this.teamText="{n} engineers",this.teamTextOne="1 engineer",this.note="",this.contactHref="",this.sendLabel="Send this to us",this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={questions:{type:Array},teams:{type:Array},ways:{type:Array},phases:{type:Array},low:{type:Number},high:{type:Number},minWeeks:{type:Number,attribute:"min-weeks"},currency:{type:String},unit:{type:Number},intro:{type:String},budgetLabel:{type:String,attribute:"budget-label"},resultHeading:{type:String,attribute:"result-heading"},teamText:{type:String,attribute:"team-text"},teamTextOne:{type:String,attribute:"team-text-one"},note:{type:String},contactHref:{type:String,attribute:"contact-href"},sendLabel:{type:String,attribute:"send-label"},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...ea.styles,Ra,Ha,Ia`
653
865
  :host { display: block; container-type: inline-size; }
654
866
  [hidden] { display: none !important; }
655
- .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: ${k(10)}; align-items: start; }
656
- .mono { font-family: ${$.fontMono}; font-size: ${Vt("xs")}; letter-spacing: 0.04em; text-transform: uppercase; color: ${$.textMuted}; margin: 0; }
657
- .sr-only { ${Ai} }
867
+ .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: ${T(10)}; align-items: start; }
868
+ .mono { font-family: ${y.fontMono}; font-size: ${vi("xs")}; letter-spacing: 0.04em; text-transform: uppercase; color: ${y.textMuted}; margin: 0; }
869
+ .sr-only { ${aa} }
658
870
 
659
- .progress { display: grid; gap: ${k(2)}; margin-block-end: ${k(6)}; }
871
+ .progress { display: grid; gap: ${T(2)}; margin-block-end: ${T(6)}; }
660
872
  .bar { block-size: 4px; border-radius: 2px; background: color-mix(in srgb, currentColor 12%, transparent); overflow: hidden; }
661
- .bar i { display: block; block-size: 100%; background: ${$.brand}; transition: inline-size 300ms ease; }
873
+ .bar i { display: block; block-size: 100%; background: ${y.brand}; transition: inline-size 300ms ease; }
662
874
 
663
875
  fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
664
- legend { padding: 0; margin-block-end: ${k(2)}; }
665
- .q { margin: 0; font-family: ${$.fontHeading}; font-weight: ${ke("bold")}; ${Se("3xl")} letter-spacing: ${$.trackingTight}; color: ${$.textHeading}; outline: none; }
666
- .hint { margin: 0 0 ${k(6)}; color: ${$.textMuted}; }
876
+ legend { padding: 0; margin-block-end: ${T(2)}; }
877
+ .q { margin: 0; font-family: ${y.fontHeading}; font-weight: ${Ie("bold")}; ${He("3xl")} letter-spacing: ${y.trackingTight}; color: ${y.textHeading}; outline: none; }
878
+ .hint { margin: 0 0 ${T(6)}; color: ${y.textMuted}; }
667
879
 
668
- .choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${k(3)}; }
880
+ .choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${T(3)}; }
669
881
  .choices.many { grid-template-columns: repeat(3, minmax(0, 1fr)); }
670
- .choice { position: relative; display: grid; gap: ${k(1)}; align-content: start; padding: ${k(4)}; border: ${$.borderThin} solid ${$.border}; border-radius: ${$.radiusLg}; background: ${$.surfaceCard}; cursor: pointer; transition: border-color 120ms ease, background 120ms ease; }
671
- .choice:hover { border-color: ${$.borderStrong}; }
672
- .choice input { ${Ai} }
673
- .choice:has(input:checked) { border-color: ${$.brand}; box-shadow: inset 0 0 0 1px ${$.brand}; background: ${$.brandSubtle}; }
674
- .choice:has(input:focus-visible) { box-shadow: ${$.focusShadow}; }
675
- .many .choice { padding: ${k(3)}; }
676
- .label { font-weight: ${ke("semibold")}; }
677
- .small { ${Se("sm")} color: ${$.textMuted}; }
882
+ .choice { position: relative; display: grid; gap: ${T(1)}; align-content: start; padding: ${T(4)}; border: ${y.borderThin} solid ${y.border}; border-radius: ${y.radiusLg}; background: ${y.surfaceCard}; cursor: pointer; transition: border-color 120ms ease, background 120ms ease; }
883
+ .choice:hover { border-color: ${y.borderStrong}; }
884
+ .choice input { ${aa} }
885
+ .choice:has(input:checked) { border-color: ${y.brand}; box-shadow: inset 0 0 0 1px ${y.brand}; background: ${y.brandSubtle}; }
886
+ .choice:has(input:focus-visible) { box-shadow: ${y.focusShadow}; }
887
+ .many .choice { padding: ${T(3)}; }
888
+ .label { font-weight: ${Ie("semibold")}; }
889
+ .small { ${He("sm")} color: ${y.textMuted}; }
678
890
  /* A tick for a picked feature, drawn in the corner. */
679
- .many .choice:has(input:checked)::after { content: '✓'; position: absolute; inset-block-start: ${k(2)}; inset-inline-end: ${k(3)}; color: ${$.brand}; font-weight: ${ke("bold")}; }
891
+ .many .choice:has(input:checked)::after { content: '✓'; position: absolute; inset-block-start: ${T(2)}; inset-inline-end: ${T(3)}; color: ${y.brand}; font-weight: ${Ie("bold")}; }
680
892
 
681
- .scale { display: grid; gap: ${k(3)}; }
682
- .scale input { inline-size: 100%; accent-color: ${$.brand}; ${Ti} }
683
- .ticks { display: flex; justify-content: space-between; ${Se("sm")} color: ${$.textMuted}; }
684
- .ticks span[aria-current] { color: ${$.text}; font-weight: ${ke("semibold")}; }
893
+ .scale { display: grid; gap: ${T(3)}; }
894
+ .scale input { inline-size: 100%; accent-color: ${y.brand}; ${ia} }
895
+ .ticks { display: flex; justify-content: space-between; ${He("sm")} color: ${y.textMuted}; }
896
+ .ticks span[aria-current] { color: ${y.text}; font-weight: ${Ie("semibold")}; }
685
897
  .now { margin: 0; }
686
898
 
687
- .nav { display: flex; gap: ${k(3)}; margin-block-start: ${k(8)}; }
688
- button, .send { ${Ti} display: inline-flex; align-items: center; justify-content: center; gap: ${k(2)}; padding: ${k(2.5)} ${k(5)}; border-radius: ${$.radiusLg}; font: inherit; font-weight: ${ke("semibold")}; cursor: pointer; text-decoration: none; border: ${$.borderThin} solid transparent; }
689
- .primary, .send { background: ${$.brand}; color: ${$.onBrand}; }
690
- .primary:hover, .send:hover { background: ${$.brandHover}; }
691
- .secondary { background: transparent; color: ${$.text}; border-color: ${$.borderStrong}; }
692
- .secondary:hover { background: ${$.surfaceSubtle}; }
899
+ .nav { display: flex; gap: ${T(3)}; margin-block-start: ${T(8)}; }
900
+ button, .send { ${ia} display: inline-flex; align-items: center; justify-content: center; gap: ${T(2)}; padding: ${T(2.5)} ${T(5)}; border-radius: ${y.radiusLg}; font: inherit; font-weight: ${Ie("semibold")}; cursor: pointer; text-decoration: none; border: ${y.borderThin} solid transparent; }
901
+ .primary, .send { background: ${y.brand}; color: ${y.onBrand}; }
902
+ .primary:hover, .send:hover { background: ${y.brandHover}; }
903
+ .secondary { background: transparent; color: ${y.text}; border-color: ${y.borderStrong}; }
904
+ .secondary:hover { background: ${y.surfaceSubtle}; }
693
905
 
694
- .panel { position: sticky; inset-block-start: ${k(6)}; overflow: hidden; isolation: isolate; padding: ${k(8)}; border-radius: ${$.radiusXl}; background: ${$.surfaceCard}; box-shadow: ${$.shadowMd}; display: grid; gap: ${k(2)}; }
906
+ .panel { position: sticky; inset-block-start: ${T(6)}; overflow: hidden; isolation: isolate; padding: ${T(8)}; border-radius: ${y.radiusXl}; background: ${y.surfaceCard}; box-shadow: ${y.shadowMd}; display: grid; gap: ${T(2)}; }
695
907
  /* The glow behind the budget grows as the product does. */
696
- .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, ${ki(Tt(1,0))} 45%, transparent), color-mix(in srgb, ${ki(Tt(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; }
697
- .range { margin: 0; font-family: ${$.fontHeading}; font-weight: ${ke("bold")}; font-size: ${Vt("5xl")}; line-height: 1; letter-spacing: ${$.trackingTight}; color: ${$.textHeading}; }
698
- .weeks { margin: 0; ${Se("lg")} }
699
- .tip { margin: ${k(4)} 0 0; padding-block-start: ${k(4)}; border-block-start: 1px solid color-mix(in srgb, currentColor 15%, transparent); color: ${$.textMuted}; }
908
+ .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, ${Zi(Qt(1,0))} 45%, transparent), color-mix(in srgb, ${Zi(Qt(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; }
909
+ .range { margin: 0; font-family: ${y.fontHeading}; font-weight: ${Ie("bold")}; font-size: ${vi("5xl")}; line-height: 1; letter-spacing: ${y.trackingTight}; color: ${y.textHeading}; }
910
+ .weeks { margin: 0; ${He("lg")} }
911
+ .tip { margin: ${T(4)} 0 0; padding-block-start: ${T(4)}; border-block-start: 1px solid color-mix(in srgb, currentColor 15%, transparent); color: ${y.textMuted}; }
700
912
 
701
- .result { display: grid; gap: ${k(6)}; }
702
- .summary { margin: 0; ${Se("xl")} text-wrap: pretty; }
913
+ .result { display: grid; gap: ${T(6)}; }
914
+ .summary { margin: 0; ${He("xl")} text-wrap: pretty; }
703
915
  .phases { display: flex; gap: 3px; block-size: 14px; border-radius: 7px; overflow: hidden; }
704
916
  .phases i { display: block; }
705
- .legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: ${k(2)} ${k(5)}; }
706
- .legend li { display: inline-flex; align-items: center; gap: ${k(2)}; }
917
+ .legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: ${T(2)} ${T(5)}; }
918
+ .legend li { display: inline-flex; align-items: center; gap: ${T(2)}; }
707
919
  .legend li::before { content: ''; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--c); }
708
- dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${k(4)}; }
709
- dt { margin: 0 0 ${k(1)}; }
710
- dd { margin: 0; font-weight: ${ke("semibold")}; }
711
- .actions { display: flex; flex-wrap: wrap; gap: ${k(3)}; }
712
- .note { margin: 0; ${Se("sm")} color: ${$.textMuted}; }
713
- .status { margin: 0; ${Se("sm")} }
920
+ dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${T(4)}; }
921
+ dt { margin: 0 0 ${T(1)}; }
922
+ dd { margin: 0; font-weight: ${Ie("semibold")}; }
923
+ .actions { display: flex; flex-wrap: wrap; gap: ${T(3)}; }
924
+ .note { margin: 0; ${He("sm")} color: ${y.textMuted}; }
925
+ .status { margin: 0; ${He("sm")} }
714
926
 
715
927
  @container (max-width: 48rem) {
716
- .wrap { grid-template-columns: minmax(0, 1fr); gap: ${k(8)}; }
928
+ .wrap { grid-template-columns: minmax(0, 1fr); gap: ${T(8)}; }
717
929
  /* Not sticky once the panel is under the questions, but still the glow's containing block, so the panel clips it
718
930
  and it never widens the page (1.4.10). */
719
931
  .panel { position: relative; inset-block-start: auto; }
@@ -721,141 +933,145 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
721
933
  }
722
934
  @container (max-width: 30rem) {
723
935
  .choices { grid-template-columns: minmax(0, 1fr); }
724
- .range { font-size: ${Vt("4xl")}; }
936
+ .range { font-size: ${vi("4xl")}; }
725
937
  }
726
938
  @media (forced-colors: active) {
727
939
  .choice:has(input:checked) { outline: 3px solid Highlight; }
728
940
  .bar i, .phases i, .legend li::before { background: CanvasText !important; }
729
941
  .glow { display: none; }
730
942
  }
731
- `]}reset(){this.answers=Object.fromEntries((this.questions??[]).map(e=>{let i=(e.start??[]).filter(a=>e.choices.some(s=>s.id===a));return e.kind==="many"?[e.id,i]:[e.id,[i[0]??e.choices[0]?.id].filter(a=>!!a)]})),this.at=0,this.tip="",this.copied=""}willUpdate(e){(e.has("questions")||!this.started)&&(this.reset(),this.started=!0)}get rules(){return{low:this.low,high:this.high,minWeeks:this.minWeeks,teams:this.teams??[],ways:this.ways??[]}}money(e){try{return new Intl.NumberFormat(zi(this),{style:"currency",currency:this.currency||"GBP",notation:"compact",maximumFractionDigits:0}).format(e*(this.unit||1))}catch{return String(e*(this.unit||1))}}listOf(e){try{return new Intl.ListFormat(zi(this),{type:"conjunction"}).format(e)}catch{return e.join(", ")}}weeksWord(e){return e===1?O("{n} week",{n:e}):O("{n} weeks",{n:e})}get most(){let e=this.questions??[],i=Object.fromEntries(e.map(a=>{if(a.kind==="many")return[a.id,a.choices.map(n=>n.id)];let s=[...a.choices].sort((n,l)=>(l.cost??0)*(l.costFactor??1)-(n.cost??0)*(n.costFactor??1))[0];return[a.id,s?[s.id]:[]]}));return Lt(e,i,this.rules).high||1}summaryOf(e){let i=this.questions??[],a=i.find(u=>u.kind==="one"),s=a?a.choices.find(u=>u.id===this.answers[a.id]?.[0]):void 0,n=i.filter(u=>u.kind==="many"&&u.inSummary!==!1).flatMap(u=>(this.answers[u.id]??[]).map(be=>{let de=u.choices.find(Ge=>Ge.id===be);return de?de.phrase||de.label:be})),l=s?s.phrase||s.label:"",y=l?n.length?O("You are building {thing} with {list}.",{thing:l,list:this.listOf(n)}):O("You are building {thing}.",{thing:l}):"",x=O("Expect {range} and about {weeks} to a first release.",{range:this.rangeOf(e),weeks:this.weeksWord(e.weeks)});return y?`${y} ${x}`:x}rangeOf(e){return O("{low} to {high}",{low:this.money(e.low),high:this.money(e.high)})}teamOf(e){return e===1?this.teamTextOne:this.teamText.replace("{n}",String(e))}pick(e,i,a){let s=this.answers[e.id]??[];this.answers={...this.answers,[e.id]:e.kind==="many"?a?[...s.filter(n=>n!==i.id),i.id]:s.filter(n=>n!==i.id):[i.id]},a&&i.tip&&(this.tip=i.tip),this.requestUpdate()}go(e){let i=(this.questions??[]).length;this.at=Math.max(0,Math.min(i,e)),this.copied="",this.requestUpdate(),this.updateComplete.then(()=>this.renderRoot.querySelector(".current .q")?.focus({preventScroll:!0}))}result(){let e=Lt(this.questions??[],this.answers,this.rules);return{low:e.low*(this.unit||1),high:e.high*(this.unit||1),weeks:e.weeks,engineers:e.engineers,way:e.way,summary:this.textOf(e),answers:this.answers}}textOf(e){let i=[this.summaryOf(e),`${this.teamOf(e.engineers)}.`];e.way&&i.push(`${e.way}.`);let a=(this.questions??[]).filter(n=>n.short&&n.kind!=="many").map(n=>{let l=n.choices.find(y=>y.id===this.answers[n.id]?.[0]);return l?`${n.short}: ${l.label}.`:""}).filter(Boolean),s=(this.questions??[]).filter(n=>n.short&&n.kind==="many"&&n.inSummary===!1).map(n=>{let l=(this.answers[n.id]??[]).map(y=>n.choices.find(x=>x.id===y)?.label??y);return l.length?`${n.short}: ${this.listOf(l)}.`:""}).filter(Boolean);return[...i,...s,...a].join(" ")}send(e){let i=this.result();try{sessionStorage.setItem("impakt.estimate",i.summary)}catch{}this.dispatchEvent(new CustomEvent("impakt-estimate",{detail:i,bubbles:!0,composed:!0,cancelable:!0}))||e.preventDefault()}async copy(){let e=this.result().summary;try{await navigator.clipboard.writeText(e),this.copied=O("Summary copied.")}catch{this.copied=O("Copying is blocked here. Select the summary above instead.")}this.requestUpdate()}heading(e){let i=Math.min(Math.max(this.headingLevel||2,2),6);return N`<div class="q" role="heading" aria-level=${i} tabindex="-1">${e}</div>`}renderQuestion(e,i){let a=this.answers[e.id]??[],s=i===this.at;if(e.kind==="scale"){let l=Math.max(0,e.choices.findIndex(x=>x.id===a[0])),y=e.choices[l];return N`<fieldset class=${s?"current":""} ?hidden=${!s}>
943
+ `]}reset(){this.answers=Object.fromEntries((this.questions??[]).map(e=>{let i=(e.start??[]).filter(a=>e.choices.some(r=>r.id===a));return e.kind==="many"?[e.id,i]:[e.id,[i[0]??e.choices[0]?.id].filter(a=>!!a)]})),this.at=0,this.tip="",this.copied=""}willUpdate(e){(e.has("questions")||!this.started)&&(this.reset(),this.started=!0)}get rules(){return{low:this.low,high:this.high,minWeeks:this.minWeeks,teams:this.teams??[],ways:this.ways??[]}}money(e){try{return new Intl.NumberFormat(ta(this),{style:"currency",currency:this.currency||"GBP",notation:"compact",maximumFractionDigits:0}).format(e*(this.unit||1))}catch{return String(e*(this.unit||1))}}listOf(e){try{return new Intl.ListFormat(ta(this),{type:"conjunction"}).format(e)}catch{return e.join(", ")}}weeksWord(e){return e===1?D("{n} week",{n:e}):D("{n} weeks",{n:e})}get most(){let e=this.questions??[],i=Object.fromEntries(e.map(a=>{if(a.kind==="many")return[a.id,a.choices.map(o=>o.id)];let r=[...a.choices].sort((o,l)=>(l.cost??0)*(l.costFactor??1)-(o.cost??0)*(o.costFactor??1))[0];return[a.id,r?[r.id]:[]]}));return Kt(e,i,this.rules).high||1}summaryOf(e){let i=this.questions??[],a=i.find(g=>g.kind==="one"),r=a?a.choices.find(g=>g.id===this.answers[a.id]?.[0]):void 0,o=i.filter(g=>g.kind==="many"&&g.inSummary!==!1).flatMap(g=>(this.answers[g.id]??[]).map(Se=>{let $e=g.choices.find(nt=>nt.id===Se);return $e?$e.phrase||$e.label:Se})),l=r?r.phrase||r.label:"",x=l?o.length?D("You are building {thing} with {list}.",{thing:l,list:this.listOf(o)}):D("You are building {thing}.",{thing:l}):"",v=D("Expect {range} and about {weeks} to a first release.",{range:this.rangeOf(e),weeks:this.weeksWord(e.weeks)});return x?`${x} ${v}`:v}rangeOf(e){return D("{low} to {high}",{low:this.money(e.low),high:this.money(e.high)})}teamOf(e){return e===1?this.teamTextOne:this.teamText.replace("{n}",String(e))}pick(e,i,a){let r=this.answers[e.id]??[];this.answers={...this.answers,[e.id]:e.kind==="many"?a?[...r.filter(o=>o!==i.id),i.id]:r.filter(o=>o!==i.id):[i.id]},a&&i.tip&&(this.tip=i.tip),this.requestUpdate()}go(e){let i=(this.questions??[]).length;this.at=Math.max(0,Math.min(i,e)),this.copied="",this.requestUpdate(),this.updateComplete.then(()=>this.renderRoot.querySelector(".current .q")?.focus({preventScroll:!0}))}result(){let e=Kt(this.questions??[],this.answers,this.rules);return{low:e.low*(this.unit||1),high:e.high*(this.unit||1),weeks:e.weeks,engineers:e.engineers,way:e.way,summary:this.textOf(e),answers:this.answers}}textOf(e){let i=[this.summaryOf(e),`${this.teamOf(e.engineers)}.`];e.way&&i.push(`${e.way}.`);let a=(this.questions??[]).filter(o=>o.short&&o.kind!=="many").map(o=>{let l=o.choices.find(x=>x.id===this.answers[o.id]?.[0]);return l?`${o.short}: ${l.label}.`:""}).filter(Boolean),r=(this.questions??[]).filter(o=>o.short&&o.kind==="many"&&o.inSummary===!1).map(o=>{let l=(this.answers[o.id]??[]).map(x=>o.choices.find(v=>v.id===x)?.label??x);return l.length?`${o.short}: ${this.listOf(l)}.`:""}).filter(Boolean);return[...i,...r,...a].join(" ")}send(e){let i=this.result();try{sessionStorage.setItem("impakt.estimate",i.summary)}catch{}this.dispatchEvent(new CustomEvent("impakt-estimate",{detail:i,bubbles:!0,composed:!0,cancelable:!0}))||e.preventDefault()}async copy(){let e=this.result().summary;try{await navigator.clipboard.writeText(e),this.copied=D("Summary copied.")}catch{this.copied=D("Copying is blocked here. Select the summary above instead.")}this.requestUpdate()}heading(e){let i=Math.min(Math.max(this.headingLevel||2,2),6);return F`<div class="q" role="heading" aria-level=${i} tabindex="-1">${e}</div>`}renderQuestion(e,i){let a=this.answers[e.id]??[],r=i===this.at;if(e.kind==="scale"){let l=Math.max(0,e.choices.findIndex(v=>v.id===a[0])),x=e.choices[l];return F`<fieldset class=${r?"current":""} ?hidden=${!r}>
732
944
  <legend>${this.heading(e.heading)}</legend>
733
- ${e.hint?N`<p class="hint">${e.hint}</p>`:ee}
945
+ ${e.hint?F`<p class="hint">${e.hint}</p>`:le}
734
946
  <div class="scale">
735
- <input type="range" min="0" max=${Math.max(0,e.choices.length-1)} step="1" .value=${String(l)} aria-label=${e.heading} aria-valuetext=${y?.label??""}
736
- @input=${x=>{let u=e.choices[Number(x.target.value)];u&&this.pick(e,u,!0)}}>
737
- <div class="ticks" aria-hidden="true">${e.choices.map((x,u)=>N`<span aria-current=${u===l?"true":ee}>${x.label}</span>`)}</div>
738
- ${y?.hint?N`<p class="now">${y.hint}</p>`:ee}
947
+ <input type="range" min="0" max=${Math.max(0,e.choices.length-1)} step="1" .value=${String(l)} aria-label=${e.heading} aria-valuetext=${x?.label??""}
948
+ @input=${v=>{let g=e.choices[Number(v.target.value)];g&&this.pick(e,g,!0)}}>
949
+ <div class="ticks" aria-hidden="true">${e.choices.map((v,g)=>F`<span aria-current=${g===l?"true":le}>${v.label}</span>`)}</div>
950
+ ${x?.hint?F`<p class="now">${x.hint}</p>`:le}
739
951
  </div>
740
- </fieldset>`}let n=e.kind==="many";return N`<fieldset class=${s?"current":""} ?hidden=${!s}>
952
+ </fieldset>`}let o=e.kind==="many";return F`<fieldset class=${r?"current":""} ?hidden=${!r}>
741
953
  <legend>${this.heading(e.heading)}</legend>
742
- ${e.hint?N`<p class="hint">${e.hint}</p>`:ee}
743
- <div class="choices ${n?"many":""}">
744
- ${e.choices.map(l=>N`<label class="choice">
745
- <input type=${n?"checkbox":"radio"} name=${`${this.uid}-${e.id}`} value=${l.id} .checked=${a.includes(l.id)}
746
- @change=${y=>this.pick(e,l,y.target.checked)}>
954
+ ${e.hint?F`<p class="hint">${e.hint}</p>`:le}
955
+ <div class="choices ${o?"many":""}">
956
+ ${e.choices.map(l=>F`<label class="choice">
957
+ <input type=${o?"checkbox":"radio"} name=${`${this.uid}-${e.id}`} value=${l.id} .checked=${a.includes(l.id)}
958
+ @change=${x=>this.pick(e,l,x.target.checked)}>
747
959
  <span class="label">${l.label}</span>
748
- ${l.hint?N`<span class="small">${l.hint}</span>`:ee}
960
+ ${l.hint?F`<span class="small">${l.hint}</span>`:le}
749
961
  </label>`)}
750
962
  </div>
751
- </fieldset>`}renderResult(e){let i=Mi(this.phases??[],e.weeks),a=this.at===(this.questions??[]).length;return N`<div class="result ${a?"current":""}" ?hidden=${!a}>
963
+ </fieldset>`}renderResult(e){let i=sa(this.phases??[],e.weeks),a=this.at===(this.questions??[]).length;return F`<div class="result ${a?"current":""}" ?hidden=${!a}>
752
964
  ${this.heading(this.resultHeading)}
753
965
  <p class="summary">${this.summaryOf(e)}</p>
754
- ${(this.phases??[]).length?N`
755
- <div class="phases" aria-hidden="true">${(this.phases??[]).map((s,n)=>N`<i style=${`flex-grow:${i[n]};background:${Tt(void 0,n)}`}></i>`)}</div>
756
- <ul class="legend">${(this.phases??[]).map((s,n)=>N`<li style=${`--c:${Tt(void 0,n)}`}>${s.label} <b>${this.weeksWord(i[n])}</b></li>`)}</ul>`:ee}
966
+ ${(this.phases??[]).length?F`
967
+ <div class="phases" aria-hidden="true">${(this.phases??[]).map((r,o)=>F`<i style=${`flex-grow:${i[o]};background:${Qt(void 0,o)}`}></i>`)}</div>
968
+ <ul class="legend">${(this.phases??[]).map((r,o)=>F`<li style=${`--c:${Qt(void 0,o)}`}>${r.label} <b>${this.weeksWord(i[o])}</b></li>`)}</ul>`:le}
757
969
  <dl>
758
- <div><dt class="mono">${O("Your team")}</dt><dd>${this.teamOf(e.engineers)}</dd></div>
759
- ${e.way?N`<div><dt class="mono">${O("Way of working")}</dt><dd>${e.way}</dd></div>`:ee}
970
+ <div><dt class="mono">${D("Your team")}</dt><dd>${this.teamOf(e.engineers)}</dd></div>
971
+ ${e.way?F`<div><dt class="mono">${D("Way of working")}</dt><dd>${e.way}</dd></div>`:le}
760
972
  </dl>
761
973
  <div class="actions">
762
- ${this.contactHref?N`<a class="send" href=${this.contactHref} @click=${s=>this.send(s)}>${this.sendLabel} <span aria-hidden="true">→</span></a>`:ee}
763
- <button type="button" class="secondary" @click=${()=>this.copy()}>${O("Copy summary")}</button>
764
- <button type="button" class="secondary" @click=${()=>{this.reset(),this.go(0)}}>${O("Start again")}</button>
974
+ ${this.contactHref?F`<a class="send" href=${this.contactHref} @click=${r=>this.send(r)}>${this.sendLabel} <span aria-hidden="true">→</span></a>`:le}
975
+ <button type="button" class="secondary" @click=${()=>this.copy()}>${D("Copy summary")}</button>
976
+ <button type="button" class="secondary" @click=${()=>{this.reset(),this.go(0)}}>${D("Start again")}</button>
765
977
  </div>
766
978
  <p class="status" role="status">${this.copied}</p>
767
- ${this.note?N`<p class="note">${this.note}</p>`:ee}
768
- </div>`}render(){let e=this.questions??[],i=e.length,a=Lt(e,this.answers,this.rules),s=this.at>=i,n=(.6+Math.min(1,a.high/this.most)*1.1).toFixed(2);return N`<div class="wrap">
979
+ ${this.note?F`<p class="note">${this.note}</p>`:le}
980
+ </div>`}render(){let e=this.questions??[],i=e.length,a=Kt(e,this.answers,this.rules),r=this.at>=i,o=(.6+Math.min(1,a.high/this.most)*1.1).toFixed(2);return F`<div class="wrap">
769
981
  <div>
770
982
  <div class="progress">
771
- <p class="mono">${s?this.resultHeading:O("Step {step} of {steps}",{step:this.at+1,steps:i})}</p>
772
- <div class="bar" aria-hidden="true"><i style=${`inline-size:${i?s?100:(this.at+1)/(i+1)*100:0}%`}></i></div>
983
+ <p class="mono">${r?this.resultHeading:D("Step {step} of {steps}",{step:this.at+1,steps:i})}</p>
984
+ <div class="bar" aria-hidden="true"><i style=${`inline-size:${i?r?100:(this.at+1)/(i+1)*100:0}%`}></i></div>
773
985
  </div>
774
- ${e.map((l,y)=>this.renderQuestion(l,y))}
986
+ ${e.map((l,x)=>this.renderQuestion(l,x))}
775
987
  ${this.renderResult(a)}
776
- ${s?ee:N`<div class="nav">
777
- ${this.at>0?N`<button type="button" class="secondary" @click=${()=>this.go(this.at-1)}>${O("Back")}</button>`:ee}
778
- <button type="button" class="primary" @click=${()=>this.go(this.at+1)}>${this.at===i-1?O("See my estimate"):O("Next")} <span aria-hidden="true">→</span></button>
988
+ ${r?le:F`<div class="nav">
989
+ ${this.at>0?F`<button type="button" class="secondary" @click=${()=>this.go(this.at-1)}>${D("Back")}</button>`:le}
990
+ <button type="button" class="primary" @click=${()=>this.go(this.at+1)}>${this.at===i-1?D("See my estimate"):D("Next")} <span aria-hidden="true">→</span></button>
779
991
  </div>`}
780
992
  </div>
781
- <aside class="panel" part="panel" style=${`--s:${n}`}>
993
+ <aside class="panel" part="panel" style=${`--s:${o}`}>
782
994
  <div class="glow" aria-hidden="true"></div>
783
995
  <p class="mono">${this.budgetLabel}</p>
784
996
  <p class="range" aria-live="polite" aria-atomic="true">${this.rangeOf(a)}</p>
785
- <p class="weeks">${O("About {weeks} to a first release",{weeks:this.weeksWord(a.weeks)})}</p>
997
+ <p class="weeks">${D("About {weeks} to a first release",{weeks:this.weeksWord(a.weeks)})}</p>
786
998
  <p class="tip" aria-live="polite">${this.tip||this.intro}</p>
787
999
  </aside>
788
- </div>`}};customElements.define("impakt-estimator",Mt);import{css as Kt,html as T,nothing as X}from"./atomic-ui.js";import{ImpaktElement as Ce,focusRing as Zt,hideOn as ea,fontSize as Ee,fontWeight as De,space as R,t as Z,type as qe,toneOf as Qt}from"./atomic-ui.js";var ta=[0,1,2,3,4],Be=Z.fontMono,Et=class extends Ce{static{this.properties={brand:{type:String},logoSrc:{type:String,attribute:"logo-src"},logoAlt:{type:String,attribute:"logo-alt"},home:{type:String},badge:{type:String},meta:{type:String},links:{type:Array},label:{type:String},menuText:{type:String,attribute:"menu-text"},status:{type:String},statusMeta:{type:String,attribute:"status-meta"},statusTone:{type:String,attribute:"status-tone"},actionText:{type:String,attribute:"action-text"},actionHref:{type:String,attribute:"action-href"}}}constructor(){super(),this.brand="",this.logoSrc="",this.logoAlt="",this.home="/",this.badge="",this.meta="",this.links=[],this.label="Main",this.menuText="Menu",this.status="",this.statusMeta="",this.statusTone="success",this.actionText="",this.actionHref=""}static{this.styles=[...Ce.styles,Zt,Kt`
1000
+ </div>`}};customElements.define("impakt-estimator",Zt);import{css as wi,html as L,nothing as te}from"./atomic-ui.js";import{ImpaktElement as _e,focusRing as Si,hideOn as Pa,fontSize as We,fontWeight as Fe,space as N,t as ne,type as at,toneOf as ki}from"./atomic-ui.js";var Na=[0,1,2,3,4],qe=ne.fontMono,ei=class extends _e{static{this.properties={brand:{type:String},logoSrc:{type:String,attribute:"logo-src"},logoAlt:{type:String,attribute:"logo-alt"},home:{type:String},badge:{type:String},meta:{type:String},links:{type:Array},label:{type:String},menuText:{type:String,attribute:"menu-text"},status:{type:String},statusMeta:{type:String,attribute:"status-meta"},statusTone:{type:String,attribute:"status-tone"},actionText:{type:String,attribute:"action-text"},actionHref:{type:String,attribute:"action-href"}}}constructor(){super(),this.brand="",this.logoSrc="",this.logoAlt="",this.home="/",this.badge="",this.meta="",this.links=[],this.label="Main",this.menuText="Menu",this.status="",this.statusMeta="",this.statusTone="success",this.actionText="",this.actionHref=""}static{this.styles=[..._e.styles,Si,wi`
789
1001
  :host { display: block; container-type: inline-size; }
790
- .bar { display: flex; align-items: center; gap: ${R(6)}; }
791
- .start { display: flex; align-items: center; gap: ${R(3)}; flex: none; }
1002
+ .bar { display: flex; align-items: center; gap: ${N(6)}; }
1003
+ .start { display: flex; align-items: center; gap: ${N(3)}; flex: none; }
792
1004
  .middle { flex: 1 1 8rem; min-inline-size: 0; display: flex; align-items: center; justify-content: center; }
793
1005
  .middle ::slotted(*) { flex: 1 1 auto; min-inline-size: 0; }
794
1006
  slot { display: contents; }
795
- .brand { display: inline-flex; align-items: center; min-block-size: ${Z.targetMin}; color: inherit; text-decoration: none; font-family: ${Z.fontHeading}; font-weight: ${De("semibold")}; ${qe("2xl")} letter-spacing: -0.02em; line-height: 1; border-radius: ${Z.radiusSm}; }
1007
+ .brand { display: inline-flex; align-items: center; min-block-size: ${ne.targetMin}; color: inherit; text-decoration: none; font-family: ${ne.fontHeading}; font-weight: ${Fe("semibold")}; ${at("2xl")} letter-spacing: -0.02em; line-height: 1; border-radius: ${ne.radiusSm}; }
796
1008
  .brand img { display: block; block-size: 32px; inline-size: auto; }
797
- .chip { display: inline-flex; align-items: center; gap: ${R(1)}; padding: 2px ${R(2)}; border-radius: ${Z.radius}; background: color-mix(in srgb, currentColor 7%, transparent); font-family: ${Be}; font-size: ${Ee("xs")}; }
1009
+ .chip { display: inline-flex; align-items: center; gap: ${N(1)}; padding: 2px ${N(2)}; border-radius: ${ne.radius}; background: color-mix(in srgb, currentColor 7%, transparent); font-family: ${qe}; font-size: ${We("xs")}; }
798
1010
  .chip svg { inline-size: 12px; block-size: 12px; }
799
- .meta { font-family: ${Be}; font-size: ${Ee("xs")}; opacity: 0.72; }
1011
+ .meta { font-family: ${qe}; font-size: ${We("xs")}; opacity: 0.72; }
800
1012
  .middle impakt-nav { flex: 1 1 8rem; }
801
- .end { display: flex; align-items: center; gap: ${R(3)}; flex: none; }
1013
+ .end { display: flex; align-items: center; gap: ${N(3)}; flex: none; }
802
1014
  .end:empty, .start:empty { display: none; }
803
- .status { display: inline-flex; align-items: center; gap: ${R(2)}; padding: ${R(1)} ${R(3)}; border: ${Z.borderThin} solid ${Z.border}; border-radius: 999px; background: ${Z.surfaceCard}; font-family: ${Be}; font-size: ${Ee("xs")}; white-space: nowrap; }
1015
+ .status { display: inline-flex; align-items: center; gap: ${N(2)}; padding: ${N(1)} ${N(3)}; border: ${ne.borderThin} solid ${ne.border}; border-radius: 999px; background: ${ne.surfaceCard}; font-family: ${qe}; font-size: ${We("xs")}; white-space: nowrap; }
804
1016
  .status .dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--tone); }
805
1017
  .status .hash { opacity: 0.72; }
806
- @container (max-width: 56rem) { .chip, .meta, .status { display: none; } .bar { gap: ${R(3)}; } }
807
- `]}act(){this.dispatchEvent(new CustomEvent("impakt-action",{bubbles:!0,composed:!0}))}render(){let t=this.logoSrc?T`<img src=${this.logoSrc} alt=${this.logoAlt||this.brand} />`:T`${this.brand}`;return T`<div class="bar" part="bar">
1018
+ @container (max-width: 56rem) { .chip, .meta, .status { display: none; } .bar { gap: ${N(3)}; } }
1019
+ `]}act(){this.dispatchEvent(new CustomEvent("impakt-action",{bubbles:!0,composed:!0}))}render(){let t=this.logoSrc?L`<img src=${this.logoSrc} alt=${this.logoAlt||this.brand} />`:L`${this.brand}`;return L`<div class="bar" part="bar">
808
1020
  <div class="start"><slot name="start">
809
- ${this.brand||this.logoSrc?T`<a class="brand" href=${this.home||"/"} part="brand">${t}</a>`:X}
810
- ${this.badge?T`<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>`:X}
811
- ${this.meta?T`<span class="meta" part="meta">${this.meta}</span>`:X}
1021
+ ${this.brand||this.logoSrc?L`<a class="brand" href=${this.home||"/"} part="brand">${t}</a>`:te}
1022
+ ${this.badge?L`<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>`:te}
1023
+ ${this.meta?L`<span class="meta" part="meta">${this.meta}</span>`:te}
812
1024
  </slot></div>
813
- <div class="middle"><slot name="middle">${(this.links??[]).length?T`<impakt-nav align="center" size="sm" .links=${this.links} .label=${this.label} .menuText=${this.menuText}></impakt-nav>`:X}</slot></div>
1025
+ <div class="middle"><slot name="middle">${(this.links??[]).length?L`<impakt-nav align="center" size="sm" .links=${this.links} .label=${this.label} .menuText=${this.menuText}></impakt-nav>`:te}</slot></div>
814
1026
  <div class="end"><slot name="end">
815
- ${this.status?T`<span class="status" part="status" style=${`--tone:${Qt(this.statusTone,0)}`}><span class="dot" aria-hidden="true"></span>${this.status}${this.statusMeta?T` <span class="hash">${this.statusMeta}</span>`:X}</span>`:X}
816
- ${this.actionText?T`<impakt-button variant="primary" icon-after="arrow-right" href=${this.actionHref||X} @click=${this.act}>${this.actionText}</impakt-button>`:X}
1027
+ ${this.status?L`<span class="status" part="status" style=${`--tone:${ki(this.statusTone,0)}`}><span class="dot" aria-hidden="true"></span>${this.status}${this.statusMeta?L` <span class="hash">${this.statusMeta}</span>`:te}</span>`:te}
1028
+ ${this.actionText?L`<impakt-button variant="primary" icon-after="arrow-right" href=${this.actionHref||te} @click=${this.act}>${this.actionText}</impakt-button>`:te}
817
1029
  </slot></div>
818
- </div>`}},Bt=class extends Ce{static{this.properties={text:{type:String},src:{type:String},alt:{type:String},href:{type:String},size:{type:String,reflect:!0},hideOn:{type:String,reflect:!0,attribute:"hide-on"}}}constructor(){super(),this.text="",this.src="",this.alt="",this.href="/",this.size="md",this.hideOn="never"}static{this.styles=[...Ce.styles,Zt,ea,Kt`
1030
+ </div>`}},ti=class extends _e{static{this.properties={text:{type:String},src:{type:String},alt:{type:String},href:{type:String},size:{type:String,reflect:!0},hideOn:{type:String,reflect:!0,attribute:"hide-on"}}}constructor(){super(),this.text="",this.src="",this.alt="",this.href="/",this.size="md",this.hideOn="never"}static{this.styles=[..._e.styles,Si,Pa,wi`
819
1031
  :host { display: inline-flex; align-items: center; flex: none; }
820
- a { color: inherit; text-decoration: none; font-family: ${Z.fontHeading}; font-weight: ${De("semibold")}; letter-spacing: -0.02em; line-height: 1; border-radius: ${Z.radiusSm}; }
821
- :host([size='sm']) a { ${qe("xl")} } :host([size='md']) a { ${qe("2xl")} } :host([size='lg']) a { ${qe("3xl")} }
1032
+ a { color: inherit; text-decoration: none; font-family: ${ne.fontHeading}; font-weight: ${Fe("semibold")}; letter-spacing: -0.02em; line-height: 1; border-radius: ${ne.radiusSm}; }
1033
+ :host([size='sm']) a { ${at("xl")} } :host([size='md']) a { ${at("2xl")} } :host([size='lg']) a { ${at("3xl")} }
822
1034
  img { display: block; block-size: 32px; inline-size: auto; }
823
- @media (max-width: 40rem) { :host([size='md']) a, :host([size='lg']) a { ${qe("xl")} } }
824
- `]}render(){return T`<a href=${this.href||"/"} part="link">${this.src?T`<img src=${this.src} alt=${this.alt||this.text||this.textContent?.trim()||""} />`:T`<slot>${this.text}</slot>`}</a>`}},Ct=class extends Ce{static{this.properties={brand:{type:String},log:{type:Array},columns:{type:Array},columnsOnPhone:{type:String,attribute:"columns-on-phone",reflect:!0},legal:{type:String},stripe:{type:Boolean,reflect:!0},headingLevel:{type:Number,attribute:"heading-level"}}}constructor(){super(),this.brand="",this.log=[],this.columns=[],this.columnsOnPhone="shown",this.legal="",this.stripe=!1,this.headingLevel=2}static{this.styles=[...Ce.styles,Zt,Kt`
1035
+ @media (max-width: 40rem) { :host([size='md']) a, :host([size='lg']) a { ${at("xl")} } }
1036
+ `]}render(){return L`<a href=${this.href||"/"} part="link">${this.src?L`<img src=${this.src} alt=${this.alt||this.text||this.textContent?.trim()||""} />`:L`<slot>${this.text}</slot>`}</a>`}},ii=class extends _e{static{this.properties={brand:{type:String},brandSize:{type:String,reflect:!0,attribute:"brand-size"},log:{type:Array},columns:{type:Array},columnsOnPhone:{type:String,attribute:"columns-on-phone",reflect:!0},legal:{type:String},stripe:{type:Boolean,reflect:!0},headingLevel:{type:Number,attribute:"heading-level"}}}constructor(){super(),this.brand="",this.brandSize="lg",this.log=[],this.columns=[],this.columnsOnPhone="shown",this.legal="",this.stripe=!1,this.headingLevel=2}static{this.styles=[..._e.styles,Si,wi`
825
1037
  /* The page frame's footer band gives the colours; this sits flush with its foot so the stripe meets the edge. */
826
- :host { display: block; container-type: inline-size; position: relative; padding-block: ${R(8)} ${R(4)}; margin-block-end: calc(-1 * ${R(8)}); }
827
- .top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: ${R(10)}; }
828
- .brand { margin: 0; font-family: ${Z.fontHeading}; font-weight: ${De("bold")}; font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.03em; }
1038
+ :host { display: block; container-type: inline-size; position: relative; padding-block: ${N(8)} ${N(4)}; margin-block-end: calc(-1 * ${N(8)}); }
1039
+ .top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: ${N(10)}; }
1040
+ .brand { margin: 0; font-family: ${ne.fontHeading}; font-weight: ${Fe("bold")}; font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.03em; }
1041
+ /* The name as a wordmark across the whole footer, under the columns. */
1042
+ :host([brand-size='display']) .top { grid-template-columns: 1fr; }
1043
+ :host([brand-size='display']) .top > div:first-child { order: 2; }
1044
+ :host([brand-size='display']) .brand { font-weight: ${Fe("semibold")}; font-size: clamp(3rem, 27cqi, 24rem); line-height: 0.9; letter-spacing: -0.06em; overflow-wrap: anywhere; }
829
1045
  ul { list-style: none; margin: 0; padding: 0; }
830
- .log { margin-block-start: ${R(8)}; display: grid; gap: ${R(3)}; font-family: ${Be}; font-size: ${Ee("sm")}; }
831
- .log li { display: flex; align-items: center; gap: ${R(3)}; opacity: 0.72; }
1046
+ .log { margin-block-start: ${N(8)}; display: grid; gap: ${N(3)}; font-family: ${qe}; font-size: ${We("sm")}; }
1047
+ .log li { display: flex; align-items: center; gap: ${N(3)}; opacity: 0.72; }
832
1048
  .log li:first-child { opacity: 1; }
833
1049
  .log .dot { flex: none; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--tone); }
834
- .log .code { margin-inline-end: ${R(3)}; }
835
- .columns { display: grid; grid-template-columns: repeat(var(--count, 4), minmax(0, 1fr)); gap: ${R(8)}; }
836
- .h { margin: 0 0 ${R(4)}; font-family: ${Be}; font-size: ${Ee("xs")}; font-weight: ${De("medium")}; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.72; }
837
- .columns ul { display: grid; gap: ${R(3)}; }
838
- a { color: inherit; text-decoration: none; font-weight: ${De("medium")}; border-radius: ${Z.radiusSm}; }
1050
+ .log .code { margin-inline-end: ${N(3)}; }
1051
+ .columns { display: grid; grid-template-columns: repeat(var(--count, 4), minmax(0, 1fr)); gap: ${N(8)}; }
1052
+ .h { margin: 0 0 ${N(4)}; font-family: ${qe}; font-size: ${We("xs")}; font-weight: ${Fe("medium")}; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.72; }
1053
+ .columns ul { display: grid; gap: ${N(3)}; }
1054
+ a { color: inherit; text-decoration: none; font-weight: ${Fe("medium")}; border-radius: ${ne.radiusSm}; }
839
1055
  a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
840
- .legal { margin: ${R(16)} 0 0; font-family: ${Be}; font-size: ${Ee("xs")}; opacity: 0.72; }
1056
+ .legal { margin: ${N(16)} 0 0; font-family: ${qe}; font-size: ${We("xs")}; opacity: 0.72; }
841
1057
  .stripe { position: absolute; inset-inline: -100vmax; inset-block-end: 0; block-size: 6px; display: flex; }
842
1058
  .stripe span { flex: 1; }
843
1059
  @container (max-width: 48rem) { .top { grid-template-columns: 1fr; } .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
844
1060
  @container (max-width: 40rem) { :host([columns-on-phone='hidden']) .columns { display: none; } }
845
1061
  @media (forced-colors: active) { :host { border-block-start: 1px solid CanvasText; } .log .dot { border: 1px solid CanvasText; } }
846
- `]}heading(t){let e=Math.min(Math.max(this.headingLevel||2,2),4);return e===3?T`<h3 class="h">${t}</h3>`:e===4?T`<h4 class="h">${t}</h4>`:T`<h2 class="h">${t}</h2>`}render(){let t=this.log??[];return T`<div part="footer">
1062
+ `]}heading(t){let e=Math.min(Math.max(this.headingLevel||2,2),4);return e===3?L`<h3 class="h">${t}</h3>`:e===4?L`<h4 class="h">${t}</h4>`:L`<h2 class="h">${t}</h2>`}render(){let t=this.log??[];return L`<div part="footer">
847
1063
  <div class="top">
848
1064
  <div>
849
- ${this.brand?T`<p class="brand" part="brand">${this.brand}</p>`:X}
850
- ${t.length?T`<ul class="log" part="log">${t.map((e,i)=>T`<li style=${`--tone:${Qt(e.tone??(i===0?"success":"accent"),i)}`}><span class="dot" aria-hidden="true"></span><span>${e.meta?T`<span class="code">${e.meta}</span>`:X}${e.text}</span></li>`)}</ul>`:X}
1065
+ ${this.brand?L`<p class="brand" part="brand">${this.brand}</p>`:te}
1066
+ ${t.length?L`<ul class="log" part="log">${t.map((e,i)=>L`<li style=${`--tone:${ki(e.tone??(i===0?"success":"accent"),i)}`}><span class="dot" aria-hidden="true"></span><span>${e.meta?L`<span class="code">${e.meta}</span>`:te}${e.text}</span></li>`)}</ul>`:te}
851
1067
  </div>
852
1068
  <div class="columns" part="columns" style=${`--count:${Math.max(1,(this.columns??[]).length)}`}>
853
- ${(this.columns??[]).map(e=>T`<div>${this.heading(e.heading)}<ul>${(e.links??[]).map(i=>T`<li><a href=${i.href}>${i.label}</a></li>`)}</ul></div>`)}
1069
+ ${(this.columns??[]).map(e=>L`<div>${this.heading(e.heading)}<ul>${(e.links??[]).map(i=>L`<li><a href=${i.href}>${i.label}</a></li>`)}</ul></div>`)}
854
1070
  </div>
855
1071
  </div>
856
- ${this.legal?T`<p class="legal" part="legal">${this.legal}</p>`:X}
857
- ${this.stripe?T`<div class="stripe" aria-hidden="true">${ta.map(e=>T`<span style=${`background:${Qt(void 0,e)}`}></span>`)}</div>`:X}
858
- </div>`}};customElements.define("impakt-site-header",Et);customElements.define("impakt-wordmark",Bt);customElements.define("impakt-site-footer",Ct);import{html as Ie,css as ia,nothing as Jt}from"./atomic-ui.js";import{say as Ei,ImpaktElement as Bi,fontSize as aa,fontWeight as ra,space as ge,t as ei,token as It}from"./atomic-ui.js";var Rt=o=>Math.min(1,Math.max(0,o)),Ht=class extends Bi{constructor(){super();this.paused=!1;this.frame=0;this.started=0;this.reduced=!1;this.seekFrom=0;this.seekTo=0;this.seekStart=0;this.seekMs=0;this.onScroll=()=>{(this.drive==="view"||this.drive==="page")&&this.schedule()};this.tick=e=>{if(this.frame=0,this.seekMs){this.seekStart||(this.seekStart=e);let i=Math.min(1,(e-this.seekStart)/this.seekMs),a=i<.5?4*i*i*i:1-Math.pow(-2*i+2,3)/2;this.progress=this.seekFrom+(this.seekTo-this.seekFrom)*a,i<1?this.schedule():this.seekMs=0;return}if(this.drive==="view"){let i=this.getBoundingClientRect(),a=window.innerHeight||1;this.progress=Rt(-i.top/Math.max(1,i.height-a))}else if(this.drive==="page"){let i=document.documentElement;this.progress=Rt(window.scrollY/Math.max(1,i.scrollHeight-(window.innerHeight||0)))}else this.drive==="loop"&&!this.paused&&!this.reduced&&(this.started||(this.started=e-this.progress*this.duration*1e3),this.progress=(e-this.started)/(this.duration*1e3)%1,this.schedule())};this.togglePause=()=>this.setPaused(!this.paused);this.drive="view",this.layout="stage",this.length=3,this.duration=8,this.label="Animation",this.progress=0,this.controls="below",this.bleed=!1,this.hideOn="never"}static{this.properties={drive:{type:String,reflect:!0},layout:{type:String,reflect:!0},length:{type:Number},duration:{type:Number},label:{type:String},progress:{type:Number},controls:{type:String,reflect:!0},bleed:{type:Boolean,reflect:!0},hideOn:{type:String,reflect:!0,attribute:"hide-on"}}}static{this.styles=[...Bi.styles,ia`
1072
+ ${this.legal?L`<p class="legal" part="legal">${this.legal}</p>`:te}
1073
+ ${this.stripe?L`<div class="stripe" aria-hidden="true">${Na.map(e=>L`<span style=${`background:${ki(void 0,e)}`}></span>`)}</div>`:te}
1074
+ </div>`}};customElements.define("impakt-site-header",ei);customElements.define("impakt-wordmark",ti);customElements.define("impakt-site-footer",ii);import{html as De,css as ja,nothing as zi}from"./atomic-ui.js";import{say as na,ImpaktElement as oa,fontSize as Oa,fontWeight as Fa,space as we,t as Ti,token as ai}from"./atomic-ui.js";var ri=n=>Math.min(1,Math.max(0,n)),si=class extends oa{constructor(){super();this.paused=!1;this.frame=0;this.started=0;this.reduced=!1;this.seekFrom=0;this.seekTo=0;this.seekStart=0;this.seekMs=0;this.onScroll=()=>{(this.drive==="view"||this.drive==="page")&&this.schedule()};this.tick=e=>{if(this.frame=0,this.seekMs){this.seekStart||(this.seekStart=e);let i=Math.min(1,(e-this.seekStart)/this.seekMs),a=i<.5?4*i*i*i:1-Math.pow(-2*i+2,3)/2;this.progress=this.seekFrom+(this.seekTo-this.seekFrom)*a,i<1?this.schedule():this.seekMs=0;return}if(this.drive==="view"){let i=this.getBoundingClientRect(),a=window.innerHeight||1;this.progress=ri(-i.top/Math.max(1,i.height-a))}else if(this.drive==="page"){let i=document.documentElement;this.progress=ri(window.scrollY/Math.max(1,i.scrollHeight-(window.innerHeight||0)))}else this.drive==="loop"&&!this.paused&&!this.reduced&&(this.started||(this.started=e-this.progress*this.duration*1e3),this.progress=(e-this.started)/(this.duration*1e3)%1,this.schedule())};this.togglePause=()=>this.setPaused(!this.paused);this.drive="view",this.layout="stage",this.length=3,this.duration=8,this.label="Animation",this.progress=0,this.controls="below",this.bleed=!1,this.hideOn="never"}static{this.properties={drive:{type:String,reflect:!0},layout:{type:String,reflect:!0},length:{type:Number},duration:{type:Number},label:{type:String},progress:{type:Number},controls:{type:String,reflect:!0},bleed:{type:Boolean,reflect:!0},hideOn:{type:String,reflect:!0,attribute:"hide-on"}}}static{this.styles=[...oa.styles,ja`
859
1075
  :host {
860
1076
  display: block;
861
1077
  position: relative;
@@ -869,7 +1085,7 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
869
1085
  }
870
1086
  :host([layout='split']) .frame {
871
1087
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
872
- gap: ${ge(8)};
1088
+ gap: ${we(8)};
873
1089
  }
874
1090
  .stage {
875
1091
  position: sticky;
@@ -894,34 +1110,34 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
894
1110
  }
895
1111
  .controls {
896
1112
  display: flex;
897
- gap: ${ge(3)};
1113
+ gap: ${we(3)};
898
1114
  align-items: center;
899
1115
  justify-content: center;
900
- padding-block: ${ge(3)};
1116
+ padding-block: ${we(3)};
901
1117
  }
902
1118
  :host([bleed]) { margin-inline: calc(50% - 50vw); }
903
1119
  @media (max-width: 40rem) { :host([hide-on='phone']) { display: none; } }
904
1120
  @media (min-width: 40.0625rem) { :host([hide-on='wide']) { display: none; } }
905
1121
  /* Over the stage, the controls float at its foot, above the layers and clear of its edges. */
906
- .stage > .controls { position: absolute; inset-inline: ${ge(6)}; inset-block-end: ${ge(6)}; z-index: 2; padding: 0; }
1122
+ .stage > .controls { position: absolute; inset-inline: ${we(6)}; inset-block-end: ${we(6)}; z-index: 2; padding: 0; }
907
1123
  .stage > .controls ::slotted(*) { box-shadow: 0 12px 32px rgb(16 19 23 / 14%); border-radius: 16px; background: var(--impakt-color-surface-card, #fff); }
908
1124
  /* A control takes the row, so a graph scrubber spans the stage; a narrower one centres itself. */
909
1125
  .controls ::slotted(*) { flex: 1 1 auto; min-width: 0; }
910
1126
  .pause {
911
- min-width: ${It("target.min","24px")};
912
- min-height: ${It("target.min","24px")};
913
- padding: ${ge(2)} ${ge(4)};
914
- border-radius: ${It("radius.full","9999px")};
915
- border: 1px solid ${ei.border};
916
- background: ${ei.surfaceCard};
917
- color: ${ei.text};
918
- font-size: ${aa("sm")};
919
- font-weight: ${ra("medium")};
1127
+ min-width: ${ai("target.min","24px")};
1128
+ min-height: ${ai("target.min","24px")};
1129
+ padding: ${we(2)} ${we(4)};
1130
+ border-radius: ${ai("radius.full","9999px")};
1131
+ border: 1px solid ${Ti.border};
1132
+ background: ${Ti.surfaceCard};
1133
+ color: ${Ti.text};
1134
+ font-size: ${Oa("sm")};
1135
+ font-weight: ${Fa("medium")};
920
1136
  cursor: pointer;
921
1137
  }
922
1138
  .pause:focus-visible {
923
1139
  outline: none;
924
- box-shadow: ${It("focus.ring.shadow","0 0 0 2px #fff, 0 0 0 4px #1a1a1a")};
1140
+ box-shadow: ${ai("focus.ring.shadow","0 0 0 2px #fff, 0 0 0 4px #1a1a1a")};
925
1141
  }
926
1142
  @media (max-width: 48rem) {
927
1143
  :host([layout='split']) .frame {
@@ -939,7 +1155,7 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
939
1155
  .stage {
940
1156
  position: relative;
941
1157
  height: auto;
942
- gap: ${ge(6)};
1158
+ gap: ${we(6)};
943
1159
  }
944
1160
  /* With less motion the layers are shown one after another, so every
945
1161
  state the scene would have moved through can still be seen. */
@@ -947,17 +1163,17 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
947
1163
  grid-area: auto;
948
1164
  }
949
1165
  }
950
- `]}connectedCallback(){super.connectedCallback();try{this.reduced=window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{this.reduced=!1}window.addEventListener("scroll",this.onScroll,{passive:!0,capture:!0}),window.addEventListener("resize",this.onScroll),this.schedule()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("scroll",this.onScroll,{capture:!0}),window.removeEventListener("resize",this.onScroll),this.frame&&cancelAnimationFrame(this.frame),this.frame=0}updated(e){e.has("length")&&this.style.setProperty("--impakt-scene-length",String(this.length)),e.has("progress")&&this.publish(),e.has("drive")&&(this.started=0,this.schedule())}seek(e,i=0){if(i<=0||this.reduced){this.progress=Rt(e);return}this.seekFrom=this.progress,this.seekTo=Rt(e),this.seekStart=0,this.seekMs=i,this.schedule()}schedule(){!this.frame&&typeof requestAnimationFrame=="function"&&(this.frame=requestAnimationFrame(this.tick))}publish(){this.style.setProperty("--impakt-scene-progress",this.progress.toFixed(4)),this.dispatchEvent(new CustomEvent("impakt-scene-progress",{detail:{progress:this.progress},bubbles:!0,composed:!0}))}setPaused(e){this.paused!==e&&(this.paused=e,this.started=0,this.schedule(),this.requestUpdate())}pause(){this.setPaused(!0)}render(){let e=this.drive==="loop",i=this.controls==="over"&&!this.reduced,a=Ie`<div class="controls" part="controls">
1166
+ `]}connectedCallback(){super.connectedCallback();try{this.reduced=window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{this.reduced=!1}window.addEventListener("scroll",this.onScroll,{passive:!0,capture:!0}),window.addEventListener("resize",this.onScroll),this.schedule()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("scroll",this.onScroll,{capture:!0}),window.removeEventListener("resize",this.onScroll),this.frame&&cancelAnimationFrame(this.frame),this.frame=0}updated(e){e.has("length")&&this.style.setProperty("--impakt-scene-length",String(this.length)),e.has("progress")&&this.publish(),e.has("drive")&&(this.started=0,this.schedule())}seek(e,i=0){if(i<=0||this.reduced){this.progress=ri(e);return}this.seekFrom=this.progress,this.seekTo=ri(e),this.seekStart=0,this.seekMs=i,this.schedule()}schedule(){!this.frame&&typeof requestAnimationFrame=="function"&&(this.frame=requestAnimationFrame(this.tick))}publish(){this.style.setProperty("--impakt-scene-progress",this.progress.toFixed(4)),this.dispatchEvent(new CustomEvent("impakt-scene-progress",{detail:{progress:this.progress},bubbles:!0,composed:!0}))}setPaused(e){this.paused!==e&&(this.paused=e,this.started=0,this.schedule(),this.requestUpdate())}pause(){this.setPaused(!0)}render(){let e=this.drive==="loop",i=this.controls==="over"&&!this.reduced,a=De`<div class="controls" part="controls">
951
1167
  <slot name="controls"></slot>
952
- ${e&&!this.reduced?Ie`<button class="pause" type="button" aria-pressed=${this.paused?"true":"false"} @click=${this.togglePause}>
953
- ${this.paused?Ei("Play {name}",{name:this.label}):Ei("Pause {name}",{name:this.label})}
954
- </button>`:Jt}
955
- </div>`,s=Ie`<div class="stage" part="stage"><slot name="stage"></slot>${i?a:Jt}</div>`;return Ie`
1168
+ ${e&&!this.reduced?De`<button class="pause" type="button" aria-pressed=${this.paused?"true":"false"} @click=${this.togglePause}>
1169
+ ${this.paused?na("Play {name}",{name:this.label}):na("Pause {name}",{name:this.label})}
1170
+ </button>`:zi}
1171
+ </div>`,r=De`<div class="stage" part="stage"><slot name="stage"></slot>${i?a:zi}</div>`;return De`
956
1172
  <div class="frame" part="frame" role="region" aria-label=${this.label}>
957
- ${this.layout==="split"?Ie`<div class="content" part="content"><slot></slot></div>${s}`:Ie`${s}<div class="content" part="content"><slot></slot></div>`}
1173
+ ${this.layout==="split"?De`<div class="content" part="content"><slot></slot></div>${r}`:De`${r}<div class="content" part="content"><slot></slot></div>`}
958
1174
  </div>
959
- ${i?Jt:a}
960
- `}};customElements.define("impakt-scene",Ht);import{html as ne,css as sa}from"./atomic-ui.js";import{say as Ci,ImpaktElement as Ii,visuallyHidden as na,fontSize as ti,fontWeight as Ri,space as V,t as H,token as ce}from"./atomic-ui.js";var ii={brand:"var(--impakt-color-brand-default, #1f4ed8)",accent:"var(--impakt-color-accent-default, #c8a15a)",info:"var(--impakt-color-status-info-default, #1f4ed8)",success:"var(--impakt-color-status-success-default, #047857)",warning:"var(--impakt-color-status-warning-default, #b45309)",danger:"var(--impakt-color-status-danger-default, #c8102e)"},Pt=class extends Ii{constructor(){super();this.scene=null;this.onProgress=e=>{this.value=e.detail.progress};this.onInput=e=>{let i=Number(e.target.value)/1e3;this.value=i,this.scene?.seek(i)};this.label="Scene progress",this.stops=[],this.look="buttons",this.hint="",this.value=0}static{this.properties={label:{type:String},stops:{type:Array},look:{type:String,reflect:!0},hint:{type:String},value:{type:Number,state:!0}}}static{this.styles=[...Ii.styles,sa`
1175
+ ${i?zi:a}
1176
+ `}};customElements.define("impakt-scene",si);import{html as ue,css as Wa}from"./atomic-ui.js";import{say as la,ImpaktElement as da,visuallyHidden as qa,fontSize as Ai,fontWeight as ca,space as ie,t as j,token as fe}from"./atomic-ui.js";var Mi={brand:"var(--impakt-color-brand-default, #1f4ed8)",accent:"var(--impakt-color-accent-default, #c8a15a)",info:"var(--impakt-color-status-info-default, #1f4ed8)",success:"var(--impakt-color-status-success-default, #047857)",warning:"var(--impakt-color-status-warning-default, #b45309)",danger:"var(--impakt-color-status-danger-default, #c8102e)"},ni=class extends da{constructor(){super();this.scene=null;this.onProgress=e=>{this.value=e.detail.progress};this.onInput=e=>{let i=Number(e.target.value)/1e3;this.value=i,this.scene?.seek(i)};this.label="Scene progress",this.stops=[],this.look="buttons",this.hint="",this.value=0}static{this.properties={label:{type:String},stops:{type:Array},look:{type:String,reflect:!0},hint:{type:String},value:{type:Number,state:!0}}}static{this.styles=[...da.styles,Wa`
961
1177
  :host {
962
1178
  display: block;
963
1179
  width: 100%;
@@ -966,71 +1182,71 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
966
1182
  }
967
1183
  .wrap {
968
1184
  display: grid;
969
- gap: ${V(2)};
970
- padding: ${V(3)} ${V(4)};
971
- border-radius: ${ce("radius.xl","16px")};
972
- background: ${H.surfaceCard};
973
- box-shadow: ${ce("shadow.lg","0 10px 15px -3px rgba(0,0,0,.1)")};
974
- border: 1px solid ${H.border};
1185
+ gap: ${ie(2)};
1186
+ padding: ${ie(3)} ${ie(4)};
1187
+ border-radius: ${fe("radius.xl","16px")};
1188
+ background: ${j.surfaceCard};
1189
+ box-shadow: ${fe("shadow.lg","0 10px 15px -3px rgba(0,0,0,.1)")};
1190
+ border: 1px solid ${j.border};
975
1191
  }
976
1192
  input {
977
1193
  width: 100%;
978
- min-height: ${ce("target.min","24px")};
979
- accent-color: ${H.brand};
1194
+ min-height: ${fe("target.min","24px")};
1195
+ accent-color: ${j.brand};
980
1196
  margin: 0;
981
1197
  }
982
1198
  .stops {
983
1199
  position: relative;
984
1200
  display: flex;
985
1201
  flex-wrap: wrap;
986
- gap: ${V(2)};
1202
+ gap: ${ie(2)};
987
1203
  list-style: none;
988
1204
  margin: 0;
989
1205
  padding: 0;
990
1206
  }
991
1207
  button {
992
- min-height: ${ce("target.min","24px")};
993
- padding: ${V(1)} ${V(3)};
994
- border-radius: ${ce("radius.full","9999px")};
995
- border: 1px solid ${H.border};
1208
+ min-height: ${fe("target.min","24px")};
1209
+ padding: ${ie(1)} ${ie(3)};
1210
+ border-radius: ${fe("radius.full","9999px")};
1211
+ border: 1px solid ${j.border};
996
1212
  background: transparent;
997
- color: ${H.textMuted};
998
- font-size: ${ti("xs")};
999
- font-weight: ${Ri("medium")};
1213
+ color: ${j.textMuted};
1214
+ font-size: ${Ai("xs")};
1215
+ font-weight: ${ca("medium")};
1000
1216
  cursor: pointer;
1001
1217
  }
1002
1218
  button[aria-current='true'] {
1003
- color: ${H.text};
1004
- border-color: ${H.text};
1219
+ color: ${j.text};
1220
+ border-color: ${j.text};
1005
1221
  }
1006
1222
  .sr-only {
1007
- ${na}
1223
+ ${qa}
1008
1224
  }
1009
1225
  /* The graph look: the code of where you are, the line of stops, where you are. */
1010
1226
  :host([look='graph']) { max-width: none; }
1011
- .graph { display: grid; grid-template-columns: minmax(8rem, auto) minmax(0, 1fr) auto; gap: ${V(6)}; align-items: center; padding: ${V(4)} ${V(6)}; border-radius: ${ce("radius.xl","16px")}; background: ${H.surfaceCard}; box-shadow: ${ce("shadow.lg","0 10px 15px -3px rgba(0,0,0,.1)")}; border: 1px solid ${H.border}; }
1012
- .mono { font-family: ${H.fontMono}; font-size: ${ti("xs")}; letter-spacing: 0.04em; }
1227
+ .graph { display: grid; grid-template-columns: minmax(8rem, auto) minmax(0, 1fr) auto; gap: ${ie(6)}; align-items: center; padding: ${ie(4)} ${ie(6)}; border-radius: ${fe("radius.xl","16px")}; background: ${j.surfaceCard}; box-shadow: ${fe("shadow.lg","0 10px 15px -3px rgba(0,0,0,.1)")}; border: 1px solid ${j.border}; }
1228
+ .mono { font-family: ${j.fontMono}; font-size: ${Ai("xs")}; letter-spacing: 0.04em; }
1013
1229
  .head { display: grid; gap: 2px; }
1014
- .head .k { color: ${H.textMuted}; text-transform: uppercase; }
1015
- .head .code { font-size: ${ti("md")}; color: ${H.text}; }
1016
- .head .note { color: ${H.textMuted}; }
1230
+ .head .k { color: ${j.textMuted}; text-transform: uppercase; }
1231
+ .head .code { font-size: ${Ai("md")}; color: ${j.text}; }
1232
+ .head .note { color: ${j.textMuted}; }
1017
1233
  .line { position: relative; block-size: 48px; }
1018
- .track, .fill { position: absolute; inset-inline: 0; inset-block-start: 14px; block-size: 3px; border-radius: 3px; background: ${H.border}; opacity: 0.5; }
1234
+ .track, .fill { position: absolute; inset-inline: 0; inset-block-start: 14px; block-size: 3px; border-radius: 3px; background: ${j.border}; opacity: 0.5; }
1019
1235
  .fill { opacity: 1; background: none; display: flex; overflow: hidden; }
1020
1236
  .fill span { block-size: 100%; }
1021
- .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: ${H.surfaceCard}; padding: 0; min-height: 0; cursor: pointer; }
1237
+ .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: ${j.surfaceCard}; padding: 0; min-height: 0; cursor: pointer; }
1022
1238
  .dot[data-passed] { background: var(--c); }
1023
1239
  .dot[aria-current='true'] { inline-size: 24px; block-size: 24px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); }
1024
- .dot-label { position: absolute; inset-block-start: 30px; translate: -50% 0; white-space: nowrap; color: ${H.textMuted}; text-transform: uppercase; pointer-events: none; }
1025
- .dot-label[data-current] { color: ${H.text}; font-weight: ${Ri("bold")}; }
1240
+ .dot-label { position: absolute; inset-block-start: 30px; translate: -50% 0; white-space: nowrap; color: ${j.textMuted}; text-transform: uppercase; pointer-events: none; }
1241
+ .dot-label[data-current] { color: ${j.text}; font-weight: ${ca("bold")}; }
1026
1242
  .line input { position: absolute; inset: 0 0 auto; block-size: 30px; opacity: 0; cursor: grab; }
1027
1243
  .line input:focus-visible { opacity: 1; }
1028
- .where { display: grid; gap: ${V(2)}; justify-items: end; }
1029
- .chip { display: inline-flex; align-items: center; gap: ${V(2)}; padding: ${V(1)} ${V(3)}; border-radius: ${ce("radius.full","9999px")}; border: 1px solid ${H.border}; color: ${H.text}; text-transform: uppercase; }
1244
+ .where { display: grid; gap: ${ie(2)}; justify-items: end; }
1245
+ .chip { display: inline-flex; align-items: center; gap: ${ie(2)}; padding: ${ie(1)} ${ie(3)}; border-radius: ${fe("radius.full","9999px")}; border: 1px solid ${j.border}; color: ${j.text}; text-transform: uppercase; }
1030
1246
  .chip::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--c); }
1031
- .hint { color: ${H.textMuted}; text-transform: uppercase; }
1247
+ .hint { color: ${j.textMuted}; text-transform: uppercase; }
1032
1248
  /* Muted by colour, not opacity, so the code keeps its contrast (1.4.3). */
1033
- .chip .meta { color: ${H.textMuted}; }
1249
+ .chip .meta { color: ${j.textMuted}; }
1034
1250
  @media (max-width: 48rem) {
1035
1251
  .graph { grid-template-columns: minmax(0, 1fr); }
1036
1252
  .where { justify-items: start; }
@@ -1039,29 +1255,29 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
1039
1255
  button:focus-visible,
1040
1256
  input:focus-visible {
1041
1257
  outline: none;
1042
- box-shadow: ${ce("focus.ring.shadow","0 0 0 2px #fff, 0 0 0 4px #1a1a1a")};
1258
+ box-shadow: ${fe("focus.ring.shadow","0 0 0 2px #fff, 0 0 0 4px #1a1a1a")};
1043
1259
  }
1044
- `]}connectedCallback(){super.connectedCallback(),this.scene=this.closest("impakt-scene"),this.scene?.addEventListener("impakt-scene-progress",this.onProgress),this.scene&&(this.value=this.scene.progress)}disconnectedCallback(){super.disconnectedCallback(),this.scene?.removeEventListener("impakt-scene-progress",this.onProgress),this.scene=null}goTo(e){this.scene?.seek(e.at,600)}nearest(){let e=-1,i=1/0;return this.stops.forEach((a,s)=>{let n=Math.abs(a.at-this.value);n<i&&(i=n,e=s)}),e}renderGraph(e,i){let a=e,s=[...this.stops??[]].sort((x,u)=>x.at-u.at);a=s.indexOf(this.stops[a]);let n=x=>{let u=x?.tone??"brand";return typeof u=="number"?`var(--impakt-color-chart-${u}, ${ii.brand})`:ii[u]??ii.brand},l=s[a]??s[0],y=s.map((x,u)=>{let be=u===0?0:s[u-1].at,de=Math.min(x.at,this.value);return{width:Math.round(Math.max(0,de-be)*1e4)/100,c:n(x)}});return ne`<div class="graph" part="wrap">
1260
+ `]}connectedCallback(){super.connectedCallback(),this.scene=this.closest("impakt-scene"),this.scene?.addEventListener("impakt-scene-progress",this.onProgress),this.scene&&(this.value=this.scene.progress)}disconnectedCallback(){super.disconnectedCallback(),this.scene?.removeEventListener("impakt-scene-progress",this.onProgress),this.scene=null}goTo(e){this.scene?.seek(e.at,600)}nearest(){let e=-1,i=1/0;return this.stops.forEach((a,r)=>{let o=Math.abs(a.at-this.value);o<i&&(i=o,e=r)}),e}renderGraph(e,i){let a=e,r=[...this.stops??[]].sort((v,g)=>v.at-g.at);a=r.indexOf(this.stops[a]);let o=v=>{let g=v?.tone??"brand";return typeof g=="number"?`var(--impakt-color-chart-${g}, ${Mi.brand})`:Mi[g]??Mi.brand},l=r[a]??r[0],x=r.map((v,g)=>{let Se=g===0?0:r[g-1].at,$e=Math.min(v.at,this.value);return{width:Math.round(Math.max(0,$e-Se)*1e4)/100,c:o(v)}});return ue`<div class="graph" part="wrap">
1045
1261
  <div class="head mono" aria-hidden="true">
1046
1262
  <span class="k">HEAD</span>
1047
1263
  <span class="code">${l?.meta??l?.label??""}</span>
1048
- ${l?.note?ne`<span class="note">${l.note}</span>`:null}
1264
+ ${l?.note?ue`<span class="note">${l.note}</span>`:null}
1049
1265
  </div>
1050
1266
  <div class="line">
1051
1267
  <div class="track"></div>
1052
- <div class="fill" aria-hidden="true">${y.map(x=>ne`<span style=${`width:${x.width}%;background:${x.c}`}></span>`)}</div>
1053
- ${s.map((x,u)=>ne`
1054
- <button type="button" class="dot" style=${`left:${x.at*100}%;--c:${n(x)}`} ?data-passed=${x.at<=this.value+1e-4} aria-current=${u===a?"true":"false"} @click=${()=>this.goTo(x)}>
1055
- <span class="sr-only">${Ci("Go to {name}",{name:x.label})}</span>
1268
+ <div class="fill" aria-hidden="true">${x.map(v=>ue`<span style=${`width:${v.width}%;background:${v.c}`}></span>`)}</div>
1269
+ ${r.map((v,g)=>ue`
1270
+ <button type="button" class="dot" style=${`left:${v.at*100}%;--c:${o(v)}`} ?data-passed=${v.at<=this.value+1e-4} aria-current=${g===a?"true":"false"} @click=${()=>this.goTo(v)}>
1271
+ <span class="sr-only">${la("Go to {name}",{name:v.label})}</span>
1056
1272
  </button>
1057
- <span class="dot-label mono" style=${`left:${x.at*100}%`} ?data-current=${u===a} aria-hidden="true">${x.label}</span>`)}
1273
+ <span class="dot-label mono" style=${`left:${v.at*100}%`} ?data-current=${g===a} aria-hidden="true">${v.label}</span>`)}
1058
1274
  <input type="range" min="0" max="1000" step="1" .value=${String(Math.round(this.value*1e3))} aria-label=${this.label} aria-valuetext=${i} @input=${this.onInput} />
1059
1275
  </div>
1060
1276
  <div class="where" aria-hidden="true">
1061
- ${l?ne`<span class="chip mono" style=${`--c:${n(l)}`}>${l.label}${l.meta?ne`&nbsp;<span class="meta">${l.meta}</span>`:null}</span>`:null}
1062
- ${this.hint?ne`<span class="hint mono">${this.hint}</span>`:null}
1277
+ ${l?ue`<span class="chip mono" style=${`--c:${o(l)}`}>${l.label}${l.meta?ue`&nbsp;<span class="meta">${l.meta}</span>`:null}</span>`:null}
1278
+ ${this.hint?ue`<span class="hint mono">${this.hint}</span>`:null}
1063
1279
  </div>
1064
- </div>`}render(){let e=this.nearest(),i=e>=0?this.stops[e].label:`${Math.round(this.value*100)}%`;return this.look==="graph"?this.renderGraph(e,i):ne`
1280
+ </div>`}render(){let e=this.nearest(),i=e>=0?this.stops[e].label:`${Math.round(this.value*100)}%`;return this.look==="graph"?this.renderGraph(e,i):ue`
1065
1281
  <div class="wrap" part="wrap">
1066
1282
  <input
1067
1283
  type="range"
@@ -1073,73 +1289,73 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
1073
1289
  aria-valuetext=${i}
1074
1290
  @input=${this.onInput}
1075
1291
  />
1076
- ${this.stops.length?ne`<ul class="stops" part="stops">
1077
- ${this.stops.map((a,s)=>ne`<li>
1078
- <button type="button" aria-current=${s===e?"true":"false"} @click=${()=>this.goTo(a)}>
1079
- <span aria-hidden="true">${a.label}</span><span class="sr-only">${Ci("Go to {name}",{name:a.label})}</span>
1292
+ ${this.stops.length?ue`<ul class="stops" part="stops">
1293
+ ${this.stops.map((a,r)=>ue`<li>
1294
+ <button type="button" aria-current=${r===e?"true":"false"} @click=${()=>this.goTo(a)}>
1295
+ <span aria-hidden="true">${a.label}</span><span class="sr-only">${la("Go to {name}",{name:a.label})}</span>
1080
1296
  </button>
1081
1297
  </li>`)}
1082
1298
  </ul>`:null}
1083
1299
  </div>
1084
- `}};customElements.define("impakt-scrubber",Pt);import{css as ze,html as v,nothing as te,svg as Ue}from"./atomic-ui.js";import{say as J,ImpaktElement as oe,focusRing as oa,visuallyHidden as la,fontSize as Re,fontWeight as si,space as A,spaceAround as Ye,t as B,type as ca,iconSvg as da,toneOf as ri,TONE as Hi}from"./atomic-ui.js";function ni(o,t){let e=()=>{o.setAttribute("shown",""),t?.()};if(typeof IntersectionObserver!="function")return e(),()=>{};let i=new IntersectionObserver(a=>{a.some(s=>s.isIntersecting)&&(e(),i.disconnect())},{threshold:.25});return i.observe(o),()=>i.disconnect()}var Pi=()=>typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches,_t=ze`.mono { font-family: ${B.fontMono}; font-size: ${Re("xs")}; letter-spacing: 0.04em; }`,pa=(o,t,e)=>{switch(Math.min(Math.max(o||3,2),6)){case 2:return v`<h2 class=${e}>${t}</h2>`;case 4:return v`<h4 class=${e}>${t}</h4>`;case 5:return v`<h5 class=${e}>${t}</h5>`;case 6:return v`<h6 class=${e}>${t}</h6>`;default:return v`<h3 class=${e}>${t}</h3>`}},qt=ze`
1085
- .h { margin: 0; color: var(--impakt-heading, ${B.textHeading}); font-family: ${B.fontHeading}; font-weight: ${si("bold")}; letter-spacing: ${B.trackingTight}; text-wrap: balance; }
1300
+ `}};customElements.define("impakt-scrubber",ni);import{css as Re,html as w,nothing as de,svg as rt}from"./atomic-ui.js";import{say as oe,ImpaktElement as ge,focusRing as _a,visuallyHidden as Da,fontSize as Ue,fontWeight as Ci,space as E,spaceAround as st,t as H,type as Ua,iconSvg as Ya,toneOf as Ei,TONE as pa}from"./atomic-ui.js";function Bi(n,t){let e=()=>{n.setAttribute("shown",""),t?.()};if(typeof IntersectionObserver!="function")return e(),()=>{};let i=new IntersectionObserver(a=>{a.some(r=>r.isIntersecting)&&(e(),i.disconnect())},{threshold:.25});return i.observe(n),()=>i.disconnect()}var ha=()=>typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches,hi=Re`.mono { font-family: ${H.fontMono}; font-size: ${Ue("xs")}; letter-spacing: 0.04em; }`,Ga=(n,t,e)=>{switch(Math.min(Math.max(n||3,2),6)){case 2:return w`<h2 class=${e}>${t}</h2>`;case 4:return w`<h4 class=${e}>${t}</h4>`;case 5:return w`<h5 class=${e}>${t}</h5>`;case 6:return w`<h6 class=${e}>${t}</h6>`;default:return w`<h3 class=${e}>${t}</h3>`}},mi=Re`
1301
+ .h { margin: 0; color: var(--impakt-heading, ${H.textHeading}); font-family: ${H.fontHeading}; font-weight: ${Ci("bold")}; letter-spacing: ${H.trackingTight}; text-wrap: balance; }
1086
1302
  .body { margin: 0; color: inherit; opacity: 0.8; text-wrap: pretty; }
1087
1303
  .meta { margin: 0; color: inherit; opacity: 0.72; text-transform: uppercase; }
1088
- .sr-only { ${la} }
1089
- `,Nt=class extends oe{constructor(){super();this.raf=0;this.label="",this.heading="",this.text="",this.beforeSrc="",this.beforeAlt="",this.afterSrc="",this.afterAlt="",this.items=[],this.href="",this.headingLevel=3,this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={label:{type:String},heading:{type:String},text:{type:String},beforeSrc:{type:String,attribute:"before-src"},beforeAlt:{type:String,attribute:"before-alt"},afterSrc:{type:String,attribute:"after-src"},afterAlt:{type:String,attribute:"after-alt"},items:{type:Array},href:{type:String},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...oe.styles,Ye,_t,qt,ze`
1304
+ .sr-only { ${Da} }
1305
+ `,oi=class extends ge{constructor(){super();this.raf=0;this.label="",this.heading="",this.text="",this.beforeSrc="",this.beforeAlt="",this.afterSrc="",this.afterAlt="",this.items=[],this.href="",this.headingLevel=3,this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={label:{type:String},heading:{type:String},text:{type:String},beforeSrc:{type:String,attribute:"before-src"},beforeAlt:{type:String,attribute:"before-alt"},afterSrc:{type:String,attribute:"after-src"},afterAlt:{type:String,attribute:"after-alt"},items:{type:Array},href:{type:String},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...ge.styles,st,hi,mi,Re`
1090
1306
  :host { display: block; }
1091
- article { display: flex; flex-direction: column; gap: ${A(3)}; }
1092
- .media { border-radius: ${B.radiusXl}; overflow: clip; background: ${B.surfaceInset}; }
1307
+ article { display: flex; flex-direction: column; gap: ${E(3)}; }
1308
+ .media { border-radius: ${H.radiusXl}; overflow: clip; background: ${H.surfaceInset}; }
1093
1309
  .media img { display: block; inline-size: 100%; aspect-ratio: 5 / 3; object-fit: cover; }
1094
1310
  impakt-before-after { display: block; }
1095
- .h { font-size: ${Re("3xl")}; }
1311
+ .h { font-size: ${Ue("3xl")}; }
1096
1312
  .h a { color: inherit; text-decoration: none; }
1097
1313
  .h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
1098
- .h a:focus-visible { outline: none; box-shadow: ${B.focusShadow}; border-radius: ${B.radiusSm}; }
1099
- ul { list-style: none; margin: ${A(1)} 0 0; padding: 0; display: grid; gap: ${A(1)}; }
1100
- li { display: grid; grid-template-columns: 1.25em minmax(0, 1fr); gap: ${A(2)}; padding: ${A(1)} ${A(3)}; border-radius: ${B.radius}; }
1101
- li[data-change='added'] { background: ${B.successSubtle}; color: ${B.successText}; }
1102
- li[data-change='removed'] { background: ${B.dangerSubtle}; color: ${B.dangerText}; }
1103
- li[data-change='same'] { color: ${B.textMuted}; }
1104
- .sign { font-weight: ${si("bold")}; }
1105
- `]}wipe(e){let i=this.renderRoot.querySelector("impakt-before-after");if(!i)return;if(cancelAnimationFrame(this.raf),Pi()){i.position=e;return}let a=i.position??ai,s=performance.now(),n=y=>y<.5?4*y*y*y:1-Math.pow(-2*y+2,3)/2,l=y=>{let x=Math.min(1,(y-s)/450);i.position=a+(e-a)*n(x),x<1&&(this.raf=requestAnimationFrame(l))};this.raf=requestAnimationFrame(l)}disconnectedCallback(){super.disconnectedCallback(),cancelAnimationFrame(this.raf)}render(){let e=this.beforeSrc&&this.afterSrc,i=this.href?v`<a href=${this.href}>${this.heading}</a>`:this.heading,a={added:"+",removed:"\u2212",same:" "},s={added:J("Added"),removed:J("Removed"),same:J("Kept")};return v`<article part="card">
1106
- ${e?v`<div class="media" @pointerenter=${n=>n.pointerType==="mouse"&&this.wipe(0)} @pointerleave=${n=>n.pointerType==="mouse"&&this.wipe(ai)}><impakt-before-after .position=${ai} .beforeSrc=${this.beforeSrc} .beforeAlt=${this.beforeAlt} .afterSrc=${this.afterSrc} .afterAlt=${this.afterAlt} .beforeLabel=${J("Before")} .afterLabel=${J("Shipped")} .label=${J("Compare {name} before and after",{name:this.heading})}></impakt-before-after></div>`:this.afterSrc||this.beforeSrc?v`<div class="media"><img src=${this.afterSrc||this.beforeSrc} alt=${this.afterSrc?this.afterAlt:this.beforeAlt} loading="lazy" /></div>`:te}
1107
- ${this.label?v`<p class="meta mono">${this.label}</p>`:te}
1108
- ${this.heading?ha(this.headingLevel,i):te}
1109
- ${this.text?v`<p class="body">${this.text}</p>`:te}
1110
- ${(this.items??[]).length?v`<ul class="mono" part="diff">${this.items.map(n=>v`<li data-change=${n.change}><span class="sign" aria-hidden="true">${a[n.change]??" "}</span><span><span class="sr-only">${s[n.change]??""}: </span>${n.text}</span></li>`)}</ul>`:te}
1111
- </article>`}},jt=class extends oe{static{this.properties={items:{type:Array},columns:{type:String,reflect:!0},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.items=[],this.columns="two",this.headingLevel=3,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...oe.styles,Ye,ze`
1314
+ .h a:focus-visible { outline: none; box-shadow: ${H.focusShadow}; border-radius: ${H.radiusSm}; }
1315
+ ul { list-style: none; margin: ${E(1)} 0 0; padding: 0; display: grid; gap: ${E(1)}; }
1316
+ li { display: grid; grid-template-columns: 1.25em minmax(0, 1fr); gap: ${E(2)}; padding: ${E(1)} ${E(3)}; border-radius: ${H.radius}; }
1317
+ li[data-change='added'] { background: ${H.successSubtle}; color: ${H.successText}; }
1318
+ li[data-change='removed'] { background: ${H.dangerSubtle}; color: ${H.dangerText}; }
1319
+ li[data-change='same'] { color: ${H.textMuted}; }
1320
+ .sign { font-weight: ${Ci("bold")}; }
1321
+ `]}wipe(e){let i=this.renderRoot.querySelector("impakt-before-after");if(!i)return;if(cancelAnimationFrame(this.raf),ha()){i.position=e;return}let a=i.position??Li,r=performance.now(),o=x=>x<.5?4*x*x*x:1-Math.pow(-2*x+2,3)/2,l=x=>{let v=Math.min(1,(x-r)/450);i.position=a+(e-a)*o(v),v<1&&(this.raf=requestAnimationFrame(l))};this.raf=requestAnimationFrame(l)}disconnectedCallback(){super.disconnectedCallback(),cancelAnimationFrame(this.raf)}render(){let e=this.beforeSrc&&this.afterSrc,i=this.href?w`<a href=${this.href}>${this.heading}</a>`:this.heading,a={added:"+",removed:"\u2212",same:" "},r={added:oe("Added"),removed:oe("Removed"),same:oe("Kept")};return w`<article part="card">
1322
+ ${e?w`<div class="media" @pointerenter=${o=>o.pointerType==="mouse"&&this.wipe(0)} @pointerleave=${o=>o.pointerType==="mouse"&&this.wipe(Li)}><impakt-before-after .position=${Li} .beforeSrc=${this.beforeSrc} .beforeAlt=${this.beforeAlt} .afterSrc=${this.afterSrc} .afterAlt=${this.afterAlt} .beforeLabel=${oe("Before")} .afterLabel=${oe("Shipped")} .label=${oe("Compare {name} before and after",{name:this.heading})}></impakt-before-after></div>`:this.afterSrc||this.beforeSrc?w`<div class="media"><img src=${this.afterSrc||this.beforeSrc} alt=${this.afterSrc?this.afterAlt:this.beforeAlt} loading="lazy" /></div>`:de}
1323
+ ${this.label?w`<p class="meta mono">${this.label}</p>`:de}
1324
+ ${this.heading?Xa(this.headingLevel,i):de}
1325
+ ${this.text?w`<p class="body">${this.text}</p>`:de}
1326
+ ${(this.items??[]).length?w`<ul class="mono" part="diff">${this.items.map(o=>w`<li data-change=${o.change}><span class="sign" aria-hidden="true">${a[o.change]??" "}</span><span><span class="sr-only">${r[o.change]??""}: </span>${o.text}</span></li>`)}</ul>`:de}
1327
+ </article>`}},li=class extends ge{static{this.properties={items:{type:Array},columns:{type:String,reflect:!0},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.items=[],this.columns="two",this.headingLevel=3,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...ge.styles,st,Re`
1112
1328
  :host { display: block; container-type: inline-size; }
1113
- ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${A(12)} ${A(10)}; }
1329
+ ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${E(12)} ${E(10)}; }
1114
1330
  :host([columns='one']) ul { grid-template-columns: minmax(0, 1fr); }
1115
1331
  :host([columns='three']) ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
1116
1332
  @container (max-width: 44rem) { ul, :host([columns='three']) ul { grid-template-columns: minmax(0, 1fr); } }
1117
- `]}render(){let t=typeof location>"u"?"":location.pathname.replace(/\/$/,""),e=(this.items??[]).filter(i=>!i.href||i.href.replace(/\/$/,"")!==t);return v`<ul part="list">${e.map(i=>{let a=i.heading??i.title??"";return v`<li><impakt-release-card
1333
+ `]}render(){let t=typeof location>"u"?"":location.pathname.replace(/\/$/,""),e=(this.items??[]).filter(i=>!i.href||i.href.replace(/\/$/,"")!==t);return w`<ul part="list">${e.map(i=>{let a=i.heading??i.title??"";return w`<li><impakt-release-card
1118
1334
  .label=${i.label??""} .heading=${a} .text=${i.text??""} .href=${i.href??""}
1119
- .beforeSrc=${i.beforeSrc??""} .beforeAlt=${i.beforeAlt||J("{name} as a wireframe",{name:a})}
1120
- .afterSrc=${i.afterSrc??""} .afterAlt=${i.afterAlt||J("{name} as it shipped",{name:a})}
1121
- .items=${i.items??[]} .headingLevel=${this.headingLevel}></impakt-release-card></li>`})}</ul>`}},ai=42;function ha(o,t){let e=Math.min(Math.max(o||3,2),6);return e===2?v`<h2 class="h">${t}</h2>`:e===4?v`<h4 class="h">${t}</h4>`:e===5?v`<h5 class="h">${t}</h5>`:e===6?v`<h6 class="h">${t}</h6>`:v`<h3 class="h">${t}</h3>`}var Ot=class extends oe{constructor(){super();this.unwatch=()=>{};this.items=[],this.trunk="",this.headingLevel=3,this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={items:{type:Array},trunk:{type:String},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...oe.styles,Ye,_t,qt,ze`
1335
+ .beforeSrc=${i.beforeSrc??""} .beforeAlt=${i.beforeAlt||oe("{name} as a wireframe",{name:a})}
1336
+ .afterSrc=${i.afterSrc??""} .afterAlt=${i.afterAlt||oe("{name} as it shipped",{name:a})}
1337
+ .items=${i.items??[]} .headingLevel=${this.headingLevel}></impakt-release-card></li>`})}</ul>`}},Li=42;function Xa(n,t){let e=Math.min(Math.max(n||3,2),6);return e===2?w`<h2 class="h">${t}</h2>`:e===4?w`<h4 class="h">${t}</h4>`:e===5?w`<h5 class="h">${t}</h5>`:e===6?w`<h6 class="h">${t}</h6>`:w`<h3 class="h">${t}</h3>`}var di=class extends ge{constructor(){super();this.unwatch=()=>{};this.items=[],this.trunk="",this.headingLevel=3,this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={items:{type:Array},trunk:{type:String},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...ge.styles,st,hi,mi,Re`
1122
1338
  :host { display: block; container-type: inline-size; --trunk: color-mix(in srgb, currentColor 70%, transparent); }
1123
1339
  ul { list-style: none; margin: 0; padding: 0; position: relative; }
1124
1340
  ul::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 11px; inline-size: 3px; border-radius: 3px; background: var(--trunk); }
1125
- li { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); padding-block: ${A(6)}; }
1341
+ li { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); padding-block: ${E(6)}; }
1126
1342
  .graph { position: relative; }
1127
- .graph svg { position: absolute; inset-block-start: -${A(6)}; inset-inline-start: 0; inline-size: 96px; block-size: calc(100% + ${A(12)}); overflow: visible; }
1128
- .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${A(4)} ${A(10)}; align-items: start; }
1129
- .path { margin: 0 0 ${A(2)}; opacity: 0.72; }
1130
- .h { font-size: ${Re("3xl")}; line-height: 1.05; }
1343
+ .graph svg { position: absolute; inset-block-start: -${E(6)}; inset-inline-start: 0; inline-size: 96px; block-size: calc(100% + ${E(12)}); overflow: visible; }
1344
+ .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: ${E(4)} ${E(10)}; align-items: start; }
1345
+ .path { margin: 0 0 ${E(2)}; opacity: 0.72; }
1346
+ .h { font-size: ${Ue("3xl")}; line-height: 1.05; }
1131
1347
  .h a { color: inherit; text-decoration: none; }
1132
1348
  .h a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
1133
- .h a:focus-visible { outline: none; box-shadow: ${B.focusShadow}; border-radius: ${B.radiusSm}; }
1134
- .detail { display: flex; flex-direction: column; gap: ${A(3)}; padding-block-start: ${A(1)}; }
1349
+ .h a:focus-visible { outline: none; box-shadow: ${H.focusShadow}; border-radius: ${H.radiusSm}; }
1350
+ .detail { display: flex; flex-direction: column; gap: ${E(3)}; padding-block-start: ${E(1)}; }
1135
1351
  .tags { margin: 0; opacity: 0.7; text-transform: uppercase; }
1136
- .end { position: relative; display: flex; align-items: center; gap: ${A(3)}; padding-block-start: ${A(4)}; }
1352
+ .end { position: relative; display: flex; align-items: center; gap: ${E(3)}; padding-block-start: ${E(4)}; }
1137
1353
  .end::before { content: ''; inline-size: 16px; block-size: 16px; margin-inline-start: 5px; border-radius: 50%; background: currentColor; }
1138
1354
  @container (max-width: 44rem) {
1139
1355
  li { grid-template-columns: 56px minmax(0, 1fr); }
1140
1356
  .graph svg { inline-size: 56px; }
1141
1357
  .row { grid-template-columns: minmax(0, 1fr); }
1142
- .h { font-size: ${Re("2xl")}; }
1358
+ .h { font-size: ${Ue("2xl")}; }
1143
1359
  }
1144
1360
  /* Branch draw: each branch opens down from the trunk, 120 ms after the one above, then its dot pops. */
1145
1361
  @media (prefers-reduced-motion: no-preference) {
@@ -1148,29 +1364,29 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
1148
1364
  :host([shown]) .graph svg { clip-path: inset(0); }
1149
1365
  :host([shown]) .graph circle { transform: scale(1); }
1150
1366
  }
1151
- `]}connectedCallback(){super.connectedCallback(),this.unwatch=ni(this)}disconnectedCallback(){super.disconnectedCallback(),this.unwatch()}render(){let e=i=>Ue`<svg viewBox="0 0 96 200" preserveAspectRatio="none" aria-hidden="true" focusable="false">
1367
+ `]}connectedCallback(){super.connectedCallback(),this.unwatch=Bi(this)}disconnectedCallback(){super.disconnectedCallback(),this.unwatch()}render(){let e=i=>rt`<svg viewBox="0 0 96 200" preserveAspectRatio="none" aria-hidden="true" focusable="false">
1152
1368
  <path d="M12 0 C12 40 60 30 60 70 L60 120 C60 160 12 160 12 200" fill="none" stroke=${i} stroke-width="3" vector-effect="non-scaling-stroke" />
1153
1369
  <circle cx="60" cy="86" r="8" fill=${i} />
1154
- </svg>`;return v`<ul part="list">${(this.items??[]).map((i,a)=>v`<li part="item" style=${`--i:${a}`}>
1155
- <div class="graph">${e(ri(i.tone,a))}</div>
1370
+ </svg>`;return w`<ul part="list">${(this.items??[]).map((i,a)=>w`<li part="item" style=${`--i:${a}`}>
1371
+ <div class="graph">${e(Ei(i.tone,a))}</div>
1156
1372
  <div>
1157
- ${i.path?v`<p class="path mono">${i.path}</p>`:te}
1373
+ ${i.path?w`<p class="path mono">${i.path}</p>`:de}
1158
1374
  <div class="row">
1159
- ${pa(this.headingLevel,i.href?v`<a href=${i.href}>${i.heading}</a>`:i.heading,"h")}
1375
+ ${Ga(this.headingLevel,i.href?w`<a href=${i.href}>${i.heading}</a>`:i.heading,"h")}
1160
1376
  <div class="detail">
1161
- ${i.text?v`<p class="body">${i.text}</p>`:te}
1162
- ${i.tags?.length?v`<p class="tags mono">${i.tags.join(" \xB7 ")}</p>`:te}
1377
+ ${i.text?w`<p class="body">${i.text}</p>`:de}
1378
+ ${i.tags?.length?w`<p class="tags mono">${i.tags.join(" \xB7 ")}</p>`:de}
1163
1379
  </div>
1164
1380
  </div>
1165
1381
  </div>
1166
1382
  </li>`)}</ul>
1167
- ${this.trunk?v`<p class="end mono" part="trunk">${this.trunk}</p>`:te}`}},Ft=class extends oe{constructor(){super();this.unwatch=()=>{};this.counted=null;this.items=[],this.summary="",this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={items:{type:Array},summary:{type:String},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...oe.styles,Ye,_t,qt,ze`
1383
+ ${this.trunk?w`<p class="end mono" part="trunk">${this.trunk}</p>`:de}`}},ci=class extends ge{constructor(){super();this.unwatch=()=>{};this.counted=null;this.items=[],this.summary="",this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={items:{type:Array},summary:{type:String},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...ge.styles,st,hi,mi,Re`
1168
1384
  :host { display: block; container-type: inline-size; }
1169
- .summary { display: inline-flex; align-items: center; gap: ${A(2)}; margin: 0 0 ${A(6)}; padding: ${A(1)} ${A(3)}; border-radius: ${B.radiusXl}; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
1170
- .summary::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${B.success}; }
1385
+ .summary { display: inline-flex; align-items: center; gap: ${E(2)}; margin: 0 0 ${E(6)}; padding: ${E(1)} ${E(3)}; border-radius: ${H.radiusXl}; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
1386
+ .summary::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: ${H.success}; }
1171
1387
  /* The rows share one grid, so the figure column fits the widest figure and every row lines up. */
1172
- ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 32px max-content minmax(0, 1fr) auto; column-gap: ${A(6)}; }
1173
- li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; padding-block: ${A(5)}; border-block-end: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
1388
+ ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 32px max-content minmax(0, 1fr) auto; column-gap: ${E(6)}; }
1389
+ li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; padding-block: ${E(5)}; border-block-end: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
1174
1390
  /* Checks run: each tick pops in, 150 ms after the one above. */
1175
1391
  @media (prefers-reduced-motion: no-preference) {
1176
1392
  .tick { transform: scale(0); transition: transform 600ms cubic-bezier(.34, 1.56, .64, 1) calc(var(--i, 0) * 150ms); }
@@ -1178,28 +1394,28 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
1178
1394
  }
1179
1395
  .sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
1180
1396
  /* A passed check is a filled disc with a tick cut out of it, as a CI run shows one. */
1181
- .tick { display: inline-flex; align-items: center; justify-content: center; inline-size: 26px; block-size: 26px; border-radius: 50%; background: ${B.success}; color: var(--impakt-color-status-success-on, #fff); }
1182
- .figure { margin: 0; font-family: ${B.fontHeading}; font-weight: ${si("bold")}; font-size: ${Re("5xl")}; line-height: 1; letter-spacing: ${B.trackingTight}; white-space: nowrap; }
1183
- .label { margin: 0; ${ca("xl")} }
1397
+ .tick { display: inline-flex; align-items: center; justify-content: center; inline-size: 26px; block-size: 26px; border-radius: 50%; background: ${H.success}; color: var(--impakt-color-status-success-on, #fff); }
1398
+ .figure { margin: 0; font-family: ${H.fontHeading}; font-weight: ${Ci("bold")}; font-size: ${Ue("5xl")}; line-height: 1; letter-spacing: ${H.trackingTight}; white-space: nowrap; }
1399
+ .label { margin: 0; ${Ua("xl")} }
1184
1400
  .status { margin: 0; opacity: 0.72; }
1185
1401
  @container (max-width: 40rem) {
1186
1402
  ul { grid-template-columns: 28px minmax(0, 1fr); }
1187
- li { row-gap: ${A(1)}; }
1403
+ li { row-gap: ${E(1)}; }
1188
1404
  .label, .status { grid-column: 2; }
1189
- .figure { font-size: ${Re("4xl")}; }
1405
+ .figure { font-size: ${Ue("4xl")}; }
1190
1406
  }
1191
- `]}connectedCallback(){super.connectedCallback(),this.unwatch=ni(this,()=>this.run())}disconnectedCallback(){super.disconnectedCallback(),this.unwatch()}run(){if(Pi())return;let e=this.items??[],i=performance.now(),a=s=>{this.counted=e.map((n,l)=>Math.min(1,Math.max(0,(s-i-l*150)/1200))),this.requestUpdate(),this.counted.some(n=>n<1)?requestAnimationFrame(a):this.counted=null};requestAnimationFrame(a)}render(){let e=(i,a)=>{let s=this.counted?.[a],n=/^(\d+)(.*)$/.exec(i);if(s===void 0||s>=1||!n)return v`${i}`;let l=1-Math.pow(1-s,3);return v`<span aria-hidden="true">${Math.round(Number(n[1])*l)}${n[2]}</span><span class="sr-only">${i}</span>`};return v`${this.summary?v`<p class="summary mono" part="summary">${this.summary}</p>`:te}
1192
- <ul part="list">${(this.items??[]).map((i,a)=>v`<li part="item" style=${`--i:${a}`}>
1193
- <span class="tick" aria-hidden="true">${da("check","16px")}</span>
1407
+ `]}connectedCallback(){super.connectedCallback(),this.unwatch=Bi(this,()=>this.run())}disconnectedCallback(){super.disconnectedCallback(),this.unwatch()}run(){if(ha())return;let e=this.items??[],i=performance.now(),a=r=>{this.counted=e.map((o,l)=>Math.min(1,Math.max(0,(r-i-l*150)/1200))),this.requestUpdate(),this.counted.some(o=>o<1)?requestAnimationFrame(a):this.counted=null};requestAnimationFrame(a)}render(){let e=(i,a)=>{let r=this.counted?.[a],o=/^(\d+)(.*)$/.exec(i);if(r===void 0||r>=1||!o)return w`${i}`;let l=1-Math.pow(1-r,3);return w`<span aria-hidden="true">${Math.round(Number(o[1])*l)}${o[2]}</span><span class="sr-only">${i}</span>`};return w`${this.summary?w`<p class="summary mono" part="summary">${this.summary}</p>`:de}
1408
+ <ul part="list">${(this.items??[]).map((i,a)=>w`<li part="item" style=${`--i:${a}`}>
1409
+ <span class="tick" aria-hidden="true">${Ya("check","16px")}</span>
1194
1410
  <p class="figure">${e(i.figure,a)}</p>
1195
1411
  <p class="label">${i.label}</p>
1196
- ${i.status?v`<p class="status mono">${i.status}</p>`:v`<span></span>`}
1197
- </li>`)}</ul>`}},Wt=class extends oe{constructor(){super();this.unwatch=()=>{};this.lanes=[],this.marks=[],this.span=20,this.unit="",this.every=2,this.release="",this.releaseAt=0,this.label="",this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={lanes:{type:Array},marks:{type:Array},span:{type:Number},unit:{type:String},every:{type:Number},release:{type:String},releaseAt:{type:Number,attribute:"release-at"},label:{type:String},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...oe.styles,oa,Ye,_t,qt,ze`
1412
+ ${i.status?w`<p class="status mono">${i.status}</p>`:w`<span></span>`}
1413
+ </li>`)}</ul>`}},pi=class extends ge{constructor(){super();this.unwatch=()=>{};this.lanes=[],this.marks=[],this.span=20,this.unit="",this.every=2,this.release="",this.releaseAt=0,this.label="",this.spaceAbove="none",this.spaceBelow="none"}static{this.properties={lanes:{type:Array},marks:{type:Array},span:{type:Number},unit:{type:String},every:{type:Number},release:{type:String},releaseAt:{type:Number,attribute:"release-at"},label:{type:String},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}static{this.styles=[...ge.styles,_a,st,hi,mi,Re`
1198
1414
  :host { display: block; }
1199
1415
  /* On a narrow screen the graph scrolls sideways, so the scroller takes focus and the arrow keys move it (2.1.1). */
1200
- figure { margin: 0; overflow-x: auto; border-radius: ${B.radiusSm}; }
1416
+ figure { margin: 0; overflow-x: auto; border-radius: ${H.radiusSm}; }
1201
1417
  svg { display: block; inline-size: 100%; min-inline-size: 640px; block-size: auto; overflow: visible; }
1202
- text { font-family: ${B.fontMono}; font-size: 12px; fill: currentColor; }
1418
+ text { font-family: ${H.fontMono}; font-size: 12px; fill: currentColor; }
1203
1419
  .faint { opacity: 0.5; }
1204
1420
  /* A lane's label keeps a band of the page colour around it, so a line crossing it stays legible. */
1205
1421
  .halo { paint-order: stroke; stroke: var(--impakt-color-surface-card, #fff); stroke-width: 5px; stroke-linejoin: round; }
@@ -1208,22 +1424,22 @@ Saturday, 10am to 2pm`,this.email="",this.callbackHeading="Or we can call you",t
1208
1424
  svg { clip-path: inset(0 100% 0 0); transition: clip-path 1400ms cubic-bezier(.25, 1, .5, 1); }
1209
1425
  :host([shown]) svg { clip-path: inset(0 -40px 0 0); }
1210
1426
  }
1211
- `]}connectedCallback(){super.connectedCallback(),this.unwatch=ni(this)}disconnectedCallback(){super.disconnectedCallback(),this.unwatch()}render(){let s=this.span>0?this.span:20,n=S=>24+Math.min(Math.max(S,0),s)/s*1116,l=this.lanes??[],y=52,x=40+(l.length+1)*y+40,u=40,be=S=>u+(S+1)*y,de=[];for(let S=0;S<=s;S+=Math.max(1,this.every||2))de.push(S);let Ge=S=>l.findIndex(q=>S>=q.from&&S<=q.to),Ni=S=>(this.marks??[]).some(q=>Ge(q.at)===S),Dt=this.unit||J("wk"),ji=this.label||J("Project timeline"),Oi=l.map(S=>`${S.label}: ${J("{unit} {from} to {to}",{unit:Dt,from:S.from,to:S.to})}`).join("; ");return v`<figure part="figure" tabindex="0">
1212
- <svg viewBox="0 0 ${1200} ${x}" role="img" aria-label=${`${ji}. ${Oi}${this.release?`. ${J("{name} at {unit} {at}",{name:this.release,unit:Dt,at:this.releaseAt})}`:""}`}>
1213
- <line x1=${24} y1=${u} x2=${1180} y2=${u} stroke="currentColor" stroke-width="3" stroke-linecap="round" />
1214
- <path d="M${1168} ${u-7} L${1180} ${u} L${1168} ${u+7}" fill="none" stroke="currentColor" stroke-width="3" />
1215
- ${l.map((S,q)=>{let Te=ri(S.tone,q),ie=be(q),fe=n(S.from),He=n(S.to),Pe=Math.min(36,(He-fe)/3);return Ue`<g>
1216
- <path d="M${fe} ${u} C${fe} ${(u+ie)/2} ${fe+Pe} ${ie} ${fe+Pe*1.6} ${ie} L${He-Pe*1.6} ${ie} C${He-Pe} ${ie} ${He} ${(u+ie)/2} ${He} ${u}" fill="none" stroke=${Te} stroke-width="3" />
1217
- <circle cx=${fe} cy=${u} r="7" fill=${Te} />
1218
- <text x=${fe+Pe*1.6} y=${Ni(q)?ie-10:ie+20} class="halo" style=${`fill:${Te}`}>${S.label}</text>
1427
+ `]}connectedCallback(){super.connectedCallback(),this.unwatch=Bi(this)}disconnectedCallback(){super.disconnectedCallback(),this.unwatch()}render(){let r=this.span>0?this.span:20,o=A=>24+Math.min(Math.max(A,0),r)/r*1116,l=this.lanes??[],x=52,v=40+(l.length+1)*x+40,g=40,Se=A=>g+(A+1)*x,$e=[];for(let A=0;A<=r;A+=Math.max(1,this.every||2))$e.push(A);let nt=A=>l.findIndex(V=>A>=V.from&&A<=V.to),ma=A=>(this.marks??[]).some(V=>nt(V.at)===A),ui=this.unit||oe("wk"),ua=this.label||oe("Project timeline"),ga=l.map(A=>`${A.label}: ${oe("{unit} {from} to {to}",{unit:ui,from:A.from,to:A.to})}`).join("; ");return w`<figure part="figure" tabindex="0">
1428
+ <svg viewBox="0 0 ${1200} ${v}" role="img" aria-label=${`${ua}. ${ga}${this.release?`. ${oe("{name} at {unit} {at}",{name:this.release,unit:ui,at:this.releaseAt})}`:""}`}>
1429
+ <line x1=${24} y1=${g} x2=${1180} y2=${g} stroke="currentColor" stroke-width="3" stroke-linecap="round" />
1430
+ <path d="M${1168} ${g-7} L${1180} ${g} L${1168} ${g+7}" fill="none" stroke="currentColor" stroke-width="3" />
1431
+ ${l.map((A,V)=>{let Pe=Ei(A.tone,V),ce=Se(V),ze=o(A.from),Ye=o(A.to),Ge=Math.min(36,(Ye-ze)/3);return rt`<g>
1432
+ <path d="M${ze} ${g} C${ze} ${(g+ce)/2} ${ze+Ge} ${ce} ${ze+Ge*1.6} ${ce} L${Ye-Ge*1.6} ${ce} C${Ye-Ge} ${ce} ${Ye} ${(g+ce)/2} ${Ye} ${g}" fill="none" stroke=${Pe} stroke-width="3" />
1433
+ <circle cx=${ze} cy=${g} r="7" fill=${Pe} />
1434
+ <text x=${ze+Ge*1.6} y=${ma(V)?ce-10:ce+20} class="halo" style=${`fill:${Pe}`}>${A.label}</text>
1219
1435
  </g>`})}
1220
- ${(this.marks??[]).map(S=>{let q=Ge(S.at),Te=q>=0?be(q):u,ie=q>=0?ri(l[q].tone,q):"currentColor";return Ue`<g><circle cx=${n(S.at)} cy=${Te} r="6" fill="var(--impakt-color-surface-card, #fff)" stroke=${ie} stroke-width="3" /><text x=${n(S.at)} y=${Te+22} text-anchor="middle" class="faint">${S.label}</text></g>`})}
1221
- ${this.release?Ue`<g>
1222
- <circle cx=${n(this.releaseAt)} cy=${u} r="10" fill=${Hi.success} />
1223
- <rect x=${n(this.releaseAt)-8} y=${u-36} rx="4" width=${this.release.length*7.6+16} height="22" fill=${Hi.success} />
1224
- <text x=${n(this.releaseAt)} y=${u-21} style="fill:var(--impakt-color-surface-card, #fff)">${this.release}</text>
1225
- </g>`:te}
1226
- ${de.map(S=>Ue`<text x=${n(S)} y=${x-10} text-anchor="middle" class="faint">${Dt} ${S}</text>`)}
1436
+ ${(this.marks??[]).map(A=>{let V=nt(A.at),Pe=V>=0?Se(V):g,ce=V>=0?Ei(l[V].tone,V):"currentColor";return rt`<g><circle cx=${o(A.at)} cy=${Pe} r="6" fill="var(--impakt-color-surface-card, #fff)" stroke=${ce} stroke-width="3" /><text x=${o(A.at)} y=${Pe+22} text-anchor="middle" class="faint">${A.label}</text></g>`})}
1437
+ ${this.release?rt`<g>
1438
+ <circle cx=${o(this.releaseAt)} cy=${g} r="10" fill=${pa.success} />
1439
+ <rect x=${o(this.releaseAt)-8} y=${g-36} rx="4" width=${this.release.length*7.6+16} height="22" fill=${pa.success} />
1440
+ <text x=${o(this.releaseAt)} y=${g-21} style="fill:var(--impakt-color-surface-card, #fff)">${this.release}</text>
1441
+ </g>`:de}
1442
+ ${$e.map(A=>rt`<text x=${o(A)} y=${v-10} text-anchor="middle" class="faint">${ui} ${A}</text>`)}
1227
1443
  </svg>
1228
- </figure>`}};customElements.define("impakt-release-card",Nt);customElements.define("impakt-release-list",jt);customElements.define("impakt-branch-list",Ot);customElements.define("impakt-check-list",Ft);customElements.define("impakt-branch-timeline",Wt);export{zt as ImpaktAffordabilityCalculator,et as ImpaktAnnouncement,ft as ImpaktBeforeAfter,Ot as ImpaktBranchList,Wt as ImpaktBranchTimeline,rt as ImpaktCardGrid,st as ImpaktCarousel,Ft as ImpaktCheckList,Fe as ImpaktContactBlock,dt as ImpaktCtaBanner,Mt as ImpaktEstimator,Ke as ImpaktFeatureList,nt as ImpaktGallery,Qe as ImpaktHero,yt as ImpaktLocationCard,ot as ImpaktLogoCloud,ct as ImpaktMediaSplit,bt as ImpaktMortgageCalculator,ht as ImpaktNewsletter,wt as ImpaktPlanComparison,Ze as ImpaktQuote,kt as ImpaktRegulatoryNotice,Nt as ImpaktReleaseCard,jt as ImpaktReleaseList,pt as ImpaktReviews,Ht as ImpaktScene,Pt as ImpaktScrubber,tt as ImpaktSearchBar,Ct as ImpaktSiteFooter,Et as ImpaktSiteHeader,gt as ImpaktSitePlan,St as ImpaktStampDutyCalculator,Je as ImpaktStat,lt as ImpaktSteps,$t as ImpaktStickyBar,Oe as ImpaktVideo,Bt as ImpaktWordmark,ue as SDLT,xi as embedOf,Lt as estimate,gi as gallerySpan,fi as monthlyPayment,Mi as phaseWeeks,vi as stampDuty};
1444
+ </figure>`}};customElements.define("impakt-release-card",oi);customElements.define("impakt-release-list",li);customElements.define("impakt-branch-list",di);customElements.define("impakt-check-list",ci);customElements.define("impakt-branch-timeline",pi);export{Vt as ImpaktAffordabilityCalculator,mt as ImpaktAnnouncement,Wt as ImpaktBeforeAfter,di as ImpaktBranchList,pi as ImpaktBranchTimeline,ft as ImpaktCardGrid,Lt as ImpaktCarousel,ci as ImpaktCheckList,et as ImpaktContactBlock,Ht as ImpaktCtaBanner,Zt as ImpaktEstimator,kt as ImpaktFaq,ct as ImpaktFeatureList,Et as ImpaktGallery,dt as ImpaktHero,Tt as ImpaktHighlight,yt as ImpaktJourneyButton,_t as ImpaktLocationCard,Ct as ImpaktLogoCloud,It as ImpaktMediaSplit,Ft as ImpaktMortgageCalculator,Pt as ImpaktNewsletter,St as ImpaktOffer,Yt as ImpaktPlanComparison,zt as ImpaktPostCard,pt as ImpaktQuote,Gt as ImpaktRegulatoryNotice,oi as ImpaktReleaseCard,li as ImpaktReleaseList,Rt as ImpaktReviews,si as ImpaktScene,ni as ImpaktScrubber,ut as ImpaktSearchBar,ii as ImpaktSiteFooter,ei as ImpaktSiteHeader,wt as ImpaktSiteMenu,Ot as ImpaktSitePlan,Xt as ImpaktStampDutyCalculator,ht as ImpaktStat,vt as ImpaktStatRow,Bt as ImpaktSteps,qt as ImpaktStickyBar,Ze as ImpaktVideo,ti as ImpaktWordmark,xt as ImpaktWorkList,Oi as JOURNEY_STAGES,ke as SDLT,Qi as embedOf,Kt as estimate,Ui as gallerySpan,Gi as monthlyPayment,sa as phaseWeeks,Ji as stampDuty};
1229
1445
  //# sourceMappingURL=atomic-ui-blocks.js.map