/*!
 * foundation26 – Typography
 * Fonts, type scale, headings, text and code; loaded with the page CSS, in the RTE and in the Quick Setup preview.
 * © 2026 Atelier 26 AG – part of digiscapes®. All rights reserved. digiscapes® and brandscapes® are registered trademarks.
 */

/* === Font and Size Tokens === */
/* --bs-font-feature-settings comes from the font's own fonts.css, else normal */
:root {

--bs-font-sans-serif: var(--settings-font-sans-serif, 'Roboto'), 'Roboto', system-ui, -apple-system, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
--bs-font-serif: var(--settings-font-serif, Georgia), Georgia, Times, "Times New Roman", serif;
--bs-font-monospace: var(--settings-font-monospace, SFMono-Regular), SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--bs-font-heading: var(--settings-headings-font-family, var(--bs-font-sans-serif));

--bs-body-font-size:        calc(var(--settings-body-font-size)        * var(--bs-font-scale));
--bs-font-size-large:       calc(var(--settings-font-size-large)       * var(--bs-font-scale));
--bs-font-size-medium:      calc(var(--settings-font-size-medium)      * var(--bs-font-scale));
--bs-font-size-normal:      calc(var(--settings-font-size-normal)      * var(--bs-font-scale));
--bs-font-size-small:       calc(var(--settings-font-size-small)       * var(--bs-font-scale));
--bs-line-height-small: var(--settings-line-height-small, 1.45);
--bs-font-size-extra-small: calc(var(--settings-font-size-extra-small) * var(--bs-font-scale));
--bs-line-height-extra-small: var(--settings-line-height-extra-small, 1.45);
--bs-body-line-height: var(--settings-text-line-height, 1.6);   /* unitless: every element sets its own text size × it */
--bs-font-weight-bold: var(--settings-font-weight-bold);
--bs-font-weight-light: var(--settings-font-weight-light);
--bs-btn-weight: var(--bs-font-weight-bold);

}

/* === Font Families === */

.font-family-sans-serif {font-family: var(--bs-font-sans-serif);}
.font-family-serif {font-family: var(--bs-font-serif);}
.font-family-monospace {font-family: var(--bs-font-monospace);}

/* Optical Size: the cut of a variable font with an opsz axis (Fraunces, Inter). Default auto follows the font size,
   so large serif text gets the display cut with hairline serifs; 36 and 9 give sturdier serifs and less contrast */
.font-opsz-36 {font-variation-settings: "opsz" 36;}
.font-opsz-9 {font-variation-settings: "opsz" 9;}

/* === Page Base === */
/* html too, not only body: overscroll and the notch area stay white on dark pages otherwise */
html {
    background-color: var(--bs-body-bg);
  }

body {
    font-family: var(--settings-body-font-family, var(--bs-font-sans-serif));
    font-weight: var(--bs-font-weight-light);
    line-height: var(--bs-body-line-height);
    font-feature-settings: var(--bs-font-feature-settings, normal);
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    font-size: var(--bs-body-font-size); /* 16px base */
  }

  /* === Type Scale === */
  /* Headings below 768px: only the part above the text size shrinks, 1rem + (setting − 1rem) × 0.6 – an H4 of 18px
     stays above the body text (17.2px, before 14.4px), a display-like 64px becomes 44.8px. From 768px the setting
     times the scale, as before (--bs-header-base 0). */
  :root {
    --bs-header-base:  1rem;
    --bs-header-scale: 0.60; /* < 768px */
    --bs-font-scale:   0.9375; /* < 480px */
  }
  @media (min-width: 480px)  { :root { --bs-font-scale: 0.9375; } }
  @media (min-width: 768px)  { :root { --bs-header-base: 0rem; --bs-header-scale: 1.00; --bs-font-scale: 1.0000; } }
  @media (min-width: 1280px) { :root { --bs-header-scale: 1.17; --bs-font-scale: 1.0625; } }
  @media (min-width: 1480px) { :root { --bs-header-scale: 1.33; --bs-font-scale: 1.0625; } }

  /* === Headings === */
  h1 {font-family: var(--settings-h1-font-family, var(--bs-font-heading)); font-weight: var(--settings-h1-font-weight); text-transform: var(--settings-h1-text-transform); color: var(--settings-h1-color, currentColor);}
  h2 {font-family: var(--settings-h2-font-family, var(--bs-font-heading)); font-weight: var(--settings-h2-font-weight); text-transform: var(--settings-h2-text-transform); color: var(--settings-h2-color, currentColor);}
  h3 {font-family: var(--settings-h3-font-family, var(--bs-font-heading)); font-weight: var(--settings-h3-font-weight); text-transform: var(--settings-h3-text-transform); color: var(--settings-h3-color, currentColor);}
  h4 {font-family: var(--settings-h4-font-family, var(--bs-font-heading)); font-weight: var(--settings-h4-font-weight); text-transform: var(--settings-h4-text-transform); color: var(--settings-h4-color, currentColor);}
  h5 {font-family: var(--settings-h5-font-family, var(--bs-font-heading)); font-weight: var(--settings-h5-font-weight); text-transform: var(--settings-h5-text-transform); color: var(--settings-h5-color, currentColor);}
  h6 {font-family: var(--settings-h6-font-family, var(--bs-font-heading)); font-weight: var(--settings-h6-font-weight); text-transform: var(--settings-h6-text-transform); color: var(--settings-h6-color, currentColor);}
  
  h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    text-wrap: balance;
    hyphens: auto;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphenate-limit-chars: 3 6;
    -webkit-hyphenate-limit-chars: 3 6;
    hyphenate-limit-lines: 1;
    -webkit-hyphenate-limit-lines: 1;
    overflow-wrap: break-word;
  }  

  /* Heading leading: 5 % of the size plus a fixed .25rem. Small headings get relatively more (18px: 1.27), large
     ones less (64px: 1.11). The em resolves on each heading; a child with its own size inherits the computed length
     (inline, that is harmless). Heading Line Height (setting) replaces it, --settings-hN-line-height per level.
     Space below a heading the same way (1.18.734): a fixed .5rem plus a quarter of the size, so large headings stay
     close to their text and small ones get some air (h1 56px: 22px, h4 20px: 13px; before .5em / .25em). */
  :root { --bs-heading-line-height: var(--settings-heading-line-height, calc(1.05em + .25rem)); --bs-heading-margin: calc(.25em + .5rem); }
  h1 {font-size: max(1rem, calc(var(--bs-header-base) + (var(--settings-h1-font-size) - var(--bs-header-base)) * var(--bs-header-scale))); line-height: var(--settings-h1-line-height, var(--bs-heading-line-height)); margin-bottom: var(--bs-heading-margin);} /* base 36px */
  h2 {font-size: max(1rem, calc(var(--bs-header-base) + (var(--settings-h2-font-size) - var(--bs-header-base)) * var(--bs-header-scale))); line-height: var(--settings-h2-line-height, var(--bs-heading-line-height)); margin-bottom: var(--bs-heading-margin);} /* base 26px */
  h3 {font-size: max(1rem, calc(var(--bs-header-base) + (var(--settings-h3-font-size) - var(--bs-header-base)) * var(--bs-header-scale))); line-height: var(--settings-h3-line-height, var(--bs-heading-line-height)); margin-bottom: var(--bs-heading-margin);} /* base 22px */
  h4 {font-size: max(1rem, calc(var(--bs-header-base) + (var(--settings-h4-font-size) - var(--bs-header-base)) * var(--bs-header-scale))); line-height: var(--settings-h4-line-height, var(--bs-heading-line-height)); margin-bottom: var(--bs-heading-margin);} /* base 18px */
  h5 {font-size: var(--settings-h5-font-size, 0.938rem); line-height: var(--settings-h5-line-height, 1.25); margin-bottom: .25em;}
  /* h6 reads as a bold first line of body text: body size and line height, no margin */
  h6 {font-size: calc(var(--settings-h6-font-size, 1rem) * var(--bs-font-scale)); line-height: var(--settings-h6-line-height, var(--bs-body-line-height)); margin-bottom: 0;}

  /* .h1 to .h6: the look of a level on another tag (pricing-title h3.h5, a heading whose level the page needed to
     change). Specificity of a tag, not of a class: placed after the tag rules they win over them, and every class
     (.card-title, .display-*, .lead, utilities) still wins over them, as it did over the tag. */
  :where(.h1, .h2, .h3, .h4, .h5, .h6):is(h1, h2, h3, h4, h5, h6, p, div, span) {
    margin-top: 0;
    text-wrap: balance;
    hyphens: auto;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphenate-limit-chars: 3 6;
    -webkit-hyphenate-limit-chars: 3 6;
    hyphenate-limit-lines: 1;
    -webkit-hyphenate-limit-lines: 1;
    overflow-wrap: break-word;
  }
  :where(.h1):is(h1, h2, h3, h4, h5, h6, p, div, span) {font-family: var(--settings-h1-font-family, var(--bs-font-heading)); font-weight: var(--settings-h1-font-weight); text-transform: var(--settings-h1-text-transform); color: var(--settings-h1-color, currentColor); font-size: max(1rem, calc(var(--bs-header-base) + (var(--settings-h1-font-size) - var(--bs-header-base)) * var(--bs-header-scale))); line-height: var(--settings-h1-line-height, var(--bs-heading-line-height)); margin-bottom: var(--bs-heading-margin);}
  :where(.h2):is(h1, h2, h3, h4, h5, h6, p, div, span) {font-family: var(--settings-h2-font-family, var(--bs-font-heading)); font-weight: var(--settings-h2-font-weight); text-transform: var(--settings-h2-text-transform); color: var(--settings-h2-color, currentColor); font-size: max(1rem, calc(var(--bs-header-base) + (var(--settings-h2-font-size) - var(--bs-header-base)) * var(--bs-header-scale))); line-height: var(--settings-h2-line-height, var(--bs-heading-line-height)); margin-bottom: var(--bs-heading-margin);}
  :where(.h3):is(h1, h2, h3, h4, h5, h6, p, div, span) {font-family: var(--settings-h3-font-family, var(--bs-font-heading)); font-weight: var(--settings-h3-font-weight); text-transform: var(--settings-h3-text-transform); color: var(--settings-h3-color, currentColor); font-size: max(1rem, calc(var(--bs-header-base) + (var(--settings-h3-font-size) - var(--bs-header-base)) * var(--bs-header-scale))); line-height: var(--settings-h3-line-height, var(--bs-heading-line-height)); margin-bottom: var(--bs-heading-margin);}
  :where(.h4):is(h1, h2, h3, h4, h5, h6, p, div, span) {font-family: var(--settings-h4-font-family, var(--bs-font-heading)); font-weight: var(--settings-h4-font-weight); text-transform: var(--settings-h4-text-transform); color: var(--settings-h4-color, currentColor); font-size: max(1rem, calc(var(--bs-header-base) + (var(--settings-h4-font-size) - var(--bs-header-base)) * var(--bs-header-scale))); line-height: var(--settings-h4-line-height, var(--bs-heading-line-height)); margin-bottom: var(--bs-heading-margin);}
  :where(.h5):is(h1, h2, h3, h4, h5, h6, p, div, span) {font-family: var(--settings-h5-font-family, var(--bs-font-heading)); font-weight: var(--settings-h5-font-weight); text-transform: var(--settings-h5-text-transform); color: var(--settings-h5-color, currentColor); font-size: var(--settings-h5-font-size, 0.938rem); line-height: var(--settings-h5-line-height, 1.25); margin-bottom: .25em;}
  :where(.h6):is(h1, h2, h3, h4, h5, h6, p, div, span) {font-family: var(--settings-h6-font-family, var(--bs-font-heading)); font-weight: var(--settings-h6-font-weight); text-transform: var(--settings-h6-text-transform); color: var(--settings-h6-color, currentColor); font-size: calc(var(--settings-h6-font-size, 1rem) * var(--bs-font-scale)); line-height: var(--settings-h6-line-height, var(--bs-body-line-height)); margin-bottom: 0;}
  .lead, .large {font-size: var(--bs-font-size-large); line-height: var(--settings-line-height-large, var(--bs-body-line-height));}
  .lead {font-family: var(--settings-lead-font-family, inherit); color: var(--settings-lead-color, inherit);}
  .medium {font-size: var(--bs-font-size-medium); line-height: var(--settings-line-height-medium, var(--bs-body-line-height));}
  .normal {font-size: var(--bs-font-size-normal); line-height: var(--bs-body-line-height);}
  .small, small {font-size: var(--bs-font-size-small); line-height: var(--bs-line-height-small);}
  .extra-small {font-size: var(--bs-font-size-extra-small); line-height: var(--bs-line-height-extra-small);}
  figcaption, .image-caption {font-size: var(--bs-font-size-small); margin-top: .25rem;}
  details {font-size: var(--bs-font-size-small); margin-bottom: 1.5rem;}

/* === Display Sizes === */
/* Display sizes: tight like the headings (large type needs less leading); one variable for a site's Custom CSS */
:root { --bs-display-line-height: 1.1; }
/* The size stays a share of the surrounding text (the brand's heading scale); a ceiling in container width (1.18.659)
   only bites where the share would not fit – a nested display size, a large parent – instead of overflowing. Set
   above the largest display size measured on the sites (about 17.6cqi at 390 px): where there is room nothing changes. cqi: the nearest query container (main, header, footer, a nested grid column). */
.display-1 {font-size: clamp(1em, 245%, 20cqi); line-height: var(--bs-display-line-height);}
.display-2 {font-size: clamp(1em, 220%, 19cqi); line-height: var(--bs-display-line-height);}
.display-3 {font-size: clamp(1em, 195%, 18cqi); line-height: var(--bs-display-line-height);}
.display-4 {font-size: clamp(1em, 170%, 16cqi); line-height: var(--bs-display-line-height);}
.display-5 {font-size: clamp(1em, 145%, 14cqi); line-height: var(--bs-display-line-height);}
.display-6 {font-size: clamp(1em, 120%, 12cqi); line-height: var(--bs-display-line-height);}

/* Display Fit (1.18.659, steps of 10 since 1.18.667; 75 stays for older content): the longest line of the block fills
   100 to 50 % of its parent's width; all lines share
   one size, a line only breaks at the editor's <br>. display-fit.js measures the longest line in em (--fit) once the
   fonts are there and when the text changes; the size follows the width without measuring again. Without JavaScript
   a large size that may wrap. Hidden until measured (at most 1.5 s), so it does not jump. Native text-fit can replace
   the script later with the same classes. */
:has(> .display-fit) { container-type: inline-size; }
.display-fit {
  --fit-target: 100;
  font-size: clamp(1em, 12cqi, 8em);
  line-height: .85;
}
.display-fit-100 { --fit-target: 100; }
.display-fit-90 { --fit-target: 90; }
.display-fit-80 { --fit-target: 80; }
.display-fit-75 { --fit-target: 75; }
.display-fit-70 { --fit-target: 70; }
.display-fit-60 { --fit-target: 60; }
.display-fit-50 { --fit-target: 50; }
/* A floor (--fit-min) for narrow columns: below it the text wraps like normal text with an open line height. Above it
   the longest line fits by measure (.995 against rounding), so no nowrap is needed */
.display-fit[data-fit] {
  font-size: max(var(--fit-min, 1.5rem), calc(var(--fit-target) * 1cqi / var(--fit) * .995));
  line-height: max(.85em, calc(var(--fit-min, 1.5rem) * 1.2));
}
[data-prefers-color] .display-fit:not([data-fit]) {
  visibility: hidden;
  animation: f26-display-fit-reveal 0s 1.5s forwards;
}
@keyframes f26-display-fit-reveal { to { visibility: visible; } }
  
  /* === Text === */
  p, td, th, li {
    text-wrap: pretty;
    -webkit-hyphens: auto;
    -webkit-hyphenate-limit-chars: auto 3;
    -webkit-hyphenate-limit-lines: 2;
    -moz-hyphens: auto;
    hyphens: auto;
    hyphenate-limit-chars: auto 3;
    hyphenate-limit-lines: 2;
  }

  p {
    margin-top: 0;
    margin-bottom: 1em;
  }
  p:last-of-type:last-child {
    margin-bottom: 0;
  }

  /* RTE Push to Bottom: a top-level block with mt-auto sinks to the bottom */
  [data-edit="bodytext"]:has(> .mt-auto) {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
  }
  /* Last block of a bodytext has no margin; the element brings its own gap */
  [data-edit="bodytext"] > :last-child {
    margin-bottom: 0;
  }
  /* Element around such a bodytext becomes a column, so the bodytext can grow to its height */
  .frame-content:has(> [data-edit="bodytext"] > .mt-auto) {
    display: flex;
    flex-direction: column;
  }

  /* Text transform and numerals */
  [style*="text-transform"]:has(*) {
    letter-spacing: .04rem;
  }  

  .text-lowercase {
    text-transform: lowercase;
  }
  .text-uppercase {
    text-transform: uppercase;
  }
  .oldstyle-nums {
    font-variant-numeric: oldstyle-nums;
  }
  .slashed-zero {
    font-variant-numeric: slashed-zero;
  }
  .diagonal-fractions {
    font-variant-numeric: diagonal-fractions; 
  }
  .small-caps {
    font-variant-caps: all-small-caps;
  }

  /* === Links and Inline Elements === */
  a {
    color: var(--bs-link-color);
    text-decoration: var(--bs-link-decoration);
  }
  
  a:hover {
    color: var(--bs-link-hover-color);
    text-decoration: var(--bs-link-decoration-hover);
  }
  
  a:not([href]):not([class]), a:not([href]):not([class]):hover {
    color: inherit;
    text-decoration: none;
  }
     
  span[style^="background-color"] {
    padding: 0.125rem 0.25rem 0.125rem 0.25rem;
  }
  
  mark, .mark {
    padding: 0.125rem 0.25rem 0.125rem 0.25rem;
    color: var(--bs-mark-color);
    background-color: var(--bs-mark-bg);
  }
  
  .text-muted, .muted {
    color: var(--bs-muted);
  }

  s {
    text-decoration: line-through;
  }

  del {
    text-decoration: line-through;
    padding: 0.125rem 0.25rem 0.125rem 0.25rem;
    background-color: var(--bs-danger-50);
  }
  
  ins {
    padding: 0.125rem 0.25rem 0.125rem 0.25rem;
    background-color: var(--bs-success-500-subtle);
  }
  hr {
    margin-top: var(--bs-gutter-y, 10px);
    margin-bottom: var(--bs-gutter-y, 10px);
    border: none;
    border-top: var(--bs-border-width) solid hsl(from var(--bs-border-color) h s l / var(--bs-border-opacity));
    height: 0;
    opacity: 1;
  }
  
  abbr[title] {
    text-decoration: underline dotted;
    cursor: help;
    text-decoration-skip-ink: none;
  }
  
  address {
    font-style: normal;
    line-height: inherit;
  }

  /* Indent as a variable: list-divided and list-striped (components) read it; em, follows the font size */
  ol,
  ul {
    --f26-list-indent: 1.25em;
    padding-left: var(--f26-list-indent);
  }
  
  ol,
  ul,
  dl {
    margin-top: 0;
    margin-bottom: 1rem;
  }
  /* En dash + en space = exactly 1em, so the marker sits flush with the indent */
  ul {
    --f26-list-indent: 1em;
    list-style-type: "\2013\2002";
  }

  ol ol,
  ul ul,
  ol ul,
  ul ol {
    margin-bottom: 0;
  }
  
  dt {
    font-weight: 700;
  }
  
  dd {
    margin-bottom: 0.5rem;
    margin-left: 0;
  }
  
  /* Kicker Marker (1.18.669): a mark before every kicker (Subheader, data-edit stays for visitors). Any tag: the heading
     levels correction writes the subheader as <h3 class="h5"> (1.18.673) */
  :is(.kicker-dot, .kicker-line) [data-edit="subheader"]::before {
    content: ""; display: inline-block; vertical-align: .12em; margin-inline-end: .6em;
    background: var(--settings-kicker-marker-color, var(--bs-primary-base));}
  .kicker-dot [data-edit="subheader"]::before {width: .5em; height: .5em; border-radius: 50%;}
  .kicker-line [data-edit="subheader"]::before {width: 1.5em; height: 2px; vertical-align: .3em;}
  /* 1.18.672: Slash, Square, Bar and Number (counts the kickers of the page in reading order, 01, 02 …) */
  :is(.kicker-square, .kicker-bar) [data-edit="subheader"]::before {
    content: ""; display: inline-block; margin-inline-end: .6em;
    background: var(--settings-kicker-marker-color, var(--bs-primary-base));}
  .kicker-square [data-edit="subheader"]::before {width: .5em; height: .5em; vertical-align: .12em;}
  .kicker-bar [data-edit="subheader"]::before {width: 2px; height: 1em; vertical-align: -.15em;}
  :is(.kicker-slash, .kicker-number) [data-edit="subheader"]::before {
    margin-inline-end: .5em; color: var(--settings-kicker-marker-color, var(--bs-primary-base));}
  .kicker-slash [data-edit="subheader"]::before {content: "//";}
  body.kicker-number {counter-reset: f26-kicker;}
  .kicker-number [data-edit="subheader"] {counter-increment: f26-kicker;}
  .kicker-number [data-edit="subheader"]::before {content: counter(f26-kicker, decimal-leading-zero);}

  /* === Quotes === */
  blockquote {
    font-style: italic; 
    font-size: var(--bs-font-size-large); 
    line-height: 1.4;
    border-left: 3px solid var(--bs-primary-muted); 
    padding-left: 1rem;}
  
  cite {
    font-style: italic;
  }
  cite::before {
    content: "— ";
  }

  b,
  strong {
    font-weight: var(--bs-font-weight-bold);
  }
  
  sub,
  sup {
    position: relative;
    font-size: 0.75em;
    line-height: 0;
    vertical-align: baseline;
  }
  
  sub {
    bottom: -0.25em;
  }
  
  sup {
    top: -0.5em;
  }
  
  pre,
  code,
  kbd,
  /* === Code === */
  samp {
    font-family: var(--bs-font-monospace);
    font-size: 1em;
  }

  pre {    
    font-size: var(--bs-font-size-small);
    line-height: var(--bs-line-height-small);
    display: block;
    overflow: auto;
    max-width: 100%;

  }
  
  pre:has(code) {
    padding: calc(var(--bs-gutter-x) * .75 );
    border: var(--bs-border-width) solid hsl(from var(--bs-border-color) h s l /  var(--bs-border-opacity));
    border-radius: var(--bs-border-radius);
    box-shadow: var(--bs-box-shadow-sm);
  }
  pre code {
    font-size: inherit;
    color: inherit;
    word-break: normal;
    white-space: pre-wrap;
    padding: 0;
    margin: 0;
    background-color: transparent;
  }
  
  code {
    font-size: var(--bs-font-size-small);
    line-height: var(--bs-line-height-small);
    color: var(--bs-code-color);
    background-color: hsl(from var(--bs-overlay) h s l / 0.05);
    border-radius: .125em;
    padding: 0 0.25em;
    overflow-wrap: anywhere; /* anywhere, not break-word: long tokens would widen grid columns */
  }
  a > code {
    color: inherit;
  }
  
  kbd {
    padding: 0.1875rem 0.375rem;
    font-size: 0.875em;
    color: var(--bs-body-bg);
    background-color: var(--bs-body-color);
    border-radius: 0.25rem;
  }
  kbd kbd {
    padding: 0;
    font-size: 1em;
  }
  
