/* Generation AI project — Eleventy theme
   Migrated from WordPress/Kadence. All styles are self-contained here.
   No external WordPress or Kadence stylesheets are needed. */
:root {
  --global-palette1: #314e25;
  --global-palette2: #446d33;
  --global-palette3: #000000;
  --global-palette4: #314e25;
  --global-palette5: #3b5e2c;
  --global-palette6: #446d33;
  --global-palette7: #f0f4ec;
  --global-palette8: #f7f9f5;
  --global-palette9: #ffffff;
  --global-body-font-family: Arial, Helvetica, sans-serif;
  --global-heading-font-family: Arial, Helvetica, sans-serif;
  --global-font-size-small: clamp(0.8rem, 0.73rem + 0.217vw, 0.9rem);
  --global-font-size-medium: clamp(1.1rem, 0.995rem + 0.326vw, 1.25rem);
  --global-font-size-large: clamp(1.75rem, 1.576rem + 0.543vw, 2rem);
  --global-font-size-larger: clamp(2rem, 1.6rem + 1vw, 2.5rem);
  --global-font-size-xxlarge: clamp(2.25rem, 1.728rem + 1.63vw, 3rem);
  --global-content-width: 1290px;
  --global-content-edge-padding: 1.5rem;
  --global-content-narrow-width: 842px;
  --global-kb-font-size-sm: 0.875rem;
  --global-kb-font-size-md: 1.125rem;
  --global-kb-font-size-lg: 1.5rem;
  --global-kb-font-size-xl: 1.75rem;
  --global-kb-font-size-xxl: 2.25rem;
  --global-kb-font-size-3xl: 3rem;
}

/* ── Accessibility utilities ───────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.skip-to-main {
  position: absolute;
  left: -9999px;
  top: 1rem;
  z-index: 9999;
  background: var(--global-palette1, #314e25);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 6px 6px;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
}
.skip-to-main:focus { left: 1rem; }

/* ── Base reset ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--global-body-font-family, Arial, Helvetica, sans-serif);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.6;
  color: var(--global-palette3, #000);
}

img { max-width: 100%; height: auto; }
a { color: var(--global-palette2, #446d33); }
a:hover { color: var(--global-palette1, #314e25); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--global-heading-font-family, Arial, Helvetica, sans-serif);
  font-weight: 700;
  line-height: 1.5;
  margin: 1.5em 0 0.5em;
  color: var(--global-palette1, #314e25);
}
h1 { font-size: 2rem; }       /* 32px */
h2 { font-size: 1.75rem; }    /* 28px */
h3 { font-size: 1.5rem; color: var(--global-palette3, #000); } /* 24px, black */
h4 { font-size: 1.375rem; }   /* 22px */
h5 { font-size: 1.25rem; }    /* 20px */
h6 { font-size: 1.125rem; }   /* 18px */

p { margin: 0 0 1em; }
ul, ol { padding-left: 1.5em; margin: 0 0 1em; }
blockquote {
  border-left: 4px solid var(--global-palette4, #314e25);
  margin: 1.5rem 0;
  padding: 0.5rem 1rem;
  color: var(--global-palette5, #3b5e2c);
  font-style: italic;
}
figure { margin: 0; }
figcaption { font-size: 0.875rem; color: #666; margin-top: 0.25rem; }
code, pre {
  font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
  font-size: 0.875rem;
}
pre {
  background: var(--global-palette7, #f0f4ec);
  padding: 1rem 1.5rem;
  overflow-x: auto;
  border-radius: 4px;
  line-height: 1.5;
}

table { border-collapse: collapse; width: 100%; margin-bottom: 1rem; }
th, td { padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid var(--global-palette7, #eee); }
th { font-weight: 700; border-bottom: 2px solid var(--global-palette6, #446d33); }

/* ── WordPress / Gutenberg utility classes (used in migrated content) ──────── */

/* Text alignment */
.has-text-align-center { text-align: center; }
.has-text-align-left   { text-align: left; }
.has-text-align-right  { text-align: right; }

/* Font sizes — match Kadence/WP preset scale */
.has-small-font-size   { font-size: var(--global-font-size-small, 0.875rem); }
.has-medium-font-size  { font-size: var(--global-font-size-medium, 1.125rem); }
.has-large-font-size   { font-size: var(--global-font-size-large, 1.75rem); }
.has-larger-font-size  { font-size: var(--global-font-size-larger, 2rem); }
.has-xxlarge-font-size { font-size: var(--global-font-size-xxlarge, 2.5rem); }
/* alias used by some pages */
.has--font-size        { font-size: inherit; }

/* Palette text colours */
.has-theme-palette-1-color { color: var(--global-palette1, #314e25); }
.has-theme-palette-2-color { color: var(--global-palette2, #446d33); }
.has-theme-palette-3-color { color: var(--global-palette3, #000); }
.has-theme-palette-9-color { color: var(--global-palette9, #fff); }

/* wp-block-heading inside blocks — preserve heading margins */
.wp-block-heading { margin-top: 0.5em; }

/* wp-block-image */
.wp-block-image { margin: 1rem 0; }
.wp-block-image img { display: block; max-width: 100%; height: auto; }
.wp-block-image.aligncenter { text-align: center; }
.wp-block-image.aligncenter img { margin: 0 auto; }

/* wp-block-group */
.wp-block-group { margin: 1rem 0; }
.wp-block-group.has-background { padding: 1.5rem; border-radius: 4px; }

/* wp-block-media-text — image + text side by side */
.wp-block-media-text {
  display: grid;
  grid-template-columns: 50% 1fr;
  gap: 2rem;
  align-items: center;
  margin: 1.5rem 0;
}
.wp-block-media-text.has-media-on-the-right { grid-template-columns: 1fr 50%; }
.wp-block-media-text.has-media-on-the-right .wp-block-media-text__media { order: 2; }
.wp-block-media-text.has-media-on-the-right .wp-block-media-text__content { order: 1; }
.wp-block-media-text__media img { width: 100%; height: auto; display: block; }
@media (max-width: 600px) {
  .wp-block-media-text,
  .wp-block-media-text.has-media-on-the-right { grid-template-columns: 1fr; }
  .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media { order: 0; }
}

/* wp-block-separator */
.wp-block-separator {
  border: none;
  border-top: 2px solid var(--global-palette7, #e0e8d8);
  margin: 2rem 0;
}
.wp-block-separator.is-style-wide { width: 100%; }
.wp-block-separator.is-style-dots { border: none; text-align: center; }
.wp-block-separator.is-style-dots::before { content: "···"; letter-spacing: 0.5em; color: var(--global-palette6, #446d33); }

/* wp-block-list */
.wp-block-list { padding-left: 1.5em; margin: 0 0 1em; }

/* wp-block-quote */
.wp-block-quote {
  border-left: 4px solid var(--global-palette4, #314e25);
  margin: 1.5rem 0;
  padding: 0.5rem 1rem;
  font-style: italic;
}
.wp-block-quote cite { display: block; font-size: 0.875rem; margin-top: 0.5rem; font-style: normal; }

/* wp-block-file */
.wp-block-file { margin: 1rem 0; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.wp-block-file__button {
  display: inline-flex;
  padding: 0.5em 1.25em;
  background: var(--global-palette1, #314e25);
  color: #fff;
  text-decoration: none;
  border-radius: 36px;
  font-size: 0.875rem;
  transition: background 0.2s;
}
.wp-block-file__button:hover { background: var(--global-palette2, #446d33); color: #fff; }

.institutional-visibility {
  padding-top: 1rem;
}

.institutional-visibility__header {
  margin-bottom: 1rem;
}

.institutional-visibility__title {
  margin: 0 0 0.5rem;
}

.institutional-visibility__lead,
.institutional-visibility__note {
  margin: 0.35rem 0;
}

.institutional-visibility__note {
  color: var(--global-palette5, #4f5e46);
  font-size: 0.95rem;
}

.institutional-visibility__table-wrap {
  overflow-x: auto;
  border: 1px solid var(--global-palette7, #d8decf);
  border-radius: 18px;
  background: var(--global-palette9, #fff);
}

.institutional-visibility__table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.institutional-visibility__table th,
.institutional-visibility__table td {
  padding: 1rem;
  border-bottom: 1px solid var(--global-palette7, #d8decf);
  text-align: left;
  vertical-align: top;
}

.institutional-visibility__table tbody tr:last-child td {
  border-bottom: 0;
}

.institutional-visibility__table th {
  background: #f6f8f2;
  font-size: 0.95rem;
}

.institutional-visibility__date {
  white-space: nowrap;
  font-weight: 600;
}

.institutional-visibility__source {
  font-weight: 600;
}

.institutional-visibility__type {
  margin-top: 0.25rem;
  color: var(--global-palette5, #4f5e46);
  font-size: 0.92rem;
}

.institutional-visibility__link {
  font-weight: 600;
}

.institutional-visibility__summary {
  margin-top: 0.45rem;
  color: var(--global-palette5, #4f5e46);
}

.institutional-visibility__people {
  min-width: 15rem;
}

/* Column inner content */
.kt-inside-inner-col { height: 100%; }

/* ── Site header ───────────────────────────────────────────────────────────── */
.site-shell-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--global-palette9, #fff);
  transition: transform 0.3s ease, filter 0.3s ease;
}
/* On hero pages: extend header down by the wave height and clip background
   to the nav area only — wave valleys show the hero image beneath */
.has-hero .site-shell-header {
  padding-bottom: 28px;
  background-clip: content-box;
}
.site-shell-header.is-stuck {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
}
/* Slide header out of view when scrolling down within hero zone */
.site-shell-header.is-hidden {
  transform: translateY(-100%);
}
/* Non-hero pages: push content below the fixed header */
body:not(.has-hero) {
  padding-top: var(--kb-header-height, 60px);
}
/* Body padding when mobile menu is open — prevents content shift */
body.kb-nav-open {
  overflow: hidden;
}
/* Submenu edge detection — flip position when near viewport edge */
.kb-nav-sub-menu.sub-menu-right-edge,
.kb-mega-menu.sub-menu-right-edge {
  left: auto;
  right: 0;
}
.kb-nav-sub-menu.sub-menu-left-edge,
.kb-mega-menu.sub-menu-left-edge {
  left: 0;
  right: auto;
}
/* Wave decoration at header bottom (hero pages only) */
.site-header-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 28px;
  pointer-events: none;
  color: var(--global-palette9, #fff);
}
.site-header-wave svg {
  display: block;
  width: 100%;
  height: 100%;
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: var(--global-content-width, 1290px);
  margin: 0 auto;
  padding: 0 1.25rem;
  min-height: 32px;
}
.site-header-inner,
.site-navigation,
.language-switcher a { font-family: var(--global-body-font-family, Arial, Helvetica, sans-serif); }
.site-logo {
  text-decoration: none;
  color: var(--global-palette1, #314e25);
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: var(--global-heading-font-family, Arial, Helvetica, sans-serif);
}
.site-name { font-family: inherit; }
.site-logo img { width: 90px; height: auto; display: block; }

/* ── Hamburger toggle — hidden on desktop ──────────────────────────────────── */
.kb-nav-toggle {
  display: none;
  background: var(--global-palette7, #f0f4ec);
  border: 1px solid var(--global-palette6, #446d33);
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.5rem;
  padding: 0.25rem 0.5rem;
  color: var(--global-palette3, #000);
  margin-left: auto;
}
.kb-nav-toggle:hover { background: var(--global-palette9, #fff); }

/* ── Primary nav — desktop ─────────────────────────────────────────────────── */
.site-navigation {
  margin-left: auto;
}
.kb-nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}
.kb-nav-item {
  position: relative;
}
.kb-nav-link-row {
  display: flex;
  align-items: stretch;
}
.kb-nav-link {
  display: block;
  flex: 1;
  padding: 0.4rem 0.65rem;
  text-decoration: none;
  color: var(--global-palette4, #314e25);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.kb-nav-link:hover {
  color: var(--global-palette1, #314e25);
  background: #d9e3cf;
}
.kb-nav-item-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--global-palette4, #314e25);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.kb-nav-item-toggle:hover,
.kb-nav-item-toggle:focus-visible {
  background: #d9e3cf;
  color: var(--global-palette1, #314e25);
}
.kb-nav-item.is-open > .kb-nav-link-row .kb-nav-item-toggle,
.kb-nav-item:focus-within > .kb-nav-link-row .kb-nav-item-toggle {
  transform: rotate(180deg);
}

/* ── Normal dropdown ───────────────────────────────────────────────────────── */
.menu-item-has-children > .sub-menu { display: none; }
.menu-item-has-children:hover > .sub-menu,
.menu-item-has-children:focus-within > .sub-menu,
.menu-item-has-children.is-open > .sub-menu {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--global-palette9, #fff);
  border: 1px solid #d9e3cf;
  border-radius: 0 0 20px 20px;
  box-shadow: 0px 2px 13px 0px rgba(0,0,0,0.1);
  z-index: 200;
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
}
.kb-nav-sub-menu .menu-item + .menu-item {
  border-top: 1px solid #d9e3cf;
}
.kb-nav-sub-menu .kb-nav-link { padding: 0.4rem 1rem; }
.kb-nav-sub-menu .menu-item:hover > .kb-nav-link { background: var(--global-palette7, #f0f4ec); }

/* ── Megamenu ──────────────────────────────────────────────────────────────── */
.kb-nav-mega-menu-item > .kb-mega-menu { display: none; }
.kb-nav-mega-menu-item:hover > .kb-mega-menu,
.kb-nav-mega-menu-item:focus-within > .kb-mega-menu,
.kb-nav-mega-menu-item.is-open > .kb-mega-menu {
  display: flex;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  background: var(--global-palette9, #fff);
  border: 1px solid #d9e3cf;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(49,78,37,0.16);
  z-index: 200;
  overflow: hidden;
}

/* Nav tab highlight — ties visually to the dark green sidebar */
.kb-nav-mega-menu-item:hover > .kb-nav-link-row,
.kb-nav-mega-menu-item:focus-within > .kb-nav-link-row,
.kb-nav-mega-menu-item.is-open > .kb-nav-link-row {
  background: var(--global-palette1, #314e25);
  border-radius: 8px;
}
.kb-nav-mega-menu-item:hover > .kb-nav-link-row .kb-nav-link,
.kb-nav-mega-menu-item:focus-within > .kb-nav-link-row .kb-nav-link,
.kb-nav-mega-menu-item.is-open > .kb-nav-link-row .kb-nav-link {
  color: #fff;
}
/* Kun kb-nav-link:hover myös laukeaa (maussi suoraan linkin päällä):
   varmistetaan tumma tausta + valkoinen teksti — ei valkoista tekstiä vaalealla pohjalla */
.kb-nav-mega-menu-item:hover > .kb-nav-link-row .kb-nav-link:hover,
.kb-nav-mega-menu-item:focus-within > .kb-nav-link-row .kb-nav-link:hover,
.kb-nav-mega-menu-item.is-open > .kb-nav-link-row .kb-nav-link:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.kb-nav-mega-menu-item:hover > .kb-nav-link-row .kb-nav-item-toggle,
.kb-nav-mega-menu-item:focus-within > .kb-nav-link-row .kb-nav-item-toggle,
.kb-nav-mega-menu-item.is-open > .kb-nav-link-row .kb-nav-item-toggle {
  color: rgba(255,255,255,0.8);
}
/* Toggle-nappi itse hoverattuna megamenu-rivissä: tumma bg, valkoinen teksti */
.kb-nav-mega-menu-item:hover > .kb-nav-link-row .kb-nav-item-toggle:hover,
.kb-nav-mega-menu-item:focus-within > .kb-nav-link-row .kb-nav-item-toggle:hover,
.kb-nav-mega-menu-item.is-open > .kb-nav-link-row .kb-nav-item-toggle:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* Sidebar */
.kb-mega-sidebar {
  flex-shrink: 0;
  width: 200px;
  background: var(--global-palette1, #314e25);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.kb-mega-sidebar-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.kb-mega-sidebar-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}
.kb-mega-sidebar-cta {
  display: inline-block;
  margin-top: auto;
  padding-top: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 0.15s;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.kb-mega-sidebar-cta:hover { color: #fff; }

/* Columns area */
.kb-mega-menu-cols {
  flex: 1;
  display: flex;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 1.5rem 1.25rem;
  min-width: 0;
}
.kb-mega-menu-col {
  flex: 1;
  min-width: 0;
  padding: 0 0.75rem;
}
.kb-mega-menu-col + .kb-mega-menu-col {
  border-left: 1px solid #eef2eb;
}
.kb-mega-col-heading {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--global-palette2, #446d33);
  margin: 0 0 0.5rem;
  padding: 0 0.25rem;
  white-space: nowrap;
}
.kb-mega-col-items { list-style: none; margin: 0; padding: 0; }
.kb-mega-ext { font-size: 0.72em; opacity: 0.5; }
.kb-mega-link {
  display: block;
  padding: 0.32rem 0.25rem;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
  font-size: 0.875rem;
  line-height: 1.35;
  transition: background 0.12s, color 0.12s;
}
.kb-mega-link:hover {
  background: var(--global-palette7, #f0f4ec);
  color: var(--global-palette1, #314e25);
}

.language-switcher {
  margin-left: 0.5rem;
  flex-shrink: 0;
}
.language-switcher ul {
  display: flex;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.language-switcher a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--global-palette4, #314e25);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.language-switcher a:hover {
  background: rgba(49, 78, 37, 0.08);
}
.language-switcher a.is-active,
.language-switcher a[aria-current="true"] {
  color: var(--global-palette2, #446d33);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

/* ── Header search button ──────────────────────────────────────────────────── */
.site-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: var(--global-palette1, #314e25);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.site-search-btn:hover {
  background: rgba(49, 78, 37, 0.1);
  color: var(--global-palette1, #314e25);
}

/* ── Pagefind search UI ─────────────────────────────────────────────────────── */
.search-page { padding: 2rem var(--global-content-edge-padding, 1.5rem); max-width: var(--global-content-narrow-width, 842px); margin: 0 auto; }
.search-page h1 { margin-top: 0; }

/* Override Pagefind UI colours to match site palette */
:root {
  --pagefind-ui-scale: 1;
  --pagefind-ui-primary: var(--global-palette1, #314e25);
  --pagefind-ui-text: var(--global-palette3, #000);
  --pagefind-ui-background: var(--global-palette9, #fff);
  --pagefind-ui-border: var(--global-palette7, #e0e8d8);
  --pagefind-ui-tag: var(--global-palette7, #e0e8d8);
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 6px;
  --pagefind-ui-image-border-radius: 4px;
  --pagefind-ui-font: var(--global-body-font-family, sans-serif);
}

/* ── Search modal ────────────────────────────────────────────────────────────── */
.search-modal { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: flex-start; justify-content: center; padding: max(64px, 8vh) 1rem 2rem; }
.search-modal[hidden] { display: none; }
.search-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
body.search-modal-open { overflow: hidden; }
.search-modal-box { position: relative; width: min(660px, 94vw); background: var(--global-palette9, #fff); border-radius: 12px; padding: 1.5rem; box-shadow: 0 24px 64px rgba(0,0,0,0.28); max-height: calc(100vh - max(64px, 8vh) - 2rem); overflow-y: auto; }
.search-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.search-modal-title { font-weight: 700; font-size: 1rem; color: var(--global-palette3, #000); }
.search-modal-close { background: none; border: none; cursor: pointer; color: var(--global-palette3, #000); padding: 4px; line-height: 1; border-radius: 4px; display: flex; align-items: center; }
.search-modal-close:hover { background: var(--global-palette7, #f0f4ec); }
.search-modal-close:focus-visible { outline: 2px solid var(--global-palette1, #314e25); outline-offset: 2px; }

/* ── 404 inline search ───────────────────────────────────────────────────────── */
.error-404-search { margin-top: 2rem; text-align: left; width: 100%; }
.error-404-search-label { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--global-palette5, #3b5e2c); margin: 0 0 0.75rem; }

/* ── Feather icons (list items, nav) ───────────────────────────────────────── */
.feather-icon { display: inline-flex; align-items: center; flex-shrink: 0; }
.feather-icon svg { width: 1em; height: 1em; vertical-align: middle; }

/* kt-svg-icon-list: icon + text side by side */
.kt-svg-icon-list-item-wrap { display: flex; align-items: flex-start; gap: 0.5em; }
.kt-svg-icon-list-text { flex: 1; }

/* ── Kadence buttons ───────────────────────────────────────────────────────── */
.kb-btn-wrap,
.kb-buttons-wrap,
.kb-btn-align-wrap { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.kb-btn-align-center { justify-content: center; }
.kb-btn-align-right  { justify-content: flex-end; }
.kb-btn-align-left   { justify-content: flex-start; }

.kb-button,
.kb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  text-decoration: none;
  padding: 0.7em 1.75em;
  border-radius: 36px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  cursor: pointer;
  border: none;
  transition: background 0.2s, box-shadow 0.2s;
  background: #d9e3cf;
  color: var(--global-palette1, #314e25);
  box-shadow: inset 0 0 0 -7px rgba(0,0,0,0);
}
.kb-button:hover,
.kb-btn:hover {
  background: #bbcca8;
  color: var(--global-palette1, #314e25);
  box-shadow: inset 0 15px 25px -7px rgba(0,0,0,0.1);
}
.kb-btn-size-small  { font-size: 0.8rem; padding: 0.45em 1em; }
.kb-btn-size-medium { font-size: 0.95rem; padding: 0.65em 1.5em; }
.kb-btn-size-large  { font-size: 1.1rem; padding: 0.8em 1.75em; }
.kb-btn-size-xlarge { font-size: 1.3rem; padding: 1em 2em; }

/* Outline / ghost style */
.kb-btn-style-outline {
  background: transparent;
  border-color: currentColor;
  color: var(--global-palette1, #314e25);
}
.kb-btn-style-outline:hover {
  background: var(--global-palette1, #314e25);
  color: var(--global-palette9, #fff);
}

/* ── Kadence image block ───────────────────────────────────────────────────── */
.kb-image-wrap { display: block; }
.kb-image-wrap img { display: block; max-width: 100%; height: auto; }
.kb-image-wrap.kb-icon-block { display: flex; justify-content: flex-start; margin-bottom: 1rem; }
.kb-image-wrap.kb-icon-block svg { flex-shrink: 0; }

/* ── Page layout — CSS grid for alignfull breakout ─────────────────────────── */
.page { margin: 0; }
.page-content {
  display: grid;
  grid-template-columns:
    [full-start] minmax(0, 1fr)
    [content-start] min(var(--global-content-width, 1290px), calc(100% - 2 * var(--global-content-edge-padding, 1.5rem)))
    [content-end] minmax(0, 1fr)
    [full-end];
}
.page-content > * { grid-column: content; }
.page-content > .alignfull,
.page-content > .alignwide { grid-column: full; }

/* ── Kadence rowlayout column grid ─────────────────────────────────────────── */
.kt-row-column-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--global-row-gutter-md, 2rem);
  position: relative;
  z-index: 1;
}
.alignfull > .kt-row-column-wrap {
  padding-left: var(--global-content-edge-padding, 1.5rem);
  padding-right: var(--global-content-edge-padding, 1.5rem);
  max-width: var(--global-content-width, 1290px);
  margin-left: auto;
  margin-right: auto;
}
/* overlay + separator positioning */
.kb-row-layout-wrap { position: relative; }
.kt-row-layout-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.kb-has-bg-img > .kt-row-layout-overlay {
  background: linear-gradient(135deg, var(--global-palette1, #314e25) 50%, var(--global-palette9, #fff) 100%);
  mix-blend-mode: multiply;
  opacity: 0.85;
}

/* Auto-detect column count via :has() — works regardless of kb-col-N class value */
@media (min-width: 768px) {
  .kt-row-column-wrap:has(> .kb-section-container:nth-child(2)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kt-row-column-wrap.kb-layout-left-golden:has(> .kb-section-container:nth-child(2)) {
    grid-template-columns: 2fr 1fr;
  }
  .kt-row-column-wrap.kb-layout-right-golden:has(> .kb-section-container:nth-child(2)) {
    grid-template-columns: 1fr 2fr;
  }
}
@media (min-width: 1025px) {
  .kt-row-column-wrap:has(> .kb-section-container:nth-child(3)) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .kt-row-column-wrap:has(> .kb-section-container:nth-child(4)) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ── Kadence row separators ─────────────────────────────────────────────────── */
.kt-row-layout-bottom-sep,
.kt-svg-for-bottom-sep {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  pointer-events: none;
  z-index: 2;
}
.kt-row-layout-top-sep,
.kt-svg-for-top-sep {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  pointer-events: none;
  z-index: 2;
}
.kt-row-layout-bottom-sep svg,
.kt-row-layout-top-sep svg,
.kt-svg-for-top-sep svg,
.kt-svg-for-bottom-sep svg {
  fill: currentColor !important;
  display: block;
  width: 107%;
  height: 100px;
  margin-left: -3.5%;
}

/* ── Kadence postgrid / Splide carousel ────────────────────────────────────── */
.kb-post-grid,
.kb-posts-block {
  padding: 1rem 0;
}

/* Carousel postgrids — full-width background, track spans viewport */
.kb-post-grid--carousel {
  background: var(--global-palette7, #f0f4ec);
  padding: 3rem 0 2.5rem;
}
/* Title aligns with content column */
.kb-post-grid--carousel .kb-post-feed-header {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  margin-bottom: 1.25rem;
}

.kb-post-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 1.25rem;
}

.kb-post-feed-title {
  margin: 0;
  color: var(--global-palette1, #314e25);
  font-family: var(--global-heading-font-family, Arial, Helvetica, sans-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.1;
}

.kb-post-feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.kb-post-feed-carousel-wrap {
  position: relative;
}

.kb-post-feed-carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  user-select: none;
  padding-left: max(1.5rem, calc((100vw - 900px) / 2));
  padding-right: max(1.5rem, calc((100vw - 900px) / 2));
  padding-bottom: 1.5rem;
  scrollbar-width: none;
}
.kb-post-feed-carousel::-webkit-scrollbar { display: none; }

.kb-post-feed-carousel > .kb-post-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
}

@media (max-width: 1024px) {
  .kb-post-feed-carousel > .kb-post-card { flex: 0 0 260px; }
}
@media (max-width: 640px) {
  .kb-post-feed-carousel > .kb-post-card { flex: 0 0 80vw; }
}

/* Prev/next nav buttons */
.kb-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(calc(-50% - 0.75rem));
  z-index: 2;
  background: var(--global-palette9, #fff);
  border: 1px solid rgba(49,78,37,.15);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--global-palette1, #314e25);
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  transition: background .15s, box-shadow .15s, opacity .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kb-carousel-btn:hover,
.kb-carousel-btn:focus-visible { background: var(--global-palette7, #f0f4ec); box-shadow: 0 4px 12px rgba(0,0,0,.15); outline: 3px solid var(--global-palette2, #446d33); outline-offset: 2px; }
.kb-carousel-btn--edge { opacity: 0.2; pointer-events: none; }
.kb-carousel-btn--prev { left: max(0.5rem, calc((100vw - 900px) / 2 - 52px)); }
.kb-carousel-btn--next { right: max(0.5rem, calc((100vw - 900px) / 2 - 52px)); }
@media (max-width: 960px) {
  .kb-carousel-btn--prev { left: 0.5rem; }
  .kb-carousel-btn--next { right: 0.5rem; }
}

.kb-post-card {
  display: flex;
  flex-direction: column;
  background: var(--global-palette9, #fff);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 15px 15px -10px rgba(0,0,0,0.05);
  height: 100%;
}

.kb-post-card__image-link {
  display: block;
}

.kb-post-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.kb-post-card__body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.kb-post-card__date {
  font-size: 0.8rem;
  color: #5e6c7b;
  margin-bottom: 0.6rem;
}

.kb-post-card__title {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.kb-post-card__title a {
  text-decoration: none;
  color: var(--global-palette1, #314e25);
}

.kb-post-card__title a:hover {
  color: var(--global-palette2, #446d33);
}

.kb-post-card__excerpt {
  font-size: 0.875rem;
  margin: 0;
  color: var(--global-palette3, #000);
  opacity: 0.78;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── SHIELD-ohjelma ─────────────────────────────────────────────────────────── */
.shield-intro { padding: 2.5rem 1.5rem 3rem; }
.shield-intro-inner { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.shield-intro-eyebrow { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--global-palette2, #446d33); margin: 0 0 .75rem; }
.shield-intro-body { color: #333; line-height: 1.7; margin: 0 0 1rem; }
.shield-intro-link { display: inline-block; margin-top: .5rem; color: var(--global-palette2, #446d33); font-weight: 600; text-decoration: none; }
.shield-intro-link:hover { text-decoration: underline; }
.shield-intro-image img { width: 100%; border-radius: 12px; display: block; }
.shield-projects { padding: 2rem 1.5rem 4rem; background: var(--global-palette7, #f0f4ec); }
.shield-projects-inner { max-width: 900px; margin: 0 auto; }
.shield-projects-heading { font-size: 1.4rem; font-weight: 700; color: var(--global-palette2, #446d33); margin: 0 0 1.5rem; }
.shield-projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.shield-project-card { background: #fff; border: 1px solid #dde5d6; border-radius: 10px; padding: 1.5rem; display: flex; flex-direction: column; gap: .75rem; }
.shield-project-card--current { border-color: var(--global-palette2, #446d33); border-width: 2px; }
.shield-project-acronym { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--global-palette2, #446d33); background: var(--global-palette7, #f0f4ec); display: inline-block; padding: .2rem .6rem; border-radius: 4px; }
.shield-project-card--current .shield-project-acronym { background: var(--global-palette2, #446d33); color: #fff; }
.shield-project-title { font-size: .95rem; font-weight: 600; margin: 0; line-height: 1.4; }
.shield-project-title a { color: var(--global-palette3, #000); text-decoration: none; }
.shield-project-title a:hover { color: var(--global-palette2, #446d33); text-decoration: underline; }
.shield-project-meta { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .2rem .75rem; font-size: .82rem; }
.shield-project-meta dt { color: #888; font-weight: 600; white-space: nowrap; }
.shield-project-meta dd { margin: 0; color: #333; }
/* Shield section heading variant (used outside shield-projects) */
.shield-section-heading {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--global-palette2, #446d33);
  margin: 0 0 0.75rem;
}
.shield-section-lead {
  color: #555;
  line-height: 1.7;
  margin: 0 0 1.5rem;
}
.shield-section-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
/* Report document card */
.hankkeen-report-section {
  padding: 2.5rem 1.5rem 3.5rem;
}
.hankkeen-report-card {
  max-width: 340px;
  background: #fff;
  border: 1px solid #dde5d6;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
}
.hankkeen-report-card__cover {
  background: var(--global-palette1, #314e25);
  padding: 2rem 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}
.hankkeen-report-card__type {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.12);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}
.hankkeen-report-card__cover svg {
  color: rgba(255,255,255,0.9);
}
.hankkeen-report-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
}
.hankkeen-report-card__year {
  font-size: 0.78rem;
  color: #888;
  font-weight: 600;
}
.hankkeen-report-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a2e14;
  line-height: 1.35;
  margin: 0;
}
.hankkeen-report-card__desc {
  font-size: 0.875rem;
  color: #555;
  line-height: 1.6;
  margin: 0.25rem 0 0.75rem;
}
.hankkeen-report-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--global-palette2, #446d33);
  text-decoration: none;
  margin-top: auto;
}
.hankkeen-report-card__link:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .shield-intro-inner { grid-template-columns: 1fr; }
  .shield-intro-image { order: -1; }
  .shield-projects-grid { grid-template-columns: 1fr; }
}

/* ── Uutiskirje / Newsletter page ───────────────────────────────────────────── */
.newsletter-page { padding: 3rem 1.5rem 4rem; }
.newsletter-page-inner { max-width: 860px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.newsletter-title { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; margin: 0 0 1rem; color: var(--global-palette2, #446d33); }
.newsletter-desc { font-size: 1.05rem; color: #333; margin: 0 0 1.25rem; line-height: 1.6; }
.newsletter-benefits { margin: 0 0 1.5rem; padding-left: 1.25rem; color: #444; line-height: 1.8; }
.newsletter-privacy { font-size: .85rem; color: #666; margin: 0; }
.newsletter-privacy a { color: var(--global-palette2, #446d33); }
.newsletter-form-wrap { background: var(--global-palette7, #f0f4ec); border-radius: 12px; padding: 2rem; }
.newsletter-form-placeholder { color: #666; font-size: .9rem; }
.newsletter-form-placeholder-note { margin-top: .5rem; }
@media (max-width: 640px) {
  .newsletter-page-inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* ── Yhteydenotto / Contact page ────────────────────────────────────────────── */
.contact-page { padding: 3rem 1.5rem 4rem; }
.contact-page-inner { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }
.contact-lead { font-size: 1.05rem; color: #333; line-height: 1.7; margin: 0 0 2rem; }
.contact-details { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.contact-details li { display: flex; flex-direction: column; gap: .2rem; font-size: 1rem; color: #222; }
.contact-detail-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--global-palette2, #446d33); }
.contact-details a { color: var(--global-palette2, #446d33); font-weight: 600; text-decoration: none; }
.contact-details a:hover { text-decoration: underline; }
.contact-form-wrap { background: var(--global-palette7, #f0f4ec); border-radius: 12px; padding: 2rem; }
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-form-field { display: flex; flex-direction: column; gap: .35rem; }
.contact-form-field label { font-size: .875rem; font-weight: 600; color: #222; }
.contact-form-field input,
.contact-form-field textarea { width: 100%; padding: .6rem .85rem; border: 1px solid #cdd8c5; border-radius: 6px; font-size: 1rem; font-family: inherit; background: #fff; color: #222; transition: border-color .15s; }
.contact-form-field input:focus,
.contact-form-field textarea:focus { outline: 2px solid var(--global-palette2, #446d33); outline-offset: 0; border-color: var(--global-palette2, #446d33); box-shadow: 0 0 0 3px rgba(68,109,51,.45); }
.contact-form-field textarea { resize: vertical; min-height: 120px; }
.contact-form-btn { align-self: flex-start; background: var(--global-palette2, #446d33); color: #fff; border: none; border-radius: 6px; padding: .7rem 1.75rem; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background .15s; }
.contact-form-btn:hover { background: var(--global-palette1, #314e25); }
.contact-form-btn:disabled { opacity: 0.65; cursor: not-allowed; }
.contact-form-status { margin-top: 1rem; padding: .75rem 1rem; border-radius: 6px; font-size: .95rem; }
.contact-form-status--ok  { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.contact-form-status--err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
@media (max-width: 640px) {
  .contact-page-inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* ── Ajankohtaista intro ────────────────────────────────────────────────────── */
.news-intro { padding: 3rem 1.5rem 1.5rem; background: var(--global-palette9, #fff); }
.news-intro-inner { max-width: 860px; margin: 0 auto; }
.news-intro-title { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; margin: 0 0 .5rem; color: var(--global-palette2, #446d33); }
.news-intro-desc { font-size: 1.05rem; color: #444; margin: 0; }

/* ── Kadence tabs ───────────────────────────────────────────────────────────── */
.kb-tabs { margin: 1.5rem 0; }
.kt-tabs-title-list { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; gap: .25rem; border-bottom: 2px solid var(--global-palette7, #eee); }
.kt-title-item { margin: 0; }
.kt-tab-title { display: block; padding: .6rem 1.25rem; text-decoration: none; border-radius: 4px 4px 0 0; border: 1px solid transparent; border-bottom: none; color: var(--global-palette3, #000); font-weight: 500; font-size: .95rem; transition: background .15s, color .15s; }
.kt-tab-title:hover { background: var(--global-palette7, #f0f4ec); }
.kt-title-item.kt-tab-title-active .kt-tab-title { background: var(--global-palette9, #fff); border-color: var(--global-palette7, #eee); color: var(--global-palette2, #446d33); font-weight: 700; margin-bottom: -2px; }
.kt-tabs-content-wrap { padding: 1.5rem 0 0; }
.kb-tab-panel { display: none; }
.kb-tab-panel.kt-tab-active { display: block; }
/* Fallback: show first panel before JS runs */
.kb-tabs:not(.kb-tabs-js-ready) .kb-tab-panel:first-child { display: block; }

/* ── Kadence query grid ──────────────────────────────────────────────────────── */
.kb-query-loop { margin: 1rem 0; }
.kb-query-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.kb-query-hidden { display: none; }
.kb-query-sentinel { height: 1px; }
.kb-query-item { background: var(--global-palette9, #fff); border: 1px solid var(--global-palette7, #eee); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.kb-query-item__thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.kb-query-item__body { padding: 1rem; display: flex; flex-direction: column; flex: 1; }
.kb-query-item__cats { margin-bottom: .4rem; }
.kb-query-item__cat { display: inline-block; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--global-palette2, #446d33); background: var(--global-palette7, #f0f4ec); padding: .15rem .5rem; border-radius: 3px; }
.kb-query-item__title { font-size: 1rem; margin: 0 0 .4rem; line-height: 1.35; }
.kb-query-item__title a { color: var(--global-palette3, #000); text-decoration: none; }
.kb-query-item__title a:hover { color: var(--global-palette2, #446d33); }
.kb-query-item__date { font-size: .8rem; color: #666; display: block; margin-bottom: .5rem; }
.kb-query-item__excerpt { font-size: .875rem; color: #444; margin: 0; line-height: 1.5; flex: 1; }
.codeschool-showcase {
  background: var(--global-palette7, #f5f6ef);
  padding: 2rem 0 3rem;
}
.codeschool-showcase__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
.codeschool-showcase__header {
  max-width: 780px;
  margin: 0 auto 1.5rem;
  text-align: center;
}
.codeschool-showcase__heading {
  margin: 0 0 .5rem;
  color: var(--global-palette3, #202124);
}
.codeschool-showcase__lead {
  margin: 0;
  color: var(--global-palette4, #4b5563);
  line-height: 1.6;
}
.codeschool-showcase__grid {
  margin-top: 1.5rem;
}
.codeschool-showcase__card {
  min-height: 100%;
}
.codeschool-showcase__body {
  gap: .75rem;
}
.codeschool-showcase__cats {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 0;
}
.codeschool-showcase__source {
  margin: 0;
  font-size: .875rem;
  color: #5f6368;
}
.codeschool-showcase__source-label {
  font-weight: 600;
  margin-right: .35rem;
  color: var(--global-palette3, #202124);
}
.codeschool-showcase__actions {
  margin: 0;
  padding-top: .25rem;
}
.codeschool-showcase__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: .6rem .95rem;
  border-radius: 999px;
  background: var(--global-palette3, #2c5f2e);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.codeschool-showcase__link:hover,
.codeschool-showcase__link:focus {
  background: var(--global-palette2, #446d33);
  color: #fff;
}
.codeschool-showcase__empty {
  margin: 1rem 0 0;
  text-align: center;
  color: var(--global-palette4, #4b5563);
}

/* ── Kadence accordion ──────────────────────────────────────────────────────── */
.kt-accordion-pane { border: 1px solid var(--global-palette7, #eee); border-radius: 4px; margin-bottom: .5rem; overflow: hidden; }
.kt-accordion-header-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; background: var(--global-palette7, #f0f4ec); border: none; padding: 1rem 1.25rem; cursor: pointer; font-size: 1.05rem; font-weight: 600; text-align: left; gap: .5rem; color: var(--global-palette3, #000); }
.kt-accordion-header-btn:hover { background: var(--global-palette6, #446d33); color: var(--global-palette9, #fff); }
.kt-blocks-accordion-title { flex: 1; line-height: 1.35; white-space: normal; }
.kt-accordion-icon-trigger { display: inline-flex; align-items: center; font-size: 1.25rem; transition: transform .2s; line-height: 1; flex-shrink: 0; }
.kt-accordion-icon-trigger::after { content: '+'; }
.kt-accordion-pane.is-open .kt-accordion-icon-trigger::after { content: '\2212'; }
.kt-accordion-panel { display: none; }
.kt-accordion-pane.is-open .kt-accordion-panel { display: block; }
.kt-accordion-panel-inner { padding: 1rem; }

/* ── Kadence infobox ────────────────────────────────────────────────────────── */
.kt-blocks-info-box-link-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; text-decoration: none; color: inherit; }
.kt-blocks-info-box-media-container { flex-shrink: 0; }
.kt-info-svg-div { display: inline-flex; align-items: center; }
.kt-info-svg-div svg { width: 2rem; height: 2rem; }
.kt-info-box-img-wrap img { max-width: 100%; display: block; }
.kt-infobox-textcontent { flex: 1; display: flex; flex-direction: column; }
.kt-blocks-info-box-title { margin: 0 0 .5rem; }

/* ── Kadence infobox — person cards inside accordion + row grid ─────────────── */
.kt-accordion-panel .kt-row-column-wrap { align-items: stretch; }
.kt-accordion-panel .kt-row-column-wrap .kb-section-container,
.kt-accordion-panel .kt-row-column-wrap .kt-inside-inner-col { height: 100%; display: flex; flex-direction: column; }
.kt-accordion-panel .kt-row-column-wrap .kt-blocks-info-box-wrap { background: var(--global-palette9, #fff); border: 1px solid var(--global-palette7, #f0f4ec); border-radius: 12px; padding: 1.25rem 1rem 1rem; box-shadow: 0 1px 6px rgba(0,0,0,.07); display: flex; flex-direction: column; height: 100%; box-sizing: border-box; }
.kt-accordion-panel .kt-row-column-wrap .kt-blocks-info-box-link-wrap,
.kt-accordion-panel .kt-row-column-wrap .kt-infobox-textcontent { display: flex; flex-direction: column; flex: 1; }
.kt-accordion-panel .kt-row-column-wrap .kt-info-box-image { width: 96px !important; height: 96px !important; object-fit: cover !important; border-radius: 50%; display: block !important; margin: 0 auto .875rem; }
.kt-accordion-panel .kt-row-column-wrap .kt-blocks-info-box-media { display: block; width: 96px; height: 96px; margin: 0 auto; overflow: hidden; }
.kt-accordion-panel .kt-row-column-wrap .kt-blocks-info-box-title { font-size: 1rem; font-weight: 700; margin: 0 0 .2rem; text-align: center; }
.kt-accordion-panel .kt-row-column-wrap .kt-blocks-info-box-text { font-size: .875rem; text-align: center; margin: 0 0 .5rem; line-height: 1.4; }
.kt-accordion-panel .kt-row-column-wrap .kt-blocks-info-box-text a { font-size: .75rem; word-break: break-all; color: var(--global-palette2, #446d33); }

/* ── Hero section ───────────────────────────────────────────────────────────── */
.entry-hero.page-hero-section {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  display: flex;
  align-items: center;
  background-color: var(--global-palette1, #314e25);
}
.hero-bg-sharp {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  z-index: 0;
}
.hero-bg-blur {
  position: absolute;
  inset: -30px;
  background-size: cover;
  background-position: center center;
  filter: blur(5px);
  transform: scale(1.06);
  z-index: 1;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 50%);
  mask-image: linear-gradient(to bottom, black 0%, transparent 50%);
}
.entry-hero-container-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--global-content-width, 1290px);
  margin: 0 auto;
  padding: 0 var(--global-content-edge-padding, 1.5rem);
}
.hero-section-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(8,16,4,0.72) 0%, transparent 50%);
  z-index: 0;
}
.entry-hero.page-hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 55%, #ffffff 100%);
  z-index: 1;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  padding: 2.5rem 0 3rem;
}
.hero-headline {
  font-size: clamp(1.55rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 1rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.hero-tagline {
  font-size: clamp(0.92rem, 1.6vw, 1.1rem);
  color: rgba(255,255,255,0.88);
  line-height: 1.65;
  margin: 0 0 1.75rem;
  text-shadow: 0 1px 5px rgba(0,0,0,0.4);
}
.hero-cta-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.hero-cta-btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.hero-cta-btn--primary {
  background: var(--global-palette2, #446d33);
  color: #fff;
}
.hero-cta-btn--primary:hover { background: #fff; color: var(--global-palette1, #314e25); }
.hero-cta-btn--secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.65);
}
.hero-cta-btn--secondary:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.page-title {
  color: var(--global-palette3, #2c5f2e);
  font-size: clamp(1.75rem, 1.5rem + 1.5vw, 2.75rem);
  margin: 1.5rem 0 1rem;
  padding: 0 var(--global-content-edge-padding, 1.5rem);
  max-width: var(--global-content-width, 1290px);
  margin-left: auto;
  margin-right: auto;
}

/* ── Post layout ───────────────────────────────────────────────────────────── */
.post { margin: 0; }
.post-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem var(--global-content-edge-padding, 1.5rem) 4rem;
}
.post-header { margin-bottom: 2.5rem; }
.post-categories { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.post-category {
  display: inline-block; padding: 0.2em 0.7em;
  background: #eef4ea; color: var(--global-palette1, #314e25);
  border-radius: 999px; font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  text-decoration: none; transition: background 0.15s;
}
.post-category:hover { background: #d8ebcf; }
.post-title {
  color: var(--global-palette3, #2c5f2e);
  font-size: clamp(1.6rem, 1.3rem + 1.5vw, 2.4rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
}
.post-date {
  display: block;
  color: #64748b;
  font-size: 0.9rem;
}
.post-featured-image {
  display: block; width: 100%; margin-top: 1.5rem;
  border-radius: 8px; object-fit: cover;
}
/* Prose typography for post body */
.post-content { line-height: 1.75; color: #1e293b; }
.post-content > * + * { margin-top: 1.2em; }
.post-content p { margin: 0; }
.post-content h2 {
  font-size: 1.4rem; font-weight: 700;
  color: var(--global-palette3, #2c5f2e);
  margin-top: 2.25em; margin-bottom: 0.5em;
}
.post-content h3 {
  font-size: 1.15rem; font-weight: 700;
  color: var(--global-palette1, #314e25);
  margin-top: 2em; margin-bottom: 0.4em;
}
.post-content ul, .post-content ol { padding-left: 1.5em; }
.post-content li + li { margin-top: 0.35em; }
.post-content a { color: var(--global-palette2, #446d33); text-decoration: underline; }
.post-content a:hover { color: var(--global-palette1, #314e25); }
.post-content code {
  background: #f1f5f9; border-radius: 4px;
  padding: 0.1em 0.4em; font-size: 0.9em;
}
.post-content blockquote {
  border-left: 3px solid var(--global-palette2, #446d33);
  padding-left: 1rem; color: #475569;
  margin: 0;
}
.post-footer {
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(15,23,42,0.08);
}
.post-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.post-tag {
  display: inline-block; padding: 0.2em 0.7em;
  background: #f1f5f9; color: #475569;
  border-radius: 999px; font-size: 0.78rem;
  text-decoration: none; transition: background 0.15s;
}
.post-tag:hover { background: #e2e8f0; color: #1e293b; }
/* Related posts */
.post-related {
  margin-top: 3.5rem; padding-top: 2rem;
  border-top: 2px solid var(--global-palette7, #f0f4ec);
}
.post-related__heading {
  margin: 0 0 1.25rem;
  font-size: 1rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: #64748b;
}
.post-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.post-related__card {
  display: flex; flex-direction: column; gap: 0.4rem;
  padding: 1rem 1.1rem 1.1rem;
  background: #f8fafc;
  border: 1px solid rgba(15,23,42,0.07);
  border-radius: 8px;
  text-decoration: none; color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.post-related__card:hover {
  border-color: var(--global-palette2, #446d33);
  box-shadow: 0 2px 8px rgba(15,23,42,0.08);
}
.post-related__cat {
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--global-palette2, #446d33);
}
.post-related__title {
  font-size: 0.92rem; font-weight: 600; line-height: 1.35;
  color: #1e293b;
}
.post-related__date {
  margin-top: auto; padding-top: 0.5rem;
  font-size: 0.78rem; color: #94a3b8;
}

/* ── Footer logo strip ─────────────────────────────────────────────────────── */
.footer-logos {
  background: #fff;
  border-top: 1px solid rgba(15,23,42,0.08);
  padding: 2rem var(--global-content-edge-padding, 1.5rem);
}
.footer-logos-inner {
  max-width: var(--global-content-width, 1290px);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  align-items: flex-start;
}
.footer-logos-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-logos-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}
.footer-logos-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2rem;
}
.footer-logo-item {
  display: inline-flex;
  align-items: center;
  opacity: 0.75;
  transition: opacity 0.15s;
  text-decoration: none;
}
.footer-logo-item:hover { opacity: 1; }
.footer-logo-img {
  height: 48px;
  width: 140px;
  max-width: 180px;
  object-fit: contain;
  object-position: left center;
  display: block;
  filter: brightness(0);
}
.footer-logo-img--invert { filter: invert(1); }
.footer-logo-img--png { filter: none; }
.footer-logo-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

/* ── Site footer ───────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--global-palette1, #314e25);
  color: var(--global-palette9, #fff);
  padding: 2rem var(--global-content-edge-padding, 1.5rem);
  margin-top: 3rem;
}
.site-footer-inner {
  max-width: var(--global-content-width, 1290px);
  margin: 0 auto;
}
.site-footer-copy { margin: 0; opacity: 0.8; font-size: 0.875rem; }

/* ── Mobile (≤ 1024px) ─────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .kb-nav-toggle { display: block; }

  .site-navigation {
    display: none;
    position: fixed;
    inset: 60px 0 0 0;
    background: var(--global-palette9, #fff);
    overflow-y: auto;
    z-index: 999;
    padding: 1rem;
    margin-left: 0;
  }
  .site-navigation.is-open { display: block; }

  .kb-nav-menu { flex-direction: column; align-items: stretch; gap: 0; }
  .kb-nav-link-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
  }
  .kb-nav-link { padding: 0.75rem 0.5rem; border-bottom: 1px solid var(--global-palette7, #eee); white-space: normal; }
  .kb-nav-item-toggle {
    min-width: 3rem;
    border-bottom: 1px solid var(--global-palette7, #eee);
  }

  /* Dropdowns/megamenus become full-width stacked on mobile */
  .menu-item-has-children > .sub-menu,
  .kb-nav-mega-menu-item > .kb-mega-menu { display: none; }
  .menu-item-has-children.is-open > .sub-menu,
  .kb-nav-mega-menu-item.is-open > .kb-mega-menu {
    display: block;
    position: static;
    transform: none;
    width: unset;
    min-width: unset;
    max-width: unset;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: var(--global-palette7, #f0f4ec);
    padding: 0.25rem 0 0.25rem 1rem;
  }
  .kb-mega-sidebar { display: none; }
  .kb-mega-menu-cols { display: flex; flex-direction: column; gap: 0; padding: 0.25rem 0 0.25rem 1rem; }
}

/* ── BetterDocs listing ───────────────────────────────────────────────────── */
.docs-index { margin-top: 3rem; }
.docs-kb-section { margin-bottom: 2.5rem; }
.docs-kb-title { font-size: 1.4rem; margin-bottom: 0.75rem; color: var(--global-palette3, #333); border-bottom: 2px solid var(--global-palette6, #ccc); padding-bottom: 0.25rem; }
.docs-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.5rem; }
.docs-list-item a { display: block; padding: 0.6rem 0.9rem; background: var(--global-palette8, #f5f5f5); border-radius: 4px; text-decoration: none; color: var(--global-palette3, #333); transition: background 0.15s; }
.docs-list-item a:hover { background: var(--global-palette7, #e8eef5); }
.docs-cat { display: block; font-size: 0.75rem; color: var(--global-palette6, #888); margin-top: 0.2rem; }

/* ── Doc layout (sidebar + content) ──────────────────────────────────────── */
.doc-layout { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; align-items: start; max-width: 1100px; margin: 2rem auto; padding: 0 1rem; }
.doc-sidebar { position: sticky; top: 1rem; }
.doc-sidebar-link { display: block; padding: 0.4rem 0.75rem; border-radius: 4px; text-decoration: none; color: var(--global-palette3, #333); font-size: 0.9rem; }
.doc-sidebar-link:hover { background: var(--global-palette8, #f5f5f5); }
.doc-sidebar-link.is-active { background: var(--global-palette6, #dde4f0); font-weight: 600; }
.doc-title { margin-bottom: 0.5rem; }
.doc-category { font-size: 0.8rem; color: var(--global-palette6, #888); margin-bottom: 1.5rem; }
@media (max-width: 700px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-sidebar { position: static; }
}

/* ── 404 page ────────────────────────────────────────────────────────────── */
.error-404 { min-height: 60vh; display: flex; align-items: center; justify-content: center; }
.error-404-inner { text-align: center; padding: 3rem 1.5rem; max-width: 560px; margin: 0 auto; }
.error-404-code { font-size: clamp(5rem, 20vw, 9rem); font-weight: 700; line-height: 1; color: var(--global-palette7, #f0f4ec); letter-spacing: -0.04em; }
.error-404-title { font-size: clamp(1.4rem, 4vw, 2rem); margin: 0.25rem 0 0.75rem; }
.error-404-desc { color: #555; margin: 0 0 2rem; }
.error-404-suggestions { margin: 0 0 2rem; }
.error-404-suggestions-label { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--global-palette5, #3b5e2c); margin: 0 0 0.75rem; }
.error-404-suggestions-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; align-items: center; }
.error-404-suggestions-list a { display: inline-block; padding: 0.5em 1.2em; background: var(--global-palette7, #f0f4ec); border-radius: 5px; text-decoration: none; color: var(--global-palette3, #000); font-weight: 500; transition: background 0.15s; }
.error-404-suggestions-list a:hover { background: #dde9d5; }
.e404-ext { font-size: 0.75em; color: var(--global-palette5, #3b5e2c); }
.error-404-home { display: inline-block; margin-top: 0.5rem; color: var(--global-palette2, #446d33); font-size: 0.9rem; }

/* ── gen-ai.fi tool cards (materiaalit-sivu) ─────────────────────────────── */
.gen-ai-tools-intro { max-width: 700px; margin: 0 0 2rem; }
.gen-ai-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 1rem;
  row-gap: 0.6rem;
  margin: 0 0 2.5rem;
}
@media (max-width: 900px) { .gen-ai-tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .gen-ai-tool-grid { grid-template-columns: 1fr; } }

/* Each card spans 8 rows (image · type · badge · title · desc · meta · links · legal)
   and uses subgrid so all cards in the same visual row share row heights */
.gen-ai-tool-card {
  display: grid;
  grid-row: span 8;
  grid-template-rows: subgrid;
  align-items: start;
  background: var(--global-palette9, #fff);
  border: 1px solid #dde5d6;
  border-radius: 8px;
  padding: 0 0 1.5rem;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(49,78,37,0.07);
  transition: box-shadow 0.2s, transform 0.2s;
}
.gen-ai-tool-card:hover { box-shadow: 0 6px 18px rgba(49,78,37,0.14); transform: translateY(-2px); }

/* Hero image row */
.gen-ai-tool-card-image {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: #e8f0e4;
}
.gen-ai-tool-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.gen-ai-tool-card-image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #b0c4a8;
  background: linear-gradient(135deg, #e8f0e4 0%, #d4e4cc 100%);
}
.gen-ai-tool-card-type {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--global-palette2, #446d33);
  border-bottom: 2px solid var(--global-palette2, #446d33);
  padding: 0.1em 0;
  margin: 1.1rem 1.5rem 0.75rem;
}
.gen-ai-tool-card-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
  padding: 0 1.5rem;
}
.gen-ai-tool-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15em 0.6em;
  border-radius: 3px;
}
.gen-ai-tool-badge--active { background: #e2f0dc; color: #2d5a1e; }
.gen-ai-tool-badge--beta { background: #dce8f8; color: #1a4a80; }
.gen-ai-tool-badge--new { background: #fff3cd; color: #7a5c00; }
.gen-ai-tool-card-title {
  font-size: 1.15rem;
  margin: 0;
  padding: 0 1.5rem;
  color: var(--global-palette3, #000);
}
.gen-ai-tool-card-desc { font-size: 0.9rem; line-height: 1.55; color: #444; margin: 0; padding: 0 1.5rem; }
.gen-ai-tool-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-content: start;
  padding: 0 1.5rem;
}
.gen-ai-tool-tag {
  font-size: 0.72rem;
  background: var(--global-palette7, #f0f4ec);
  color: var(--global-palette5, #3b5e2c);
  padding: 0.15em 0.55em;
  border-radius: 3px;
}
.gen-ai-tool-card-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
  align-self: start;
  padding: 0 1.5rem;
}
/* Shared button base */
.gen-ai-tool-card-about,
.gen-ai-tool-card-link,
.gen-ai-tool-card-curriculum {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  padding: 0.55em 1em;
  min-height: 2.65rem;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
/* Kuvaus — secondary outlined */
.gen-ai-tool-card-about {
  color: var(--global-palette1, #314e25);
  border: 1.5px solid #c2d3b8;
  background: #fff;
}
.gen-ai-tool-card-about:hover { border-color: var(--global-palette2, #446d33); background: var(--global-palette7, #f0f4ec); color: var(--global-palette1, #314e25); }
/* Kokeile — primary filled */
.gen-ai-tool-card-link {
  background: var(--global-palette2, #446d33);
  color: #fff;
  border: 1.5px solid transparent;
}
.gen-ai-tool-card-link:hover { background: var(--global-palette1, #314e25); color: #fff; }
.gen-ai-tool-card-link--disabled {
  background: #e8e8e8;
  color: #999;
  cursor: default;
  border-color: transparent;
}
.gen-ai-tool-card-link--disabled:hover { background: #e8e8e8; color: #999; }
/* Oppimateriaalit — tertiary soft */
.gen-ai-tool-card-curriculum {
  font-size: 0.82rem;
  color: var(--global-palette4, #314e25);
  background: var(--global-palette7, #f0f4ec);
  border: 1.5px solid transparent;
}
.gen-ai-tool-card-curriculum:hover { background: #dde9d5; }
.gen-ai-tool-card--github .gen-ai-tool-card-desc strong {
  color: var(--global-palette1, #314e25);
}
/* ── Tool card legal row ──────────────────────────────────────────────────── */
.gen-ai-tool-card-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  margin-top: auto;
  padding: 0.75rem 1.5rem 0;
  border-top: 1px solid rgba(15,23,42,0.07);
}
.gen-ai-tool-legal-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--global-palette1, #314e25);
  background: var(--global-palette7, #f0f4ec);
  border: 1px solid #c2d3b8;
  border-radius: 4px;
  padding: 0.15em 0.5em;
}
.gen-ai-tool-legal-link {
  font-size: 0.78rem;
  color: #64748b;
  text-decoration: none;
}
.gen-ai-tool-legal-link:hover { color: var(--global-palette2, #446d33); text-decoration: underline; }
.gen-ai-tool-legal-link--github::before { content: ""; }

/* ── Open source repo pills ───────────────────────────────────────────────── */
.mat-open-repos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.mat-open-repo {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--global-palette1, #314e25);
  background: #fff;
  border: 1.5px solid #c2d3b8;
  border-radius: 20px;
  padding: 0.35em 0.9em;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.mat-open-repo:hover {
  border-color: var(--global-palette2, #446d33);
  background: var(--global-palette7, #f0f4ec);
}
.gen-ai-tools-curricula {
  background: var(--global-palette7, #f0f4ec);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin-top: 0.5rem;
}
.gen-ai-tools-curricula h3 { margin: 0 0 0.5rem; }
.gen-ai-tools-curricula ul { margin: 0.5rem 0 1.25rem; padding-left: 1.4rem; }
.gen-ai-tools-curricula li { margin-bottom: 0.4rem; }

/* ── Materiaalit page sections ────────────────────────────────────────────── */
.mat-section {
  padding: 3.5rem 0;
}
.mat-section--alt {
  background: var(--global-palette7, #f0f4ec);
}
.mat-section-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.mat-section-inner--narrow {
  max-width: 680px;
}
.mat-section-heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1.75rem;
  color: var(--global-palette3, #111);
}

/* Curricula cards — 2-column grid matching the tool card style */
.mat-curricula-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 600px) { .mat-curricula-grid { grid-template-columns: 1fr; } }

.mat-curricula-card {
  background: var(--global-palette9, #fff);
  border: 1px solid #dde5d6;
  border-radius: 8px;
  padding: 1.25rem 1.5rem 1.5rem;
  box-shadow: 0 2px 6px rgba(49,78,37,0.07);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.mat-curricula-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: var(--global-palette3, #111);
}
.mat-curricula-desc {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #444;
  margin: 0;
  flex-grow: 1;
}
.mat-curricula-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Publication cards grid */
.mat-pub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}
@media (max-width: 680px) { .mat-pub-grid { grid-template-columns: 1fr; } }

.mat-pub-card {
  background: #fff;
  border: 1px solid #dde5d6;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(49,78,37,0.07);
  transition: box-shadow 0.2s;
}
.mat-pub-card:hover { box-shadow: 0 6px 20px rgba(49,78,37,0.13); }

/* Coloured top accent bar */
.mat-pub-card-accent {
  height: 5px;
}
.mat-pub-card--book  .mat-pub-card-accent { background: linear-gradient(90deg, #314e25, #5a8a40); }
.mat-pub-card--guide .mat-pub-card-accent { background: linear-gradient(90deg, #1d4079, #3b70c4); }
.mat-pub-card--case  .mat-pub-card-accent { background: linear-gradient(90deg, #7a4a00, #c47b1a); }

.mat-pub-card-body {
  padding: 1.5rem 1.75rem 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Type badge */
.mat-pub-card-type {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 4px;
  padding: 0.2em 0.65em;
  margin-bottom: 0.75rem;
  align-self: flex-start;
}
.mat-pub-card--book  .mat-pub-card-type { background: #eaf2e4; color: #314e25; }
.mat-pub-card--guide .mat-pub-card-type { background: #e6eef8; color: #1d4079; }
.mat-pub-card--case  .mat-pub-card-type { background: #fdf0e0; color: #7a4a00; }

.mat-pub-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.75rem;
  color: #0f172a;
}
.mat-pub-card-desc {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #475569;
  margin: 0 0 0.75rem;
  flex: 1;
}
.mat-pub-card-authors {
  font-size: 0.8rem;
  color: #94a3b8;
  font-style: italic;
  margin: 0 0 1.25rem;
}

.mat-pub-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}
.mat-pub-card-btn {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  padding: 0.5em 1em;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.mat-pub-card-btn--primary {
  background: var(--global-palette2, #446d33);
  color: #fff;
}
.mat-pub-card-btn--primary:hover { background: var(--global-palette1, #314e25); }
.mat-pub-card-btn--secondary {
  background: transparent;
  color: var(--global-palette2, #446d33);
  border: 1px solid currentColor;
}
.mat-pub-card-btn--secondary:hover { background: #f0f7eb; }

/* ── Publication layout ────────────────────────────────────────────────────── */

/* Meta bar */
/* Publication hero — title, authors, date */
.publication-hero {
  background: linear-gradient(135deg, var(--global-palette1, #314e25) 0%, #1e3818 100%);
  color: #fff;
  padding: 4rem var(--global-content-edge-padding, 1.5rem) 3.5rem;
}
.publication-hero-inner {
  max-width: 760px;
  margin: 0 auto;
}
.publication-hero-type {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  padding: 0.25em 0.75em;
  margin-bottom: 1.25rem;
}
.publication-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  margin: 0 0 1.75rem;
  letter-spacing: -0.01em;
}
.publication-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.2);
}
.publication-hero-author {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.publication-hero-author-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}
a.publication-hero-author-name:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.publication-hero-author-title {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
}
.publication-hero-date {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  align-self: flex-end;
  margin-left: auto;
}
@media (max-width: 680px) {
  .publication-hero { padding: 2.5rem 1.25rem 2rem; }
  .publication-hero-date { margin-left: 0; }
}

/* Two-column book layout: TOC sidebar + body */
.publication-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  max-width: var(--global-content-width, 1290px);
  margin: 0 auto;
  align-items: start;
  min-height: 80vh;
}
@media (max-width: 960px) {
  .publication-layout { grid-template-columns: 1fr; }
}

/* TOC sidebar */
.publication-toc {
  position: sticky;
  top: 2.5rem;
  max-height: calc(100vh - 3.5rem);
  overflow-y: auto;
  border-right: 1px solid rgba(15,23,42,0.08);
  padding: 2rem 0;
}
.publication-toc-inner { padding: 0 1.25rem; }

.publication-toc-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  background: none;
  border: none;
  padding: 0 0 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  cursor: default;
  text-align: left;
}
.publication-toc-toggle::before {
  content: "§";
  font-size: 0.9rem;
  opacity: 0.5;
}
@media (max-width: 960px) {
  .publication-toc {
    position: static;
    border-right: none;
    border-bottom: 1px solid rgba(15,23,42,0.08);
    padding: 1.25rem 1.5rem;
    max-height: none;
    overflow: visible;
  }
  .publication-toc-toggle {
    cursor: pointer;
    padding-bottom: 0;
    justify-content: space-between;
  }
  .publication-toc-toggle::after {
    content: "▾";
    font-size: 0.8rem;
    transition: transform 0.2s;
  }
  .publication-toc-toggle[aria-expanded="false"]::after { transform: rotate(-90deg); }
  .publication-toc-nav.is-hidden { display: none; }
  .publication-toc-nav { padding-top: 0.75rem; }
}

.pub-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}
.pub-toc-item--h3 { padding-left: 0.85rem; }
.pub-toc-link {
  display: block;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #64748b;
  text-decoration: none;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  border-left: 2px solid transparent;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.pub-toc-link:hover {
  background: var(--global-palette7, #f0f4ec);
  color: var(--global-palette1, #314e25);
}
.pub-toc-link.is-active {
  background: var(--global-palette7, #f0f4ec);
  color: var(--global-palette1, #314e25);
  font-weight: 600;
  border-left-color: var(--global-palette2, #446d33);
}

/* Body — reading column */
.publication-body {
  padding: 3rem 3.5rem 5rem;
  max-width: 72ch;
  box-sizing: content-box;
}
@media (max-width: 960px) {
  .publication-body { padding: 2rem 1.5rem 4rem; max-width: 100%; }
}

/* Book typography */
.publication-body p,
.publication-body li {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #1e293b;
}
.publication-body ul,
.publication-body ol {
  padding-left: 1.5rem;
  margin: 0.75rem 0 1.25rem;
}
.publication-body li { margin-bottom: 0.35rem; }
.publication-body strong { color: #0f172a; }
.publication-body a { color: var(--global-palette2, #446d33); }
.publication-body a:hover { text-decoration: none; }

/* h2 — chapter headings */
.publication-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--global-palette1, #314e25);
  margin-top: 3.5rem;
  margin-bottom: 1rem;
  padding-top: 2rem;
  border-top: 2px solid var(--global-palette7, #f0f4ec);
  line-height: 1.3;
}
/* First h2 gets no top border */
.publication-body h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
/* h3 — subsection headings */
.publication-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 2.25rem;
  margin-bottom: 0.6rem;
  line-height: 1.4;
}
/* h4 — used inside .pub-case boxes */
.publication-body h4 {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  margin: 0 0 0.75rem;
}
/* hr — section separator */
.publication-body hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 3rem 0 2.5rem;
}

/* Lead paragraph — scope/intro */
.publication-body .pub-lead {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #334155;
  border-left: 3px solid var(--global-palette2, #446d33);
  padding: 1rem 1.25rem;
  margin: 0 0 2.5rem;
  background: #f8faf6;
  border-radius: 0 6px 6px 0;
}
.publication-body .pub-lead p { font-size: inherit; line-height: inherit; color: inherit; }

/* Callout — key legal point */
.pub-callout {
  background: #f0f7eb;
  border-left: 4px solid var(--global-palette2, #446d33);
  border-radius: 0 6px 6px 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.pub-callout p { margin: 0.35rem 0 0; font-size: 0.975rem !important; line-height: 1.7 !important; }
.pub-callout p:first-child { margin-top: 0; }
.pub-callout ul { margin: 0.5rem 0 0; }
.pub-callout li { font-size: 0.975rem !important; margin-bottom: 0.2rem; }
.pub-callout strong { color: #1a3a0f; }

/* Case study box */
.pub-case {
  background: #f8f9fb;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  margin: 1.5rem 0;
}
.pub-case h4 {
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #64748b !important;
  margin: 0 0 1rem !important;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #e2e8f0;
}
.pub-case p { font-size: 0.975rem !important; line-height: 1.75 !important; margin: 0 0 0.6rem; }
.pub-case p:last-child { margin-bottom: 0; }
.pub-case em { color: #64748b; font-style: italic; }

/* Footnotes */
.pub-footnotes {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.875rem;
  color: #64748b;
}
.pub-footnotes h4 {
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #94a3b8 !important;
  margin: 0 0 0.5rem !important;
}
.pub-footnotes p { font-size: 0.875rem !important; line-height: 1.6 !important; margin: 0; }
.pub-footnotes a { color: #64748b; }

/* Legal links row in avoimuus-section */
.mat-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #c2d3b8;
}
.mat-legal-links a {
  font-size: 0.875rem;
  color: #475569;
  text-decoration: none;
}
.mat-legal-links a:hover { color: var(--global-palette2, #446d33); text-decoration: underline; }

/* "All materials" footer link */
.mat-all-link {
  margin: 2rem 0 0;
  font-size: 0.95rem;
}
.mat-all-link a {
  font-weight: 600;
  color: var(--global-palette2, #446d33);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.mat-all-link a:hover { color: var(--global-palette1, #314e25); }

/* ── Consortium / Konsortio page ─────────────────────────────────────────── */
.konsortio-page { display: grid; gap: 3rem; }
.konsortio-section__lead { max-width: 74ch; margin: 0; color: #475569; }
.consortium-group-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--global-palette2, #446d33);
  margin: 0 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #dde5d6;
}
.consortium-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
}
.consortium-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbf7 100%);
  box-shadow: 0 4px 12px rgba(15,23,42,0.06);
}
.consortium-card--featured {
  border-top: 4px solid var(--global-palette2, #446d33);
  border-color: rgba(49,78,37,0.2);
  border-top-color: var(--global-palette2, #446d33);
}
.consortium-card__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.consortium-card__meta {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: #eef4ea;
  color: #314e25;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.consortium-card__meta--discipline {
  background: #f3f4f6;
  color: #334155;
}
.consortium-card__image {
  width: 88px; height: 88px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  object-fit: cover;
  background: #e5e7eb;
}
.consortium-card__body { display: flex; flex: 1; flex-direction: column; }
.consortium-card__name { margin: 0; font-size: 1.05rem; line-height: 1.25; text-align: center; }
.consortium-card__role {
  margin: 0.35rem 0 0;
  color: #334155;
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
}
.consortium-card__description { margin: 0.75rem 0 0; color: #475569; font-size: 0.875rem; line-height: 1.55; }
/* Contact & profile links */
.consortium-card__links { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.75rem; }
.consortium-card__email {
  font-size: 0.82rem; color: #475569; text-decoration: none; text-align: center;
  word-break: break-all;
}
.consortium-card__email:hover { text-decoration: underline; }
.consortium-card__profile-links { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
.consortium-card__profile-link {
  display: inline-flex; align-items: center; gap: 0.2rem;
  padding: 0.2em 0.65em;
  border-radius: 4px;
  border: 1px solid #c2d3b8;
  font-size: 0.75rem; font-weight: 600;
  color: var(--global-palette2, #446d33);
  text-decoration: none; background: #fff;
  transition: background 0.15s, border-color 0.15s;
}
.consortium-card__profile-link:hover { background: var(--global-palette7, #f0f4ec); border-color: var(--global-palette2); }
.consortium-card__profile-link--orcid { border-color: #a6ce39; color: #4d8b00; }
.consortium-card__profile-link--orcid:hover { background: #f4fce4; border-color: #78a820; }
.consortium-filters {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 1rem;
  background: #f8fafc;
}
.consortium-filters__controls {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.consortium-filters__field { display: grid; gap: 0.35rem; }
.consortium-filters__field label {
  font-size: 0.82rem; font-weight: 700; color: #334155;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.consortium-filters__field select {
  width: 100%; min-height: 44px;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(148,163,184,0.55);
  border-radius: 0.75rem;
  background: #fff; color: #0f172a; font: inherit;
}
.consortium-filters__status { margin: 0; color: #475569; font-size: 0.95rem; }
.researchfi-card { margin-top: auto; padding-top: 1rem; }
.researchfi-card__title {
  margin: 0 0 0.5rem;
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280;
}
.researchfi-card__list { list-style: none; margin: 0; padding: 0; }
.researchfi-card__item + .researchfi-card__item {
  margin-top: 0.85rem; padding-top: 0.85rem;
  border-top: 1px solid rgba(15,23,42,0.08);
}
.researchfi-card__meta,
.researchfi-card__authors,
.researchfi-card__empty { color: #4b5563; font-size: 0.85rem; line-height: 1.45; }
.researchfi-card__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin-top: 0.2rem; font-size: 0.88rem; line-height: 1.45;
}
.researchfi-card__name.is-expanded { -webkit-line-clamp: unset; overflow: visible; }
.researchfi-card__expand-btn {
  display: none; margin-top: 0.2rem;
  background: none; border: none; padding: 0;
  font-size: 0.8rem; font-weight: 600; color: var(--global-palette2, #446d33);
  cursor: pointer; text-decoration: underline;
}
.researchfi-card__expand-btn.is-visible { display: inline; }
.researchfi-card__authors { margin-top: 0.25rem; }
.researchfi-card__empty { margin: 0; }
.researchfi-card__all-link {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.35rem 0.85rem;
  background: var(--global-palette1, #314e25);
  color: #fff; border-radius: 6px;
  font-size: 0.8rem; font-weight: 600;
  text-decoration: none; transition: background 0.15s;
}
.researchfi-card__all-link:hover { background: var(--global-palette2, #446d33); }
@media (max-width: 767px) {
  .consortium-card__meta-row { flex-direction: column; align-items: flex-start; }
  .consortium-card__meta { max-width: 100%; }
  .consortium-card__meta--discipline { margin-left: 0; justify-content: flex-start; text-align: left; }
}
/* Fix: author display:flex overrides UA [hidden]{display:none} */
.consortium-card[hidden],
[data-consortium-section][hidden] { display: none !important; }
/* Org partner logo / placeholder */
.consortium-card__image--org { border-radius: 8px; }
.consortium-card__org-placeholder {
  width: 104px; height: 80px;
  margin: 0 auto 1rem;
  border-radius: 8px;
  background: var(--global-palette7, #f0f4ec);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; font-weight: 800;
  color: var(--global-palette2, #446d33);
  letter-spacing: -0.02em;
}

/* ── scientific publications list ─────────────────────────────────────────── */
.scientific-publications {
  display: grid;
  gap: 2rem;
}

.scientific-publications__lead {
  margin: 0;
  max-width: 72ch;
  color: #475569;
}

.scientific-publications__group {
  display: grid;
  gap: 1rem;
}

.scientific-publications__year {
  margin: 0;
  font-size: 1.35rem;
}

.scientific-publications__list {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 1rem;
}

.scientific-publications__item {
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.scientific-publications__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.scientific-publications__code,
.scientific-publications__status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.scientific-publications__code {
  background: #e2f0dc;
  color: #2d5a1e;
}

.scientific-publications__status {
  background: #fff3cd;
  color: #7a5c00;
}

.scientific-publications__citation,
.scientific-publications__link-row {
  margin: 0;
}

.scientific-publications__authors,
.scientific-publications__title,
.scientific-publications__venue,
.scientific-publications__notes {
  margin: 0;
}

.scientific-publications__authors {
  color: #475569;
  font-size: 0.96rem;
}

.scientific-publications__title {
  margin-top: 0.25rem;
  font-weight: 700;
  color: #0f172a;
}

.scientific-publications__venue,
.scientific-publications__notes {
  margin-top: 0.25rem;
  color: #334155;
}

.scientific-publications__link-row {
  margin-top: 0.45rem;
}

.scientific-publications__link-row a {
  font-weight: 600;
}

/* ── Scientific publications filterable table ────────────────────────────── */
.sci-pub-table-section { display: grid; gap: 0.75rem; }

.sci-pub-table-search-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.sci-pub-table-search-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}
.sci-pub-table-search-input {
  flex: 1 1 18rem;
  max-width: 32rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font: inherit;
  font-size: 0.9rem;
}
.sci-pub-table-search-input:focus {
  outline: 2px solid #3a6a2a;
  border-color: #3f6f31;
}
.sci-pub-table-count {
  font-size: 0.82rem;
  color: #64748b;
  white-space: nowrap;
}

.sci-pub-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
}
.sci-pub-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 54rem;
  font-size: 0.88rem;
}
.sci-pub-table th,
.sci-pub-table td {
  padding: 0.65rem 0.9rem;
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}
.sci-pub-thead-labels th {
  background: #f1f5f9;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-bottom: none;
}
.sci-pub-thead-filters th {
  background: #f8fafc;
  padding-top: 0.4rem;
  padding-bottom: 0.6rem;
}
.sci-pub-col-filter {
  width: 100%;
  padding: 0.4rem 0.55rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.4rem;
  font: inherit;
  font-size: 0.82rem;
  background: #fff;
}
.sci-pub-col-filter:focus {
  outline: 2px solid #3a6a2a;
  border-color: #3f6f31;
}
.sci-pub-table tbody tr:hover { background: #f8fafc; }
.sci-pub-table td:nth-child(1) { min-width: 12rem; }
.sci-pub-table td:nth-child(2) { min-width: 4.5rem; white-space: nowrap; }
.sci-pub-td-title            { min-width: 18rem; font-weight: 600; }
.sci-pub-table td:nth-child(4) { min-width: 14rem; color: #475569; }
.sci-pub-td-link             { min-width: 6rem; white-space: nowrap; }
.sci-pub-empty { color: #64748b; margin: 0.5rem 0; }

/* ── Homepage intro ──────────────────────────────────────────────────────── */
.home-intro {
  background: var(--global-palette9, #fff);
  padding: 3rem 1.5rem 2.5rem;
}
.home-intro-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}
.home-intro-text {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.7;
  color: #333;
  margin: 0 0 1.75rem;
}
.home-intro-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.home-intro-btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.home-intro-btn--primary {
  background: var(--global-palette2, #446d33);
  color: #fff;
}
.home-intro-btn--primary:hover { background: var(--global-palette1, #314e25); }
.home-intro-btn--secondary {
  background: transparent;
  color: var(--global-palette2, #446d33);
  border: 2px solid var(--global-palette2, #446d33);
}
.home-intro-btn--secondary:hover {
  background: var(--global-palette7, #f0f4ec);
}

/* ── Toiminta digest ─────────────────────────────────────────────────────── */
.toiminta-digest {
  background: var(--global-palette9, #fff);
  padding: 3.5rem 1.5rem 4rem;
}
.toiminta-digest-inner {
  max-width: var(--global-content-width, 1290px);
  margin: 0 auto;
}
.toiminta-digest-heading {
  font-size: clamp(1.3rem, 1.1rem + 0.65vw, 1.7rem);
  color: var(--global-palette1, #314e25);
  margin: 0 0 2rem;
}
.toiminta-digest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
}
.toiminta-digest-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.toiminta-digest-col-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--global-palette2, #446d33);
  margin: 0 0 0.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--global-palette2, #446d33);
}
.toiminta-digest-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.toiminta-digest-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.toiminta-digest-item a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--global-palette3, #202124);
  text-decoration: none;
  line-height: 1.35;
}
.toiminta-digest-item a:hover { text-decoration: underline; color: var(--global-palette2, #446d33); }
.toiminta-digest-citation {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--global-palette3, #202124);
  line-height: 1.4;
  font-style: normal;
}
.toiminta-digest-date {
  font-size: 0.75rem;
  color: #888;
}
.toiminta-digest-empty {
  font-size: 0.875rem;
  color: #aaa;
}
.toiminta-digest-cta {
  display: inline-block;
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--global-palette2, #446d33);
  text-decoration: none;
}
.toiminta-digest-cta:hover { text-decoration: underline; }

/* ── Homepage challenges ─────────────────────────────────────────────────── */
.home-challenges {
  background: var(--global-palette9, #fff);
  padding: 3.5rem 1.5rem;
}
.home-challenges--tinted {
  background: var(--global-palette7, #f0f4ec);
}
.home-challenges-report-link {
  text-align: center;
  margin-top: 2rem;
}
.home-challenges-inner {
  max-width: 900px;
  margin: 0 auto;
}
.home-challenges-heading {
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--global-palette1, #314e25);
  margin: 0 0 0.75rem;
}
.home-challenges-lead {
  text-align: center;
  color: #555;
  font-size: 1rem;
  margin: 0 0 2.5rem;
}
.home-challenges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.home-challenge-card {
  background: var(--global-palette7, #f0f4ec);
  border-radius: 10px;
  border-left: 4px solid var(--global-palette2, #446d33);
  padding: 2rem 1.75rem;
}
.home-challenge-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--global-palette2, #446d33);
  opacity: 0.45;
  line-height: 1;
  margin-bottom: 0.75rem;
  font-variant-numeric: tabular-nums;
}
.home-challenge-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--global-palette1, #314e25);
  margin: 0 0 0.6rem;
}
.home-challenge-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #444;
  margin: 0;
}

/* ── Homepage tools CTA ──────────────────────────────────────────────────── */
.home-tools {
  background: var(--global-palette9, #fff);
  padding: 3.5rem 1.5rem;
}
.home-tools-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.home-tools-heading {
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--global-palette1, #314e25);
  margin: 0 0 0.75rem;
}
.home-tools-lead {
  color: #444;
  line-height: 1.7;
  margin: 0 0 1.5rem;
}
.home-tools-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}
.home-tools-btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: 2rem;
  background: var(--global-palette2, #446d33);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s;
}
.home-tools-btn:hover { background: var(--global-palette1, #314e25); }
.home-tools-link {
  color: var(--global-palette2, #446d33);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}
.home-tools-link:hover { text-decoration: underline; }
.home-tools-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
}
.home-tools-list li::before {
  content: "→ ";
  color: var(--global-palette2, #446d33);
  font-weight: 700;
}
.home-tools-list a {
  color: var(--global-palette1, #314e25);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.home-tools-list a:hover { text-decoration: underline; }
@media (max-width: 700px) {
  .home-tools-inner { grid-template-columns: 1fr; gap: 2rem; }
  .home-tools-list { grid-template-columns: 1fr; }
}

/* ── Homepage icon colours per path ─────────────────────────────────────── */
.home-path-icon--teacher { background: #e8f5e9; color: #2e7d32; }
.home-path-icon--research { background: #e3f2fd; color: #1565c0; }
.home-path-icon--public { background: #fff3e0; color: #e65100; }

/* ── Homepage audience paths ─────────────────────────────────────────────── */
.home-paths {
  background: var(--global-palette7, #f0f4ec);
  padding: 3.5rem 1.5rem;
}
.home-paths--white {
  background: var(--global-palette9, #fff);
}
.home-paths-inner {
  max-width: 900px;
  margin: 0 auto;
}
.home-paths-heading {
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--global-palette1, #314e25);
  margin: 0 0 2rem;
}
.home-paths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.home-path-card {
  display: flex;
  flex-direction: column;
  background: var(--global-palette9, #fff);
  border-radius: 10px;
  padding: 2rem 1.75rem;
  text-decoration: none;
  color: var(--global-palette3, #000);
  box-shadow: 0 2px 8px rgba(49,78,37,0.08);
  transition: box-shadow 0.2s, transform 0.2s;
}
.home-path-card:hover {
  box-shadow: 0 8px 24px rgba(49,78,37,0.16);
  transform: translateY(-3px);
  color: var(--global-palette3, #000);
}
.home-path-icon {
  color: var(--global-palette2, #446d33);
  background: var(--global-palette7, #f0f4ec);
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}
.home-path-title {
  font-size: 1.3rem;
  margin: 0 0 0.6rem;
  color: var(--global-palette1, #314e25);
}
.home-path-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #555;
  flex-grow: 1;
  margin: 0 0 1.25rem;
}
.home-path-cta {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--global-palette2, #446d33);
  margin-top: auto;
}
.home-path-card:hover .home-path-cta { color: var(--global-palette1, #314e25); }

/* ── Homepage stats strip ────────────────────────────────────────────────── */
.home-stats {
  background: var(--global-palette1, #314e25);
  padding: 2.5rem 1.5rem;
}
.home-stats-inner {
  max-width: var(--global-content-width, 1290px);
  margin: 0 auto;
}
.home-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem 2rem;
  margin: 0;
  padding: 0;
}
.home-stat {
  text-align: center;
  padding: 0.75rem 0;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.home-stat:last-child { border-right: none; }
.home-stat-value {
  display: block;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin: 0 0 0.35rem;
}
.home-stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.3;
}
@media (max-width: 600px) {
  .home-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .home-stat { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .home-stat:nth-child(odd):last-child,
  .home-stat:nth-last-child(-n+1):nth-child(odd) { border-bottom: none; }
  .home-stat:nth-child(4), .home-stat:nth-child(5) { border-bottom: none; }
}


/* ── gen-ai.fi brand strip ───────────────────────────────────────────────── */
.genai-brand-strip {
  background: var(--global-palette2, #446d33);
  padding: 2rem 1.5rem;
}
.genai-brand-strip-inner {
  max-width: var(--global-content-width, 1290px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.genai-brand-strip-text {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.genai-brand-strip-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
}
.genai-brand-strip-wordmark {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.genai-brand-strip-lead {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  margin: 0;
  flex-basis: 100%;
}
.genai-brand-strip-cta {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: #fff;
  color: var(--global-palette2, #446d33);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 2rem;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.genai-brand-strip-cta:hover {
  background: var(--global-palette7, #f0f4ec);
}
@media (max-width: 600px) {
  .genai-brand-strip-inner { flex-direction: column; align-items: flex-start; }
  .genai-brand-strip-cta { align-self: stretch; text-align: center; }
}

/* ── Site footer ─────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--global-palette1, #314e25);
  color: rgba(255,255,255,0.85);
  padding: 3rem 1.5rem 1.5rem;
  margin-top: 3rem;
}
.site-footer-inner {
  max-width: var(--global-content-width, 1290px);
  margin: 0 auto;
}
.site-footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem 3rem;
  margin-bottom: 2.5rem;
}
.site-footer-col-heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin: 0 0 0.85rem;
}
.site-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer-links li {
  margin-bottom: 0.45rem;
}
.site-footer-links a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}
.site-footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}
.site-footer-ext {
  font-size: 0.75em;
  opacity: 0.6;
}
.site-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.25rem;
}
.site-footer-copy {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}
@media (max-width: 600px) {
  .site-footer-cols { grid-template-columns: 1fr 1fr; }
}

/* ── Opettajalle page ────────────────────────────────────────────────────── */

/* Intro */
.teacher-intro {
  background: var(--global-palette9, #fff);
  padding: 3rem 1.5rem 2.5rem;
}
.teacher-intro-inner {
  max-width: var(--global-content-narrow-width, 842px);
  margin: 0 auto;
}
.teacher-intro-text {
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem);
  line-height: 1.6;
  color: var(--global-palette3, #000);
  margin: 0 0 1.75rem;
}
.teacher-intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}
.teacher-intro-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.teacher-intro-btn--primary {
  background: var(--global-palette2, #446d33);
  color: #fff;
}
.teacher-intro-btn--primary:hover {
  background: var(--global-palette1, #314e25);
  color: #fff;
}
.teacher-intro-btn--secondary {
  background: transparent;
  color: var(--global-palette2, #446d33);
  border: 2px solid var(--global-palette2, #446d33);
}
.teacher-intro-btn--secondary:hover {
  background: var(--global-palette7, #f0f4ec);
  color: var(--global-palette1, #314e25);
  border-color: var(--global-palette1, #314e25);
}

/* Steps */
.teacher-steps {
  background: var(--global-palette7, #f0f4ec);
  padding: 3.5rem 1.5rem;
}
.teacher-steps-inner {
  max-width: var(--global-content-narrow-width, 842px);
  margin: 0 auto;
}
.teacher-steps-heading {
  font-size: clamp(1.5rem, 1.3rem + 0.65vw, 1.9rem);
  color: var(--global-palette1, #314e25);
  margin: 0 0 2rem;
}
.teacher-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.teacher-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.teacher-step-num {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  background: var(--global-palette2, #446d33);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  margin-top: 0.15rem;
}
.teacher-step-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--global-palette1, #314e25);
}
.teacher-step-desc {
  margin: 0;
  color: #444;
  line-height: 1.55;
}

/* Tools grid */
.teacher-tools {
  background: var(--global-palette9, #fff);
  padding: 4rem 1.5rem;
}
.teacher-tools-inner {
  max-width: var(--global-content-width, 1290px);
  margin: 0 auto;
}
.teacher-tools-heading {
  font-size: clamp(1.5rem, 1.3rem + 0.65vw, 1.9rem);
  color: var(--global-palette1, #314e25);
  margin: 0 0 0.6rem;
}
.teacher-tools-lead {
  color: #555;
  margin: 0 0 2.5rem;
  max-width: 60ch;
}
.teacher-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.teacher-tool-card {
  background: var(--global-palette8, #f7f9f5);
  border-radius: 0.75rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border: 1px solid var(--global-palette7, #f0f4ec);
  transition: box-shadow 0.15s;
}
.teacher-tool-card:hover {
  box-shadow: 0 4px 16px rgba(49,78,37,0.1);
}
.teacher-tool-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--global-palette1, #314e25);
  margin: 0;
}
.teacher-tool-desc {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
  margin: 0;
  flex: 1;
}
.teacher-tool-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--global-palette2, #446d33);
  text-decoration: none;
}
.teacher-tool-link:hover {
  color: var(--global-palette1, #314e25);
  text-decoration: underline;
}

/* Materials */
.teacher-materials {
  background: var(--global-palette1, #314e25);
  padding: 4rem 1.5rem;
}
.teacher-materials-inner {
  max-width: var(--global-content-narrow-width, 842px);
  margin: 0 auto;
}
.teacher-materials-heading {
  font-size: clamp(1.5rem, 1.3rem + 0.65vw, 1.9rem);
  color: #fff;
  margin: 0 0 0.75rem;
}
.teacher-materials-desc {
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  margin: 0 0 1.75rem;
  max-width: 55ch;
}
.teacher-materials-btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: #fff;
  color: var(--global-palette1, #314e25);
  border-radius: 2rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s;
}
.teacher-materials-btn:hover {
  background: var(--global-palette7, #f0f4ec);
  color: var(--global-palette1, #314e25);
}

/* Privacy guide card */
.teacher-guide {
  background: var(--global-palette7, #f0f4ec);
  padding: 4rem 1.5rem;
}
.teacher-guide-inner {
  max-width: var(--global-content-narrow-width, 842px);
  margin: 0 auto;
}
.teacher-guide-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 2rem 2.5rem;
  border-left: 4px solid var(--global-palette2, #446d33);
}
.teacher-guide-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--global-palette2, #446d33);
  margin-bottom: 0.5rem;
}
.teacher-guide-title {
  font-size: clamp(1.2rem, 1.1rem + 0.35vw, 1.45rem);
  color: var(--global-palette1, #314e25);
  margin: 0 0 0.75rem;
}
.teacher-guide-desc {
  color: #555;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}
.teacher-guide-btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: var(--global-palette2, #446d33);
  color: #fff;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.15s;
}
.teacher-guide-btn:hover {
  background: var(--global-palette1, #314e25);
}

/* About section */
.teacher-about {
  background: var(--global-palette9, #fff);
  padding: 4rem 1.5rem;
}
.teacher-about-inner {
  max-width: var(--global-content-narrow-width, 842px);
  margin: 0 auto;
}
.teacher-about-heading {
  font-size: clamp(1.3rem, 1.15rem + 0.5vw, 1.6rem);
  color: var(--global-palette1, #314e25);
  margin: 0 0 1rem;
}
.teacher-about-text {
  color: #555;
  line-height: 1.65;
  margin: 0 0 1rem;
}
.teacher-about-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 700;
  color: var(--global-palette2, #446d33);
  text-decoration: none;
}
.teacher-about-link:hover {
  color: var(--global-palette1, #314e25);
  text-decoration: underline;
}
@media (max-width: 640px) {
  .teacher-tools-grid { grid-template-columns: 1fr; }
  .teacher-guide-card { padding: 1.5rem; }
}

/* ── Tutkijalle page ─────────────────────────────────────────────────────── */

/* Intro */
.researcher-intro {
  background: var(--global-palette9, #fff);
  padding: 3rem 1.5rem 2.5rem;
}
.researcher-intro-inner {
  max-width: var(--global-content-narrow-width, 842px);
  margin: 0 auto;
}
.researcher-intro-text {
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem);
  line-height: 1.6;
  color: var(--global-palette3, #000);
  margin: 0 0 1.75rem;
}
.researcher-intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}
.researcher-intro-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.researcher-intro-btn--primary {
  background: var(--global-palette2, #446d33);
  color: #fff;
}
.researcher-intro-btn--primary:hover {
  background: var(--global-palette1, #314e25);
  color: #fff;
}
.researcher-intro-btn--secondary {
  background: transparent;
  color: var(--global-palette2, #446d33);
  border: 2px solid var(--global-palette2, #446d33);
}
.researcher-intro-btn--secondary:hover {
  background: var(--global-palette7, #f0f4ec);
  color: var(--global-palette1, #314e25);
  border-color: var(--global-palette1, #314e25);
}

/* Research themes */
.researcher-themes {
  background: var(--global-palette7, #f0f4ec);
  padding: 4rem 1.5rem;
}
.researcher-themes-inner {
  max-width: var(--global-content-width, 1290px);
  margin: 0 auto;
}
.researcher-themes-heading {
  font-size: clamp(1.5rem, 1.3rem + 0.65vw, 1.9rem);
  color: var(--global-palette1, #314e25);
  margin: 0 0 0.5rem;
}
.researcher-themes-lead {
  color: #555;
  margin: 0 0 2.5rem;
}
.researcher-themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.researcher-theme-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.75rem;
  position: relative;
  border: 1px solid rgba(49,78,37,0.1);
}
.researcher-theme-num {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--global-palette7, #f0f4ec);
  line-height: 1;
  margin-bottom: 0.5rem;
  user-select: none;
}
.researcher-theme-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--global-palette1, #314e25);
  margin: 0 0 0.6rem;
}
.researcher-theme-desc {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.55;
  margin: 0 0 1rem;
}
.researcher-theme-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--global-palette2, #446d33);
  text-decoration: none;
}
.researcher-theme-link:hover { text-decoration: underline; }

/* SHIELD section */
.researcher-shield {
  background: var(--global-palette1, #314e25);
  padding: 4rem 1.5rem;
}
.researcher-shield-inner {
  max-width: var(--global-content-width, 1290px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.researcher-shield-heading {
  font-size: clamp(1.5rem, 1.3rem + 0.65vw, 1.9rem);
  color: #fff;
  margin: 0 0 0.75rem;
}
.researcher-shield-desc {
  color: rgba(255,255,255,0.85);
  line-height: 1.65;
  margin: 0 0 1.75rem;
}
.researcher-shield-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}
.researcher-shield-btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: #fff;
  color: var(--global-palette1, #314e25);
  border-radius: 2rem;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.15s;
}
.researcher-shield-btn:hover {
  background: var(--global-palette7, #f0f4ec);
  color: var(--global-palette1, #314e25);
}
.researcher-shield-link {
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}
.researcher-shield-link:hover {
  color: #fff;
  text-decoration: underline;
}
.researcher-shield-projects-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin: 0 0 1rem;
}
.researcher-shield-projects-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.researcher-shield-projects-list li {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  line-height: 1.5;
}
.researcher-shield-projects-list a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.researcher-shield-projects-list a:hover {
  text-decoration: underline;
}
.researcher-shield-pi {
  display: block;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-top: 0.15rem;
}
@media (max-width: 768px) {
  .researcher-shield-inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* Events */
.researcher-events {
  background: var(--global-palette8, #f7f9f5);
  padding: 4rem 1.5rem;
}
.researcher-events-inner {
  max-width: var(--global-content-width, 1290px);
  margin: 0 auto;
}
.researcher-events-heading {
  font-size: clamp(1.5rem, 1.3rem + 0.65vw, 1.9rem);
  color: var(--global-palette1, #314e25);
  margin: 0 0 2rem;
}
.researcher-events-more {
  margin-top: 1.5rem;
}
.researcher-events-more a {
  font-weight: 700;
  color: var(--global-palette2, #446d33);
  text-decoration: none;
}
.researcher-events-more a:hover {
  color: var(--global-palette1, #314e25);
  text-decoration: underline;
}

/* Publications */
.researcher-publications {
  background: var(--global-palette9, #fff);
  padding: 4rem 1.5rem;
}
.researcher-publications-inner {
  max-width: var(--global-content-width, 1290px);
  margin: 0 auto;
}
.researcher-publications-heading {
  font-size: clamp(1.5rem, 1.3rem + 0.65vw, 1.9rem);
  color: var(--global-palette1, #314e25);
  margin: 0 0 0.5rem;
}
.researcher-publications-lead {
  color: #555;
  margin: 0 0 2rem;
  max-width: 65ch;
}
@media (max-width: 640px) {
  .researcher-themes-grid { grid-template-columns: 1fr; }
}

/* ── Yleisölle page ──────────────────────────────────────────────────────── */

/* Intro */
.public-intro {
  background: var(--global-palette9, #fff);
  padding: 3rem 1.5rem 2.5rem;
}
.public-intro-inner {
  max-width: var(--global-content-narrow-width, 842px);
  margin: 0 auto;
}
.public-intro-text {
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem);
  line-height: 1.6;
  color: var(--global-palette3, #000);
  margin: 0 0 1.75rem;
}
.public-intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}
.public-intro-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.public-intro-btn--primary {
  background: var(--global-palette2, #446d33);
  color: #fff;
}
.public-intro-btn--primary:hover {
  background: var(--global-palette1, #314e25);
  color: #fff;
}
.public-intro-btn--secondary {
  background: transparent;
  color: var(--global-palette2, #446d33);
  border: 2px solid var(--global-palette2, #446d33);
}
.public-intro-btn--secondary:hover {
  background: var(--global-palette7, #f0f4ec);
  color: var(--global-palette1, #314e25);
  border-color: var(--global-palette1, #314e25);
}

/* Book section */
.public-book {
  background: var(--global-palette1, #314e25);
  padding: 4rem 1.5rem;
}
.public-book-inner {
  max-width: var(--global-content-width, 1290px);
  margin: 0 auto;
}
.public-book-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.55);
  margin-bottom: 1.25rem;
}
.public-book-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
}
.public-book-title {
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem);
  color: #fff;
  margin: 0 0 0.4rem;
  line-height: 1.25;
}
.public-book-authors {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  margin: 0 0 1.25rem;
}
.public-book-desc {
  color: rgba(255,255,255,0.85);
  line-height: 1.65;
  margin: 0 0 1rem;
  max-width: 58ch;
}
.public-book-myths {
  margin: 1.25rem 0 1.75rem;
  background: rgba(255,255,255,0.08);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
}
.public-book-myths-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.5);
  margin: 0 0 0.6rem;
}
.public-book-myths-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
}
.public-book-myths-list li {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.85);
}
.public-book-myths-list li::before {
  content: "→ ";
  color: rgba(255,255,255,0.4);
}
.public-book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}
.public-book-btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.public-book-btn--primary {
  background: #fff;
  color: var(--global-palette1, #314e25);
}
.public-book-btn--primary:hover {
  background: var(--global-palette7, #f0f4ec);
  color: var(--global-palette1, #314e25);
}
.public-book-btn--secondary {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border: 1.5px solid rgba(255,255,255,0.35);
}
.public-book-btn--secondary:hover {
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}
.public-book-badge {
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 1rem;
  padding: 2rem 1.5rem;
  text-align: center;
  min-width: 140px;
  flex-shrink: 0;
}
.public-book-badge-number {
  font-size: 4rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.25rem;
}
.public-book-badge-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.4;
  margin-bottom: 1rem;
}
.public-book-badge-free {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
}
@media (max-width: 640px) {
  .public-book-layout { grid-template-columns: 1fr; }
  .public-book-badge { display: none; }
}

/* Tools grid */
.public-tools {
  background: var(--global-palette7, #f0f4ec);
  padding: 4rem 1.5rem;
}
.public-tools-inner {
  max-width: var(--global-content-width, 1290px);
  margin: 0 auto;
}
.public-tools-heading {
  font-size: clamp(1.5rem, 1.3rem + 0.65vw, 1.9rem);
  color: var(--global-palette1, #314e25);
  margin: 0 0 0.6rem;
}
.public-tools-desc {
  color: #555;
  margin: 0 0 2rem;
  max-width: 55ch;
}
.public-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.public-tool-item {
  background: #fff;
  border-radius: 0.6rem;
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border: 1px solid rgba(49,78,37,0.1);
  transition: box-shadow 0.15s, border-color 0.15s;
}
.public-tool-item:hover {
  box-shadow: 0 3px 12px rgba(49,78,37,0.12);
  border-color: var(--global-palette2, #446d33);
}
.public-tool-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--global-palette1, #314e25);
}
.public-tool-desc {
  font-size: 0.8rem;
  color: #777;
}

/* Media section */
.public-media {
  background: var(--global-palette9, #fff);
  padding: 4rem 1.5rem;
}
.public-media-inner {
  max-width: var(--global-content-width, 1290px);
  margin: 0 auto;
}
.public-media-heading {
  font-size: clamp(1.5rem, 1.3rem + 0.65vw, 1.9rem);
  color: var(--global-palette1, #314e25);
  margin: 0 0 2rem;
}
.public-media-more {
  margin-top: 1.5rem;
}
.public-media-more a {
  font-weight: 700;
  color: var(--global-palette2, #446d33);
  text-decoration: none;
}
.public-media-more a:hover {
  color: var(--global-palette1, #314e25);
  text-decoration: underline;
}

.stakeholder-activities {
  padding-top: 1rem;
}

.stakeholder-activities__header {
  margin-bottom: 1rem;
}

.stakeholder-activities__title {
  margin: 0 0 0.5rem;
}

.stakeholder-activities__lead {
  margin: 0;
  color: var(--global-palette5, #4f5e46);
  max-width: 72ch;
}

.stakeholder-activities__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.stakeholder-activities__card {
  border-radius: 8px;
}

.stakeholder-activities__card-body {
  gap: 0.65rem;
}

.stakeholder-activities__topline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.1rem;
}

.stakeholder-activities__badge {
  align-self: flex-start;
}

.stakeholder-activities__badge--muted {
  background: #f6f8f2;
  color: var(--global-palette5, #4f5e46);
}

.stakeholder-activities__card-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.stakeholder-activities__stakeholder,
.stakeholder-activities__meta {
  margin: 0;
  font-size: 0.92rem;
  color: #444;
  line-height: 1.55;
}

.stakeholder-activities__empty {
  padding: 1rem 1.25rem;
  border: 1px solid var(--global-palette7, #d8decf);
  border-radius: 8px;
  background: var(--global-palette9, #fff);
}

.stakeholder-activities-page,
.researcher-presentations {
  padding: 4rem 1.5rem;
  background: var(--global-palette8, #f7f9f5);
}

.stakeholder-activities-page__inner,
.researcher-presentations-inner {
  max-width: var(--global-content-width, 1290px);
  margin: 0 auto;
}

@media (max-width: 700px) {
  .stakeholder-activities-page,
  .researcher-presentations {
    padding: 3rem 1rem;
  }
}

/* ============================================================
   Media table — Ajankohtaista / Media-välilehti
   ============================================================ */

.media-table-section {
  padding: 1.5rem 0 2rem;
}

/* Controls row */
.media-table-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.media-table-search-wrap {
  flex: 1 1 220px;
}

.media-table-search {
  width: 100%;
  padding: 0.5rem 0.85rem;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  font-size: 0.9rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Ccircle cx='6.5' cy='6.5' r='4' stroke='%23888' stroke-width='1.4'/%3E%3Cpath d='M10.5 10.5l3 3' stroke='%23888' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 0.7rem center;
  padding-right: 2.2rem;
}
.media-table-search:focus {
  outline: 2px solid var(--global-palette1, #3a7c3a);
  border-color: transparent;
}

.media-table-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.media-table-filter {
  padding: 0.47rem 2rem 0.47rem 0.75rem;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  font-size: 0.88rem;
  background: #fff;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
}
.media-table-filter:focus {
  outline: 2px solid var(--global-palette1, #3a7c3a);
  border-color: transparent;
}

.media-table-count {
  font-size: 0.82rem;
  color: #666;
  margin: 0;
  white-space: nowrap;
}

/* Table */
.media-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e5e9ef;
  border-radius: 8px;
  background: #fff;
}

.media-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  table-layout: fixed;
}

.media-table thead {
  background: #f5f7fa;
  border-bottom: 2px solid #e5e9ef;
}

.media-table th {
  padding: 0.65rem 0.85rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #555;
  white-space: nowrap;
}

.media-table td {
  padding: 0.65rem 0.85rem;
  vertical-align: top;
  border-bottom: 1px solid #eef0f3;
  line-height: 1.45;
  overflow-wrap: break-word;
  word-break: break-word;
}

.media-table-row:last-child td {
  border-bottom: none;
}

.media-table-row:hover td {
  background: #fafbfc;
}

/* Column widths */
.media-table-col--date         { width: 100px; }
.media-table-col--source       { width: 130px; }
.media-table-col--title        { width: 28%; }
.media-table-col--content      { width: auto; }
.media-table-col--link         { width: 88px; text-align: center; }
.media-table-col--authors      { width: 18%; }
.media-table-col--venue        { width: auto; color: #555; font-size: 0.88rem; }
.media-table-col--participants { width: 88px; text-align: center; }

/* Date cell */
.media-table-col--date time {
  font-variant-numeric: tabular-nums;
  color: #555;
  font-size: 0.84rem;
}

/* Source badge */
.media-table-source-badge {
  display: inline-block;
  padding: 0.18em 0.6em;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #ebebeb;
  color: #444;
}
.media-table-source-badge--yle  { background: #e8f4ec; color: #1a5c28; }
.media-table-source-badge--hs   { background: #fff0e8; color: #7a3010; }
.media-table-source-badge--mtv  { background: #e8f0fb; color: #1a3a7a; }
.media-table-source-badge--iv    { background: #f0f5e8; color: #2d5a1a; }
.media-table-source-badge--hanke { background: #f0eaf8; color: #4a1a7a; }

/* Content cell */
.media-table-col--content {
  color: #555;
  font-size: 0.85rem;
}
.media-table-na {
  color: #aaa;
  font-style: italic;
}

/* Link */
.media-table-link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--global-palette1, #3a7c3a);
  text-decoration: none;
  white-space: nowrap;
}
.media-table-link:hover {
  text-decoration: underline;
}

/* Empty state */
.media-table-empty {
  padding: 2rem;
  text-align: center;
  color: #888;
  font-style: italic;
}

/* Pagination */
.media-table-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.media-table-page-btn {
  padding: 0.45rem 1rem;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  color: #333;
  transition: background 0.15s, border-color 0.15s;
}
.media-table-page-btn:hover:not(:disabled) {
  background: #f0f4f0;
  border-color: var(--global-palette1, #3a7c3a);
  color: var(--global-palette1, #3a7c3a);
}
.media-table-page-btn:disabled {
  opacity: 0.38;
  cursor: default;
}

.media-table-page-info {
  font-size: 0.85rem;
  color: #555;
  min-width: 100px;
  text-align: center;
}

/* Responsive */
@media (max-width: 700px) {
  .media-table-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .media-table-filters {
    flex-direction: column;
  }
  .media-table th,
  .media-table td {
    padding: 0.5rem 0.6rem;
  }
  .media-table-col--content {
    display: none;
  }
  .media-table-col--date   { width: 90px; }
  .media-table-col--source { width: 110px; }
  .media-table-col--link   { width: 72px; }
}

/* Tapahtumat badges */
.tapahtumat-badge--konferenssi { background: #edf2fb; color: #1d3a7a; }
.tapahtumat-badge--webinaari   { background: #f0edf8; color: #4a1d7a; }
.tapahtumat-badge--tyopaja     { background: #fdf3e8; color: #7a3a00; }
.tapahtumat-badge--tapahtuma   { background: #e8f5ec; color: #1a5c28; }

/* Toiminta badges */
.toiminta-badge--post        { background: #e8f0fb; color: #1a3a7a; }
.toiminta-badge--stakeholder { background: #f5f0e8; color: #5c3d1a; }

/* Toiminta extra column */
.toiminta-table-col--extra {
  width: auto;
  font-size: 0.84rem;
  color: #555;
}
.toiminta-stakeholder-name {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.15em;
}
.toiminta-participants,
.toiminta-consortium {
  display: inline-block;
  font-size: 0.78rem;
  color: #777;
  margin-right: 0.5em;
}

/* ============================================================
   Media table — shared header (title + controls in one bar)
   ============================================================ */

.media-table-header {
  margin-bottom: 0;
}
.media-table-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: #222;
  margin: 0 0 0.65rem;
}
.media-table-section + .media-table-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e9ef;
}

/* Scientific publications */
.scipub-badge {
  display: inline-block;
  padding: 0.18em 0.55em;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #f0edf8;
  color: #4a1d7a;
  font-family: monospace;
}
.scipub-venue {
  display: block;
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.2em;
  font-style: italic;
}

/* Institutional visibility */
.iv-type {
  display: block;
  font-size: 0.75rem;
  color: #888;
  margin-top: 0.15em;
}
.iv-badge {
  display: inline-block;
  padding: 0.18em 0.6em;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #e8f0f8;
  color: #1a3a6a;
}
.iv-summary {
  font-size: 0.82rem;
  color: #666;
  margin-top: 0.25em;
}
.media-table-col--people {
  width: 150px;
  font-size: 0.82rem;
  color: #555;
}

@media (max-width: 700px) {
  .media-table-heading {
    font-size: 0.95rem;
  }
}

/* ── Prose page (tietosuojaseloste, saavutettavuusseloste, jne.) ─────────── */
.prose-page {
  max-width: 740px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}
.prose-page-meta {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}
.prose-section {
  margin-bottom: 2.5rem;
}
.prose-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--global-palette1, #1a1a2e);
  margin: 0 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--global-palette4, #4a90d9);
}
.prose-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.4rem;
  color: var(--global-palette2, #2c2c54);
}
.prose-section h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 1rem 0 0.35rem;
  color: #444;
}
.prose-section p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #333;
  margin: 0 0 0.85rem;
}
.prose-section ul {
  margin: 0.5rem 0 1rem 1.25rem;
  padding: 0;
}
.prose-section li {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0.4rem;
}
.prose-section code {
  font-size: 0.85em;
  background: #f4f4f4;
  border-radius: 3px;
  padding: 0.1em 0.4em;
}

/* ═══════════════════════════════════════════════════════════════════════
   ACCESSIBILITY TOOLBAR
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Trigger button ───────────────────────────────────────────────────── */
.a11y-toolbar {
  position: fixed;
  bottom: 5.5rem;
  right: 1rem;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}
.a11y-trigger {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  background: var(--global-palette1, #314e25);
  color: #fff;
  border: 2px solid transparent;
  border-radius: 2rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(0,0,0,0.22);
  transition: background 0.15s, outline 0.1s;
}
.a11y-trigger:hover  { background: var(--global-palette2, #446d33); }
.a11y-trigger:focus-visible { outline: 3px solid #f5c400; outline-offset: 2px; }

/* ── Panel ────────────────────────────────────────────────────────────── */
.a11y-panel {
  background: #fff;
  border: 2px solid var(--global-palette1, #314e25);
  border-radius: 0.75rem;
  box-shadow: 0 6px 24px rgba(0,0,0,0.16);
  width: 272px;
  max-height: 82vh;
  overflow-y: auto;
  padding-bottom: 0.75rem;
}
.a11y-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem 0.6rem;
  border-bottom: 1px solid #e5e5e5;
  background: var(--global-palette7, #f0f4ec);
  border-radius: 0.6rem 0.6rem 0 0;
}
.a11y-panel-title { font-weight: 700; font-size: 0.88rem; color: #222; }
.a11y-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0.2rem 0.45rem;
  border-radius: 0.3rem;
  color: #444;
  line-height: 1;
}
.a11y-close:hover { background: #e0e0e0; }
.a11y-close:focus-visible { outline: 2px solid var(--global-palette1); }

/* ── Sections ─────────────────────────────────────────────────────────── */
.a11y-section {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.a11y-section:last-child { border-bottom: none; }
.a11y-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Button row (font size / TTS) ─────────────────────────────────────── */
.a11y-btn-row { display: flex; gap: 0.4rem; }
.a11y-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.35rem 0.6rem;
  border: 2px solid #ccc;
  background: #f8f8f8;
  border-radius: 0.4rem;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  transition: border-color 0.12s, background 0.12s;
}
.a11y-btn:hover       { border-color: var(--global-palette1); background: #edf2e8; }
.a11y-btn:focus-visible { outline: 2px solid var(--global-palette1); outline-offset: 1px; border-color: var(--global-palette1); }
.a11y-btn:disabled    { opacity: 0.38; cursor: not-allowed; }
.a11y-btn--tts        { font-size: 0.82rem; }
.a11y-btn--reset      { background: #fff5f5; border-color: #e0a0a0; color: #b00; width: 100%; }
.a11y-btn--reset:hover { background: #ffe0e0; border-color: #b00; }

/* ── Toggle buttons ───────────────────────────────────────────────────── */
.a11y-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border: 2px solid #ccc;
  background: #f8f8f8;
  border-radius: 0.4rem;
  cursor: pointer;
  font-size: 0.88rem;
  text-align: left;
  transition: border-color 0.12s, background 0.12s;
}
.a11y-toggle:hover       { border-color: var(--global-palette1); background: #edf2e8; }
.a11y-toggle:focus-visible { outline: 2px solid var(--global-palette1); outline-offset: 1px; }
.a11y-toggle[aria-pressed="true"] {
  background: var(--global-palette1, #314e25);
  color: #fff;
  border-color: var(--global-palette1, #314e25);
}

/* ── Colour swatches ──────────────────────────────────────────────────── */
.a11y-swatches { display: flex; gap: 0.5rem; }
.a11y-swatch {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid #ccc;
  cursor: pointer;
  transition: transform 0.12s;
  padding: 0;
}
.a11y-swatch:hover        { transform: scale(1.18); }
.a11y-swatch:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.a11y-swatch--active      { border: 3px solid #000 !important; box-shadow: 0 0 0 2px #fff inset; }
.a11y-swatch--white  { background: #ffffff; }
.a11y-swatch--beige  { background: #f5ead4; }
.a11y-swatch--yellow { background: #fef9c3; }
.a11y-swatch--blue   { background: #cfe2ff; }
.a11y-swatch--green  { background: #d3edcc; }

/* ── Reading guide line ───────────────────────────────────────────────── */
#a11y-guide-line {
  position: fixed;
  left: 0;
  right: 0;
  height: 2.8rem;
  background: rgba(254, 249, 100, 0.28);
  border-top:    2px solid rgba(190, 160, 0, 0.35);
  border-bottom: 2px solid rgba(190, 160, 0, 0.35);
  pointer-events: none;
  z-index: 9997;
  top: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   ACCESSIBILITY MODES  (applied as classes / data-attrs on <html>)
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Dyslexia-friendly font & spacing ─────────────────────────────────── */
.a11y-dyslexia body,
.a11y-dyslexia p,
.a11y-dyslexia li,
.a11y-dyslexia td,
.a11y-dyslexia th,
.a11y-dyslexia h1, .a11y-dyslexia h2, .a11y-dyslexia h3,
.a11y-dyslexia h4, .a11y-dyslexia h5, .a11y-dyslexia h6,
.a11y-dyslexia label, .a11y-dyslexia span, .a11y-dyslexia a {
  font-family: 'Trebuchet MS', Verdana, Arial, sans-serif !important;
  letter-spacing: 0.07em  !important;
  word-spacing:   0.18em  !important;
  line-height:    1.95    !important;
}

/* ── Extra spacing mode ───────────────────────────────────────────────── */
.a11y-spacing p,
.a11y-spacing li,
.a11y-spacing td,
.a11y-spacing th {
  letter-spacing: 0.1em  !important;
  word-spacing:   0.22em !important;
  line-height:    2.2    !important;
}

/* ── High contrast ────────────────────────────────────────────────────── */
/* filter: invert+hue-rotate works at compositing level — bypasses all
   CSS specificity wars with background/color shorthand properties.      */
/* Apply invert on the root element — nothing can escape this */
html.a11y-contrast {
  filter: invert(1) hue-rotate(180deg);
}
/* Double-invert images, videos and iframes to restore natural appearance */
html.a11y-contrast img,
html.a11y-contrast video,
html.a11y-contrast iframe {
  filter: invert(1) hue-rotate(180deg);
}
/* Fix: semi-transparent white text (rgba <0.7 alpha) on dark backgrounds composites to
   a medium gray that inverts to another medium gray — insufficient contrast (~3:1).
   Force full opacity so the filter produces pure black on the inverted light background. */
html.a11y-contrast .site-footer-col-heading,
html.a11y-contrast .site-footer-copy,
html.a11y-contrast .researcher-shield-projects-heading,
html.a11y-contrast .researcher-shield-pi,
html.a11y-contrast .home-stat-label {
  color: #fff;
}

/* ── Background tints ─────────────────────────────────────────────────── */
html[data-a11y-bg="beige"]  { background-color: #f5ead4 !important; }
html[data-a11y-bg="yellow"] { background-color: #fef9c3 !important; }
html[data-a11y-bg="blue"]   { background-color: #cfe2ff !important; }
html[data-a11y-bg="green"]  { background-color: #d3edcc !important; }

html[data-a11y-bg="beige"]  body,
html[data-a11y-bg="yellow"] body,
html[data-a11y-bg="blue"]   body,
html[data-a11y-bg="green"]  body { background-color: transparent !important; }

html[data-a11y-bg="beige"]  .page,
html[data-a11y-bg="beige"]  .post-content,
html[data-a11y-bg="beige"]  .page-content,
html[data-a11y-bg="yellow"] .page,
html[data-a11y-bg="yellow"] .post-content,
html[data-a11y-bg="yellow"] .page-content,
html[data-a11y-bg="blue"]   .page,
html[data-a11y-bg="blue"]   .post-content,
html[data-a11y-bg="blue"]   .page-content,
html[data-a11y-bg="green"]  .page,
html[data-a11y-bg="green"]  .post-content,
html[data-a11y-bg="green"]  .page-content { background-color: transparent !important; }

/* ── Reduced motion ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .a11y-trigger, .a11y-btn, .a11y-toggle, .a11y-swatch { transition: none; }
}

/* ── Mobile ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .a11y-toolbar { right: 0.5rem; bottom: 4.5rem; }
  .a11y-panel   { width: calc(100vw - 1rem); }
}
