@charset "UTF-8";
/* Bjsk (bjsk.fi) – sivuston tyylit
   Ilme: sininen #005293 + accent #ffcd00
*/
:root {
  --hi-ink: #1a2430;
  --hi-ink-soft: #4a5568;
  --hi-forest: #005293;
  --hi-forest-deep: #003d6b;
  --hi-mint: #006aa7;
  --hi-sand: #eef4f9;
  --hi-sand-deep: #d4e2ef;
  --hi-paper: #f4f7fa;
  --hi-white: #ffffff;
  --hi-accent: #005293;
  --hi-sky: #006aa7;
  --hi-sky-soft: #5a8fb8;
  --hi-orange: #ffcd00;
  --hi-orange-hot: #e6b800;
  --hi-line: rgba(64, 64, 64, 0.14);
  --hi-shadow: 0 12px 40px rgba(60, 60, 60, 0.1);
  --hi-radius: 0.35rem;
  --hi-font: "Source Sans 3", Arial, system-ui, sans-serif;
  --hi-display: "Montserrat", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--hi-font);
  color: var(--hi-ink);
  background:
    radial-gradient(1100px 560px at 8% -10%, rgba(45, 122, 184, 0.16), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(18, 50, 75, 0.1), transparent 50%),
    linear-gradient(180deg, #e8eef4 0%, var(--hi-paper) 30%, var(--hi-paper) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2000;
}

/* ---- Top bar ---- */
.hi-topbar {
  background: rgba(244, 247, 245, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hi-line);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.hi-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none !important;
  color: var(--hi-ink) !important;
  padding: 0.15rem 0;
}

.hi-brand-logo {
  display: block;
  height: 2.65rem;
  width: auto;
  max-width: min(220px, 55vw);
  object-fit: contain;
  object-position: left center;
}

.hi-brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.4rem;
  background:
    linear-gradient(135deg, #005A2E 0%, #3DB26C 70%, #6bc98a 100%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.2);
}

.hi-brand-text {
  font-family: var(--hi-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hi-brand-text strong { font-weight: 700; }
.hi-brand-light { font-weight: 600; opacity: 0.72; margin-left: 0.15em; }

.navbar-toggler {
  border-color: var(--hi-line);
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(15, 28, 36, 0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.hi-topnav .nav-link {
  color: var(--hi-ink-soft) !important;
  font-weight: 500;
  padding: 0.45rem 0.75rem !important;
  border-radius: var(--hi-radius);
}
.hi-topnav .nav-link:hover,
.hi-topnav .nav-link.active {
  color: var(--hi-mint) !important;
  background: rgba(61, 178, 108, 0.1);
}

.hi-search {
  gap: 0.35rem;
  max-width: 16rem;
}
.hi-search .form-control {
  border-color: var(--hi-line);
  background: var(--hi-white);
}
.hi-btn-search {
  background: var(--hi-forest);
  color: #fff;
  border: none;
  white-space: nowrap;
}
.hi-btn-search:hover { background: var(--hi-forest-deep); color: #fff; }

.hi-editbar {
  background: #404040;
  color: #f0f0f0;
  font-size: 0.875rem;
  padding: 0.45rem 0;
}

/* ---- Korostettu tiedotebanneri ---- */
.hi-alert-banner {
  background: #fff5f5;
  border-bottom: 1px solid #f0c4c4;
  padding: 0.7rem 0;
  position: relative;
  z-index: 1040;
}
.hi-alert-banner .container {
  display: flex;
  align-items: center;
  min-height: 1.5rem;
}
.hi-alert-link {
  color: #c1121f;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.4;
  display: inline;
}
.hi-alert-link:hover,
.hi-alert-link:focus-visible {
  color: #8a0c15;
  text-decoration: underline;
}
.hi-typewriter-text {
  white-space: pre-wrap;
}
.hi-alert-cta {
  font-weight: 500;
  opacity: 0.78;
  white-space: nowrap;
}
.hi-typewriter-cursor {
  display: inline-block;
  width: 0.55ch;
  margin-left: 1px;
  border-right: 2px solid #c1121f;
  animation: hi-cursor-blink 0.85s steps(1) infinite;
  vertical-align: -0.05em;
  height: 1.05em;
}
@keyframes hi-cursor-blink {
  0%, 45% { border-color: #c1121f; }
  46%, 100% { border-color: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .hi-typewriter-cursor { animation: none; border-color: #c1121f; }
}

/* ---- Shell ---- */
.hi-shell {
  flex: 1;
  padding: 0.75rem 0 3rem;
}

.hi-main {
  background: var(--hi-white);
  border: 1px solid var(--hi-line);
  border-radius: 0.75rem;
  padding: 1.5rem 1.35rem 2rem;
  box-shadow: var(--hi-shadow);
  animation: hiFadeUp 0.45s ease both;
}

@media (min-width: 992px) {
  .hi-main { padding: 2rem 2.25rem 2.5rem; }
}

@keyframes hiFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hi-page-title {
  font-family: var(--hi-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: var(--hi-ink);
}

.hi-page-lead {
  margin: 0 0 1.5rem;
}
.hi-page-lead-figure {
  margin: 0 0 1rem;
}
.hi-page-lead-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--hi-radius);
}
.hi-page-ingress {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--hi-ink-soft);
  font-weight: 500;
  max-width: 42rem;
}
.hi-page-lead-compact .hi-page-ingress {
  font-size: 1.05rem;
  max-width: none;
}
.hi-page-lead-compact .hi-child-thumb {
  flex-basis: 11rem;
  pointer-events: none;
}
.hi-page-lead-compact .hi-child-thumb img {
  height: 8rem;
}
@media (max-width: 575.98px) {
  .hi-page-lead-compact .hi-child-thumb {
    flex-basis: 7.5rem;
  }
  .hi-page-lead-compact .hi-child-thumb img {
    height: 5.5rem;
  }
}


.hi-child-item-inner {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.hi-child-thumb {
  flex: 0 0 7.5rem;
  display: block;
  overflow: hidden;
  border-radius: var(--hi-radius);
  background: var(--hi-sand);
}
.hi-child-thumb img {
  display: block;
  width: 100%;
  height: 5.5rem;
  object-fit: cover;
}
.hi-child-body {
  min-width: 0;
  flex: 1 1 auto;
}
.hi-child-ingress {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #5a6b73;
}
@media (max-width: 575.98px) {
  .hi-child-thumb {
    flex-basis: 5.5rem;
  }
  .hi-child-thumb img {
    height: 4.25rem;
  }
}

.hi-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.hi-page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  font-size: 0.925rem;
}
body.hi-home .hi-page-meta {
  margin-top: 1.25rem;
}
.hi-page-meta-left,
.hi-page-meta-right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  align-items: center;
}
.hi-page-meta-right {
  margin-left: auto;
  justify-content: flex-end;
}
.hi-page-meta-right .hi-updated {
  color: #5a6b73;
  white-space: nowrap;
}

.hi-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 0.25rem;
  background: var(--hi-sand-deep);
  color: var(--hi-ink-soft);
}
.hi-badge-tiedote { background: #d8f0e2; color: #005A2E; }
.hi-badge-tapahtuma { background: #d7ebe3; color: var(--hi-forest-deep); }
.hi-badge-perus { background: #dfe6ea; color: #2a3a44; }
.hi-badge-valiotsikko { background: #e4eaf0; color: #2a3a44; }
.hi-badge-teksti { background: #e8efe9; color: var(--hi-forest-deep); }
.hi-badge-kuva { background: #d8f0e2; color: #005A2E; }
.hi-badge-wysiwyg { background: #e8e4f0; color: #3d3460; }
.hi-badge-youtube { background: #fde8e8; color: #8a1f1f; }
.hi-badge-linkki { background: #e4eef8; color: #1f4a6e; }

.hi-link-card {
  margin: 1rem 0;
}
.hi-link-card-main {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border: 1px solid color-mix(in srgb, var(--hi-forest) 28%, transparent);
  background: color-mix(in srgb, var(--hi-forest) 5%, #fff);
  color: var(--hi-forest-deep);
  text-decoration: none;
  border-radius: var(--hi-radius);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.hi-link-card-main:hover,
.hi-link-card-main:focus {
  background: color-mix(in srgb, var(--hi-forest) 12%, #fff);
  border-color: var(--hi-forest);
  color: var(--hi-forest-deep);
}
.hi-link-card-image {
  flex: 0 0 7.5rem;
  width: 7.5rem;
  height: 4.5rem;
  overflow: hidden;
  border-radius: 0.35rem;
  background: color-mix(in srgb, var(--hi-forest) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--hi-forest) 16%, transparent);
  margin-top: 0.1rem;
}
.hi-link-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center;
}
.hi-link-card-body {
  flex: 1;
  min-width: 0;
}
.hi-link-card-title {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  margin-bottom: 0.2rem;
}
.hi-link-card-ext {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.85em;
  opacity: 0.75;
}
.hi-link-card-url {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--hi-ink-soft);
  word-break: break-all;
  margin-bottom: 0.35rem;
}
.hi-link-card-desc {
  display: block;
  font-size: 0.95rem;
  color: var(--hi-ink-soft);
  line-height: 1.55;
  font-weight: 400;
}
.hi-link-card-desc p {
  margin: 0 0 0.45rem;
}
.hi-link-card-desc p:last-child {
  margin-bottom: 0;
}

.hi-youtube {
  position: relative;
  width: 100%;
  margin: 1.25rem 0 1.5rem;
  aspect-ratio: 16 / 9;
  background: #0f1c24;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--hi-line);
}
.hi-youtube iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.hi-subhead {
  font-family: var(--hi-display);
  font-size: 1.45rem;
  margin: 1.75rem 0 0.75rem;
  color: var(--hi-forest-deep);
}

.hi-text {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 42rem;
}
.hi-text p { margin: 0 0 0.85rem; }
.hi-text p:last-child { margin-bottom: 0; }
.hi-text-h3 {
  font-family: var(--hi-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--hi-forest-deep);
  margin: 1.15rem 0 0.45rem;
  line-height: 1.35;
}
.hi-text-h3:first-child {
  margin-top: 0;
}
.hi-text strong { font-weight: 700; }
.hi-text em { font-style: italic; }
.hi-text del { text-decoration: line-through; opacity: 0.85; }
.hi-text a {
  color: var(--hi-forest);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}
.hi-text a:hover { color: var(--hi-forest-deep); }
.hi-text code {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
  font-size: 0.9em;
  background: var(--hi-sand);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
}
.hi-codeblock {
  margin: 0.75rem 0;
  padding: 0.85rem 1rem;
  background: #1a242b;
  color: #e8f0f3;
  border-radius: 0.4rem;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.45;
}
.hi-codeblock code {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
  background: transparent;
  padding: 0;
  color: inherit;
}
.hi-quote {
  margin: 0.75rem 0;
  padding: 0.35rem 0 0.35rem 0.9rem;
  border-left: 3px solid var(--hi-mint);
  color: var(--hi-ink-soft);
}
.hi-text-list,
.hi-tasklist {
  margin: 0.5rem 0 0.85rem;
  padding-left: 1.35rem;
}
.hi-tasklist {
  list-style: none;
  padding-left: 0;
}
.hi-tasklist li {
  margin: 0.25rem 0;
  padding-left: 0.15rem;
}
.hi-task-box {
  font-family: ui-monospace, Consolas, monospace;
  color: var(--hi-forest);
}
.hi-task-done {
  opacity: 0.72;
  text-decoration: line-through;
}

.hi-wysiwyg {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 46rem;
}
.hi-wysiwyg p { margin-bottom: 1rem; }
.hi-wysiwyg a { color: var(--hi-forest); }
.hi-wysiwyg ul, .hi-wysiwyg ol { padding-left: 1.25rem; }
.hi-wysiwyg iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  margin: 1rem 0;
  border-radius: 0.5rem;
}

.hi-figure {
  margin: 1.5rem 0;
  width: 100%;
  max-width: 100%;
}
.hi-figure-inline {
  margin: 0;
}
.hi-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  border: 1px solid var(--hi-line);
}
/* Partnerilogot: ei kehystä */
.hi-figure img[src*="purolomat_logo" i],
.hi-wysiwyg img[src*="purolomat_logo" i],
.hi-figure img[src*="Eumer_minttu" i],
.hi-wysiwyg img[src*="Eumer_minttu" i],
.hi-figure img[src*="eumer" i],
.hi-wysiwyg img[src*="eumer" i],
.hi-figure img[src$=".svg" i],
.hi-wysiwyg img[src$=".svg" i] {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.hi-figure figcaption {
  font-size: 0.9rem;
  color: #5a6b73;
  margin-top: 0.55rem;
  line-height: 1.45;
}
.hi-figure-link {
  display: block;
  line-height: 0;
}
.hi-figure-link:hover img {
  opacity: 0.92;
}
.hi-image-with-text {
  display: grid;
  gap: 1.25rem;
  margin: 1.25rem 0 1.5rem;
  align-items: start;
}
.hi-image-with-text-body {
  max-width: none;
}
@media (min-width: 768px) {
  .hi-image-with-text {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.75rem;
  }
  .hi-image-vasen .hi-image-with-text-media { order: 1; }
  .hi-image-vasen .hi-image-with-text-body { order: 2; }
  .hi-image-oikea .hi-image-with-text-media { order: 2; }
  .hi-image-oikea .hi-image-with-text-body { order: 1; }
}

.breadcrumb {
  /* \203A = › — escape, ettei IIS/latin1-CSS hajota merkkiä */
  --bs-breadcrumb-divider: "\203A";
  font-size: 0.875rem;
}
.breadcrumb a { color: var(--hi-forest); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---- Sidebar ---- */
@media (min-width: 992px) {
  .hi-shell > .container > .row {
    align-items: flex-start;
  }
  .hi-shell > .container > .row > .hi-sidebar {
    padding-top: 0;
  }
}
.hi-sidepanel {
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--hi-line);
  border-radius: 0.75rem;
  padding: 1.15rem 1rem;
  position: sticky;
  top: 5.5rem;
  animation: hiFadeUp 0.55s ease both;
}

.hi-side-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5a6b73;
  margin: 0 0 0.65rem;
  font-weight: 700;
}

.hi-sidenav {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hi-sidenav li { margin: 0; }
.hi-sidenav a {
  display: block;
  padding: 0.4rem 0.55rem;
  color: var(--hi-ink-soft);
  text-decoration: none;
  border-radius: var(--hi-radius);
  font-weight: 500;
  font-size: 0.95rem;
}
.hi-sidenav a:hover,
.hi-sidenav a.active {
  background: rgba(61, 178, 108, 0.12);
  color: var(--hi-forest);
}
.hi-sidenav-news a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.hi-nav-icon {
  flex: 0 0 auto;
  width: 0.95rem;
  height: 0.95rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.72;
}
.hi-sidenav a:hover .hi-nav-icon,
.hi-sidenav a.active .hi-nav-icon {
  opacity: 1;
}
.hi-nav-icon-fill {
  fill: currentColor;
  stroke: none;
}
.hi-sidenav-nested {
  margin-left: 0.75rem;
  border-left: 2px solid var(--hi-sand-deep);
  padding-left: 0.25rem;
  margin-bottom: 0.35rem;
}

/* ---- Lists / cards for news & events ---- */
.hi-list-year {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hi-forest);
  margin: 2rem 0 0.25rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--hi-line);
}
.hi-list-year:first-of-type {
  margin-top: 1rem;
}
.hi-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hi-list-item {
  padding: 0.25rem 0;
}
.hi-list-item:first-child { padding-top: 0; }
.hi-list-item a {
  color: var(--hi-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
}
.hi-list-item a:hover { color: var(--hi-forest); }
.hi-list-meta {
  font-size: 0.875rem;
  color: #5a6b73;
  margin-top: 0.25rem;
}

.hi-snippet {
  margin: 0.45rem 0 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--hi-ink-soft);
  max-width: 42rem;
}

.hi-search-table td {
  vertical-align: top;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}
.hi-search-table .hi-snippet {
  margin-top: 0.35rem;
}

.hi-hit,
mark.hi-hit {
  background: #c8ebd6;
  color: var(--hi-ink);
  padding: 0.05em 0.15em;
  border-radius: 0.15rem;
  font-weight: 600;
}

.hi-search-results .hi-list-item a mark.hi-hit {
  background: #c8ebd6;
}

/* Sivuluettelo: suodatus + lajittelu */
.hi-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}
.hi-table-toolbar .form-control {
  max-width: 22rem;
  border-color: var(--hi-line);
}
.hi-table-toolbar .form-control:focus {
  border-color: var(--hi-mint);
  box-shadow: 0 0 0 0.2rem rgba(61, 155, 122, 0.2);
}

.hi-sort-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 600;
  color: var(--hi-ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.hi-sort-btn:hover,
.hi-sort-btn:focus-visible {
  color: var(--hi-forest);
  outline: none;
}
.hi-sort-ind {
  font-size: 0.65rem;
  color: var(--hi-mint);
  min-width: 0.75rem;
}
.hi-sortable thead th {
  white-space: nowrap;
}

.hi-path-label {
  font-size: 0.75rem;
  line-height: 1.2;
  color: #7a8b93;
  margin-bottom: 0.15rem;
  word-break: break-all;
}
.hi-page-name {
  font-weight: 600;
  color: var(--hi-forest);
  text-decoration: none;
}
.hi-page-name:hover {
  text-decoration: underline;
}

/* Edellinen / Seuraava sisarsivut */
.hi-sibling-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--hi-line);
  border-top: 0;
}
.hi-sibling-prev,
.hi-sibling-next {
  min-width: 0;
}
.hi-sibling-next {
  text-align: right;
}
.hi-sibling-nav a {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  text-decoration: none;
  color: var(--hi-ink);
  max-width: 100%;
}
.hi-sibling-nav a:hover .hi-sibling-title {
  color: var(--hi-forest);
}
.hi-sibling-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7a8b93;
  font-weight: 700;
}
.hi-sibling-prev .hi-sibling-label::before { content: "\2190\00A0"; } /* ← */
.hi-sibling-next .hi-sibling-label::after { content: "\00A0\2192"; } /* → */
.hi-sibling-title {
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.35;
  word-break: break-word;
}
@media (max-width: 575.98px) {
  .hi-sibling-nav {
    grid-template-columns: 1fr;
  }
  .hi-sibling-next { text-align: left; }
}

.hi-empty {
  padding: 1.5rem;
  background: var(--hi-sand);
  border-radius: var(--hi-radius);
  color: #5a6b73;
}

/* ---- kuvat.fi upotus ---- */
.hi-kuvat-embed {
  margin: 0.5rem 0 1.5rem;
  min-height: 12rem;
}
.hi-kuvat-embed .pb-folderembed {
  width: 100%;
}

/* Wysiwyg-sivun kapea max-width estää 5 sarakkeen mahtumisen */
.hi-wysiwyg:has(.pb-folderembed) {
  max-width: none;
}

/*
  kuvat.fi käyttää inline-block + %-leveyksiä.
  Elementtien väliset whitespace-merkit kasvattavat rivin leveyttä,
  jolloin viimeinen kuva tippuu seuraavalle riville (esim. 4+1 vs 5).
*/
.pb-folderembed.pb-thumbscale.pb-hascolumns {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  column-gap: 1.5%;
  row-gap: 0.85rem;
}
.pb-folderembed.pb-thumbscale.pb-hascolumns > br {
  display: none;
}
.pb-folderembed.pb-thumbscale.pb-hascolumns .pb-imageobject {
  margin-right: 0 !important;
  margin-bottom: 0 !important;
  box-sizing: border-box;
}
.pb-folderembed.pb-thumbscale.pb-columns2 .pb-imageobject { width: calc((100% - 1.5%) / 2) !important; }
.pb-folderembed.pb-thumbscale.pb-columns3 .pb-imageobject { width: calc((100% - 3%) / 3) !important; }
.pb-folderembed.pb-thumbscale.pb-columns4 .pb-imageobject { width: calc((100% - 4.5%) / 4) !important; }
.pb-folderembed.pb-thumbscale.pb-columns5 .pb-imageobject { width: calc((100% - 6%) / 5) !important; }
.pb-folderembed.pb-thumbscale.pb-columns6 .pb-imageobject { width: calc((100% - 7.5%) / 6) !important; }

/* Kapea näyttö: aina 1 sarake (data-columns-arvosta riippumatta) */
@media (max-width: 575.98px) {
  .pb-folderembed.pb-thumbscale.pb-hascolumns {
    column-gap: 0;
  }
  .pb-folderembed.pb-thumbscale.pb-hascolumns .pb-imageobject {
    width: 100% !important;
  }
}

/* ---- Hero (etusivu) ---- */
.hi-hero {
  margin: -0.25rem 0 1.75rem;
  padding: 1.75rem 1.5rem;
  border-radius: 0.65rem;
  background:
    linear-gradient(120deg, rgba(64, 64, 64, 0.94), rgba(0, 90, 46, 0.88)),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  color: #f5f5f5;
  animation: hiFadeUp 0.5s ease both;
}
.hi-hero-photo {
  position: relative;
  min-height: 0;
  display: block;
  padding: 0;
  overflow: hidden;
  background: #333;
}
body.hi-home .hi-hero.hi-hero-photo.hi-hero-carousel {
  margin: -1.5rem -1.35rem 0;
  border-radius: 0.75rem 0.75rem 0 0;
  overflow: hidden;
}
@media (min-width: 992px) {
  body.hi-home .hi-hero.hi-hero-photo.hi-hero-carousel {
    margin: -2rem -2.25rem 0;
  }
}
.hi-hero-img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}
.hi-hero-carousel .carousel {
  position: relative;
  z-index: 0;
}
.hi-hero-carousel .carousel-inner,
.hi-hero-carousel .carousel-item {
  background: #333;
}
.hi-hero-carousel .carousel-inner {
  aspect-ratio: 960 / 240;
}
.hi-hero-carousel .carousel-item {
  height: 100%;
}
.hi-hero-carousel .hi-hero-img {
  width: 100%;
  height: auto;
  aspect-ratio: 960 / 240;
  object-fit: cover;
  object-position: center;
}
.hi-hero-carousel .carousel-indicators {
  z-index: 2;
  margin-bottom: 0.85rem;
}
.hi-hero-carousel .carousel-indicators [data-bs-target] {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.55);
  border: 0;
  opacity: 1;
}
.hi-hero-carousel .carousel-indicators .active {
  background-color: var(--hi-mint);
}
.hi-hero-carousel .carousel-control-prev,
.hi-hero-carousel .carousel-control-next {
  z-index: 2;
  width: 3rem;
  opacity: 0.85;
}
.hi-hero-carousel .carousel-control-prev:hover,
.hi-hero-carousel .carousel-control-next:hover {
  opacity: 1;
}
.hi-hero-photo.hi-hero-carousel::after {
  background: linear-gradient(180deg, transparent 45%, rgba(18, 50, 75, 0.42) 100%);
}
.hi-hero-photo.hi-hero-carousel .hi-hero-inner {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
.hi-hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(60, 60, 60, 0.82) 0%, rgba(0, 90, 46, 0.5) 50%, rgba(61, 178, 108, 0.28) 100%);
  pointer-events: none;
  z-index: 1;
}
.hi-hero-inner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 0.85rem 1.1rem 1rem;
  max-width: 36rem;
  animation: hiFadeUp 0.65s ease both;
  pointer-events: none;
}
.hi-hero-brand {
  font-family: var(--hi-display);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
  color: #fff;
}
.hi-hero-tagline {
  margin: 0 0 0.85rem !important;
  font-size: clamp(0.98rem, 1.8vw, 1.12rem) !important;
  font-weight: 500;
  opacity: 0.94;
  max-width: 28rem;
  line-height: 1.35;
}
.hi-hero-lead {
  margin: 0 0 0.45rem !important;
  font-size: 0.85rem !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.72;
}
.hi-hero h1 {
  font-family: var(--hi-display);
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: #fff;
}
.hi-hero-photo h1 {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
}
.hi-hero-rotator {
  position: relative;
  min-height: 1.45em;
}
.hi-hero-rotator-text {
  display: inline-block;
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.hi-hero-rotator-text.is-out {
  opacity: 0;
  transform: translateY(0.35rem);
}
.hi-hero-rotator-text.is-in {
  opacity: 1;
  transform: translateY(0);
}
.hi-hero p {
  margin: 0;
  opacity: 0.92;
  max-width: 36rem;
  font-size: 1rem;
}
@media (prefers-reduced-motion: reduce) {
  .hi-hero-rotator-text { transition: none; }
}
@media (min-width: 768px) {
  .hi-hero-inner {
    padding: 1.15rem 1.5rem 1.25rem;
  }
}

/* ---- Footer ---- */
.hi-footer {
  background: #404040;
  color: #d0d0d0;
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}
.hi-footer a { color: #fff; text-decoration: none; }
.hi-footer a:hover { color: var(--hi-mint); text-decoration: underline; }
.hi-footer-brand {
  font-family: var(--hi-display);
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.35rem;
}
.hi-footer-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8aa0ab;
  margin-bottom: 0.65rem;
  font-weight: 700;
}
.hi-footer-links li { margin-bottom: 0.35rem; }
.hi-footer-address {
  line-height: 1.55;
  margin-top: 0.5rem;
}
.hi-footer-contact li {
  margin-bottom: 0.85rem;
}
.hi-footer-contact a {
  display: block;
  line-height: 1.45;
}
.hi-footer-invoice {
  line-height: 1.55;
  font-size: 0.925rem;
}
.hi-footer-muted {
  color: #8aa0ab;
  font-size: 0.875rem;
}
.hi-footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
  color: #8aa0ab;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: center;
  justify-content: space-between;
}
.hi-footer-legal {
  color: #8aa0ab;
  text-decoration: none;
}
.hi-footer-legal:hover,
.hi-footer-legal:focus-visible {
  color: #c5d4db;
  text-decoration: underline;
}
.hi-feedback-bar {
  margin: 2.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--hi-line);
  text-align: right;
}
.hi-feedback-link {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.8rem;
  color: #5a6b73;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
  text-align: left;
}
.hi-feedback-link:hover,
.hi-feedback-link:focus-visible {
  color: var(--hi-forest-deep);
}
.hi-feedback-status.is-ok { color: var(--hi-forest-deep); }
.hi-feedback-status.is-err { color: #a33; }

.hi-footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem 1.75rem;
  align-items: center;
  justify-content: center;
  margin-top: 1.75rem;
  padding: 1.35rem 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
}
.hi-footer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hi-footer-badge img {
  display: block;
  max-height: 88px;
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
}
@media (max-width: 575.98px) {
  .hi-footer-badge img {
    max-height: 64px;
    max-width: 160px;
  }
}

/* ---- Forms / admin ---- */
.hi-contact-form {
  max-width: 36rem;
}
.hi-form .form-label { font-weight: 600; font-size: 0.9rem; }
.hi-form .form-control,
.hi-form .form-select {
  border-color: var(--hi-line);
}
.hi-form input[readonly] {
  background: var(--hi-paper);
  color: var(--hi-ink-soft);
  cursor: default;
}
.btn-hi {
  background: var(--hi-forest);
  border-color: var(--hi-forest);
  color: #fff;
}
.btn-hi:hover { background: var(--hi-forest-deep); border-color: var(--hi-forest-deep); color: #fff; }
.btn-outline-hi {
  border-color: var(--hi-forest);
  color: var(--hi-forest);
}
.btn-outline-hi:hover { background: var(--hi-mint); border-color: var(--hi-mint); color: #fff; }

.hi-row-block {
  margin-bottom: 0.25rem;
}
.hi-row-preview .hi-subhead:first-child {
  margin-top: 0.5rem;
}
.hi-row-divider {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  border-top: 1px solid var(--hi-line);
  padding: 0.4rem 0 0.35rem;
  margin: 0.75rem 0 0.15rem;
}
.hi-row-insert-slot {
  background: rgba(15, 28, 36, 0.045);
  border-radius: var(--hi-radius);
  padding: 0 0.75rem;
  margin: 0.4rem 0;
}
.hi-row-insert-divider {
  justify-content: flex-end;
  margin-top: 0.15rem;
  margin-bottom: 0.15rem;
  border-top-color: transparent;
}
.hi-row-insert-divider .dropdown-menu {
  min-width: 10rem;
  font-size: 0.9rem;
}
.hi-row-insert-slot .hi-row-insert-editor {
  padding-bottom: 0.65rem;
}
.hi-row-type {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}
.hi-row-editor {
  border: 1px solid var(--hi-line);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 0.85rem;
  background: var(--hi-paper);
}
.hi-row-block.is-editing .hi-row-preview,
.hi-row-block.is-editing .hi-row-divider {
  display: none;
}
.hi-page-info-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.hi-page-info-preview .hi-page-meta {
  margin-bottom: 0.75rem;
}
.hi-page-info-preview .hi-page-meta-right a[href^="/skriv-ut/"] {
  display: none;
}
.hi-page-info-block .hi-page-title {
  margin-top: 0.35rem;
  margin-bottom: 0;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  flex: 1 1 auto;
  min-width: 0;
}
.hi-page-status {
  flex: 0 0 auto;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.hi-page-status-published {
  color: var(--hi-forest);
}
.hi-page-status-draft {
  color: var(--hi-accent);
}
.hi-page-info-divider {
  background: rgba(15, 28, 36, 0.045);
  border-top-color: transparent;
  border-radius: var(--hi-radius);
  padding: 0.45rem 0.75rem;
  margin: 0 0 0.35rem;
}
.hi-page-info-path {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--hi-ink-soft);
  word-break: break-all;
}
.hi-page-info-block.is-editing .hi-page-info-preview,
.hi-page-info-block.is-editing .hi-page-info-divider {
  display: none;
}
.hi-page-info-block.is-editing .hi-page-info-editor {
  display: block;
}
.hi-row-editor-new {
  border-color: var(--hi-mint);
}
.hi-image-field .hi-upload-input {
  margin-bottom: 0.35rem;
}
.hi-upload-preview {
  max-height: 160px;
  width: auto;
  border: 1px solid var(--hi-line);
  border-radius: var(--hi-radius);
  background: var(--hi-white);
}

.hi-draft-watermark {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  overflow: hidden;
}
.hi-draft-watermark span {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%) rotate(-28deg);
  font-family: var(--hi-display);
  font-size: clamp(3.5rem, 16vw, 11rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(196, 92, 38, 0.11);
  white-space: nowrap;
  user-select: none;
}

.hi-sitemap-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.hi-sitemap ul { list-style: none; padding-left: 1.15rem; margin: 0.2rem 0 0; }
.hi-sitemap > ul { padding-left: 0; }
.hi-sitemap li {
  margin: 0.15rem 0;
}
.hi-sitemap-branch,
.hi-sitemap-leaf {
  position: relative;
}
.hi-sitemap-branch {
  padding-left: 1.35rem;
}
.hi-sitemap-leaf {
  padding-left: 1.35rem;
}
.hi-sitemap-toggle {
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 1px solid var(--hi-line);
  border-radius: 0.2rem;
  background: var(--hi-white);
  color: var(--hi-ink-soft);
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hi-sitemap-toggle::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0.28rem 0 0.28rem 0.4rem;
  border-color: transparent transparent transparent currentColor;
  transform: rotate(0deg);
  transition: transform 0.15s ease;
}
.hi-sitemap-branch.is-open > .hi-sitemap-toggle::before {
  transform: rotate(90deg);
}
.hi-sitemap-branch:not(.is-open) > ul {
  display: none;
}
.hi-sitemap-leaf::before {
  content: "";
  position: absolute;
  left: 0.45rem;
  top: 0.7rem;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: rgba(15, 28, 36, 0.25);
}
.hi-sitemap a { color: var(--hi-forest); text-decoration: none; }
.hi-sitemap a:hover { text-decoration: underline; }

/* ---- Print ---- */
@media print {
  .hi-draft-watermark { display: none !important; }
  .hi-topbar, .hi-sidebar, .hi-footer, .hi-page-actions, .hi-editbar, .hi-alert-banner, .hi-feedback-bar, .skip-link { display: none !important; }
  .hi-main {
    box-shadow: none;
    border: none;
    padding: 0;
  }
  body { background: #fff; }
  .hi-shell { padding: 0; }
}

body.print-view .hi-topbar,
body.print-view .hi-sidebar,
body.print-view .hi-footer,
body.print-view .hi-page-actions,
body.print-view .hi-alert-banner { display: none !important; }
body.print-view .hi-main {
  box-shadow: none;
  border: none;
  max-width: 800px;
  margin: 0 auto;
}

.hi-home-cards .hi-home-card {
  display: block;
  padding: 1.1rem 1.25rem;
  border-radius: var(--hi-radius);
  background: var(--hi-white);
  border: 1px solid var(--hi-line);
  box-shadow: var(--hi-shadow);
  text-decoration: none !important;
  color: var(--hi-ink);
  height: 100%;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.hi-home-cards .hi-home-card:hover {
  border-color: var(--hi-mint);
  transform: translateY(-2px);
}
.hi-home-cards .hi-home-card strong {
  display: block;
  font-family: var(--hi-display);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
  color: var(--hi-forest);
}
.hi-home-cards .hi-home-card span {
  font-size: 0.92rem;
  color: var(--hi-ink-soft);
}
.hi-footer-credit a {
  color: inherit;
}
