/* Mosaic: flat blocks of brand colour cut at the hexagon's 30° angles. Sections meet on slanted seams,
   services sit in a mosaic of different-sized tiles, and the six steps are hexagons in a honeycomb row.
   Square corners throughout; the gradient is kept for the logo and the six step shades.
   Page colours are dark (Nighttime) for every visitor until they flip the header switch to light (Papier).
   The colour blocks stay the same in both. */
:root {
  color-scheme: dark;
  /* brand */
  --moonlight: #6C3BAA;
  --borealis: #008B8B;
  --nighttime: #14131C;
  --ink-colour: #1C1A2B;
  --vellum: #EDE6D6;
  --papier: #F6F3EE;
  --s1: #6C3BAA; --s2: #644FA5; --s3: #5A609F; --s4: #4C7099; --s5: #377E92; --s6: #008B8B;
  --gradient: linear-gradient(135deg, var(--moonlight), var(--borealis));
  /* theme: dark */
  --ground: #14131C;      /* Nighttime */
  --raised: #1C1A2B;      /* Ink */
  --ink: #EDE6D6;         /* Vellum */
  --ink-soft: #C9C2D3;
  --ink-faint: #9A95A8;
  --line: #34314A;
  --deep: #1C1A2B;        /* the dark bands (process, footer) */
  --tile-deep: #644FA5;   /* the dark tile among the services: a Moonlight shade on dark, Nighttime on light */
  --accent-text: #A88BE0; /* Moonlight, lifted for text on dark */
  --accent-text-2: #3DC2C2;
  --on-accent: #FFFFFF;
  /* type */
  --display: "Tirra", "Inter", ui-sans-serif, system-ui, sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --step--1: 0.875rem; --step-0: 1rem; --step-1: 1.25rem; --step-2: clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem);
  --step-3: clamp(2.4rem, 1.6rem + 3vw, 4.5rem); --step-4: clamp(3rem, 1.6rem + 5.4vw, 6.5rem);
  --wrap: 76rem;
  --radius: 0px;
  --seam: clamp(28px, 6vw, 80px);   /* how far a slanted section edge drops */
  --chamfer: 14px;                  /* the cut corner on buttons and tiles */
}
:root[data-theme="light"] {
  color-scheme: light;
  --ground: #F6F3EE; --raised: #EDE6D6; --ink: #1C1A2B; --ink-soft: #4A4658; --ink-faint: #6E6A7C;
  --line: #D9D1C1; --deep: #14131C; --tile-deep: #14131C; --accent-text: #5B2F96; --accent-text-2: #00706F;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--ground); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent-text-2); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.02; letter-spacing: -0.015em; text-wrap: balance; margin: 0; }
h1, h2 { font-weight: 700; letter-spacing: -0.025em; }
p { margin: 0; }

.band { padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.wrap { max-width: var(--wrap); margin-inline: auto; }
.label { font: 600 0.8125rem/1.4 var(--label, var(--body)); letter-spacing: 0.01em; color: var(--ink-faint); }
.amp { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* colour blocks: any section or tile can take one of these */
.tone-moonlight { --tone-bg: var(--moonlight); --tone-fg: var(--vellum); --tone-soft: #E3D9F1; }
.tone-borealis { --tone-bg: var(--borealis); --tone-fg: var(--nighttime); --tone-soft: var(--nighttime); }
.tone-shade { --tone-bg: var(--s3); --tone-fg: var(--papier); --tone-soft: var(--papier); }
.tone-night { --tone-bg: var(--deep); --tone-fg: var(--vellum); --tone-soft: #C9C2D3; }
.tone-vellum { --tone-bg: var(--vellum); --tone-fg: var(--ink-colour); --tone-soft: #4A4658; }
.tone-moonlight, .tone-borealis, .tone-shade, .tone-night, .tone-vellum { background: var(--tone-bg); color: var(--tone-fg); }
:is(.tone-moonlight, .tone-borealis, .tone-shade, .tone-night, .tone-vellum) p { color: var(--tone-soft); }
.seam-bottom { clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--seam)), 0 100%); padding-bottom: var(--seam); }
.seam-top { clip-path: polygon(0 var(--seam), 100% 0, 100% 100%, 0 100%); padding-top: var(--seam); }
.seam-top.seam-bottom { clip-path: polygon(0 var(--seam), 100% 0, 100% calc(100% - var(--seam)), 0 100%); }

/* header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: var(--ground); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem; }
.brand { display: inline-flex; color: var(--ink); }
.brand svg { height: 28px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a { text-decoration: none; font-size: 0.9375rem; font-weight: 500; color: var(--ink); }
.nav .nav-link { text-underline-offset: 6px; text-decoration-thickness: 3px; }
.nav .nav-link:hover, .nav .nav-link[aria-current="page"] { text-decoration-line: underline; text-decoration-color: var(--borealis); }
@media (max-width: 760px) { .nav .nav-link { display: none; } }
/* menu hover text (Admin > Pages > Settings): a small tip under the link, for mouse and keyboard only */
.nav .has-hint { position: relative; }
.nav-cta { display: inline-flex; }
.nav-hint { position: absolute; top: calc(100% + 12px); left: 50%; z-index: 40; width: max-content; max-width: 16rem; padding: 0.45rem 0.75rem; background: var(--ink-colour); color: var(--vellum); border: 1px solid var(--borealis); border-radius: 6px; font: 400 0.8125rem/1.4 var(--body); letter-spacing: 0; text-transform: none; text-align: center; white-space: normal; pointer-events: none; opacity: 0; visibility: hidden; transform: translate(-50%, -4px); transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s; }
.nav-hint::before { content: ""; position: absolute; bottom: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-bottom-color: var(--borealis); }
.nav-cta .nav-hint { left: auto; right: 0; transform: translateY(-4px); }
.nav-cta .nav-hint::before { left: auto; right: 1.5rem; }
@media (hover: hover) { .nav .has-hint:hover .nav-hint { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; } .nav .nav-cta:hover .nav-hint { transform: none; } }
.nav .has-hint:is(:focus-visible, :has(:focus-visible)) .nav-hint { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.nav .nav-cta:has(:focus-visible) .nav-hint { transform: none; }
@media (max-width: 760px) { .nav-hint { display: none; } }
@media (prefers-reduced-motion: reduce) { .nav-hint { transition: none; } }

/* buttons: solid, cut at the hexagon's angle on two corners */
.btn { display: inline-flex; align-items: center; gap: 0.6rem; padding: 1rem 1.6rem; border: 0; border-radius: 0; font: 600 1rem/1 var(--body); text-decoration: none; cursor: pointer;
  clip-path: polygon(var(--chamfer) 0, 100% 0, calc(100% - var(--chamfer)) 100%, 0 100%); transition: transform .15s ease, background-color .15s ease; }
.btn-primary { background: var(--moonlight); color: var(--vellum); }
.btn-primary:hover { background: var(--s2); transform: translateX(3px); }
.btn-ghost { background: transparent; color: inherit; clip-path: none; padding-inline: 0.4rem; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; text-decoration-color: var(--borealis); }
.btn-ghost:hover { text-decoration-thickness: 4px; }
.nav .btn { padding: 0.75rem 1.25rem; font-size: 0.9375rem; }
.nav .btn-primary { color: var(--vellum); } /* .nav a would otherwise turn it Ink in light mode */
/* on a coloured block the main button turns Vellum */
:is(.hero, .page-intro, .tone-moonlight, .tone-shade) .btn-primary { background: var(--vellum); color: var(--ink-colour); }
:is(.hero, .page-intro, .tone-moonlight, .tone-shade) .btn-primary:hover { background: var(--papier); }
:is(.tone-borealis, .cta-band, #contact) .btn-primary { background: var(--nighttime); color: var(--vellum); }
:is(.hero, .page-intro, .tone-moonlight, .tone-shade) .btn-ghost { text-decoration-color: currentColor; }
:is(.tone-borealis, .cta-band, #contact) .btn-ghost { text-decoration-color: currentColor; }
/* light/dark switch: a slanted track (cut like the buttons) with a hexagon that slides across.
   Dark: Moonlight hexagon with a moon on the left. Light: Borealis hexagon with a sun on the right. */
.theme-toggle { position: relative; flex: none; width: 62px; height: 44px; margin: -5px 0; padding: 0; border: 0; background: transparent; color: var(--vellum); cursor: pointer; }
.theme-toggle[hidden] { display: none; }
.theme-toggle::before { content: ""; position: absolute; inset: 8px 0; background: var(--line); transition: background-color .2s ease;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }
.theme-toggle:hover::before { background: var(--ink-faint); }
.tt-knob { position: absolute; top: 5px; left: 4px; display: grid; place-items: center; width: 30px; height: 34px; background: var(--moonlight);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); transition: transform .25s ease, background-color .25s ease; }
.tt-knob svg { grid-area: 1 / 1; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun { opacity: 0; }
.theme-toggle[aria-checked="true"] .tt-knob { transform: translateX(24px); background: var(--borealis); color: #FFFFFF; }
.theme-toggle[aria-checked="true"] .i-sun { opacity: 1; }
.theme-toggle[aria-checked="true"] .i-moon { opacity: 0; }
@media (max-width: 760px) { .nav { gap: 0.75rem; } }

/* hero: a Moonlight block with a honeycomb of brand colours, cut on a slant at the bottom */
.hero { background: var(--moonlight); color: var(--vellum); clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--seam)), 0 100%); padding-bottom: var(--seam); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 2rem; align-items: center; padding-block: clamp(3rem, 7vw, 6.5rem) clamp(2.5rem, 5vw, 4.5rem); }
.hero-copy { display: grid; gap: 1.75rem; min-width: 0; justify-items: start; }
.hero h1 { font-size: var(--step-4); line-height: 0.95; color: var(--vellum); }
.hero .lede { font-size: var(--step-1); color: #E3D9F1; max-width: 34rem; line-height: 1.5; }
.hero .amp { background: none; color: inherit; }
.hero .label { color: #E3D9F1; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; }
.hero-figure { margin: 0 calc(-1 * max(20px, (100vw - var(--wrap)) / 2)) 0 0; display: grid; gap: 0.75rem; justify-items: end; min-width: 0; }
.hero-figure svg { width: 100%; max-width: 36rem; height: auto; color: var(--vellum); display: block; }
.hero-figure figcaption { font-size: 0.8125rem; color: #E3D9F1; text-align: right; padding-right: 20px; }
.hexmap text { font-family: var(--body); font-weight: 500; font-size: 11px; fill: currentColor; }
.hexmap .n { fill: currentColor; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 0; padding-block: 2.5rem 2rem; }
  .hero-figure { order: -1; margin: 0 -20px 0 0; justify-items: end; }
  .hero-figure svg { max-width: 15rem; margin-bottom: 1rem; }
}

/* sections */
section.block .wrap { padding-block: clamp(3.5rem, 7vw, 6rem); display: grid; gap: clamp(2rem, 4vw, 3rem); }
.section-head { display: grid; gap: 1rem 4rem; align-content: start; }
.section-head h2 { font-size: var(--step-3); }
.section-head p { color: var(--ink-soft); font-size: 1.1875rem; max-width: 34rem; }
.section-head .label { display: none; } /* section names are said by the big title */
@media (min-width: 900px) {
  .section-head:has(> h2 + p) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
  .section-head:has(> h2 + p) > :not(h2, p) { grid-column: 1 / -1; }
}

/* services: a mosaic of colour tiles, each a different size */
.services { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: minmax(9.5rem, auto); gap: 10px; }
.service { padding: clamp(1.5rem, 3vw, 2.25rem); display: flex; flex-direction: column; justify-content: flex-end; gap: 0.75rem; min-width: 0; background: var(--tone-bg, var(--raised)); color: var(--tone-fg, var(--ink)); grid-column: span 3; grid-row: span 2; }
.service h3 { font-size: var(--step-2); }
.service p { color: var(--tone-soft, var(--ink-soft)); max-width: 30rem; }
.service ul { order: -1; margin: 0 0 auto; padding: 0 0 1.5rem; list-style: none; display: flex; flex-wrap: wrap; gap: 0 0.4rem; font-size: 0.8125rem; font-weight: 600; color: var(--tone-fg, var(--ink)); opacity: 0.85; }
.service li:not(:last-child)::after { content: " ·"; }
.service:nth-child(5n+1) { --tone-bg: var(--borealis); --tone-fg: var(--nighttime); --tone-soft: var(--nighttime); grid-column: span 4; clip-path: polygon(0 0, calc(100% - 4rem) 0, 100% 4rem, 100% 100%, 0 100%); }
.service:nth-child(5n+1) h3 { font-size: var(--step-3); }
.service:nth-child(5n+2) { --tone-bg: var(--tile-deep); --tone-fg: var(--vellum); --tone-soft: var(--vellum); grid-column: span 2; grid-row: span 3; }
.service:nth-child(5n+3) { --tone-bg: var(--s3); --tone-fg: var(--papier); --tone-soft: var(--papier); grid-column: span 2; }
.service:nth-child(5n+4) { --tone-bg: var(--vellum); --tone-fg: var(--ink-colour); --tone-soft: #4A4658; grid-column: span 2; }
.service:nth-child(5n) { background: transparent; border: 3px solid var(--ink); grid-column: span 6; grid-row: span 1; flex-direction: row; justify-content: flex-start; align-items: center; gap: 1rem 2.5rem; flex-wrap: wrap; }
.service:nth-child(5n) h3 { flex: none; }
.service:nth-child(5n) ul { display: none; }
.service:nth-child(4):last-child { grid-column: span 4; grid-row: span 1; }
@media (max-width: 960px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service, .service:nth-child(n) { grid-column: span 1; grid-row: auto; min-height: 15rem; }
  .service:nth-child(5n+1), .service:nth-child(5n) { grid-column: 1 / -1; }
  .service:nth-child(5n) { min-height: 0; }
}
@media (max-width: 600px) {
  .services { grid-template-columns: minmax(0, 1fr); }
  .service, .service:nth-child(n) { grid-column: 1 / -1; min-height: 0; }
  .service:nth-child(5n+1) { clip-path: polygon(0 0, calc(100% - 2.5rem) 0, 100% 2.5rem, 100% 100%, 0 100%); }
}

/* process: a dark band, slanted at the top, with the six steps as a honeycomb row of hexagons */
section.block:has(> .wrap > .steps) { background: var(--deep); color: var(--vellum); clip-path: polygon(0 var(--seam), 100% 0, 100% 100%, 0 100%); padding-top: var(--seam); }
section.block:has(> .wrap > .steps) .section-head p { color: #C9C2D3; }
section.block:has(> .wrap > .steps) + section.block .wrap { padding-top: clamp(4rem, 8vw, 7rem); }
.steps { list-style: none; margin: 0; padding: 0 0 4.5rem; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 0.5rem; counter-reset: step; }
.step { display: grid; gap: 0.9rem; align-content: start; justify-items: center; text-align: center; min-width: 0; counter-increment: step; }
.step:nth-child(even) { transform: translateY(4.5rem); }
.step::before { content: counter(step); grid-row: 1; grid-column: 1; width: 100%; max-width: 11rem; aspect-ratio: 0.866; background: var(--c); color: var(--papier);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); display: grid; place-items: center; padding-bottom: 2.6rem;
  font: 700 clamp(2.5rem, 4vw, 3.75rem)/1 var(--display); }
.step h3 { position: relative; grid-row: 1; grid-column: 1; align-self: center; margin-top: 3.3rem; font-size: clamp(1.05rem, 1.6vw, 1.5rem); color: var(--papier); pointer-events: none; }
.step .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.step p { color: #C9C2D3; font-size: 0.9375rem; max-width: 13rem; }
@media (max-width: 860px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 0.75rem; padding-bottom: 3rem; }
  .step:nth-child(even) { transform: none; }
  .step:nth-child(3n+2) { transform: translateY(3rem); }
  .step:nth-child(n+4) { margin-top: 1rem; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; padding-bottom: 0; }
  .step, .step:nth-child(n) { transform: none; margin: 0; grid-template-columns: 5.5rem minmax(0, 1fr); justify-items: start; text-align: left; gap: 0.25rem 1.25rem; }
  .step::before { grid-row: 1 / span 2; max-width: none; padding-bottom: 0; font-size: 2.25rem; }
  .step h3 { grid-column: 2; grid-row: 1; margin: 0; align-self: end; font-size: 1.375rem; }
  .step p { grid-column: 2; grid-row: 2; max-width: none; }
}

/* work: sample briefs as colour blocks with a big number (.case-num, a text item so it can be edited) */
.work { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.case { display: flex; flex-direction: column; justify-content: flex-end; gap: 0.75rem; min-width: 0; min-height: 24rem; padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--tone-bg, var(--vellum)); color: var(--tone-fg, var(--ink-colour)); }
.case-num { display: block; font: 700 clamp(4rem, 8vw, 7.5rem)/0.8 var(--display); margin-bottom: auto; color: var(--tone-num, inherit); }
.case:nth-child(3n+1) { --tone-bg: var(--vellum); --tone-fg: var(--ink-colour); --tone-soft: #4A4658; --tone-num: var(--moonlight); }
.case:nth-child(3n+2) { --tone-bg: var(--s3); --tone-fg: var(--papier); --tone-soft: var(--papier); }
.case:nth-child(3n) { --tone-bg: var(--borealis); --tone-fg: var(--nighttime); --tone-soft: var(--nighttime); }
.case-shot { display: none; } /* the old placeholder "screenshots" */
.case img { width: 100%; height: auto; display: block; }
.case h3 { font-size: var(--step-2); }
.case p { color: var(--tone-soft, var(--ink-soft)); font-size: 1rem; }
.case .meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.tag { font: 600 0.8125rem/1.2 var(--label, var(--body)); color: inherit; opacity: 0.85; justify-self: start; }
@media (max-width: 860px) { .work { grid-template-columns: minmax(0, 1fr); } .case { min-height: 18rem; } }

/* about */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.about .section-head { grid-template-columns: minmax(0, 1fr); }
.about > :only-child { grid-column: 1 / -1; max-width: 50rem; }
.about-copy { display: grid; gap: 1rem; color: var(--ink-soft); font-size: 1.125rem; max-width: 36rem; }
.about-copy p:first-child { color: var(--ink); font: 600 var(--step-2)/1.15 var(--display); letter-spacing: -0.01em; }
.promises { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.promises div { display: grid; gap: 0.75rem; align-content: end; min-height: 15rem; padding: 1.75rem; background: var(--tone-bg); color: var(--tone-fg); }
.promises div:nth-child(4n+1) { --tone-bg: var(--moonlight); --tone-fg: var(--vellum); --tone-soft: #E3D9F1; }
.promises div:nth-child(4n+2) { --tone-bg: var(--borealis); --tone-fg: var(--nighttime); --tone-soft: var(--nighttime); }
.promises div:nth-child(4n+3) { --tone-bg: var(--s3); --tone-fg: var(--papier); --tone-soft: var(--papier); }
.promises div:nth-child(4n) { --tone-bg: var(--vellum); --tone-fg: var(--ink-colour); --tone-soft: #4A4658; }
.promises dt { font: 700 var(--step-2)/1.05 var(--display); letter-spacing: -0.01em; }
.promises dd { margin: 0; color: var(--tone-soft); }
@media (max-width: 960px) { .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .about { grid-template-columns: minmax(0, 1fr); gap: 2rem; } }
@media (max-width: 460px) { .promises { grid-template-columns: minmax(0, 1fr); } .promises div { min-height: 0; } }
/* Tipstrum questions: the Q&A groups sit 1rem apart. Each group's own bottom margin plus the section's
   3rem gap made them about 76px apart. An empty leftover list takes no space. */
section.block.tipstrum-faq .wrap { gap: 1rem; }
.tipstrum-faq .hxw-qa { margin-bottom: 0; }
.tipstrum-faq .promises:empty { display: none; }

/* contact: a Borealis band, slanted at the top, with square Papier fields */
section:has(.contact-card) { background: var(--borealis); color: var(--nighttime); clip-path: polygon(0 var(--seam), 100% 0, 100% 100%, 0 100%); padding-block: var(--seam) 0 !important; }
.contact-card { padding: 0; background: none; }
.contact-inner { background: none; padding: clamp(3rem, 6vw, 5rem) 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: end; }
.contact-inner .section-head { grid-template-columns: minmax(0, 1fr); }
.contact-inner .section-head h2 { font-size: var(--step-3); color: var(--nighttime); }
.contact-inner .section-head p { color: var(--nighttime); font-weight: 500; }
form { display: grid; gap: 0.75rem; min-width: 0; }
.field { display: grid; gap: 0.35rem; }
.field label { font-size: 0.875rem; font-weight: 600; }
.field input, .field textarea, .field select { width: 100%; font: inherit; color: var(--ink-colour); background: var(--papier); border: 0; border-radius: 0; padding: 0.95rem 1rem; border-bottom: 3px solid transparent; }
.field textarea { min-height: 7rem; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-bottom-color: var(--moonlight); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.75rem; }
.form-note { font-size: 0.875rem; color: inherit; }
.form-note.sent { font-weight: 600; }
/* a form somewhere other than the Borealis band keeps the page colours */
section:not(:has(.contact-card)) .field input, section:not(:has(.contact-card)) .field textarea, section:not(:has(.contact-card)) .field select { background: var(--raised); color: var(--ink); }
@media (max-width: 860px) { .contact-inner { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .two { grid-template-columns: minmax(0, 1fr); } }

/* footer: grey by default and only as tall as its words; a minimum height, colour and note can be set in Admin > Footer
   or a page's Settings */
.site-footer { background: #5D5B65; color: var(--vellum); display: flex; }
main:has(> section:last-child .contact-card) + .site-footer { margin-top: 0; }
/* .foot-body is the footer's inner box, in the built-in footer and in one designed in the footer editor */
.foot-body { flex: 1; padding-block: 1.5rem 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.foot-design { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.foot-design > :last-child { flex: 1; }
.foot-band { display: flex; flex-direction: column; }
.foot-band > .wrap { width: 100%; }
.foot-band + .foot-band > .foot-body { padding-top: 0; }
.foot-top { display: flex; flex-wrap: wrap; gap: 0.75rem 3rem; align-items: center; justify-content: space-between; }
.foot-body .brand { color: inherit; display: inline-flex; }
.foot-body .brand svg, .foot-body .brand img { height: 24px; width: auto; display: block; }
/* the brand wordmark file carries its clear space round the logo; this crops it to the same size as the built-in one */
.foot-body .foot-logo img { height: calc(24px * 187.01 / 104); margin: calc(24px * -41.5 / 104); max-width: none; }
.foot-body p { font-size: 0.875rem; color: inherit; opacity: .85; }
.foot-body .foot-note { font-size: 1rem; opacity: 1; max-width: 40rem; }
.foot-body .foot-legal { margin-top: auto; }
.foot-body nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.foot-body nav a { font-size: 0.9375rem; color: inherit; text-decoration: none; }
.foot-body nav a:hover { text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.site-footer.foot-light { color: var(--ink-colour); }
/* social links (Admin > Footer > YouTube channel): an icon in the footer's text colour that turns to the brand
   gradient on hover. They sit after the menu links; the logo's auto margin keeps the menu and icons together on the right.
   The padding gives a 44px tap target without taking more room in the row. */
.foot-top:has(> .foot-social) { column-gap: 1.5rem; }
.foot-top:has(> .foot-social) > :first-child { margin-right: auto; }
.foot-social { display: flex; align-items: center; gap: 0.25rem; }
.foot-social a { display: inline-flex; padding: 10px; margin: -10px; color: inherit; border-radius: 8px; text-decoration: none; }
.foot-social .ic { font-size: 24px; vertical-align: middle; transition: transform .15s ease; }
.foot-social a:hover .ic, .foot-social a:focus-visible .ic { background: linear-gradient(135deg, #6C3BAA, #008B8B); transform: scale(1.08); }
.site-footer:not(.foot-light) .foot-social a:hover .ic, .site-footer:not(.foot-light) .foot-social a:focus-visible .ic { background: linear-gradient(135deg, #A88BE0, #3DC2C2); }
.foot-social a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .foot-social .ic { transition: none; } .foot-social a:hover .ic { transform: none; } }
main > section:last-child:not(:has(.contact-card)):not(.cta-band) { padding-bottom: 3rem; }

/* PHP site additions */
.step-1 { --c: var(--s1); } .step-2 { --c: var(--s2); } .step-3 { --c: var(--s3); }
.step-4 { --c: var(--s4); } .step-5 { --c: var(--s5); } .step-6 { --c: var(--s6); }
.step:not([class*="step-"]) { --c: var(--moonlight); }
.tint-gradient { --tint: var(--gradient); } .tint-s3 { --tint: var(--s3); } .tint-s6 { --tint: var(--s6); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* page headings: a Moonlight block like the homepage hero */
.page-intro + section:has(.contact-card) { clip-path: none; margin-top: calc(-1 * var(--seam)); }
.page-intro { position: relative; z-index: 1; background: var(--moonlight); color: var(--vellum); clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--seam)), 0 100%); padding-bottom: var(--seam); }
.page-intro .wrap { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 4vw, 3rem); display: grid; gap: 1.25rem; max-width: var(--wrap); }
.page-intro h1 { font-size: var(--step-4); line-height: 0.95; max-width: 60rem; color: var(--vellum); }
.page-intro p { font-size: var(--step-1); color: #E3D9F1; max-width: 40rem; line-height: 1.5; }
.page-intro .label { color: #E3D9F1; }
.prose .wrap { padding-block: 3rem; }
.prose .wrap > * { max-width: 40rem; }
.prose h2 { font-size: var(--step-3); margin-bottom: 1rem; }
.prose p { color: var(--ink-soft); font-size: 1.0625rem; margin-bottom: 1rem; }
.split .wrap { padding-block: 4rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
.split img { width: 100%; height: auto; display: block; }
.split .copy { display: grid; gap: 1rem; min-width: 0; }
.split h2 { font-size: var(--step-3); }
.split p { color: var(--ink-soft); font-size: 1.0625rem; }
@media (max-width: 860px) { .split .wrap { grid-template-columns: minmax(0, 1fr); } }
/* call to action: a Borealis band, slanted at the top */
.cta-band { background: var(--borealis); color: var(--nighttime); clip-path: polygon(0 var(--seam), 100% 0, 100% 100%, 0 100%); padding-top: var(--seam); margin-top: clamp(1rem, 4vw, 3rem); }
.cta-band .wrap { padding-block: clamp(2.5rem, 6vw, 4.5rem); display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; }
.cta-band h2 { font-size: var(--step-3); max-width: 44rem; color: var(--nighttime); }
.error-page .wrap { padding-block: 6rem; display: grid; gap: 1.25rem; justify-items: start; }
.error-page h1 { font-size: var(--step-4); }
.error-page p { color: var(--ink-soft); font-size: var(--step-1); }

/* app promo pages (work/...) */
.app-hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 3rem; align-items: center; padding-block: 3.5rem 3rem; }
.app-hero-copy { display: grid; gap: 1.25rem; min-width: 0; justify-items: start; }
.app-hero h1 { font-size: var(--step-4); }
.app-hero .lede { font-size: var(--step-1); color: var(--ink-soft); max-width: 36rem; line-height: 1.5; }
.app-back { text-decoration: none; }
.app-back:hover { color: var(--ink); }
.app-phone { margin: 0; display: grid; gap: 0.75rem; justify-items: center; min-width: 0; }
.app-phone figcaption, .app-shots figcaption, .app-wide figcaption { font: 400 0.75rem/1.4 var(--mono); color: var(--ink-faint); text-align: center; }
.app-video { display: block; width: 100%; max-width: 19rem; aspect-ratio: 9 / 16; height: auto; object-fit: cover; background: #14131C; border-radius: 28px; border: 8px solid var(--nighttime); }
.app-how { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.app-how-copy { display: grid; gap: 2rem; min-width: 0; }
.app-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; counter-reset: s; }
.app-steps li { display: grid; gap: 0.35rem; padding-left: 1.25rem; border-left: 3px solid var(--c); counter-increment: s; }
.app-steps h3 { font-size: var(--step-1); }
.app-steps h3::before { content: "0" counter(s) "  "; font: 500 0.8125rem/1 var(--mono); color: var(--ink-faint); white-space: pre; }
.app-steps p { color: var(--ink-soft); font-size: 0.9375rem; }
.app-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; min-width: 0; }
.app-shots figure:last-child { margin-top: 3rem; }
.app-shots figure, .app-wide { margin: 0; display: grid; gap: 0.6rem; min-width: 0; }
.app-shots img, .app-wide img { width: 100%; height: auto; display: block; background: #14131C; }
.app-shots img { border-radius: 22px; }
.app-wide img { border-bottom: 10px solid var(--borealis); }
.app-film video { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #14131C; border-bottom: 10px solid var(--borealis); }
.app-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.app-feature { background: var(--raised); padding: 1.75rem; display: grid; gap: 0.5rem; align-content: start; min-width: 0; }
.app-feature:last-child:nth-child(odd) { grid-column: 1 / -1; }
.app-feature h3 { font-size: var(--step-1); }
.app-feature p { color: var(--ink-soft); font-size: 0.9375rem; max-width: 34rem; }
.app-start { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.app-start > div { display: grid; gap: 0.5rem; align-content: start; padding-top: 1rem; border-top: 1px solid var(--line); min-width: 0; }
.app-start h3 { font-size: var(--step-1); }
.app-start p { color: var(--ink-soft); font-size: 0.9375rem; }
.app-free { display: grid; gap: 0.6rem; padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--moonlight); color: var(--vellum); clip-path: polygon(0 0, calc(100% - 3rem) 0, 100% 3rem, 100% 100%, 0 100%); }
.app-free .label { color: #E3D9F1; }
.app-free p { font-size: var(--step-1); line-height: 1.5; max-width: 44rem; }
.app-cta-copy { display: grid; gap: 0.75rem; }
.app-cta-copy p { color: var(--nighttime); font-size: 1.0625rem; max-width: 36rem; }
/* work page: featured app */
.app-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 0; text-decoration: none; color: var(--ink-colour); background: var(--vellum); overflow: hidden; clip-path: polygon(0 0, calc(100% - 4rem) 0, 100% 4rem, 100% 100%, 0 100%); transition: transform .15s ease; }
.app-card:hover { transform: translateX(4px); }
.app-card-copy p { color: #4A4658 !important; }
.app-card-shot { background: #14131C; min-width: 0; }
.app-card-shot img { width: 100%; height: 100%; max-height: 22rem; object-fit: cover; object-position: top left; display: block; }
.app-card-copy { padding: clamp(1.5rem, 4vw, 2.5rem); display: grid; gap: 0.9rem; align-content: center; min-width: 0; }
.app-card-copy h2 { font-size: var(--step-3); }
.app-card-copy p { color: var(--ink-soft); }
.app-card-more { font: 600 1rem/1 var(--body); color: var(--moonlight); }
.app-card + .app-card { margin-top: 10px; }

/* App showcase: a words panel and an app screenshot, joined by a slanted brand-colour seam.
   Everything is set with variables so the editor's menus (classes on .appshow, the picture and the line) can change
   the panel colour, seam colour, slant, sides, split, height and width without touching the words.
   The panel keeps its colours in both themes, like the colour blocks. */
section.block.appshow-band .wrap { padding-block: clamp(1rem, 2.5vw, 1.75rem); display: block; }
.appshow {
  --as-bg: var(--nighttime); --as-fg: #EDE6D6; --as-soft: #C9C2D3; --as-faint: #9A95A8;
  --as-seam: var(--moonlight); --as-backdrop: var(--nighttime);
  --as-slant: clamp(2.5rem, 7vw, 6.5rem); --as-seam-w: clamp(1.1rem, 3vw, 2.6rem);
  --as-slant-m: 2.5rem; --as-seam-m: 0.9rem;
  --as-split: 52%; --as-height: 0px;
  --ink: var(--as-fg); --ink-soft: var(--as-soft); --ink-faint: var(--as-faint);
  --accent-text: var(--as-fg); --accent-text-2: var(--as-fg); --ground: var(--as-bg);
  --line: color-mix(in srgb, var(--as-fg) 28%, transparent); --raised: #1C1A2B;
  --hx-text-1: #9A79BA; --hx-text-2: #8E7EB4; --hx-text-3: #7F82AD; --hx-text-4: #6C88A5; --hx-text-5: #528E9C; --hx-text-6: #1A9593;
  --hx-hl-mix: 50%; --title-from: #A88BE0; --title-to: #3DC2C2;
  color-scheme: dark;
  position: relative; display: grid; grid-template-columns: var(--as-split) minmax(0, 1fr);
  min-height: var(--as-height); background: var(--as-bg); color: var(--as-fg); overflow: hidden;
}
/* panel colours */
.appshow.appshow-p-ink { --as-bg: #1C1A2B; }
.appshow.appshow-p-moonlight { --as-bg: var(--moonlight); --as-soft: #E3D9F1; --as-faint: #E3D9F1; --title-from: #EDE6D6; --title-to: #F6F3EE; }
.appshow.appshow-p-shade { --as-bg: var(--s3); --as-fg: #F6F3EE; --as-soft: #F6F3EE; --as-faint: #F6F3EE; --title-from: #EDE6D6; --title-to: #F6F3EE; }
.appshow:is(.appshow-p-borealis, .appshow-p-vellum, .appshow-p-papier) {
  color-scheme: light; --raised: #EDE6D6;
  --hx-text-1: #6C3BAA; --hx-text-2: #644FA5; --hx-text-3: #5A609F; --hx-text-4: #486A91; --hx-text-5: #317082; --hx-text-6: #00706F;
  --hx-hl-mix: 35%; --title-from: #6C3BAA; --title-to: #008B8B;
}
.appshow.appshow-p-borealis { --as-bg: var(--borealis); --as-fg: #14131C; --as-soft: #14131C; --as-faint: #14131C; }
.appshow.appshow-p-vellum { --as-bg: var(--vellum); --as-fg: #1C1A2B; --as-soft: #4A4658; --as-faint: #4A4658; }
.appshow.appshow-p-papier { --as-bg: var(--papier); --as-fg: #1C1A2B; --as-soft: #4A4658; --as-faint: #4A4658; }
/* seam colours */
.appshow.appshow-seam-2 { --as-seam: var(--s2); } .appshow.appshow-seam-3 { --as-seam: var(--s3); }
.appshow.appshow-seam-4 { --as-seam: var(--s4); } .appshow.appshow-seam-5 { --as-seam: var(--s5); }
.appshow.appshow-seam-borealis { --as-seam: var(--borealis); }
.appshow.appshow-seam-gradient { --as-seam: linear-gradient(180deg, var(--moonlight), var(--borealis)); }
.appshow.appshow-seam-shades { --as-seam: linear-gradient(180deg, var(--s1) 0 16.66%, var(--s2) 0 33.33%, var(--s3) 0 50%, var(--s4) 0 66.66%, var(--s5) 0 83.33%, var(--s6) 0); }
.appshow.appshow-seam-vellum { --as-seam: var(--vellum); }
.appshow.appshow-seam-nighttime { --as-seam: var(--nighttime); }
.appshow.appshow-seam-none { --as-seam-w: 0px; --as-seam-m: 0px; }
/* slant, split, height, width */
.appshow.appshow-steep { --as-slant: clamp(4rem, 12vw, 10rem); --as-slant-m: 4rem; }
.appshow.appshow-straight { --as-slant: 0px; --as-slant-m: 0px; }
.appshow.appshow-more-words { --as-split: 60%; }
.appshow.appshow-more-shot { --as-split: 42%; }
.appshow.appshow-short { --as-height: clamp(16rem, 30vw, 24rem); }
.appshow.appshow-standard { --as-height: clamp(22rem, 42vw, 33rem); }
.appshow.appshow-tall { --as-height: clamp(28rem, 54vw, 44rem); }
.appshow.appshow-full { margin-inline: calc(50% - 50vw); }

/* the words */
.appshow-copy {
  position: relative; z-index: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; container-type: inline-size;
  padding: clamp(1.75rem, 4.5vw, 3.75rem); padding-right: calc(var(--as-slant) * 0.5 + clamp(1.25rem, 3vw, 2.5rem));
}
.appshow .appshow-logo {
  display: flex; align-items: center; gap: 0.14em; margin: 0 0 clamp(1.75rem, 7cqi, 3rem);
  font: 500 clamp(1.3rem, 6cqi, 2.4rem)/1 var(--display); letter-spacing: 0.14em; color: var(--ink);
}
.appshow .appshow-logo .ic { font-size: 1.5em; vertical-align: middle; margin-right: 0.12em; }
.appshow .appshow-label { margin: 0 0 0.6rem; font: 500 clamp(0.8rem, 2.9cqi, 1.1rem)/1.2 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.appshow .appshow-name { margin: 0; font-size: clamp(2.2rem, 12.5cqi, 5.25rem); line-height: 1; color: var(--ink); overflow-wrap: anywhere; }
.appshow .appshow-tagline { margin: clamp(0.75rem, 2.5cqi, 1.2rem) 0 clamp(1.4rem, 5cqi, 2.25rem); max-width: 34ch; font-size: clamp(1.1rem, 4.6cqi, 1.75rem); line-height: 1.3; color: var(--ink); }
.appshow .appshow-rule { width: clamp(4rem, 8vw, 6rem); height: 4px; margin: 0 0 clamp(0.9rem, 2vw, 1.25rem); background: var(--as-rule, linear-gradient(90deg, var(--moonlight), var(--borealis))); }
.appshow .appshow-rule.appshow-rule-shades { --as-rule: linear-gradient(90deg, var(--s1) 0 16.66%, var(--s2) 0 33.33%, var(--s3) 0 50%, var(--s4) 0 66.66%, var(--s5) 0 83.33%, var(--s6) 0); }
.appshow .appshow-rule.appshow-rule-moonlight { --as-rule: var(--moonlight); }
.appshow .appshow-rule.appshow-rule-borealis { --as-rule: var(--borealis); }
.appshow .appshow-rule.appshow-rule-vellum { --as-rule: var(--vellum); }
.appshow .appshow-rule.appshow-rule-ink { --as-rule: var(--ink); }
/* where the words sit in the panel: together in the middle (standard), top, bottom, or spread with the logo at the
   top and the web address at the bottom */
.appshow.appshow-pos-top > .appshow-copy { justify-content: flex-start; }
.appshow.appshow-pos-bottom > .appshow-copy { justify-content: flex-end; }
.appshow.appshow-pos-spread .appshow-logo { margin-bottom: auto; padding-bottom: clamp(1.75rem, 7cqi, 3rem); }
.appshow.appshow-pos-spread .appshow-rule { margin-top: auto; }
.appshow .appshow-url { margin: 0; font: 400 clamp(0.72rem, 4.1cqi, 1.25rem)/1.35 var(--mono); letter-spacing: 0.03em; color: var(--ink-soft); overflow-wrap: anywhere; }
.appshow .appshow-url a { color: inherit; text-decoration: none; }
.appshow .appshow-url a:hover { text-decoration: underline; text-decoration-color: var(--borealis); text-underline-offset: 5px; }

/* the picture side: cut on the slant, with the seam laid along the cut */
.appshow-shot {
  position: relative; min-width: 0; min-height: 12rem; margin-left: calc(-1 * var(--as-slant)); background: var(--as-backdrop);
  clip-path: polygon(var(--as-slant) 0, 100% 0, 100% 100%, 0 100%);
}
.appshow-shot::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: var(--as-seam);
  clip-path: polygon(var(--as-slant) 0, calc(var(--as-slant) + var(--as-seam-w)) 0, var(--as-seam-w) 100%, 0 100%);
}
/* a linked screenshot is wrapped in <a class="hx-img-link">, so the link fills the side too */
.appshow-shot > .hx-img-link { position: absolute; inset: 0; display: block; }
.appshow-shot > img, .appshow-shot > .hx-img-link > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: left top; display: block; background: var(--as-backdrop); }
.appshow-img.appshow-fit-top { object-position: center top; }
.appshow-img.appshow-fit-center { object-position: center; }
.appshow-img.appshow-fit-whole { object-fit: contain; object-position: center; padding: clamp(1rem, 3vw, 2rem); padding-left: calc(var(--as-slant) + var(--as-seam-w) + clamp(0.5rem, 2vw, 1.5rem)); }
.appshow-img.appshow-bd-ink { background: #1C1A2B; }
.appshow-img.appshow-bd-moonlight { background: var(--moonlight); }
.appshow-img.appshow-bd-borealis { background: var(--borealis); }
.appshow-img.appshow-bd-vellum { background: var(--vellum); }
.appshow-img.appshow-bd-papier { background: var(--papier); }

/* picture on the left: the cut leans the other way */
.appshow.appshow-flip { grid-template-columns: minmax(0, 1fr) var(--as-split); }
.appshow.appshow-flip > .appshow-copy { order: 2; padding-right: clamp(1.75rem, 4.5vw, 3.75rem); padding-left: calc(var(--as-slant) * 0.5 + clamp(1.25rem, 3vw, 2.5rem)); }
.appshow.appshow-flip > .appshow-shot { order: 1; margin-left: 0; margin-right: calc(-1 * var(--as-slant)); clip-path: polygon(0 0, 100% 0, calc(100% - var(--as-slant)) 100%, 0 100%); }
.appshow.appshow-flip > .appshow-shot::after { clip-path: polygon(calc(100% - var(--as-seam-w)) 0, 100% 0, calc(100% - var(--as-slant)) 100%, calc(100% - var(--as-slant) - var(--as-seam-w)) 100%); }
.appshow.appshow-flip .appshow-img.appshow-fit-whole { padding-left: clamp(1rem, 3vw, 2rem); padding-right: calc(var(--as-slant) + var(--as-seam-w) + clamp(0.5rem, 2vw, 1.5rem)); }

/* narrow spaces (phones, or a showcase dropped into a column): words on top, the picture below under a slanted seam.
   The showcase's parent is the measuring box, so it stacks whenever it's narrow, not only on small screens. */
:has(> .appshow) { container: appshow / inline-size; }
@container appshow (max-width: 640px) {
  .appshow, .appshow.appshow-flip { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .appshow .appshow-copy, .appshow.appshow-flip > .appshow-copy { order: 1; padding: 1.75rem 1.5rem calc(var(--as-slant-m) + 1.5rem); }
  .appshow .appshow-shot, .appshow.appshow-flip > .appshow-shot {
    order: 2; margin: calc(-1 * var(--as-slant-m)) 0 0; min-height: clamp(12rem, 62cqi, 22rem);
    clip-path: polygon(0 var(--as-slant-m), 100% 0, 100% 100%, 0 100%);
  }
  .appshow .appshow-shot::after, .appshow.appshow-flip > .appshow-shot::after {
    clip-path: polygon(0 var(--as-slant-m), 100% 0, 100% var(--as-seam-m), 0 calc(var(--as-slant-m) + var(--as-seam-m)));
  }
  .appshow .appshow-img.appshow-fit-whole, .appshow.appshow-flip .appshow-img.appshow-fit-whole { padding: calc(var(--as-slant-m) + var(--as-seam-m) + 0.75rem) 1rem 1rem; }
}
.app-phone-shot { display: block; width: 100%; max-width: 19rem; height: auto; background: #14131C; border-radius: 28px; border: 8px solid var(--nighttime); }
.app-tall.app-tall-wide img { max-width: 34rem; border-radius: 14px; }
@media (max-width: 960px) { .app-start { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .app-hero .wrap, .app-how, .app-card { grid-template-columns: minmax(0, 1fr); }
  .app-hero .wrap { gap: 2.5rem; padding-block: 2.5rem; }
  .app-video, .app-phone-shot { max-width: 16rem; }
}
@media (max-width: 560px) { .app-features, .app-start { grid-template-columns: minmax(0, 1fr); } .app-feature { padding: 1.5rem; } .app-shots figure:last-child { margin-top: 1.5rem; } }
@media (min-width: 1100px) { .app-why .promises { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* column sections (built in the editor: pick 1 to 4 columns, or a wide + narrow split) */
.columns .wrap { padding-block: 4rem; display: grid; gap: 2rem; }
.cols-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem 2.5rem; align-items: start; }
.cols-4 { column-gap: 1.5rem; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.cols-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.cols-middle { align-items: center; }
.col { display: grid; gap: 0.875rem; align-content: start; min-width: 0; }
.col h2 { font-size: var(--step-3); }
.col h3 { font-size: var(--step-2); }
.col p { color: var(--ink-soft); font-size: 1.0625rem; }
.col img { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.cols-cards .col { background: var(--raised); padding: 1.75rem; }
.cols-cards.cols-4 .col { padding: 1.25rem; }
@media (max-width: 860px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-3, .cols-2-1, .cols-1-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .cols-2, .cols-4 { grid-template-columns: minmax(0, 1fr); } }
.app-then { font: 600 var(--step-1)/1.3 var(--display); }
.app-note { color: var(--ink-soft); padding-left: 1.25rem; border-left: 3px solid var(--line); }
.app-demo { display: grid; gap: 1.75rem; }
.app-demo-frame { background: #0c1013; border-bottom: 10px solid var(--borealis); min-width: 0; }
.app-demo-frame iframe { display: block; width: 100%; height: 1150px; border: 0; }
.app-demo-open { font: 400 0.8125rem/1.4 var(--mono); }
.app-demo-open a { color: var(--accent-text-2); }
.app-yours { align-items: start; }
.app-yours .section-head { grid-template-columns: minmax(0, 1fr); }
.app-hero h1.app-long { font-size: var(--step-3); }
.app-features-list { grid-template-columns: minmax(0, 1fr); }
.app-tall { margin: 0; display: grid; gap: 0.6rem; justify-items: center; min-width: 0; position: sticky; top: 6rem; }
.app-tall img { width: 100%; max-width: 20rem; height: auto; display: block; background: #14131C; border-radius: 22px; }
.app-tall figcaption { font: 400 0.75rem/1.4 var(--mono); color: var(--ink-faint); text-align: center; }
@media (max-width: 860px) { .app-tall { position: static; } .app-tall img { max-width: 16rem; } }
/* Slotly page (work/slotly) */
.app-tag-logo { display: inline-flex; align-items: center; gap: 0.6rem; }
.app-tag-logo img { width: 28px; height: 28px; display: block; }
.app-demo-shot { display: block; background: #14131C; border-bottom: 10px solid var(--borealis); transition: transform .15s ease; }
.app-demo-shot:hover { transform: translateY(-3px); }
.app-demo-shot img { width: 100%; height: auto; display: block; }
.app-demo .hero-actions .app-demo-open { color: var(--ink-faint); }
/* Fezziwig page (work/fezziwig): a landscape register screenshot in the hero, and a demo frame that fits the screen
   (the app scrolls inside it, so the frame doesn't need to grow with it) */
.app-hero .wrap:has(> .app-tablet) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.app-tablet { margin: 0; display: grid; gap: 0.75rem; justify-items: center; min-width: 0; }
.app-tablet figcaption { font: 400 0.75rem/1.4 var(--mono); color: var(--ink-faint); text-align: center; }
.app-tablet-shot { display: block; width: 100%; max-width: 40rem; height: auto; background: #14131C; border-radius: 18px; border: 8px solid var(--nighttime); }
/* Landscape promo video on an app page (Fezziwig): full width of the page, under its own heading. */
.app-tour-film { margin: 2rem 0 0; display: grid; gap: 0.75rem; justify-items: center; min-width: 0; }
.app-tour-film figcaption { font: 400 0.75rem/1.4 var(--mono); color: var(--ink-faint); text-align: center; }
.app-tour-video { display: block; width: 100%; max-width: 64rem; aspect-ratio: 16 / 9; height: auto; background: #14131C; border-radius: 18px; border: 8px solid var(--nighttime); }
@media (max-width: 600px) { .app-tour-video { border-width: 5px; border-radius: 12px; } }
.app-demo-frame.app-demo-fit iframe { height: min(860px, calc(100svh - 6rem)); min-height: 560px; }
/* the demo's sign-in PINs, above the demo */
.app-demo-pins { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.app-demo-pins .label { margin: 0; }
.app-demo-pins ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.app-demo-pins li { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.55rem 1rem; border: 2px solid var(--borealis); border-radius: var(--radius); }
.app-demo-pins b { font: 600 1.375rem/1 var(--mono); letter-spacing: 0.08em; color: var(--ink); }
.app-demo-pins span { color: var(--ink-soft); font-size: 0.9375rem; }
@media (max-width: 600px) { .app-demo-pins ul { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; } .app-demo-pins li { flex-direction: column; align-items: center; gap: 0.3rem; padding: 0.55rem 0.25rem; } }
@media (max-width: 860px) { .app-hero .wrap:has(> .app-tablet) { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1100px) { .app-why .promises.app-for { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Hex colours: the six sides of the logo's hexagon (--s1 Moonlight round to --s6 Borealis), for words and whole items.
   In the page editor: highlight words and pick from the Colour or Highlight menu, or select an item and use
   Colour / Background on the bar above the page.
   hx-c-N  text colour. Lifted on dark and deepened on light where needed, so every shade reads at 5:1 or better.
   hx-c-vellum, hx-c-white  light text for the coloured blocks, such as Borealis (Vellum 3.3:1, white 4.2:1 there,
           so best for headings and large or bold words).
   hx-hl-N highlighter behind words: the shade mixed into the page colour, with the main text colour on top.
   hx-bg-N solid shade behind a whole item, with white text (Nighttime on Hex 6, as on the Borealis bands).
   The :not(#hx) lets these win over the colour blocks' own text colours (such as the contact form's heading). */
:root {
  --hx-text-1: #9A79BA; --hx-text-2: #8E7EB4; --hx-text-3: #7F82AD;
  --hx-text-4: #6C88A5; --hx-text-5: #528E9C; --hx-text-6: #1A9593;
  --hx-hl-mix: 50%;
}
:root[data-theme="light"] {
  --hx-text-1: #6C3BAA; --hx-text-2: #644FA5; --hx-text-3: #5A609F;
  --hx-text-4: #486A91; --hx-text-5: #317082; --hx-text-6: #00706F;
  --hx-hl-mix: 35%;
}
.hx-c-1:not(#hx) { color: var(--hx-text-1); }
.hx-c-2:not(#hx) { color: var(--hx-text-2); }
.hx-c-3:not(#hx) { color: var(--hx-text-3); }
.hx-c-4:not(#hx) { color: var(--hx-text-4); }
.hx-c-5:not(#hx) { color: var(--hx-text-5); }
.hx-c-6:not(#hx) { color: var(--hx-text-6); }
/* light text for coloured backgrounds (Borealis, Moonlight, the hex shades): the same in both themes */
.hx-c-vellum:not(#hx) { color: #EDE6D6; }
.hx-c-white:not(#hx) { color: #FFFFFF; }
.hx-hl-1 { --hx-hl: var(--s1); } .hx-hl-2 { --hx-hl: var(--s2); } .hx-hl-3 { --hx-hl: var(--s3); }
.hx-hl-4 { --hx-hl: var(--s4); } .hx-hl-5 { --hx-hl: var(--s5); } .hx-hl-6 { --hx-hl: var(--s6); }
:is(.hx-hl-1, .hx-hl-2, .hx-hl-3, .hx-hl-4, .hx-hl-5, .hx-hl-6):not(#hx) {
  background: color-mix(in srgb, var(--hx-hl) var(--hx-hl-mix), var(--ground));
  color: var(--ink);
  padding: 0 0.15em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hx-bg-1 { --hx-bg: var(--s1); } .hx-bg-2 { --hx-bg: var(--s2); } .hx-bg-3 { --hx-bg: var(--s3); }
.hx-bg-4 { --hx-bg: var(--s4); } .hx-bg-5 { --hx-bg: var(--s5); } .hx-bg-6 { --hx-bg: var(--s6); }
:is(.hx-bg-1, .hx-bg-2, .hx-bg-3, .hx-bg-4, .hx-bg-5, .hx-bg-6):not(#hx) {
  /* text inside follows the box, including headings and links that use the theme colours */
  --ink: #FFFFFF; --ink-soft: #FFFFFF; --ink-faint: #F6F3EE; --accent-text: #FFFFFF; --accent-text-2: #FFFFFF; --tone-soft: #FFFFFF;
  background: var(--hx-bg);
  color: var(--ink);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hx-bg-6:not(#hx) { --ink: #14131C; --ink-soft: #14131C; --ink-faint: #14131C; --accent-text: #14131C; --accent-text-2: #14131C; --tone-soft: #14131C; }
:is(.hx-bg-1, .hx-bg-2, .hx-bg-3, .hx-bg-4, .hx-bg-5, .hx-bg-6) :is(h1, h2, h3, h4, p, li) { color: var(--ink); }
span:is(.hx-bg-1, .hx-bg-2, .hx-bg-3, .hx-bg-4, .hx-bg-5, .hx-bg-6) { padding: 0 0.2em; }
:is(.hx-bg-1, .hx-bg-2, .hx-bg-3, .hx-bg-4, .hx-bg-5, .hx-bg-6) > * + * { margin-top: 0.5em; }
:is(.hx-bg-1, .hx-bg-2, .hx-bg-3, .hx-bg-4, .hx-bg-5, .hx-bg-6):not(span, a, section, .band) { padding: 1.1em 1.35em; }

/* Colour blocks keep their text colours in both themes.
   A block whose background stays the same in light and dark (the tone-* backgrounds, the hero, the coloured tiles,
   the Borealis bands, the footer, hx-bg-N) pins the theme colours for everything inside it, so headings, labels,
   links, text styles, hex colours and widgets read the same whichever theme the visitor uses.
   Blocks that follow the theme (Standard sections, plain cards) are left alone. */
:is(.tone-moonlight, .tone-borealis, .tone-shade, .tone-night, .tone-vellum,
    .service:nth-child(5n+1), .service:nth-child(5n+2), .service:nth-child(5n+3), .service:nth-child(5n+4),
    .case, .promises div) {
  --ink: var(--tone-fg); --ink-soft: var(--tone-soft); --ink-faint: var(--tone-soft);
  --accent-text: var(--tone-fg); --accent-text-2: var(--tone-fg);
  --ground: var(--tone-bg);
  --line: color-mix(in srgb, var(--tone-fg) 28%, transparent);
}
/* the same, for blocks with their colours written in */
:is(.hero, .page-intro, .app-free) {
  --ink: #EDE6D6; --ink-soft: #E3D9F1; --ink-faint: #E3D9F1; --accent-text: #EDE6D6; --accent-text-2: #EDE6D6;
  --ground: var(--moonlight); --line: color-mix(in srgb, #EDE6D6 28%, transparent);
}
section.block:has(> .wrap > .steps) {
  --ink: #EDE6D6; --ink-soft: #C9C2D3; --ink-faint: #C9C2D3; --accent-text: #EDE6D6; --accent-text-2: #EDE6D6;
  --ground: var(--deep); --line: color-mix(in srgb, #EDE6D6 28%, transparent);
}
.site-footer {
  --ink: var(--vellum); --ink-soft: var(--vellum); --ink-faint: var(--vellum); --accent-text: var(--vellum); --accent-text-2: var(--vellum);
  --ground: #5D5B65; --line: color-mix(in srgb, var(--vellum) 28%, transparent);
}
.site-footer.foot-light { --ink: #1C1A2B; --ink-soft: #1C1A2B; --ink-faint: #1C1A2B; --accent-text: #1C1A2B; --accent-text-2: #1C1A2B; }
:is(.cta-band, section:has(.contact-card)) {
  --ink: #14131C; --ink-soft: #14131C; --ink-faint: #14131C; --accent-text: #14131C; --accent-text-2: #14131C;
  --ground: var(--borealis); --line: color-mix(in srgb, #14131C 28%, transparent);
}
.app-card {
  --ink: #1C1A2B; --ink-soft: #4A4658; --ink-faint: #4A4658; --accent-text: #5B2F96; --accent-text-2: #00706F;
  --ground: var(--vellum); --line: #D9D1C1;
}
:is(.hx-bg-1, .hx-bg-2, .hx-bg-3, .hx-bg-4, .hx-bg-5, .hx-bg-6) { --ground: var(--hx-bg); --line: color-mix(in srgb, var(--ink) 28%, transparent); }
/* dark backgrounds: the dark theme's raised panels, hex colours and title colours */
:is(.tone-moonlight, .tone-shade, .tone-night, .service:nth-child(5n+2), .service:nth-child(5n+3),
    .case:nth-child(3n+2), .promises div:nth-child(4n+1), .promises div:nth-child(4n+3),
    .hero, .page-intro, .app-free, section.block:has(> .wrap > .steps), .site-footer:not(.foot-light),
    .hx-bg-1, .hx-bg-2, .hx-bg-3, .hx-bg-4, .hx-bg-5) {
  color-scheme: dark;
  --raised: #1C1A2B;
  --hx-text-1: #9A79BA; --hx-text-2: #8E7EB4; --hx-text-3: #7F82AD;
  --hx-text-4: #6C88A5; --hx-text-5: #528E9C; --hx-text-6: #1A9593;
  --hx-hl-mix: 50%;
  --title-from: #A88BE0; --title-to: #3DC2C2;
}
/* on a coloured (not near-black) block, the gradient title style uses the block's own text colour family */
:is(.hero, .page-intro, .tone-moonlight, .tone-shade, .service:nth-child(5n+2), .service:nth-child(5n+3), .case:nth-child(3n+2),
    .promises div:nth-child(4n+1), .promises div:nth-child(4n+3), .app-free,
    .hx-bg-1, .hx-bg-2, .hx-bg-3, .hx-bg-4, .hx-bg-5) { --title-from: #EDE6D6; --title-to: #F6F3EE; }
/* light backgrounds: the light theme's */
:is(.tone-borealis, .tone-vellum, .service:nth-child(5n+1), .service:nth-child(5n+4),
    .case:nth-child(3n+1), .case:nth-child(3n), .promises div:nth-child(4n+2), .promises div:nth-child(4n),
    .cta-band, section:has(.contact-card), .site-footer.foot-light, .app-card, .hx-bg-6) {
  color-scheme: light;
  --raised: #EDE6D6;
  --hx-text-1: #6C3BAA; --hx-text-2: #644FA5; --hx-text-3: #5A609F;
  --hx-text-4: #486A91; --hx-text-5: #317082; --hx-text-6: #00706F;
  --hx-hl-mix: 35%;
  --title-from: #6C3BAA; --title-to: #008B8B;
}
.app-card-copy h3 { font-size: var(--step-3); margin: 0; }
.work-more { margin-top: 1.5rem; }

/* ---- Compact spacing (2026-11-14): Taier asked for the smallest comfortable margins on every section and
   component, site-wide. Each rule repeats its original selector with the tighter values; the "main" prefix lets
   the widget rules outrank assets/page-editor.css (installed from the page editor, loaded after this file). ---- */
.hero .wrap { padding-block: clamp(2rem, 4.5vw, 4rem) clamp(1.5rem, 3vw, 2.75rem); }
section.block .wrap { padding-block: clamp(2rem, 4vw, 3.5rem); gap: clamp(1.25rem, 2.5vw, 2rem); }
.page-intro .wrap { padding-block: clamp(2rem, 4.5vw, 3.5rem) clamp(1rem, 2.5vw, 2rem); gap: 1rem; }
.prose .wrap { padding-block: 2rem; }
.split .wrap { padding-block: 2.5rem; gap: 2rem; }
.columns .wrap { padding-block: 2.5rem; gap: 1.25rem; }
.cta-band { margin-top: clamp(0.5rem, 2vw, 1.5rem); }
.cta-band .wrap { padding-block: clamp(1.75rem, 4vw, 3rem); gap: 1rem 2rem; }
.contact-inner { padding-block: clamp(2rem, 4vw, 3.5rem); gap: clamp(1.25rem, 3vw, 2.5rem); }
.error-page .wrap { padding-block: 3.5rem; }
.app-hero .wrap { gap: 2rem; padding-block: 2.5rem 2rem; }
.app-shots figure:last-child { margin-top: 1.5rem; }
.promises div { min-height: 11rem; padding: 1.5rem; }
section.block.appshow-band .wrap { padding-block: clamp(0.5rem, 1.5vw, 1rem); }
@media (max-width: 860px) {
  .hero .wrap { padding-block: 1.75rem 1.25rem; }
  .app-hero .wrap { gap: 1.75rem; padding-block: 1.75rem; }
}
@media (max-width: 460px) { .promises div { min-height: 0; } }
main .hxw-qa { margin-bottom: 1rem; }
main .hxw-qa-q { margin-bottom: 0.5rem; }
main :is(.hxw-cards, .hxw-callout, ul.hxw-list, ul.hxw-kit, ul.hxw-links, .hxw-table, .hxw-hexes) { margin-bottom: 1rem; }
main .hxw-warning { margin-bottom: 1.25rem; }
main .hxw-toc { margin-bottom: 1.25rem; }
main .hxw-buttons { margin: 1.25rem 0 0.75rem; }
main hr.hxw-divider, main blockquote.hxw-quote { margin-block: 1.25rem; }
main ul.hxw-timeline { margin: 0.75rem 0 1rem; }
/* In a section's grid the gap already spaces items, so a widget's own bottom margin would double it. */
section.block .wrap > :is(.hxw-qa, .hxw-cards, .hxw-callout, .hxw-warning, .hxw-toc, ul.hxw-list, ul.hxw-kit, ul.hxw-links, .hxw-table, .hxw-hexes) { margin-bottom: 0; }
/* Keep the side margin on narrow screens: a section given "padding: 0" in the editor (an #id rule) would
   otherwise put its words against the screen edge on phones. Only left/right; its top/bottom stay as set. */
main .band:not(#hx) { padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
/* Keep every section's content column centred. Setting a section's inner box to "margin: 0" in the editor
   (an #id rule) also wiped out its auto side margins, so that one section sat against the left edge while
   the others stayed centred. Only left/right are forced; a top/bottom margin set in the editor still applies. */
.band > .wrap:not(#hx) { margin-left: auto; margin-right: auto; }
