* {
  margin: 0;
  padding: 0;
}

:root {
  --padding: 1.5rem;
  --color-black: #000;
  --color-white: #fff;
  --color-grey: #777;
  --color-light: #efefef;
  --color-text: var(--color-black);
  --color-text-grey: var(--color-grey);
  --color-background: var(--color-white);
  --color-code-light-grey:  #cacbd1;
  --color-code-comment:     #a9aaad;
  --color-code-white:       #c5c9c6;
  --color-code-red:         #d16464;
  --color-code-orange:      #de935f;
  --color-code-yellow:      #f0c674;
  --color-code-green:       #a7bd68;
  --color-code-aqua:        #8abeb7;
  --color-code-blue:        #7e9abf;
  --color-code-purple:      #b294bb;
  --font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --font-family-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

html {
  font-family: var(--font-family-sans);
  color: var(--color-text);
  background: var(--color-background);
}
img {
  width: 100%;
}
body {
  padding: var(--padding);
  max-width: 70rem;
  margin: 0 auto;
}
li {
  list-style: none;
}
a {
  color: currentColor;
  text-decoration: none;
}
button {
  font: inherit;
  background: none;
  border: 0;
  color: currentColor;
  cursor: pointer;
}
strong, b {
  font-weight: 600;
}
small {
  font-size: inherit;
  color: var(--color-text-grey);
}

.bg-light {
  background-color: var(--color-light);
}
.color-grey {
  color: var(--color-text-grey);
}

.header {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-right: -1rem;
  margin-left: -1rem;
  margin-bottom: 6rem;
}

.logo {
  padding: 1rem;
  display: flex;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
}

.menu {
  display: flex;
}
.menu a {
  padding: 1rem;
  display: block;
}
.menu a[aria-current] {
  text-decoration: underline;
}

.social {
  display: flex;
  padding: 0 .5rem;
}
.social a {
  padding: 1rem .5rem;
}

.section {
  padding: 3rem 0;
}

.grid {
  --columns: 12;
  --gutter: 3rem;
  display: grid;
  grid-gap: var(--gutter);
  grid-template-columns: 1fr;
}
.grid > .column {
  margin-bottom: 0;
}

.autogrid {
  --gutter: 3rem;
  --min: 10rem;
  display: grid;
  grid-gap: var(--gutter);
  grid-template-columns: repeat(auto-fit, minmax(var(--min), 1fr));
  grid-auto-flow: dense;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.text {
  line-height: 1.5em;
}
.text a {
  text-decoration: underline;
}
.text :first-child {
  margin-top: 0;
}
.text :last-child {
  margin-bottom: 0;
}
.text p,
.text ul,
.text ol {
  margin-bottom: 1.5rem;
}
.text ul,
.text ol {
  margin-left: 1rem;
}
.text ul p,
.text ol p {
  margin-bottom: 0;
}
.text ul > li {
  list-style: disc;
}
.text ol > li {
  list-style: decimal;
}
.text ul ol,
.text ul ul,
.text ol ul,
.text ol ol {
  margin-bottom: 0;
}
.text h1,
.h1,
.intro {
  font-size: 2rem;
  margin-bottom: 3rem;
  line-height: 1.25em;
}
.text h2,
.h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.text h3,
.h3 {
  font-weight: 600;
}
.text .codeblock {
  display: grid;
}
.text code {
  font-family: var(--font-family-mono);
  font-size: 1em;
  background: var(--color-light);
  padding: 0 .5rem;
  display: inline-block;
  color: var(--color-black);
}
.text pre {
  margin: 3rem 0;
  background: var(--color-black);
  color: var(--color-white);
  padding: 1.5rem;
  overflow-x: scroll;
  overflow-y: hidden;
  line-height: 1.5rem;
}
.text pre code {
  padding: 0;
  background: none;
  color: inherit;
}
.text hr {
  margin: 6rem 0;
}
.text dt {
  font-weight: 600;
}
.text blockquote {
  font-size: 1.25rem;
  line-height: 1.325em;
  border-left: 2px solid var(--color-black);
  padding-left: 1rem;
  margin: 3rem 0;
  max-width: 25rem;
}
.text blockquote footer {
  font-size: .875rem;
  font-style: italic;
}
.text figure {
  margin: 3rem 0;
}
.text figcaption {
  padding-top: .75rem;
  color: var(--color-text-grey);
}
.text figure ul,
.text figure.gallery ul {
  line-height: 0;
  margin: 0;
  padding: 0;
  columns: 3 14rem;
  column-gap: 1.5rem;
}
.text figure ul li,
.text figure.gallery ul li {
  list-style: none;
  break-inside: avoid;
  margin-bottom: 1.5rem;
}
.text figure ul li img,
.text figure.gallery ul li img {
  width: 100%;
  height: auto;
  display: block;
}

hr {
  border: 0;
  background: currentColor;
  height: 2px;
  width: 1.5rem;
  margin: 3rem auto;
}

.align-center {
  text-align: center;
}

.intro {
  max-width: 40rem;
}
.intro *:not(:last-child) {
  margin-bottom: 1em;
}

.h1 a,
.intro a,
.color-grey a,
.text a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.h1 a:hover,
.intro a:hover,
.color-grey a:hover,
.text a:hover {
  color: var(--color-link-hover);
  opacity: 0.85;
}

.cta,
.text a.cta,
a.cta {
  background: var(--color-cta-bg);
  color: var(--color-cta-text) !important;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none !important;
  transition: background 0.2s ease, opacity 0.2s ease;
  margin-top: 1.5rem;
}

.cta:hover,
.text a.cta:hover,
a.cta:hover {
  background: var(--color-cta-hover-bg);
  color: var(--color-cta-text) !important;
  opacity: 0.95 !important;
  text-decoration: none !important;
}

.cta span {
  text-decoration: none !important;
}

.cta .material-symbols-outlined {
  font-size: 1.25em;
  line-height: 1;
  text-decoration: none !important;
}

.video,
.img {
  position: relative;
  display: block;
  --w: 1;
  --h: 1;
  padding-bottom: calc(100% / var(--w) * var(--h));
  background: var(--color-black);
}
.img img,
.video iframe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}
.img[data-contain] img {
  object-fit: contain;
}
.img-caption,
.video-caption {
  padding-top: .75rem;
  line-height: 1.5em;
}

.footer {
  padding: 4.5rem 0 6rem;
  line-height: 1.5em;
}
.footer:before {
  content: "";
  display: block;
  width: 1.5rem;
  height: 2px;
  background: var(--color-black);
  margin-bottom: 1.5rem;
}

.footer h2 {
  font-weight: 600;
  margin-bottom: .75rem;
}
.footer ul,
.footer p {
  color: var(--color-text-grey);
}
.footer p {
  max-width: 15rem;
}
.footer-text a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.footer a:hover {
  color: var(--color-text);
}


.map {
  --w: 2;
  --h: 1;
  padding-bottom: calc(100% / var(--w) * var(--h));
  position: relative;
  overflow: hidden;
  background: var(--color-black);
}
.map iframe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.margin-s {
  margin-bottom: .75rem;
}
.margin-m {
  margin-bottom: 1.5rem;
}
.margin-l {
  margin-bottom: 3rem;
}
.margin-xl {
  margin-bottom: 4.5rem;
}
.margin-xxl {
  margin-bottom: 6rem;
}


@media screen and (min-width: 60rem) {
  body {
    --padding: 3rem;
  }

  .grid {
    grid-template-columns: repeat(12, 1fr);
  }
  .grid > .column {
    grid-column: span var(--columns);
  }

}

.pagination {
  display: flex;
  padding-top: 6rem;
}
.pagination > span {
  color: var(--color-text-grey);
}
.pagination > * {
  padding: .5rem;
  width: 3rem;
  text-align: center;
  border: 2px solid currentColor;
  margin-right: 1.5rem;
}
.pagination > a:hover {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}

.note-excerpt {
  line-height: 1.5em;
}
.note-excerpt header {
  margin-bottom: 1.5rem;
}
.note-excerpt figure {
  margin-bottom: .5rem;
}
.note-excerpt-title {
  font-weight: 600;
}
.note-excerpt-date {
  color: var(--color-text-grey);
}

/* Material Symbols Font (Self-hosted) */
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 100 700;
  src: url('../fonts/material-symbols-outlined.woff2') format('woff2');
  font-display: block;
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 1.25em;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'liga';
  vertical-align: -0.15em;
}

.heading-icon {
  margin-right: 0.35em;
  opacity: 0.85;
  font-size: 1.15em;
  line-height: 1;
  vertical-align: -0.15em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.heading-icon.icon-red,
.heading-icon.icon-accent,
.icon-red,
.icon-accent {
  color: #bc3230 !important;
  opacity: 1 !important;
}

.logo-icon {
  margin-right: 0.5rem;
  font-size: 1.4em;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.page-headline,
.block-heading {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
}

.block-heading .heading-text p,
.page-headline .heading-text p {
  display: inline;
  margin: 0 !important;
  padding: 0 !important;
}

/* Custom word/accent font classes */
.font-accent,
.font-custom {
  font-family: var(--font-family-accent);
  font-style: normal;
  letter-spacing: 0.02em;
}

.font-serif {
  font-family: "Playfair Display", Georgia, serif;
}

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

.font-mono {
  font-family: var(--font-family-mono);
}

/* iFrame Block Styles */
.block-iframe-figure {
  width: 100%;
  margin: 1.5rem 0;
}

.block-iframe-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  background: var(--color-light);
  border-radius: 6px;
  overflow: hidden;
}

.block-iframe-wrapper.has-border {
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.block-iframe-element,
.block-iframe-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
  display: block;
}

.block-iframe-caption {
  font-size: 0.875rem;
  color: var(--color-text-grey);
  margin-top: 0.5rem;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Back to Top Floating Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--color-cta-bg, var(--color-black));
  color: var(--color-cta-text, var(--color-white)) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.3s ease,
              background-color 0.2s ease;
  text-decoration: none !important;
  cursor: pointer;
}

.back-to-top.is-visible {
  opacity: 0.9;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  opacity: 1 !important;
  background-color: var(--color-cta-hover-bg, var(--color-black));
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  color: var(--color-cta-text, var(--color-white)) !important;
  text-decoration: none !important;
}

.back-to-top:active {
  transform: translateY(0);
}

.back-to-top .material-symbols-outlined {
  font-size: 1.5rem;
  line-height: 1;
  margin: 0;
  text-decoration: none !important;
}

/* Print QR code (hidden on screen, visible on print) */
.print-qr-code {
  display: none;
}

/* Print stylesheet (@media print) */
@media print {
  @page {
    size: A4 portrait;
    margin: 1.2cm 1.2cm 1.2cm 1.2cm;
  }

  *, *:before, *:after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  html, body {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 9.5pt !important;
    line-height: 1.45 !important;
    background: #fff !important;
  }

  /* Hide Header, Nav, Footer, and Lightbox when printing */
  .header,
  .footer,
  .menu,
  .lightbox,
  .pagination,
  .cta {
    display: none !important;
  }

  /* Main content A4 layout */
  .main {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Multi-column layout support on A4 print */
  .grid {
    display: grid !important;
    grid-template-columns: repeat(12, 1fr) !important;
    gap: 1.2rem !important;
    width: 100% !important;
  }

  .grid > .column {
    grid-column: span var(--columns, 12) !important;
    margin-bottom: 0 !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Headings & Typo */
  .h1 {
    font-size: 1.5rem !important;
    margin-bottom: 1.2rem !important;
    line-height: 1.2 !important;
  }

  .text h1, h1 {
    font-size: 1.35rem !important;
    margin-top: 1rem !important;
    margin-bottom: 0.4rem !important;
  }

  .text h2, h2, .h2 {
    font-size: 1.15rem !important;
    margin-top: 0.8rem !important;
    margin-bottom: 0.35rem !important;
  }

  .text h3, h3, .h3 {
    font-size: 1rem !important;
    margin-top: 0.6rem !important;
    margin-bottom: 0.25rem !important;
  }

  .text p, .text ul, .text ol {
    margin-bottom: 0.8rem !important;
  }

  .heading-icon {
    font-size: 1.15em !important;
    line-height: 1 !important;
    vertical-align: -0.15em !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  .block-heading, .page-headline {
    display: inline-flex !important;
    align-items: center !important;
  }

  .block-heading .heading-text,
  .page-headline .heading-text {
    display: inline !important;
  }

  .block-heading .heading-text p,
  .page-headline .heading-text p {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Break avoidance */
  h1, h2, h3, h4, h5, h6, .block-heading, .page-headline {
    page-break-after: avoid;
    break-after: avoid;
  }

  img, figure, table, blockquote, .print-qr-code {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  p, li {
    orphans: 3;
    widows: 3;
  }

  /* Print QR code block */
  .print-qr-code {
    display: flex !important;
    align-items: center;
    gap: 1.2rem;
    margin-top: 2rem !important;
    padding-top: 1rem !important;
    border-top: 1px solid #ddd !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .print-qr-svg {
    width: 80px !important;
    height: 80px !important;
    flex-shrink: 0;
  }

  .print-qr-svg svg {
    width: 100% !important;
    height: 100% !important;
  }

  .print-qr-info {
    font-size: 8.5pt !important;
    line-height: 1.35 !important;
    color: #333 !important;
  }

  .print-qr-info a {
    text-decoration: underline !important;
    color: #000 !important;
    word-break: break-all;
  }
}


