/* Structural/contextual typography spacing that has no theme.json equivalent.
   Font family, base font, heading sizes/weights, link colors and blockquote
   styling now live in theme.json (settings.typography / styles.elements /
   styles.blocks["core/quote"]). */

p {
  margin-bottom: 1.15rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

h1:first-child,
h2:first-child,
h3:first-child,
h4:first-child,
h5:first-child,
h6:first-child {
  margin-top: 0;
}

strong {
  font-weight: 600;
}

/* Jos on sivun aivan ensimmäinen elementti, tarvitaan välistystä headeristä */
main > *:first-child:is(h1, h2, h3, h4, h5, h6, p) {
  margin-top: 5rem;
}

/* Jos on sivun aivan ensimmäinen elementti, tarvitaan välistystä footteriin */
main > *:last-child:is(h1, h2, h3, h4, h5, h6, p) {
  margin-bottom: 5rem;
}

main h1,
main h2,
main h3,
main h4,
main h5,
main h6 {
  margin-top: 1.5em;
  margin-bottom: 1em;
}

*:is(h1, h2, h3, h4, h5, h6) + *:is(h1, h2, h3, h4, h5, h6) {
  margin-top: 0;
}

/* Miscellaneous typography styles */
h2.widgettitle {
  font-size: 16px;
}

blockquote {
  margin: 0 !important;
  margin: 1em 0 !important;
}

/* font-size itself comes from the "ingressi" theme.json preset now, just the leftovers it doesn't carry */
.has-ingressi-font-size {
  margin-bottom: 1.5em;
  line-height: 1.4;
  font-weight: 400;
}

/* Underline only inside body copy, not standalone/component links */
p a {
  border-bottom: 1px solid currentColor;
}

a:active {
  border-bottom: none;
}

/* Special links */
main li a[href$=".pdf"]::after {
  display: inline-block;
  content: "";
  position: relative;
  left: 8px;
  vertical-align: -0.125em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-filetype-pdf' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5ZM1.6 11.85H0v3.999h.791v-1.342h.803c.287 0 .531-.057.732-.173.203-.117.358-.275.463-.474a1.42 1.42 0 0 0 .161-.677c0-.25-.053-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38.574.574 0 0 1-.238.241.794.794 0 0 1-.375.082H.788V12.48h.66c.218 0 .389.06.512.181.123.122.185.296.185.522Zm1.217-1.333v3.999h1.46c.401 0 .734-.08.998-.237a1.45 1.45 0 0 0 .595-.689c.13-.3.196-.662.196-1.084 0-.42-.065-.778-.196-1.075a1.426 1.426 0 0 0-.589-.68c-.264-.156-.599-.234-1.005-.234H3.362Zm.791.645h.563c.248 0 .45.05.609.152a.89.89 0 0 1 .354.454c.079.201.118.452.118.753a2.3 2.3 0 0 1-.068.592 1.14 1.14 0 0 1-.196.422.8.8 0 0 1-.334.252 1.298 1.298 0 0 1-.483.082h-.563v-2.707Zm3.743 1.763v1.591h-.79V11.85h2.548v.653H7.896v1.117h1.606v.638H7.896Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  height: 16px;
  width: 16px;
  background-size: 16px 16px !important;
  margin-right: 12px;
}

main li a[target="_blank"]:not([href$=".pdf"])::after {
  display: inline-block;
  content: "";
  position: relative;
  left: 8px;
  vertical-align: -0.125em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-box-arrow-up-right' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z'/%3E%3Cpath fill-rule='evenodd' d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  height: 16px;
  width: 16px;
  background-size: 16px 16px !important;
  margin-right: 12px;
}

.breadcrumbs,
.breadcrumb-navxt {
  font-size: 14px;
  color: #a5a5a5;
}

.breadcrumbs a,
.breadcrumb-navxt a {
  color: #000;
}
