/* Define A4 page size and margins for printing */
@page {
  size: A4 portrait;
  margin: 20mm;
}

@font-face {
  font-family: "Lexend-Variable";
  /* src: url('../fonts/Lexend-Variable.woff2') format('woff2-variations'); */
  src: url("../fonts/Lexend[wght].ttf") format("woff2-variations");
  font-weight: 125 950;
  font-style: oblique 0deg 20deg;
  font-stretch: 75% 125%;
}

/* Apply basic print styling */
body {
  font-family: "Lexend-Variable", arial, "Open Sans", roboto, oxygen, ubuntu,
    cantarell, "Helvetica Neue", sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  color: #1d1d1d;
  background: #dadce0;
  margin: 0;
  padding: 0;
}

/* Main container (Drupal usually uses <body> or default divs for content) */
body > * {
  max-width: 180mm;
  /* Within A4 margins */
  margin: 0 auto;
  padding: 10mm;
  box-sizing: border-box;
  background-color: #fff;
}

/* Headings */
h1 {
  font-size: 46px;
}

h2 {
  font-size: 27px;
}

h1,
h2,
h3,
h4,
h5 {
  font-weight: bold;
  color: #000;
  page-break-after: avoid;
  margin-top: 1em;
  margin-bottom: 0.5em;
}

/* Paragraphs */
p {
  margin: 0 0 12pt;
  orphans: 3;
  widows: 3;
}

/* Links with fallback */
a {
  color: #165a98;
  text-decoration: underline;
}

a::after {
  content: " (" attr(href) ")";
  font-size: 10pt;
}

/* Lists */
ul,
ol {
  margin: 1em 0 1em 2em;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

th,
td {
  border: 1px solid #444;
  padding: 6pt;
  text-align: left;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  page-break-inside: avoid;
}

/* Horizontal rules */
hr {
  border: none;
  border-top: 1px solid #ccc;
  margin: 2em 0;
}

/* Prevent elements from breaking across pages */
table,
pre,
blockquote {
  page-break-inside: avoid;
}

/* Optional: Add visible page break class support */
.page-break {
  page-break-before: always;
}

/* Hide elements you don't want printed */
header,
footer,
.no-print,
.navigation,
.toolbar,
.print-button {
  display: none !important;
}

.tablefield-wrapper table {
  table-layout: fixed;
}

/* Links won't work on a printed page */
.link-content svg {
  display: none;
}