/* Merikarvia-seura ry – ilme nykyiseltä sivustolta: navy #336699, valkoinen, keltainen huomio */
:root {
  --hi-ink: #1a1a1a;
  --hi-ink-soft: #333333;
  --hi-forest: #336699;
  --hi-forest-deep: #0d4171;
  --hi-mint: #4d7eae;
  --hi-sand: #f4f7fb;
  --hi-sand-deep: #e4edf6;
  --hi-paper: #f3f3f3;
  --hi-white: #ffffff;
  --hi-accent: #e6b325;
  --hi-sky: #336699;
  --hi-sky-soft: #0d4171;
  --hi-line: rgba(13, 65, 113, 0.16);
  --hi-shadow: 0 8px 24px rgba(13, 65, 113, 0.06);
  --hi-radius: 0.2rem;
  --hi-font: Verdana, "Segoe UI", sans-serif;
  --hi-display: Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--hi-font);
  color: var(--hi-ink);
  background: #e6e6e6;
  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, #009EE3 0%, #33b5eb 55%, #F9D300 100%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25);
}

.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-sky) !important;
  background: rgba(0, 158, 227, 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-sky);
  color: #fff;
  border: none;
  white-space: nowrap;
}
.hi-btn-search:hover { background: var(--hi-sky-soft); color: #fff; }

.hi-editbar {
  background: #111111;
  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: 1.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-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;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--hi-line);
  font-size: 0.925rem;
}
.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: #fff6c2; color: #6b5a00; }
.hi-badge-tapahtuma { background: #d7f0fb; color: var(--hi-forest-deep); }
.hi-badge-perus { background: #e8eef2; color: #2a3a44; }
.hi-badge-valiotsikko { background: #e4eaf0; color: #2a3a44; }
.hi-badge-teksti { background: #e8f6fc; color: var(--hi-forest-deep); }
.hi-badge-kuva { background: #fff6c2; color: #6b5a00; }
.hi-badge-wysiwyg { background: #e8e4f0; color: #3d3460; }
.hi-badge-youtube { background: #fde8e8; color: #8a1f1f; }
.hi-badge-liitetiedosto { background: #e8f0e4; color: #2d4a28; }
.hi-badge-linkki { background: #e4eef8; color: #1f4a6e; }
.hi-badge-karttaupotus { background: #e6f3e9; color: #1a5a32; }
.hi-badge-alisivutkartalla { background: #e8f4ea; color: #1a5a32; }

.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;
  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-attachment {
  margin: 1rem 0;
}
.hi-attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  border: 1px solid color-mix(in srgb, var(--hi-forest) 28%, transparent);
  background: color-mix(in srgb, var(--hi-forest) 6%, #fff);
  color: var(--hi-forest-deep);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.hi-attachment-link:hover,
.hi-attachment-link:focus {
  background: color-mix(in srgb, var(--hi-forest) 14%, #fff);
  border-color: var(--hi-forest);
  color: var(--hi-forest-deep);
}
.hi-attachment-icon {
  display: inline-block;
  width: 1.15rem;
  height: 1.35rem;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-radius: 2px;
  position: relative;
}
.hi-attachment-icon::before {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 0.45rem;
  height: 0.45rem;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  background: #fff;
}
.hi-attachment-icon-pdf {
  width: 1.55rem;
  height: 1.85rem;
  border: 0;
  border-radius: 0.2rem;
  background: #c62828;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}
.hi-attachment-icon-pdf::before {
  content: "";
  top: 0;
  right: 0;
  width: 0.45rem;
  height: 0.45rem;
  border: 0;
  border-bottom-left-radius: 0.12rem;
  background: linear-gradient(135deg, #fff 48%, #ef9a9a 52%);
}
.hi-attachment-icon-pdf::after {
  content: "PDF";
  position: absolute;
  left: 50%;
  bottom: 0.22rem;
  transform: translateX(-50%);
  font-family: var(--hi-font);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #fff;
}
.hi-attachment-pdf .hi-attachment-link {
  border-color: color-mix(in srgb, #c62828 28%, transparent);
  background: color-mix(in srgb, #c62828 6%, #fff);
  color: #8a1f1f;
}
.hi-attachment-pdf .hi-attachment-link:hover,
.hi-attachment-pdf .hi-attachment-link:focus {
  background: color-mix(in srgb, #c62828 12%, #fff);
  border-color: #c62828;
  color: #8a1f1f;
}
.hi-attachment-label {
  line-height: 1.3;
}

.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-map {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 1.25rem 0 1.5rem;
  width: 100%;
}
.hi-map[hidden] {
  display: none !important;
}
.hi-map-editor .hi-map {
  margin-top: 1rem;
  margin-bottom: 0;
}
.hi-map-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
}
.hi-map-links {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  line-height: 1.45;
}
.hi-map-links a {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--hi-mint);
  text-decoration: none;
}
.hi-map-links a:hover {
  text-decoration: underline;
}
@media (min-width: 768px) {
  .hi-map-toolbar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem 1rem;
  }
  .hi-map-links {
    flex-direction: row;
    align-items: center;
    gap: 0.9rem;
  }
}
.hi-map-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.hi-map-tab {
  appearance: none;
  border: 1px solid rgba(18, 50, 75, 0.22);
  background: #fff;
  color: var(--hi-ink);
  border-radius: 999px;
  min-height: 2.1rem;
  padding: 0.25rem 0.85rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
}
.hi-map-tab:hover {
  border-color: var(--hi-mint);
  color: var(--hi-mint);
}
.hi-map-tab.is-active {
  background: var(--hi-forest);
  border-color: var(--hi-forest);
  color: #fff;
}
.hi-map-frame {
  position: relative;
  border: 1px solid var(--hi-line);
  border-radius: 0.5rem;
  overflow: hidden;
  background: #e8eef4;
  aspect-ratio: 16 / 9;
  min-height: 220px;
}
.hi-leaflet,
.hi-map-gframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.hi-leaflet {
  z-index: 0;
  min-height: 0;
}
.hi-map-gframe[hidden],
.hi-leaflet[hidden] {
  display: none !important;
}
.hi-leaflet-popup-links {
  line-height: 1.55;
}
.hi-leaflet-popup-link {
  font-weight: 650;
  color: #0b57a4;
  text-decoration: none;
}
.hi-leaflet-popup-link:hover {
  text-decoration: underline;
}
.leaflet-container a.hi-leaflet-popup-link {
  color: #0b57a4;
}
.hi-map-caption {
  margin: 0;
  font-size: 0.95rem;
  color: var(--hi-ink-soft);
}
.hi-geocode-status.is-error {
  color: #9b1c2c;
}
.hi-map-pin-list {
  list-style: none;
  margin: 0.35rem 0 1.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
}
.hi-map-pin-list a {
  font-weight: 600;
  color: var(--hi-mint);
  text-decoration: none;
}
.hi-map-pin-list a:hover {
  text-decoration: underline;
}

.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;
}
.hi-text p { margin: 0 0 0.85rem; }
.hi-text p:last-child { margin-bottom: 0; }
/* Kappale → lista / sisennys: tiivis väli (ei tuplamarginaalia) */
.hi-text p:has(+ .hi-text-list),
.hi-text p:has(+ .hi-tasklist),
.hi-text p:has(+ .hi-indent) {
  margin-bottom: 0.2rem;
}
.hi-text p + .hi-text-list,
.hi-text p + .hi-tasklist {
  margin-top: 0.15rem;
}
.hi-text .hi-indent > p + .hi-indent > .hi-text-list:first-child,
.hi-text .hi-indent > p + .hi-indent > .hi-tasklist:first-child,
.hi-text .hi-indent > .hi-text-list:first-child,
.hi-text .hi-indent > .hi-tasklist:first-child {
  margin-top: 0.15rem;
}
.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-indent {
  margin: 0 0 0 1.75rem;
  padding: 0;
  border-left: 0;
}
.hi-indent > .hi-indent {
  margin: 0 0 0 1.5rem;
  padding: 0;
}
.hi-indent > :first-child {
  margin-top: 0 !important;
}
.hi-indent > :last-child {
  margin-bottom: 0 !important;
}
/* Sisennyslohkossa normaali kappaleväli, paitsi ennen listaa */
.hi-indent > p {
  margin-bottom: 0.85rem;
}
.hi-indent > p:has(+ .hi-indent),
.hi-indent > p:has(+ .hi-text-list),
.hi-indent > p:has(+ .hi-tasklist) {
  margin-bottom: 0.2rem;
}
.hi-indent > .hi-indent + p {
  margin-top: 0.1rem;
}
.hi-indent > .hi-indent:not(:last-child) {
  margin-bottom: 0.65rem;
}
.hi-indent > p:last-child {
  margin-bottom: 0;
}
.hi-indent > .hi-indent .hi-text-list,
.hi-indent > .hi-indent .hi-tasklist {
  margin-top: 0.15rem;
  margin-bottom: 0;
}
.hi-indent > .hi-text-list,
.hi-indent > .hi-tasklist {
  margin-top: 0.15rem;
  margin-bottom: 0.65rem;
}
.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;
}
.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);
}
.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 {
  --bs-breadcrumb-divider: "›";
  font-size: 0.875rem;
}
.breadcrumb a { color: var(--hi-sky); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---- Sidebar ---- */
.hi-sidepanel {
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--hi-line);
  border-radius: 0;
  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(0, 158, 227, 0.1);
  color: var(--hi-sky);
}
.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 {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hi-list-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--hi-line);
}
.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-sky); }
.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: #fff3a0;
  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: #fff3a0;
}

/* 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(0, 158, 227, 0.22);
}

.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: "← "; }
.hi-sibling-next .hi-sibling-label::after { content: " →"; }
.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;
}

/* ---- Hero (etusivu) ---- */
.hi-hero {
  margin: -0.25rem 0 1.75rem;
  padding: 1.75rem 1.5rem;
  border-radius: 0.65rem;
  background:
    linear-gradient(120deg, rgba(17, 17, 17, 0.94), rgba(0, 158, 227, 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: #f2f7fb;
  animation: hiFadeUp 0.5s ease both;
}
.hi-hero-photo {
  position: relative;
  min-height: 0;
  display: block;
  padding: 0;
  overflow: hidden;
  background: #111111;
}
.hi-hero-img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}
.hi-hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(17, 17, 17, 0.82) 0%, rgba(0, 158, 227, 0.45) 50%, rgba(249, 211, 0, 0.18) 100%);
  pointer-events: none;
}
.hi-hero-inner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 1.35rem 1.35rem 1.5rem;
  max-width: 36rem;
  animation: hiFadeUp 0.65s ease both;
}
.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: #e6f0f7;
}
.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.75rem 2rem 2rem;
  }
}

/* ---- Footer ---- */
.hi-footer {
  background: #111111;
  color: #c9d5db;
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}
.hi-footer a { color: #33b5eb; text-decoration: none; }
.hi-footer a:hover { color: var(--hi-accent); 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: #009EE3;
  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;
  color: #b8c4ca;
}
.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;
  color: #b8c4ca;
}
.hi-footer-muted {
  color: #8aa0ab;
  font-size: 0.875rem;
}
.hi-footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 158, 227, 0.28);
  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: var(--hi-accent);
  text-decoration: underline;
}
.hi-page-end-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 2.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hi-line);
}
.hi-page-end-actions .btn {
  font-size: 0.92rem;
}
.hi-feedback-bar {
  margin: 0.75rem 0 0;
  text-align: right;
}
.hi-guestbook {
  margin: 2.25rem 0 0;
}
.hi-guestbook-entry {
  background: var(--hi-white);
  border: 1px solid var(--hi-line);
  border-radius: var(--hi-radius);
  padding: 1rem 1.15rem;
  margin-bottom: 0.85rem;
  display: flex;
  flex-direction: column;
}
.hi-guestbook-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.35rem;
  margin-top: 0.6rem;
  font-size: 0.875rem;
  color: var(--hi-muted, #6c757d);
  align-self: flex-end;
  text-align: right;
}
.hi-guestbook-date {
  margin-left: auto;
  font-size: 0.85rem;
  color: #5a6b73;
}
.hi-guestbook-body {
  white-space: normal;
  line-height: 1.55;
}
.hi-guestbook-img {
  max-width: 100%;
  max-height: 400px;
  border-radius: .375rem;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
}
.hi-gb-preview-img {
  max-width: 100%;
  max-height: 200px;
  border-radius: .375rem;
  object-fit: contain;
  display: block;
}
.hi-guestbook-page a {
  word-break: break-all;
}
.hi-guestbook-section-heading {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
}
.hi-guestbook-section-path {
  font-size: 0.82rem;
  font-weight: 400;
}
.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,
.hi-ajax-status.is-ok { color: var(--hi-forest-deep); }
.hi-feedback-status.is-err,
.hi-ajax-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(0, 158, 227, 0.12);
  border: 1px solid rgba(0, 158, 227, 0.28);
  border-radius: 0.5rem;
}
.hi-footer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.hi-footer-badge:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}
.hi-footer-badge img {
  display: block;
  max-height: 96px;
  max-width: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.35rem;
}
@media (max-width: 575.98px) {
  .hi-footer-badge img {
    max-height: 72px;
    max-width: 96px;
  }
}

/* ---- 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-sky);
  border-color: var(--hi-sky);
  color: #fff;
}
.btn-hi:hover { background: var(--hi-sky-soft); border-color: var(--hi-sky-soft); color: #fff; }
.btn-outline-hi {
  border-color: var(--hi-sky);
  color: var(--hi-sky);
}
.btn-outline-hi:hover { background: var(--hi-sky); 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 {
  border-bottom: none;
  margin-bottom: 0.75rem;
  padding-bottom: 0;
}
.hi-page-info-preview .hi-page-meta-right a[href^="/tulosta/"] {
  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: #b89600;
}
.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(0, 158, 227, 0.12);
  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 ---- */
@page {
  size: A4 portrait;
  margin: 15mm 14mm 18mm 14mm;
}

@media print {
  html, body {
    width: auto;
    background: #fff !important;
    color: #000 !important;
  }
  .hi-draft-watermark { display: none !important; }
  .hi-topbar,
  .hi-sidebar,
  .hi-footer,
  .hi-page-actions,
  .hi-editbar,
  .hi-alert-banner,
  .hi-feedback-bar,
  .hi-page-end-actions,
  .skip-link { display: none !important; }

  .hi-shell,
  .hi-shell > .container,
  .hi-shell .row {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .hi-shell .row > [class*="col-"] {
    width: 100% !important;
    max-width: none !important;
    flex: 0 0 100% !important;
    padding: 0 !important;
  }
  .hi-main {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
  }
  body.print-view .hi-main {
    max-width: none !important;
    margin: 0 !important;
  }

  h1, h2, h3 {
    break-after: avoid;
    page-break-after: avoid;
  }
  p, li, .hi-print-stamp, .hi-page-meta {
    orphans: 3;
    widows: 3;
  }
  .hi-figure,
  .hi-attachment,
  .hi-link-card,
  .hi-youtube,
  table {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Kuva + sisältöteksti rinnakkain paperilla (ei riippuvuutta ruudun leveydestä) */
  .hi-image-with-text {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) !important;
    gap: 6mm !important;
    align-items: start !important;
    margin: 4mm 0 5mm !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .hi-image-with-text-media,
  .hi-image-with-text-body {
    min-width: 0 !important;
    max-width: none !important;
  }
  .hi-image-vasen .hi-image-with-text-media { order: 1 !important; }
  .hi-image-vasen .hi-image-with-text-body { order: 2 !important; }
  .hi-image-oikea .hi-image-with-text-media { order: 2 !important; }
  .hi-image-oikea .hi-image-with-text-body { order: 1 !important; }
  .hi-image-with-text .hi-figure {
    margin: 0 !important;
  }
  .hi-image-with-text .hi-figure img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
  .hi-image-with-text-body {
    font-size: 10.5pt !important;
    line-height: 1.45 !important;
  }
  .hi-indent {
    margin: 0 0 0 14mm !important;
    padding: 0 !important;
    border-left: 0 !important;
  }
  .hi-indent > .hi-indent {
    margin: 0 0 0 10mm !important;
  }

  /* Tulostusaika: pakota näkyviin paperitulosteessa */
  body.print-view .hi-print-stamp,
  .hi-print-stamp {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #000 !important;
    text-align: right !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

body.print-view .hi-topbar,
body.print-view .hi-sidebar,
body.print-view .hi-footer,
body.print-view .hi-alert-banner,
body.print-view .hi-page-end-actions,
body.print-view .hi-feedback-bar { display: none !important; }
body.print-view .hi-main {
  box-shadow: none;
  border: none;
  max-width: 800px;
  margin: 0 auto;
}

body.print-view .hi-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

body.print-view .hi-print-stamp {
  display: block;
  text-align: right;
  margin: 0 0 0.85rem;
  padding: 0;
  border: 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #111;
}
body.print-view .hi-print-stamp-footer {
  margin: 1.25rem 0 0;
  padding: 0.65rem 0 0;
  border-top: 1px solid #333;
  font-size: 0.8rem;
}

/* ---- Pinnalistat ---- */
.hi-pinna-form {
  max-width: 36rem;
}
.hi-pinna-form #koodi {
  letter-spacing: 0.35em;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  max-width: 12rem;
}
.hi-combo {
  position: relative;
}
.hi-combo-input:disabled {
  background: var(--hi-paper);
  color: var(--hi-ink-soft, #5c6570);
  cursor: not-allowed;
}
.hi-combo-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.hi-combo-list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  max-height: 16rem;
  overflow: auto;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: var(--hi-white);
  border: 1px solid var(--hi-line);
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1.25rem rgba(20, 40, 60, 0.12);
}
.hi-combo-list li {
  padding: 0.4rem 0.75rem;
  cursor: pointer;
}
.hi-combo-list li.is-active,
.hi-combo-list li:hover {
  background: rgba(0, 158, 227, 0.12);
}
.hi-combo-list li.is-selected {
  font-weight: 600;
}
.hi-combo-hint {
  color: var(--hi-ink-soft, #5c6570);
  cursor: default;
  font-size: 0.9rem;
}
.hi-combo-hint:hover {
  background: transparent;
}
.hi-pinna-tabs .nav-link {
  color: var(--hi-ink);
  background: var(--hi-white);
  border: 1px solid var(--hi-line);
}
.hi-pinna-tabs .nav-link:hover {
  background: var(--hi-paper);
}
.hi-pinna-tabs .nav-link.active {
  background: var(--hi-sky);
  border-color: var(--hi-sky);
  color: #fff;
}
.hi-pinna-filter {
  max-width: 18rem;
}
.hi-pinna-filter-row {
  max-width: 28rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.hi-pinna-filter-row > div {
  flex: 1 1 8rem;
}
.hi-pinna-table {
  background: var(--hi-white);
}
.hi-pinna-table th {
  font-size: 0.8rem;
  text-transform: none;
  color: var(--hi-ink-soft, #5c6570);
}
.hi-pinna-table .hi-kunta-ryhma th {
  background: var(--hi-mist, #eef1f4);
  color: var(--hi-ink, #1d242c);
  font-size: 0.9rem;
  font-weight: 700;
  padding-top: 0.7rem;
  padding-bottom: 0.45rem;
}
.hi-pinna-count {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.hi-piha-radios {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.hi-piha-radios legend {
  float: none;
  width: auto;
  font-size: 1rem;
  margin-bottom: 0.4rem;
}
.hi-pinna-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 0.3rem;
  display: block;
  background: var(--hi-mist, #eef1f4);
}
.hi-pinna-thumb-link {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.45rem;
  cursor: zoom-in;
}
.hi-img-lightbox {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2100;
  background: rgba(15, 22, 28, 0.88);
  cursor: zoom-out;
  box-sizing: border-box;
}
.hi-img-lightbox[hidden] {
  display: none !important;
}
.hi-img-lightbox-frame {
  position: absolute;
  top: 3.25rem;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem 1.75rem;
  overflow: auto;
  pointer-events: none;
}
.hi-img-lightbox-photo {
  display: block;
  pointer-events: auto;
  cursor: default;
  border-radius: 0.4rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.hi-img-lightbox-meta {
  pointer-events: auto;
  color: #fff;
  max-width: min(22rem, 100%);
  min-width: 12rem;
  text-align: left;
  cursor: default;
}
.hi-img-lightbox-meta[hidden] {
  display: none !important;
}
.hi-lb-title {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.25;
}
.hi-lb-label {
  margin-top: 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.65;
}
.hi-lb-value {
  font-size: 1.05rem;
  line-height: 1.35;
}
.hi-img-lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  z-index: 1;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #1d242c;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.hi-img-lightbox-close:hover,
.hi-img-lightbox-close:focus-visible {
  background: #fff;
  outline: none;
}
body.hi-img-lightbox-open {
  overflow: hidden;
}
.hi-pinna-bc a {
  text-decoration: none;
}

/* ---- Merikarvia-seuran ilme ---- */
.hi-topbar .container,
.hi-shell > .container,
.hi-footer > .container,
.hi-alert-banner .container,
.hi-editbar .container {
  max-width: 1080px;
}

@media (min-width: 1200px) {
  .hi-topbar .container,
  .hi-shell > .container,
  .hi-footer > .container,
  .hi-alert-banner .container,
  .hi-editbar .container,
  .hi-hero-wrap {
    max-width: 1320px;
  }
}

.hi-topbar {
  background: #fff;
  backdrop-filter: none;
  border-bottom: 0;
  position: static;
}

.hi-utilbar {
  background: #f7f7f7;
  border-bottom: 1px solid #e2e2e2;
  font-size: 0.82rem;
}
.hi-utilbar .container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  min-height: 2.4rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}
.hi-utilnav {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.hi-utilnav a {
  color: #0d4171;
  text-decoration: none;
  font-weight: 600;
}
.hi-utilnav a:hover { text-decoration: underline; }

.hi-brandrow {
  padding-top: 0.85rem;
  padding-bottom: 0.75rem;
}
.hi-brand-logo {
  height: 4.4rem;
  max-width: min(420px, 78vw);
}

.hi-mainnav {
  background: #336699;
  padding-top: 0;
  padding-bottom: 0;
}
.hi-mainnav .navbar-nav { width: 100%; }
.hi-mainnav .hi-topnav .nav-link {
  color: #fff !important;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 0;
  padding: 0.65rem 0.8rem !important;
}
.hi-mainnav .hi-topnav .nav-link:hover,
.hi-mainnav .hi-topnav .nav-link.active,
.hi-mainnav .hi-topnav .nav-link:focus {
  color: #fff !important;
  background: #0d4171;
}
.hi-mainnav .navbar-toggler {
  border-color: rgba(255,255,255,0.55);
  margin: 0.4rem 0;
}
.hi-mainnav .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(255,255,255,0.95)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.hi-mainnav .dropdown-menu { font-size: 0.92rem; }

.hi-shell {
  padding-top: 1.25rem;
}
.hi-hero-wrap {
  max-width: 1080px;
  padding-top: 0;
  background: #fff;
  border-left: 1px solid #d5d5d5;
  border-right: 1px solid #d5d5d5;
}
.hi-hero-banner {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
  object-position: center 40%;
}

body.hi-home .hi-main .hi-hero.hi-hero-photo.hi-hero-carousel {
  margin: -0.15rem -1.35rem 1.35rem;
  padding: 0;
  border-bottom: 1px solid #d5d5d5;
  border-radius: 0;
  animation: none;
  background: #e8e8e8;
  overflow: hidden;
}
@media (min-width: 992px) {
  body.hi-home .hi-main .hi-hero.hi-hero-photo.hi-hero-carousel {
    margin: -2rem -2.25rem 1.35rem;
  }
}
.hi-main .hi-hero-carousel .carousel {
  position: relative;
  z-index: 0;
}
.hi-main .hi-hero-carousel .carousel-inner,
.hi-main .hi-hero-carousel .carousel-item {
  background: #e8e8e8;
}
.hi-main .hi-hero-carousel .hi-hero-img {
  width: 100%;
  height: auto;
  max-height: min(420px, 55vh);
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
}
.hi-main .hi-hero-photo.hi-hero-carousel::after {
  z-index: 1;
  background: linear-gradient(180deg, rgba(13, 65, 113, 0) 30%, rgba(13, 65, 113, 0.55) 68%, rgba(13, 65, 113, 0.9) 100%);
}
.hi-main .hi-hero-carousel .hi-hero-inner {
  z-index: 2;
  max-width: none;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  animation: none;
}
.hi-main .hi-hero-carousel .hi-hero-tagline,
.hi-main .hi-hero-carousel .hi-hero-lead {
  color: #f2f7fb;
}
.hi-main .hi-hero-carousel .hi-hero-rotator {
  margin: 0.35rem 0 0;
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  font-weight: 700;
  color: #f5e6a8;
}
.hi-main .hi-hero-carousel .carousel-indicators {
  z-index: 3;
  margin-bottom: 0.85rem;
}
.hi-main .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-main .hi-hero-carousel .carousel-indicators .active {
  background-color: #e6b325;
}
.hi-main .hi-hero-carousel .carousel-control-prev,
.hi-main .hi-hero-carousel .carousel-control-next {
  z-index: 3;
  width: 3rem;
  opacity: 0.85;
}
.hi-main .hi-hero-carousel .carousel-control-prev:hover,
.hi-main .hi-hero-carousel .carousel-control-next:hover {
  opacity: 1;
}
.hi-main .hi-hero-carousel .carousel-control-prev-icon,
.hi-main .hi-hero-carousel .carousel-control-next-icon {
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.65));
}

.hi-main {
  border-radius: 0;
  box-shadow: none;
  animation: none;
}

.hi-sidepanel {
  background: #fff;
  border: 1px solid #d5d5d5;
  border-radius: 0;
  padding: 0.9rem 0.95rem 1.1rem;
}
.hi-sidebar .hi-sidenav a {
  border-radius: 0;
}
.hi-news-side {
  list-style: none;
  margin: 0 0 0.6rem;
  padding: 0;
}
.hi-news-side li {
  margin: 0 0 0.7rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #ececec;
}
.hi-news-side a {
  color: #0d4171;
  font-weight: 600;
  text-decoration: none;
}
.hi-news-side a:hover { text-decoration: underline; }
.hi-news-more { font-size: 0.85rem; margin-bottom: 0.4rem; }

.hi-callout {
  background: #fff8dc;
  border: 1px solid #e6c200;
  padding: 0.85rem 1rem;
  margin: 0.5rem 0 1.25rem;
}
.hi-book {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  align-items: start;
  margin: 1.1rem 0 1.4rem;
}
.hi-book img {
  width: 140px;
  height: auto;
  border: 1px solid #ddd;
}
.hi-flyer {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.4rem 0 1.2rem;
  border: 1px solid #e6c200;
}
@media (max-width: 575.98px) {
  .hi-book { grid-template-columns: 1fr; }
  .hi-utilbar .container { flex-wrap: wrap; justify-content: space-between; }
}

.hi-footer {
  background: #0d4171;
  color: #e7eef5;
}
.hi-footer a { color: #fff; }
.hi-footer a:hover { color: #e6b325; }
.hi-footer-heading { color: #e6b325; }
.hi-editbar { background: #0d4171; }

.hi-page-title { color: #0d4171; }
.hi-subhead, h2, h3 { color: #0d4171; }
