/* ============================================================ Public website
   Colours, fonts and sizes come from CSS variables set by the Site module. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font-body); font-size: var(--fs); line-height: 1.7;
  background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased;
}
.icon { display: block; flex-shrink: 0; }
.wrap { --gutter: 24px; width: 100%; max-width: var(--width); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
.preview-bar { background: #f59e0b; color: #111; text-align: center; font-size: 14px; font-weight: 600; padding: 6px 12px; }
a { color: var(--accent); }

/* ---------------------------------------------------------------- header */
.site-header {
  background-color: var(--header-bg); color: var(--header-text);
  background-size: cover; background-position: center;
  border-bottom: 1px solid color-mix(in srgb, var(--header-text) 10%, transparent);
  position: relative; z-index: 50;
}
.header-sticky .site-header { position: sticky; top: 0; }
/* header transparency (background colour is set inline from the Site settings) */
.site-header { transition: background-color .25s, border-color .25s, box-shadow .25s; }
.header-see-through .site-header { border-bottom-color: transparent; }
.header-solid-scroll.scrolled .site-header { background-color: var(--header-bg) !important; border-bottom-color: color-mix(in srgb, var(--header-text) 10%, transparent); box-shadow: 0 6px 20px rgba(0, 0, 0, .08); }
.header-see-through:not(.header-sticky) .site-header, .has-hero-under .site-header { position: relative; }
.header-sticky.has-hero-under .site-header { position: sticky; }
/* hero runs underneath the header */
.has-hero-under .site-header { margin-bottom: calc(-1 * var(--hdr-h, 76px)); }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; margin-right: auto; min-width: 0; }
.brand .logo { height: var(--logo-h, 44px); width: auto; max-width: min(60vw, 520px); object-fit: contain; display: block; }
.header-inner { padding-top: 8px; padding-bottom: 8px; }
/* header / footer over the full window width */
.header-full .site-header .wrap, .footer-full .site-footer .wrap { max-width: none; }
.brand .logo-dark { display: none; }
[data-theme="dark"] .brand .logo-light { display: none; }
[data-theme="dark"] .brand .logo-dark { display: block; }
.site-name { font-family: var(--font-heading); font-weight: 700; font-size: 1.3em; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a {
  display: block; padding: 8px 14px; border-radius: 8px; color: inherit; text-decoration: none; font-weight: 500;
  opacity: .85; transition: opacity .15s, background .15s, color .15s;
}
.main-nav a:hover { opacity: 1; background: color-mix(in srgb, var(--header-text) 8%, transparent); }
.main-nav a.active { opacity: 1; color: var(--accent); }
.main-nav a, .footer-menu a { display: inline-flex; align-items: center; gap: 7px; }
.main-nav a.icon-only { padding: 8px 10px; }
.mi-icon { display: inline-flex; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.header-tools { display: flex; align-items: center; gap: 4px; }
.hd-btn {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; border: 0;
  background: transparent; color: inherit; cursor: pointer;
}
.hd-btn:hover { background: color-mix(in srgb, var(--header-text) 10%, transparent); }
.hd-btn:focus-visible, .main-nav a:focus-visible, .to-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle .i-moon, .nav-toggle, .nav-toggle .i-close { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-moon { display: block; }

/* ---------------------------------------------------------------- content */
.site-main { flex: 1; }
.content { padding-top: 48px; padding-bottom: 64px; }
.page-content > :first-child { margin-top: 0; }
.page-content h1, .page-content h2, .page-content h3, .page-content h4, .page-404 h1, .form-confirmation h2 {
  font-family: var(--font-heading); line-height: 1.25; letter-spacing: -.01em; margin: 1.6em 0 .55em;
}
.page-content p { margin: 0 0 1.1em; }
.page-content img { max-width: 100%; height: auto; border-radius: 10px; }
.page-content iframe { max-width: 100%; border-radius: 10px; }
.page-content blockquote { margin: 1.5em 0; padding: .3em 1.2em; border-left: 4px solid var(--accent); color: color-mix(in srgb, var(--text) 85%, transparent); font-style: italic; }
.page-content pre { background: color-mix(in srgb, var(--text) 7%, transparent); padding: 16px; border-radius: 10px; overflow-x: auto; font-size: .9em; }
.page-content hr { border: 0; border-top: 1px solid color-mix(in srgb, var(--text) 15%, transparent); margin: 2.5em 0; }
.page-content table { border-collapse: collapse; width: 100%; }
.page-content td, .page-content th { border: 1px solid color-mix(in srgb, var(--text) 15%, transparent); padding: 8px 12px; }
.page-404 { text-align: center; padding: 40px 0; }
.page-404 .code { font-size: 5em; font-weight: 800; color: var(--accent); margin: 0; line-height: 1; font-family: var(--font-heading); }

.site-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 26px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent); border: 0; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: filter .15s, transform .15s;
}
.site-btn:hover { filter: brightness(1.08); }
.site-btn:active { transform: translateY(1px); }

/* ---------------------------------------------------------------- forms */
.site-form { margin: 1.5em 0; max-width: 720px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-field.full { grid-column: 1 / -1; }
.form-field > label, .form-field legend { display: block; font-weight: 600; font-size: .92em; margin-bottom: 6px; color: var(--text); }
.form-field fieldset { border: 0; margin: 0; padding: 0; }
.form-field .req { color: #dc2626; }
.site-form input[type=text], .site-form input[type=email], .site-form input[type=tel], .site-form input[type=number],
.site-form input[type=url], .site-form input[type=date], .site-form select, .site-form textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: .95em; color: var(--text);
  background: color-mix(in srgb, var(--bg) 92%, var(--text) 8%); border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
  border-radius: 10px; transition: border-color .15s, box-shadow .15s;
}
.site-form textarea { resize: vertical; min-height: 140px; }
.site-form input:focus, .site-form select:focus, .site-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.choices { display: flex; flex-direction: column; gap: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .95em; }
.check input { width: 18px; height: 18px; margin-top: .25em; accent-color: var(--accent); flex-shrink: 0; }
.has-error input, .has-error select, .has-error textarea { border-color: #dc2626 !important; }
.form-error { color: #dc2626; font-size: .85em; margin-top: 5px; }
.form-alert { background: color-mix(in srgb, #dc2626 10%, transparent); color: #dc2626; border: 1px solid color-mix(in srgb, #dc2626 35%, transparent); padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-weight: 500; }
.form-actions { margin-top: 22px; }
.form-confirmation { margin: 1.5em 0; padding: 28px 30px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.form-confirmation > :first-child { margin-top: 0; }
.form-confirmation > :last-child { margin-bottom: 0; }
.form-missing { padding: 10px; border: 1px dashed #dc2626; color: #dc2626; border-radius: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--footer-bg); color: var(--footer-text); font-size: .92em; }
.site-footer a { color: inherit; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding-top: 44px; padding-bottom: 36px; }
.fcol > :first-child { margin-top: 0; }
.fcol > :last-child { margin-bottom: 0; }
.fcol h1, .fcol h2, .fcol h3, .fcol h4 { font-family: var(--font-heading); font-size: 1.05em; margin: 0 0 .6em; color: inherit; }
.fcol p { margin: 0 0 .7em; }
.fcol img { max-width: 100%; height: auto; }
.fcol-middle { text-align: center; }
.fcol-right { text-align: right; }
.footer-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 18px; padding-bottom: 18px; position: relative;
}
.footer-cols + .footer-bar::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid color-mix(in srgb, var(--footer-text) 18%, transparent); }
.footer-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* footer menu: same look as the header menu */
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.footer-menu a {
  padding: 8px 14px; border-radius: 8px; color: inherit; text-decoration: none; font-weight: 500;
  opacity: .85; transition: opacity .15s, background .15s, color .15s; font-size: 1.087em;
}
.footer-menu a:hover { opacity: 1; background: color-mix(in srgb, var(--footer-text) 10%, transparent); }
.footer-menu a.active { opacity: 1; color: var(--accent); }
.footer-menu a.icon-only { padding: 8px 10px; }
.to-top {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--footer-text) 30%, transparent); color: inherit; transition: all .15s;
}
.to-top:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------------------------------------------------------------- submenus (header menu) */
.main-nav .menu > li { position: relative; display: flex; align-items: center; }
.main-nav .mi-head { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 0; border-radius: 8px; background: none; color: inherit;
  font: inherit; font-weight: 500; opacity: .85; cursor: pointer; transition: opacity .15s, background .15s, color .15s; }
.main-nav .mi-head:hover, .main-nav li.open > .mi-head { opacity: 1; background: color-mix(in srgb, var(--header-text) 8%, transparent); }
.main-nav .active-parent, .main-nav .child-active > .mi-head, .main-nav .child-active > a { opacity: 1; color: var(--accent); }
.sub-caret { display: inline-flex; transition: transform .2s; margin-left: -2px; }
.main-nav li.open > .mi-head .sub-caret, .main-nav li.open > .sub-toggle .sub-caret { transform: rotate(180deg); }
.main-nav .mi-parent { padding-right: 4px; }
.sub-toggle { display: grid; place-items: center; width: 26px; height: 32px; margin-left: -4px; padding: 0; border: 0; border-radius: 6px; background: none; color: inherit; opacity: .7; cursor: pointer; }
.sub-toggle:hover { opacity: 1; background: color-mix(in srgb, var(--header-text) 8%, transparent); }
.sm-no-caret .sub-toggle { width: 22px; }
.submenu {
  --sm-bg: var(--sm-bg-l, #fff); --sm-tx: var(--sm-tx-l, #1f2937);
  position: absolute; top: 100%; left: 0; z-index: 60; min-width: var(--sm-w, 220px); margin: 6px 0 0; padding: var(--sm-pad, 8px); list-style: none;
  background: var(--sm-bg); color: var(--sm-tx); border-radius: var(--sm-r, 12px);
  border: 1px solid color-mix(in srgb, var(--sm-tx) 10%, transparent);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}
[data-theme="dark"] .submenu { --sm-bg: var(--sm-bg-d, #1f2937); --sm-tx: var(--sm-tx-d, #e5e7eb); }
.submenu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }   /* bridge for the mouse */
.submenu.sub-right { left: auto; right: 0; }
.sm-shadow-soft .submenu { box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .22); }
.sm-shadow-strong .submenu { box-shadow: 0 22px 48px -10px rgba(0, 0, 0, .42); }
.sm-blur .submenu { -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%); }
.main-nav li.open > .submenu,
.main-nav[data-sub-mode="hover"] li.has-sub:hover > .submenu,
.main-nav[data-sub-mode="hover"] li.has-sub:focus-within > .submenu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.submenu li { display: block; }
.main-nav .submenu a, .main-nav .submenu .mi-head { display: flex; width: 100%; padding: var(--sm-py, 9px) var(--sm-px, 14px); border-radius: max(0px, calc(var(--sm-r, 12px) - 4px));
  color: inherit; opacity: .9; white-space: nowrap; font-weight: 500; }
.main-nav .submenu a:hover { opacity: 1; background: color-mix(in srgb, var(--sm-tx) 9%, transparent); }
.main-nav .submenu a.active { opacity: 1; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.sm-divider .submenu li + li { border-top: 1px solid color-mix(in srgb, var(--sm-tx) 12%, transparent); }
.sm-divider .submenu a { border-radius: 0; }
@media (max-width: 860px) {
  .main-nav .menu > li { flex-wrap: wrap; }
  .main-nav .menu > li > a, .main-nav .menu > li > .mi-head { flex: 1; padding: 12px 10px; font-size: 1.05em; justify-content: flex-start; }
  .main-nav .mi-head { width: 100%; text-align: left; }
  .main-nav .mi-head .sub-caret { margin-left: auto; }
  .sub-toggle { width: 44px; height: 44px; margin: 0; }
  .submenu, .sm-blur .submenu { position: static; flex-basis: 100%; min-width: 0; margin: 0 0 6px; padding: 2px 0 2px 14px; border: 0; border-left: 2px solid color-mix(in srgb, var(--header-text) 15%, transparent);
    border-radius: 0; background: none; color: inherit; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
    display: none; opacity: 1; visibility: visible; transform: none; transition: none; }
  .main-nav li.open > .submenu, .main-nav[data-sub-mode="hover"] li.has-sub.open > .submenu { display: block; }
  .main-nav[data-sub-mode="hover"] li.has-sub:hover > .submenu, .main-nav[data-sub-mode="hover"] li.has-sub:focus-within > .submenu { display: none; }
  .main-nav[data-sub-mode="hover"] li.has-sub.open:hover > .submenu, .main-nav[data-sub-mode="hover"] li.has-sub.open:focus-within > .submenu { display: block; }
  .main-nav .submenu a { padding: 10px 10px; white-space: normal; }
}

/* ---------------------------------------------------------------- mobile */
@media (max-width: 860px) {
  .wrap { --gutter: 18px; max-width: none; }   /* on small screens always use the full width (also when set in %) */
  .brand .logo { height: var(--logo-h-m, 36px); }
  .nav-toggle { display: grid; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%; background: var(--header-bg); color: var(--header-text);
    border-bottom: 1px solid color-mix(in srgb, var(--header-text) 12%, transparent);
    box-shadow: 0 16px 30px rgba(0, 0, 0, .12); display: none; padding: 8px 18px 16px;
  }
  .nav-open .main-nav { display: block; }
  .nav-open .nav-toggle .i-open { display: none; }
  .nav-open .nav-toggle .i-close { display: block; }
  .main-nav .menu { flex-direction: column; gap: 2px; }
  .main-nav a { padding: 12px 10px; font-size: 1.05em; }
  .content { padding-top: 32px; padding-bottom: 48px; }
  .footer-cols { grid-template-columns: 1fr; gap: 22px; text-align: center; }
  .fcol-right { text-align: center; }
  .fcol:empty { display: none; }
  .footer-bar { flex-direction: column-reverse; text-align: center; }
  .footer-right { justify-content: center; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .brand .logo { max-width: 55vw; }
}

/* ---------------------------------------------------------------- centred forms */
.site-form.align-center { margin-left: auto; margin-right: auto; text-align: center; }
.align-center .form-field > label, .align-center .form-field legend { text-align: center; }
.align-center input, .align-center textarea, .align-center select { text-align: center; text-align-last: center; }
.align-center .choices { align-items: center; }
.align-center .check { justify-content: center; text-align: left; }
.align-center .form-actions { text-align: center; }
.form-confirmation.align-center { text-align: center; max-width: 720px; margin-left: auto; margin-right: auto; }

/* ---------------------------------------------------------------- header banner */
.site-banner { height: clamp(140px, 42vw, var(--banner-h, 360px)); background-size: cover; background-repeat: no-repeat; }

/* ---------------------------------------------------------------- images placed in the editor */
.content img.img-left, .fcol img.img-left { float: left; margin: .3em 1.4em 1em 0; }
.content img.img-right, .fcol img.img-right { float: right; margin: .3em 0 1em 1.4em; }
.content img.img-center, .fcol img.img-center { display: block; margin: 1em auto; }
.page-content::after { content: ""; display: table; clear: both; }
@media (max-width: 560px) {
  .content img.img-left, .content img.img-right { float: none; display: block; margin: 1em auto; width: 100% !important; }
}

/* ---------------------------------------------------------------- column blocks (Pages) */
.mc-block { display: grid; grid-template-columns: var(--mc-cols, 1fr); gap: var(--mc-gap, 24px); align-items: var(--mc-valign, start); box-sizing: border-box; }
.mc-col { min-width: 0; padding: var(--mc-cp, 0); }
.mc-col > :first-child { margin-top: 0; }
.mc-col > :last-child { margin-bottom: 0; }
.mc-col img { max-width: 100%; height: auto; }
@media (max-width: 1024px) { .mc-block.mc-many { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .mc-block:not(.mc-nostack) { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- page hero (Pages) */
.page-hero {
  position: relative; display: flex; width: var(--hero-w, 100%); max-width: 100%; margin: 0 auto;
  min-height: var(--hero-h, 420px); background-color: var(--hero-bg); background-size: cover; background-repeat: no-repeat;
  color: var(--hero-text); overflow: hidden; border-radius: var(--hero-radius, 0);
}
.page-hero:not(.hero-full) { margin-top: 24px; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-overlay); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; display: flex; flex: 1; padding: 40px var(--gutter, 24px); width: 100%; max-width: var(--width); margin: 0 auto; }
.hero-full .hero-inner { max-width: var(--width); }
.hero-under .hero-inner { padding-top: calc(var(--hdr-h, 76px) + 32px); }
.hero-v-top .hero-inner { align-items: flex-start; }
.hero-v-center .hero-inner { align-items: center; }
.hero-v-bottom .hero-inner { align-items: flex-end; }
.hero-h-left .hero-inner { justify-content: flex-start; text-align: left; }
.hero-h-center .hero-inner { justify-content: center; text-align: center; }
.hero-h-right .hero-inner { justify-content: flex-end; text-align: right; }
.hero-text { max-width: var(--hero-tw, 760px); }
.hero-text h1, .hero-text h2, .hero-text h3, .hero-text h4, .hero-text h5, .hero-text h6 { font-family: var(--font-heading); }
.hero-text > :first-child { margin-top: 0; }
.hero-text > :last-child { margin-bottom: 0; }
.hero-text h1, .hero-text h2, .hero-text h3, .hero-text h4, .hero-text h5, .hero-text h6, .hero-text p { color: inherit !important; }
.hero-text h1 { font-size: clamp(30px, 5vw, 60px); line-height: 1.1; margin: 0 0 .35em; }
.hero-font .hero-text, .hero-font .hero-text :is(h1, h2, h3, h4, h5, h6) { font-family: var(--hero-font); }
.hero-fs .hero-text h1 { font-size: clamp(calc(var(--hero-fs) * .55), 6vw, var(--hero-fs)); }
/* hero: shadow under the text and the subtitle */
.hero-shadow-soft .hero-text { text-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.hero-shadow-medium .hero-text { text-shadow: 0 2px 8px rgba(0, 0, 0, .5), 0 1px 2px rgba(0, 0, 0, .3); }
.hero-shadow-strong .hero-text { text-shadow: 0 3px 18px rgba(0, 0, 0, .75), 0 1px 4px rgba(0, 0, 0, .6); }
/* .hero-text prefix: must beat the general ".hero-text p" rule further down */
.hero-text .hero-subtitle { font-size: var(--hero-sub-fs, clamp(17px, 2.2vw, 24px)); line-height: 1.35; margin: -.15em 0 .9em; opacity: .92; }
.hero-sub-font .hero-text .hero-subtitle { font-family: var(--hero-sub-font); }
.hero-sub-italic .hero-text .hero-subtitle { font-style: italic; }
/* hero: own colour/opacity of title and subtitle */
.hero-tc .hero-text h1 { color: var(--hero-tc) !important; }
.hero-title-font .hero-text h1 { font-family: var(--hero-title-font); }
.hero-title-italic .hero-text h1 { font-style: italic; }
.hero-sc .hero-text .hero-subtitle { color: var(--hero-sc) !important; opacity: 1; }

@media (max-width: 600px) { .hero-text .hero-subtitle { font-size: min(var(--hero-sub-fs, 18px), 7vw); } }

.hero-text h2 { font-size: clamp(24px, 3.6vw, 42px); line-height: 1.15; margin: 0 0 .4em; }
.hero-text h3 { font-size: clamp(20px, 2.6vw, 30px); line-height: 1.2; margin: 0 0 .45em; }
.hero-text p { font-size: 1.15em; margin: 0 0 .8em; }
.hero-text a:not(.site-btn) { color: inherit; text-decoration: underline; }
.hero-text img { max-width: 100%; height: auto; }
.has-image .hero-text { text-shadow: 0 1px 12px rgba(0, 0, 0, calc(.25 * var(--hero-ta, 1))); }
@media (max-width: 860px) {
  .page-hero { min-height: var(--hero-hm, 320px); width: 100%; border-radius: 0; }
  .page-hero:not(.hero-full) { margin-top: 0; }
  .hero-inner { padding: 32px var(--gutter, 18px); }
}

/* ---------------------------------------------------------------- module Articles */
.art-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: var(--gap, 24px); margin: 1.5em 0; }
.art-card {
  --bg-c: var(--art-bg-l, transparent); --fg-c: var(--art-fg-l, inherit); --tc-c: var(--art-tc-l, inherit); --bc-c: var(--art-bc-l, transparent);
  position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--bg-c); border: 1px solid var(--bc-c);
  border-radius: var(--art-radius, 12px); overflow: hidden; transition: transform .2s, box-shadow .2s;
}
[data-theme="dark"] .art-card { --bg-c: var(--art-bg-d, transparent); --fg-c: var(--art-fg-d, inherit); --tc-c: var(--art-tc-d, inherit); --bc-c: var(--art-bc-d, transparent); }
.art-list:not(.art-boxed) .art-card { border: 0; border-radius: 0; overflow: visible; }
.art-has-fg .art-card { color: var(--fg-c); }
.art-has-tc .art-card :is(h1, h2, h3, h4, h5, h6), .art-has-tc .art-title-link, .art-has-tc .art-title { color: var(--tc-c); }
.art-shadow-soft .art-card { box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 6px 18px -6px rgba(0, 0, 0, .12); }
.art-shadow-strong .art-card { box-shadow: 0 2px 4px rgba(0, 0, 0, .06), 0 16px 36px -10px rgba(0, 0, 0, .28); }
.art-hover-lift .art-card:hover { transform: translateY(-4px); }
.art-shadow-soft.art-hover-lift .art-card:hover { box-shadow: 0 2px 4px rgba(0, 0, 0, .06), 0 14px 30px -8px rgba(0, 0, 0, .2); }
.art-align-center .art-card { text-align: center; }
.art-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.art-boxed .art-card-body { padding: var(--art-pad, 18px); }
.art-card-body > :first-child { margin-top: 0; }
.art-card-body > :last-child { margin-bottom: 0; }
.art-boxed .art-card-body > p:last-child:has(> .art-more:only-child, > .art-more-btn:only-child) { margin-top: auto; }
.page-content .art-card-body :is(h1, h2, h3, h4, h5, h6) { margin: .2em 0 .45em; }
.page-content .art-card-body p { margin: 0 0 .7em; }
/* image */
.art-img { margin: 0 0 14px; overflow: hidden; border-radius: var(--img-r, 10px); }
.art-img a { display: block; height: 100%; }
.page-content .art-img img, .art-img img { display: block; width: 100%; height: auto; border-radius: 0; transition: transform .35s ease; }
.art-img.art-ratio img { height: 100%; object-fit: cover; }
.art-hover-zoom .art-card:hover .art-img img { transform: scale(1.06); }
/* boxed card: an image at the top runs to the edges */
.art-boxed .art-card-body > .art-img:first-child { margin: calc(-1 * var(--art-pad, 18px)) calc(-1 * var(--art-pad, 18px)) var(--art-pad, 18px); border-radius: 0; }
/* image next to the text */
.art-card.art-side { display: grid; grid-template-columns: var(--art-imgw, 40%) minmax(0, 1fr); align-items: stretch; }
.art-card.art-side-right { grid-template-columns: minmax(0, 1fr) var(--art-imgw, 40%); }
.art-side-right .art-card-media { order: 2; }
.art-list:not(.art-boxed) .art-card.art-side { column-gap: 22px; }
.art-card-media { min-width: 0; }
.art-card-media .art-img { margin: 0; height: 100%; }
.art-card-media .art-img.art-ratio { height: auto; }
.art-boxed .art-card-media .art-img { border-radius: 0; }
.art-card-media .art-img img { height: 100%; object-fit: cover; }
.art-boxed .art-side .art-card-body { justify-content: center; }
/* texts */
.art-title-link { color: inherit; text-decoration: none; }
.art-subtitle { display: block; font-size: 1.2em; line-height: 1.4; opacity: .8; margin-top: -.4em; }
.art-title-link:hover { color: var(--accent); }
.art-card .art-title-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.art-card a:not(.art-title-link) { position: relative; z-index: 2; }
.art-more { color: var(--accent); font-weight: 600; text-decoration: none; }
.art-more:hover { text-decoration: underline; }
.art-cat { color: var(--accent); font-weight: 600; text-decoration: none; }
.art-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; vertical-align: middle; }
.art-chip { display: inline-block; padding: 2px 11px; border-radius: 999px; font-size: .82em; font-weight: 600; line-height: 1.7; text-decoration: none;
  background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); }
a.art-chip:hover { background: var(--accent); color: var(--on-accent); }
.art-tag-text { color: var(--accent); text-decoration: none; }
.art-back { color: var(--accent); font-weight: 600; text-decoration: none; }
.art-back:hover { text-decoration: underline; }
.art-empty { color: color-mix(in srgb, var(--text) 65%, transparent); font-style: italic; }
.art-view-all { text-align: right; margin-top: -.4em; }
/* pagination */
.art-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 2em 0 1em; }
.art-pager > a, .art-pager > span { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border-radius: 10px; text-decoration: none; font-weight: 600; color: inherit;
  border: 1px solid color-mix(in srgb, var(--text) 15%, transparent); }
.art-pager a:hover { border-color: var(--accent); color: var(--accent); }
.art-pager .art-pg-cur { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.art-pager > .art-pg-gap { border: 0; min-width: 20px; padding: 0; }
/* single article */
.art-single.art-narrow { max-width: var(--art-w, 780px); margin-left: auto; margin-right: auto; }
.art-single .art-img { margin: 1.4em 0 1.8em; }
.art-single .art-img img { width: 100%; }
.art-single .art-grid { margin-top: 1em; }
/* category page & overview */
.art-cat-head { margin-bottom: 2em; }
.art-cat-head h1 { margin-top: 0; }
.art-cat-img { margin: 0 0 1.6em; }
.art-cat-img img { width: 100%; max-height: 420px; object-fit: cover; }
.art-cat-desc { max-width: none; }
.art-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin-top: 1.5em; }
.art-cat-card { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit;
  border: 1px solid color-mix(in srgb, var(--text) 12%, transparent); transition: transform .2s, box-shadow .2s; }
.art-cat-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .25); }
.art-cat-card-img { aspect-ratio: 16 / 9; overflow: hidden; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.page-content .art-cat-card-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.art-cat-card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.art-cat-card-body strong { font-family: var(--font-heading); font-size: 1.2em; }
.art-cat-card-body small { color: var(--accent); font-weight: 600; }
@media (max-width: 900px) { .art-grid { grid-template-columns: repeat(var(--cols-t, 2), minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .art-grid { grid-template-columns: minmax(0, 1fr); }
  .art-card.art-side, .art-card.art-side-right { grid-template-columns: minmax(0, 1fr); }
  .art-side-right .art-card-media { order: 0; }
  .art-card-media .art-img { aspect-ratio: 16 / 9; }
  .art-list:not(.art-boxed) .art-card.art-side { row-gap: 12px; }
  .art-pager .art-pg-prev span, .art-pager .art-pg-next span { display: none; }
}

/* ---------------------------------------------------------------- module Catalogue: photo gallery */
.cat-grid { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: var(--gap, 12px); margin: 1.5em 0; }
.cat-grid.cat-masonry { display: block; columns: var(--cols, 4); column-gap: var(--gap, 12px); }
.cat-masonry .cat-photo { break-inside: avoid; margin: 0 0 var(--gap, 12px); }
.cat-grid.cat-natural { align-items: start; }
/* masonry with JavaScript (assets/gallery.js): left to right, every photo spans its own height in 1px rows */
.cat-grid.cat-masonry.js-masonry { display: grid; columns: auto; grid-auto-rows: 1px; row-gap: 0; column-gap: var(--gap, 12px); align-items: start; }
.cat-masonry.js-masonry .cat-photo { margin: 0; }
/* justified: rows of equal height that fill the width; the last row is not stretched */
.cat-grid.cat-justified { display: flex; flex-wrap: wrap; gap: var(--gap, 12px); --rhx: var(--rh, 240px); }
.cat-grid.cat-justified::after { content: ""; flex: 999999 1 0px; }
/* grow ×100: with a total below 1 (one portrait photo in a row) CSS would hand out only part of the free space */
.cat-justified .cat-photo { flex: calc(var(--ar, 1.5) * 100) 1 calc(var(--ar, 1.5) * var(--rhx) + 2 * var(--fwx, 0px)); max-width: 100%; }
.cat-justified.cat-framed { --fwx: var(--fw, 8px); }   /* the frame is not part of the photo: equal photo heights per row */
.cat-justified .cat-img { aspect-ratio: var(--ar, 1.5); }
.cat-justified .cat-img img, .page-content .cat-justified .cat-img img { height: 100%; object-fit: cover; }
@media (max-width: 900px) { .cat-grid.cat-justified { --rhx: calc(var(--rh, 240px) * .8); } }
@media (max-width: 600px) { .cat-grid.cat-justified { --rhx: calc(var(--rh, 240px) * .6); } }
.cat-photo { margin: 0; min-width: 0; }
.cat-frame { position: relative; border-radius: var(--r, 8px); overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.cat-framed .cat-frame { padding: var(--fw, 8px); background: var(--fc, #fff); }
[data-theme="dark"] .cat-framed .cat-frame { background: var(--fc-d, var(--fc, #1f2937)); }
.cat-img { display: block; overflow: hidden; }
.cat-framed .cat-img { border-radius: calc(var(--r, 8px) * .5); }
.cat-img img, .page-content .cat-img img { display: block; width: 100%; height: auto; margin: 0; border-radius: 0; transition: transform .45s ease, filter .3s ease; }
.cat-fixed .cat-img img, .page-content .cat-fixed .cat-img img { height: 100%; object-fit: cover; }
.cat-photo a { display: block; color: inherit; }
.cat-grid[data-lightbox] .cat-photo a { cursor: zoom-in; }
.cat-shadow-soft .cat-frame { box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 20px -8px rgba(0, 0, 0, .25); }
.cat-shadow-strong .cat-frame { box-shadow: 0 3px 6px rgba(0, 0, 0, .1), 0 18px 40px -12px rgba(0, 0, 0, .45); }
.cat-hover-zoom .cat-photo:hover .cat-img img { transform: scale(1.06); }
.cat-hover-lift .cat-photo:hover .cat-frame { transform: translateY(-5px); }
.cat-hover-dim .cat-photo { transition: opacity .25s; }
.cat-hover-dim:hover .cat-photo:not(:hover) { opacity: .55; }
.cat-photo figcaption { font-size: .88em; line-height: 1.4; }
.cat-cap-below figcaption { padding: 7px 2px 0; color: color-mix(in srgb, currentColor 72%, transparent); }
.cat-cap-overlay figcaption { position: absolute; left: var(--fw, 0); right: var(--fw, 0); bottom: var(--fw, 0); padding: 28px 12px 10px; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .7)); opacity: 0; transition: opacity .25s; pointer-events: none; }
.cat-framed.cat-cap-overlay figcaption { border-radius: 0 0 calc(var(--r, 8px) * .5) calc(var(--r, 8px) * .5); }
.cat-cap-overlay:not(.cat-framed) figcaption { left: 0; right: 0; bottom: 0; }
.cat-cap-overlay .cat-photo:hover figcaption, .cat-cap-overlay .cat-photo:focus-within figcaption { opacity: 1; }
@media (hover: none) { .cat-cap-overlay figcaption { opacity: 1; } }
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(var(--cols-t, 3), minmax(0, 1fr)); } .cat-grid.cat-masonry { columns: var(--cols-t, 3); } }
@media (max-width: 600px) { .cat-grid { grid-template-columns: repeat(var(--cols-m, 2), minmax(0, 1fr)); } .cat-grid.cat-masonry { columns: var(--cols-m, 2); } }
/* grid columns of the masonry, after the media queries above so the tablet/mobile counts apply */
.cat-grid.cat-masonry.js-masonry { columns: auto; }

/* album overview: main photos with the album title */
.cat-albums { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: var(--gap, 24px); margin: 1.5em 0; }
.cat-album { position: relative; display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.cat-album-img { display: block; overflow: hidden; border-radius: var(--r, 12px); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.page-content .cat-album-img img, .cat-album-img img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; transition: transform .45s ease; }
.cat-album:hover .cat-album-img img { transform: scale(1.05); }
.cat-noimg { display: grid; place-items: center; width: 100%; height: 100%; min-height: 120px; color: var(--accent); }
.cat-album-body { display: flex; flex-direction: column; gap: 2px; padding: 10px 2px 0; }
.cat-album-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.15em; line-height: 1.3; }
.cat-album:hover .cat-album-title { color: var(--accent); }
.cat-album-sub { display: block; font-size: .9em; opacity: .75; line-height: 1.35; margin-top: 2px; }
.cat-subtitle { font-size: 1.2em; opacity: .8; margin: -.3em 0 1em; }
.cat-album-count { font-size: .85em; opacity: .7; }
.cat-title-overlay .cat-album-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 16px 14px; color: #fff; border-radius: 0 0 var(--r, 12px) var(--r, 12px);
  background: linear-gradient(transparent, rgba(0, 0, 0, .72)); pointer-events: none; }
.cat-title-overlay .cat-album:hover .cat-album-title { color: #fff; }
.cat-empty { font-style: italic; opacity: .7; }
.cat-desc { max-width: none; }   /* full content width (Site settings › content width) */
.cat-back { margin-top: 2em; }
.cat-back a { color: var(--accent); font-weight: 600; text-decoration: none; }
.cat-gallery-title { margin: 1.6em 0 .2em; }
.cat-gallery-title a { color: inherit; text-decoration: none; }
@media (max-width: 900px) { .cat-albums { grid-template-columns: repeat(var(--cols-t, 2), minmax(0, 1fr)); } }
@media (max-width: 600px) { .cat-albums { grid-template-columns: repeat(var(--cols-m, 2), minmax(0, 1fr)); gap: var(--gap-m, 14px); } .cat-album-title { font-size: 1em; } }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(8, 10, 14, .94); opacity: 0; transition: opacity .2s; }
.lb.open { opacity: 1; }
.lb[hidden] { display: none; }
.lb-fig { margin: 0; max-width: calc(100vw - 140px); max-height: calc(100vh - 110px); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lb-fig img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 4px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); user-select: none; }
.lb-fig figcaption { color: #e5e7eb; text-align: center; font-size: 15px; max-width: 760px; }
.lb button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; transition: background .15s; }
.lb button:hover, .lb button:focus-visible { background: rgba(255, 255, 255, .22); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; top: 26px; left: 24px; color: #cbd5e1; font-size: 14px; font-variant-numeric: tabular-nums; }
.lb-single .lb-prev, .lb-single .lb-next, .lb-single .lb-count { display: none; }
@media (max-width: 600px) {
  .lb-fig { max-width: 100vw; }
  .lb-fig img { max-height: calc(100vh - 170px); border-radius: 0; }
  .lb-prev, .lb-next { top: auto; bottom: 18px; transform: none; }
  .lb-prev { left: calc(50% - 60px); } .lb-next { right: calc(50% - 60px); }
}
