/* Martti's published Next.js layout, applied only to the Martti installation. */
:root { --martti-width: var(--wp--style--global--wide-size); --martti-blue: var(--wp--preset--color--brand); --martti-pale: var(--wp--preset--color--canvas); --martti-gutter: clamp(1rem, 3vw, 2rem); --martti-section-space: clamp(2.5rem, 5vw, 4rem); --martti-column-gap: clamp(1.5rem, 4vw, 3rem); }

header.wp-block-template-part .wp-block-group.alignfull > .wp-block-group { max-width: var(--martti-width); }
header.wp-block-template-part .wp-block-site-logo { margin: 0; }
header.wp-block-template-part .wp-block-site-logo img { display: block; height: auto; }
header.wp-block-template-part .custom-logo-link { display: flex; align-items: center; min-height: 44px; }
header.wp-block-template-part .wp-block-group.is-layout-flex { align-items: center; gap: 1.5rem; }
header.wp-block-template-part .wp-block-group.is-layout-flex > .wp-block-template-part { margin: 0; }
header.wp-block-template-part .wp-block-navigation { gap: .25rem; line-height: 1.25; }
header.wp-block-template-part .wp-block-navigation__container { align-items: center; gap: .25rem; }
header.wp-block-template-part .wp-block-navigation-item__content {
  display: flex; align-items: center; justify-content: center;
  box-sizing: border-box; min-height: 44px; padding: .5rem .75rem;
  text-decoration: none;
}
header.wp-block-template-part .current-menu-item > .wp-block-navigation-item__content {
  background: var(--martti-pale); text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  header.wp-block-template-part .wp-block-navigation-item__content:hover { background: var(--martti-pale); text-decoration: none; }
}
header.wp-block-template-part .wp-block-navigation__responsive-container-open,
header.wp-block-template-part .wp-block-navigation__responsive-container-close { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
@media (max-width: 781px) {
  header.wp-block-template-part .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none; }
  header.wp-block-template-part .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
  header.wp-block-template-part .is-menu-open .wp-block-navigation__container { align-items: stretch; gap: .5rem; width: 100%; }
  header.wp-block-template-part .is-menu-open .wp-block-navigation-item__content { justify-content: flex-start; width: 100%; }
}
header.wp-block-template-part .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--on-brand); color: var(--martti-blue); }

.wp-site-blocks > main, .wp-site-blocks > footer { margin-block-start: 0; }
.wp-block-post-content > .kokoomus-section { margin-block-start: 0; }
.kokoomus-section {
  --wp--style--global--content-size: var(--martti-width);
  --wp--style--global--wide-size: var(--martti-width);
  box-sizing: border-box;
  padding: var(--martti-section-space) max(var(--martti-gutter), calc((100% - var(--martti-width)) / 2 + var(--martti-gutter)));
}
.kokoomus-section.kokoomus-prose { max-width: none; }
.kokoomus-section.martti-blue-section { background: var(--martti-pale); border: 0; border-radius: 0; }
.kokoomus-section .wp-block-columns { gap: var(--martti-column-gap); margin-block: 0; }
.kokoomus-section > .wp-block-heading { margin-block: 0 1.5rem; }
.kokoomus-section > h2.wp-block-heading,
.kokoomus-spotlight .wp-block-column > h2.wp-block-heading { font-size: var(--wp--preset--font-size--h-2); line-height: 1.25; }
.kokoomus-section .wp-block-column > h3.wp-block-heading { font-size: var(--wp--preset--font-size--h-3); line-height: 1.3; }
.kokoomus-section > .wp-block-heading:first-child { text-align: center; }
.kokoomus-prose .wp-block-heading:first-child { text-align: left; }
.kokoomus-prose :is(p, ul, ol) { line-height: 1.65; }
.kokoomus-section :is(h1, h2, h3) { text-wrap: balance; overflow-wrap: break-word; }
.kokoomus-prose > :is(p, ul, ol, blockquote, figure) { max-width: var(--kokoomus-reading-width); margin-inline: auto; }
.kokoomus-prose > :is(ul, ol) { padding-inline-start: 1.5rem; }
.kokoomus-section :is(p, ul, ol) { margin-block: 0 1rem; }
.kokoomus-section li + li { margin-top: .5rem; }
.kokoomus-section .wp-block-column > :first-child { margin-top: 0; }
.kokoomus-section .wp-block-column > :last-child,
.kokoomus-section > :last-child { margin-bottom: 0; }
.kokoomus-section .wp-block-column > :is(h2, h3) { margin-bottom: 1rem; }
.kokoomus-prose > .wp-block-heading:not(:first-child) { margin-top: 2.5rem; }
.kokoomus-prose > .wp-block-heading { max-width: var(--kokoomus-reading-width); margin-inline: auto; text-align: left; line-height: 1.3; }
.kokoomus-prose > h1.wp-block-heading { font-size: clamp(2rem, 4vw, 2.75rem); }
.kokoomus-prose > h2.wp-block-heading { font-size: clamp(1.5rem, 3vw, 2rem); }
.kokoomus-prose > h3.wp-block-heading { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
.martti-prose-centered { text-align: left; }

/* Keep the privacy notice's headings and copy on one readable column. */
.kokoomus-prose.martti-privacy > :is(p, ul, ol, .wp-block-heading) {
  max-width: var(--kokoomus-reading-width);
  margin-inline: auto;
  text-align: left;
}
.martti-privacy > :is(p, ul, ol) { font-size: 1.125rem; }
.martti-privacy > .wp-block-heading {
  font-weight: 700;
  line-height: 1.3;
  text-wrap: initial;
}
.kokoomus-prose.martti-privacy > h1.wp-block-heading { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: 1.5rem; }
.kokoomus-prose.martti-privacy > h2.wp-block-heading { font-size: clamp(1.35rem, 2.5vw, 1.65rem); margin-bottom: 1rem; }
.martti-privacy > h3.wp-block-heading { font-size: 1.25rem; }

.kokoomus-hero { min-height: 100svh; padding: 0; color: var(--wp--preset--color--on-brand); }
.kokoomus-hero .wp-block-cover__image-background { object-position: center top; }
.wp-block-cover.kokoomus-hero.martti-hero-align-left > .wp-block-cover__background.has-background-dim {
  opacity: 1;
  /* Override the Cover block's saved inline black background beneath the gradient. */
  background-color: transparent !important;
  background-image: linear-gradient(90deg, rgb(0 0 0 / .60) 0%, rgb(0 0 0 / .52) 38%, rgb(0 0 0 / 0) 65%);
}
@media (max-width: 1024px), (max-height: 500px) {
  .wp-block-cover.kokoomus-hero.martti-hero-align-left > .wp-block-cover__background.has-background-dim { background-image: linear-gradient(rgb(0 0 0 / .38), rgb(0 0 0 / .38)); }
}
.wp-block-cover.kokoomus-hero.martti-hero-align-center > .wp-block-cover__background.has-background-dim { opacity: .20; background: #000; }
.kokoomus-hero .wp-block-cover__inner-container { width: min(calc(100% - 2 * var(--martti-gutter)), calc(var(--martti-width) - 2 * var(--martti-gutter))); max-width: none; padding: clamp(3rem, 7vh, 6rem) 0; }
.kokoomus-hero .wp-block-cover__inner-container > * { max-width: 60rem; }
.kokoomus-hero .martti-hero-title { margin: 0 0 1.5rem; font-weight: 700; line-height: 1.05; text-wrap: balance; overflow-wrap: break-word; }
.kokoomus-hero .martti-hero-eyebrow { margin: 0 0 .75rem; line-height: 1.25; }
.kokoomus-hero p:not(.martti-hero-eyebrow) { max-width: 40rem; margin: 0 0 1.5rem; font-size: var(--wp--preset--font-size--lead); line-height: 1.5; }
.kokoomus-hero h1, .kokoomus-hero h2, .kokoomus-hero p { color: var(--wp--preset--color--on-brand); text-shadow: 0 2px 6px rgb(0 0 0 / .45); }
.kokoomus-hero .wp-block-buttons { gap: 1rem; }
.kokoomus-hero .wp-block-button__link { border: 2px solid var(--martti-blue); border-radius: 0; background: var(--martti-blue); color: var(--wp--preset--color--on-brand); font-size: 1.125rem; line-height: 1.25; min-height: 48px; box-sizing: border-box; padding: .75rem 1.5rem; }
.kokoomus-hero .is-style-outline .wp-block-button__link { border-color: var(--wp--preset--color--on-brand); background: transparent; color: var(--wp--preset--color--on-brand); }
@media (hover: hover) and (pointer: fine) {
  .kokoomus-hero .wp-block-button__link:hover {
    background: var(--wp--preset--color--on-brand);
    border-color: var(--wp--preset--color--on-brand);
    color: var(--martti-blue);
    filter: none;
  }
}
.kokoomus-hero.martti-hero-align-center .wp-block-cover__inner-container { text-align: center; }
.kokoomus-hero.martti-hero-align-center .wp-block-cover__inner-container > * { margin-inline: auto; }
.kokoomus-hero.martti-hero-align-right .wp-block-cover__inner-container { text-align: right; }
.kokoomus-hero.martti-hero-align-right .wp-block-cover__inner-container > * { margin-inline-start: auto; }

.kokoomus-themes .wp-block-columns { gap: 2rem; }
.kokoomus-themes .martti-theme-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1.5rem; background: var(--martti-pale); border: 0; border-radius: 0; box-shadow: none; }
.martti-theme-card h3 { margin: .5rem 0; font-size: 1.25rem; }
.martti-theme-card p { margin: 0 0 1rem; }
.martti-theme-card .martti-theme-icon { margin: 0; width: 3rem; height: 3rem; background: var(--martti-blue); mask: url('assets/icons/euro.svg') center / contain no-repeat; }
.martti-theme-card .martti-icon-GraduationCap { mask-image: url('assets/icons/heart.svg'); }
.martti-theme-card .martti-icon-Home { mask-image: url('assets/icons/home.svg'); }
.martti-theme-card .martti-icon-ShieldCheck { mask-image: url('assets/icons/shield.svg'); }
.martti-theme-card .martti-icon-Heart { mask-image: url('assets/icons/heart.svg'); }
.martti-theme-card .wp-block-buttons { margin-block-start: auto; }

.kokoomus-spotlight { border: 0; border-radius: 0; box-shadow: none; }
.kokoomus-spotlight .wp-block-columns { align-items: stretch; }
.kokoomus-spotlight .wp-block-column { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.kokoomus-spotlight .wp-block-column:has(figure) { flex-basis: 40%; }
.kokoomus-spotlight .wp-block-column:not(:has(figure)) { flex-basis: 60%; }
.kokoomus-spotlight.martti-spotlight-reversed .wp-block-column:has(figure) { flex-basis: 40%; }
.kokoomus-spotlight.martti-spotlight-reversed .wp-block-column:not(:has(figure)) { flex-basis: 60%; }
.kokoomus-spotlight figure, .kokoomus-spotlight img { width: 100%; height: 100%; margin: 0; }
.kokoomus-spotlight figure { min-height: 30rem; }
.kokoomus-spotlight img { object-fit: cover; }
.kokoomus-spotlight h2 { text-align: left; }

.kokoomus-testimonials .martti-testimonial-card { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); grid-template-rows: 1fr auto; gap: 1.5rem 1rem; background: var(--martti-pale); padding: 1.5rem; border: 0; border-radius: 0; }
.kokoomus-testimonials .wp-block-quote { grid-column: 1 / -1; background: transparent; padding: 0; margin: 0; border: 0; border-radius: 0; }
.kokoomus-testimonials .wp-block-quote p { margin: 0; }
.kokoomus-testimonials .martti-testimonial-card .wp-block-image { grid-column: 1; width: 3.5rem; height: 3.5rem; margin: 0; align-self: center; }
.kokoomus-testimonials .martti-testimonial-card .wp-block-image img { width: 3.5rem; height: 3.5rem; border-radius: 50%; object-fit: cover; }
.kokoomus-testimonials .martti-testimonial-credit { grid-column: 2; margin: 0; min-width: 0; align-self: center; }

.kokoomus-articles > .wp-block-columns { align-items: flex-start; gap: 2rem; }
.kokoomus-articles .wp-block-post-template { display: block; }
/* Editorial lists: typography and separators, without panel hover effects. */
.kokoomus-articles .wp-block-post { position: relative; padding: 1.5rem 0; margin: 0; background: transparent; border: 0; border-bottom: 1px solid var(--wp--preset--color--border); border-radius: 0; box-shadow: none; }
.kokoomus-articles .wp-block-post:first-child { padding-top: 0; }
.kokoomus-articles .wp-block-post:last-child { border-bottom: 0; padding-bottom: 0; }
.kokoomus-articles .wp-block-post-title { margin: 0 0 .5rem; font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.3; }
.kokoomus-articles .wp-block-post-title a, .kokoomus-blog-card .wp-block-post-title a { display: inline-flex; align-items: baseline; gap: .5rem; max-width: 100%; min-height: 44px; text-decoration: none; transition: color .22s ease; }
.kokoomus-articles .wp-block-post-title a::before, .kokoomus-blog-card .wp-block-post-title a::before { content: "→"; order: 1; flex: 0 0 auto; font-family: system-ui, sans-serif; font-size: 1rem; opacity: .6; transition: opacity .16s ease, transform .16s ease; }
.kokoomus-articles .type-kokoomus_tweet .wp-block-post-title a::before { content: "↗"; }
.kokoomus-articles .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.kokoomus-articles .wp-block-post-excerpt a { position: relative; z-index: 1; }
.kokoomus-articles .wp-block-post:has(a:focus-visible) { outline: 2px solid var(--wp--preset--color--focus); outline-offset: 4px; }
.kokoomus-articles .wp-block-post-title a:focus-visible { text-decoration: none; outline: none; box-shadow: none; }
.kokoomus-articles .wp-block-post:focus-within .wp-block-post-title a::before, .kokoomus-blog-card:focus-within .wp-block-post-title a::before { opacity: 1; transform: translateX(6px); }
.kokoomus-articles .wp-block-post:focus-within .wp-block-post-title a, .kokoomus-blog-card:focus-within .wp-block-post-title a { color: #24627e; }
@media (hover: hover) and (pointer: fine) {
  .kokoomus-articles .wp-block-post:hover .wp-block-post-title a, .kokoomus-blog-card:hover .wp-block-post-title a { color: #24627e; text-decoration: none; }
  .kokoomus-articles .wp-block-post:hover .wp-block-post-title a::before, .kokoomus-blog-card:hover .wp-block-post-title a::before { opacity: 1; transform: translateX(6px); }
}
@media (prefers-reduced-motion: reduce) {
  .kokoomus-articles .wp-block-post-title a, .kokoomus-blog-card .wp-block-post-title a { transition: none; }
  .kokoomus-articles .wp-block-post-title a::before, .kokoomus-blog-card .wp-block-post-title a::before { transition: none; transform: none !important; }
}
.kokoomus-articles .wp-block-post-excerpt { margin: .5rem 0; }
.kokoomus-articles .wp-block-post-date { font-size: .9rem; color: var(--wp--preset--color--text-muted); }

.kokoomus-contact > p { max-width: 48rem; margin: 0 auto 3rem; text-align: center; }
.kokoomus-contact .wp-block-columns { flex-direction: row-reverse; align-items: flex-start; }
.kokoomus-contact .wp-block-column { flex-basis: 50%; }
.kokoomus-contact .wp-block-image img { width: 100%; height: auto; }
.kokoomus-contact-form input:not([type="checkbox"]), .kokoomus-contact-form textarea { border: 2px solid var(--martti-blue); border-radius: 0; }
.kokoomus-contact-form button { border-radius: 0; }

/* Original footer: wordmark, two compact columns, then the language links. */
:where(.martti-footer-content) { font-size: 1rem; line-height: 1.5; }
:where(.martti-footer-logo) { margin: 0 auto 3rem; text-align: center; }
:where(.martti-footer-logo img) { width: 13rem; height: auto; }
footer.wp-block-template-part .martti-footer-columns {
  max-width: 52rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: start;
  gap: 2rem;
  justify-content: space-between;
}
.martti-footer-columns > .wp-block-column { min-width: 0; margin: 0; }
:where(.martti-footer-columns h3) {
  color: inherit;
  font-family: var(--wp--preset--font-family--ui);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 1rem;
}
.martti-footer-columns p { margin: 0 0 .375rem; }
.martti-footer-columns h3 { margin-top: 0; }
.martti-footer-content a { text-decoration: none; text-underline-offset: .2em; }
@media (hover: hover) and (pointer: fine) { .martti-footer-content a:hover { text-decoration: underline; text-decoration-thickness: 1px; } }
footer.wp-block-template-part .martti-footer-social { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.5rem), 1fr)); gap: .25rem .75rem; list-style: none; padding: 0; margin: 0; }
.martti-footer-social li { min-width: 0; margin: 0; }
:where(.martti-footer-social a) { display: inline-flex; align-items: center; gap: .5rem; min-height: var(--kokoomus-touch-target); }
.martti-footer-social a::before {
  content: '';
  display: inline-block;
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
  background-color: currentColor;
  mask: var(--social-icon) center / contain no-repeat;
}
.martti-footer-social a[href*="instagram.com"] { --social-icon: url('./assets/icons/social-instagram.svg'); }
.martti-footer-social a[href*="linkedin.com"] { --social-icon: url('./assets/icons/social-linkedin.svg'); }
.martti-footer-social a[href*="twitter.com"], .martti-footer-social a[href*="x.com/"] { --social-icon: url('./assets/icons/social-twitter.svg'); }
.martti-footer-social a[href*="facebook.com"] { --social-icon: url('./assets/icons/social-facebook.svg'); }
.martti-footer-social a[href*="uusisuomi.fi"] { --social-icon: url('./assets/icons/social-newspaper.svg'); }
.martti-footer-social a[href*="tiktok.com"] { --social-icon: url('./assets/icons/social-music.svg'); }
.martti-footer-content nav.martti-language-switcher {
  margin: 2rem auto 0;
  max-width: 52rem;
  font-family: var(--wp--preset--font-family--ui);
  font-weight: 700;
  font-size: 1rem;
}
.martti-language-switcher .wp-block-navigation__container { gap: 0; margin: 0; align-items: center; }
.martti-language-switcher .wp-block-navigation-item { display: flex; align-items: center; }
.martti-language-switcher a { display: inline-flex; align-items: center; justify-content: center; min-width: var(--kokoomus-touch-target); min-height: var(--kokoomus-touch-target); }
.martti-language-switcher .wp-block-navigation-item + .wp-block-navigation-item::before {
  content: none;
}
.martti-language-switcher a:focus-visible { text-decoration: underline; text-underline-offset: .3em; }
.martti-language-switcher a[aria-current="true"] { font-weight: 900; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .3em; }

@media (max-width: 781px) {
  footer.wp-block-template-part .martti-footer-columns { gap: 2rem; }
}
@media (max-width: 599px) {
  footer.wp-block-template-part .martti-footer-columns { grid-template-columns: 1fr; }
}


@media (max-width: 781px) {
  .kokoomus-section { padding: var(--martti-section-space) var(--martti-gutter); }
  .kokoomus-hero .wp-block-cover__inner-container { padding-block: 3rem; }
  .kokoomus-spotlight figure { min-height: 0; }
  .kokoomus-spotlight img { height: auto; aspect-ratio: 1; }
  .kokoomus-contact .wp-block-columns { flex-direction: column; }
}

/* Blog listing follows the original 1280px, 1/2/3-column article layout. */
.kokoomus-blog { box-sizing: border-box; padding: 2rem 1rem; }
.kokoomus-blog > h1 { margin: 2rem 0 clamp(3rem, 6vw, 5rem); text-align: center; font-size: var(--wp--preset--font-size--h-1); }
.kokoomus-blog .wp-block-post-template { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 4vw, 3.5rem) 2rem; margin: 0; padding: 0; list-style: none; }
.kokoomus-blog .wp-block-post { min-width: 0; margin: 0; }
.kokoomus-blog-card { position: relative; height: 100%; box-sizing: border-box; gap: 0; padding: 0; background: transparent; border: 0; }
.kokoomus-blog-card .wp-block-post-title { margin: 0 0 .5rem; font-size: 1.5rem; line-height: 1.35; }
.kokoomus-blog-card .wp-block-post-title a { text-decoration: none; }
.kokoomus-blog-card .wp-block-post-title a:focus-visible { text-decoration: none; }
.kokoomus-blog-card .wp-block-post-excerpt { margin: 0 0 1rem; font-size: 1rem; line-height: 1.5; color: var(--wp--preset--color--text-muted); }
.kokoomus-blog-card .wp-block-post-excerpt p { margin: 0; }
.kokoomus-blog-card .kokoomus-blog-meta { margin-top: auto; padding-top: 1rem; gap: .75rem; font-family: system-ui, sans-serif; font-size: .875rem; line-height: 1.5; font-weight: 400; }
.kokoomus-blog-meta > :is(p, .wp-block-post-date) { margin: 0; padding: 0; border: 0; background: transparent; color: var(--wp--preset--color--text-muted); }
.kokoomus-blog-meta > p:empty { display: none; }
.kokoomus-blog .wp-block-query-pagination { margin: 2rem 0 0; gap: .5rem; }
.kokoomus-blog .wp-block-query-pagination-numbers { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
.kokoomus-blog .wp-block-query-pagination :is(a, .page-numbers) { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; box-sizing: border-box; padding: .5rem .75rem; background: var(--martti-pale); color: var(--martti-blue); text-decoration: none; }
.kokoomus-blog .wp-block-query-pagination .current { background: var(--martti-blue); color: var(--wp--preset--color--on-brand); }
@media (hover: hover) and (pointer: fine) { .kokoomus-blog .wp-block-query-pagination a:hover { background: var(--martti-blue); color: var(--wp--preset--color--on-brand); } }
@media (min-width: 768px) and (max-width: 1023px) {
  .kokoomus-blog .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .kokoomus-blog { padding-inline: 2rem; }
  .kokoomus-blog .wp-block-post-template { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* One native title link covers its card, with a visible keyboard focus ring. */
.kokoomus-blog-card .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.kokoomus-blog-card:has(a:focus-visible) { outline: 2px solid var(--martti-blue); outline-offset: 4px; box-shadow: none; }
.kokoomus-blog-card .wp-block-post-title a:focus-visible { outline: none; box-shadow: none; }

@media (hover: hover) and (pointer: fine) {
  .martti-language-switcher a:hover { text-decoration: underline; }
}

/* Keep the two ballots together below the primary actions. */
:is(.kokoomus-hero, body.post-type-wp_block) .martti-hero-ballots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1.25rem; box-sizing: border-box; width: min(100%, 40rem); max-width: 40rem; margin-block-start: 1.5rem; }
:is(.kokoomus-hero, body.post-type-wp_block) .martti-hero-ballots > p { margin-inline: 0 !important; }
:is(.kokoomus-hero, body.post-type-wp_block) p.martti-hero-ballot { display: grid; grid-row: 2; grid-template-columns: 4rem minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; gap: .1rem .75rem; min-width: 0; margin: 0; text-align: left; line-height: 1.2; }
.martti-hero-ballot-number { display: flex; grid-column: 1; grid-row: 1 / 3; align-items: center; justify-content: center; width: 4rem; height: 4rem; border-radius: 50%; background: #f3a64d; color: var(--martti-blue); font-family: var(--wp--preset--font-family--ui); font-size: 2rem; font-weight: 700; line-height: 1; text-shadow: none; }
.martti-hero-ballot:last-of-type .martti-hero-ballot-number { background: var(--wp--preset--color--on-brand); }
.martti-hero-ballot-label { grid-column: 2; grid-row: 1; align-self: end; max-width: 12rem; font-family: var(--wp--preset--font-family--ui); font-size: 1.25rem; font-weight: 700; }
.martti-hero-ballot-paper { grid-column: 2; grid-row: 2; align-self: start; font-size: .9375rem; line-height: 1.2; }
:is(.kokoomus-hero, body.post-type-wp_block) p.martti-hero-ballot-list { grid-column: 1 / -1; grid-row: 1; margin: 0; font-size: 1.25rem; font-weight: 600; line-height: 1.4; text-align: left; }
body.post-type-wp_block .martti-hero-ballots { margin: 1.5rem auto; padding: 1.5rem; background: var(--martti-blue); color: var(--wp--preset--color--on-brand); }
body.post-type-wp_block .martti-hero-ballots p { color: var(--wp--preset--color--on-brand); }
.martti-election-themes .wp-block-column { border-top: 1px solid var(--wp--preset--color--border); padding-top: 1.5rem; }
.martti-election-themes { padding-bottom: clamp(2.5rem, 4vw, 3.5rem); }
.martti-election-source { margin: 2.5rem 0 0 !important; text-align: center; }
.martti-election-source a, .martti-archive-notice a { text-decoration: underline; text-underline-offset: .2em; }
.martti-election-dates { background: var(--wp--preset--color--surface); padding-block: clamp(2.5rem, 4vw, 3.5rem); }
.martti-election-dates > p { max-width: var(--kokoomus-reading-width); margin-inline: auto; text-align: center; }
.martti-election-dates > .wp-block-columns { max-width: var(--kokoomus-reading-width); margin: 2rem auto 1.5rem; text-align: center; }
.martti-election-dates .wp-block-column > h3 { margin-bottom: .4rem; }
.martti-election-dates .wp-block-column > p { font-size: clamp(1.5rem, 4vw, 2rem); }
.martti-archive-notice { padding-block: 1.5rem; background: var(--martti-pale); border-bottom: 1px solid var(--wp--preset--color--border); }
.martti-archive-notice > p { max-width: var(--martti-width); }
.martti-election-archive { min-height: 60svh; }
@media (max-width: 781px) {
 :is(.kokoomus-hero, body.post-type-wp_block) .martti-hero-ballots { gap: .5rem .75rem; }
 :is(.kokoomus-hero, body.post-type-wp_block) p.martti-hero-ballot { grid-template-columns: 3.25rem minmax(0, 1fr); gap: .1rem .5rem; }
 .martti-hero-ballot-number { width: 3.25rem; height: 3.25rem; font-size: 1.65rem; }
 .martti-hero-ballot-label { font-size: 1rem; }
 .martti-election-dates > .wp-block-columns { gap: 1.5rem; }
}
@media (max-width: 600px) {
 :is(.kokoomus-hero, body.post-type-wp_block) .martti-hero-ballots { grid-template-columns: 1fr; gap: .75rem; margin-block-start: 1.25rem; }
 :is(.kokoomus-hero, body.post-type-wp_block) p.martti-hero-ballot { grid-row: auto; }
 :is(.kokoomus-hero, body.post-type-wp_block) p.martti-hero-ballot-list { grid-row: auto; }
}

/* Restrained interaction: colour and underline change, nothing moves or floats. */
:is(.wp-block-button__link, .kokoomus-contact-form button) { transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
@media (hover: hover) and (pointer: fine) {
  :is(.wp-block-button__link, .kokoomus-contact-form button:not(:disabled)):is(:hover, :active) { transform: none; box-shadow: none; filter: none; }
  .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover, .kokoomus-contact-form button:not(:disabled):hover { background: #00263a; border-color: #00263a; color: var(--wp--preset--color--on-brand); }
  .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--martti-blue); border-color: var(--martti-blue); color: var(--wp--preset--color--on-brand); }
  .kokoomus-hero .wp-block-button__link:hover { background: var(--wp--preset--color--on-brand); border-color: var(--wp--preset--color--on-brand); color: var(--martti-blue); }
  header.wp-block-template-part .wp-block-navigation-item__content:hover { background: none; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .4em; }
}
header.wp-block-template-part .current-menu-item > .wp-block-navigation-item__content { background: none; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .4em; }
.is-style-outline > .wp-block-button__link { border: 2px solid var(--martti-blue); background: transparent; color: var(--martti-blue); }

/* Article lists: the title underlines on hover; no sliding arrows. */
.kokoomus-articles .wp-block-post-title a::before, .kokoomus-blog-card .wp-block-post-title a::before { content: none; }
.kokoomus-articles .wp-block-post-title a, .kokoomus-blog-card .wp-block-post-title a { display: inline; color: var(--martti-blue); text-decoration: none; transition: none; }
@media (hover: hover) and (pointer: fine) {
  .kokoomus-articles .wp-block-post:hover .wp-block-post-title a, .kokoomus-blog-card:hover .wp-block-post-title a { color: var(--martti-blue); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; }
}
.kokoomus-articles .wp-block-post:focus-within .wp-block-post-title a, .kokoomus-blog-card:focus-within .wp-block-post-title a { color: var(--martti-blue); }
.martti-articles-grid .wp-block-post-template.is-layout-grid { display: grid; gap: 2rem; }
.martti-articles-grid .wp-block-post, .martti-articles-grid .wp-block-post:first-child, .martti-articles-grid .wp-block-post:last-child { padding: 1.25rem 0 0; border-top: 3px solid var(--martti-blue); border-bottom: 0; }
.martti-articles-grid .wp-block-post-date { margin: 0 0 .5rem; }
.martti-articles-grid .wp-block-buttons { justify-content: center; margin-top: 2.5rem; }

/* Theme cards: a large numeral and a linked claim. */
.martti-election-themes > h2 { margin-bottom: 2rem; }
.martti-election-themes .wp-block-column { border-top: 3px solid var(--martti-blue); }
p.martti-theme-number { margin: 0 0 .5rem; font-family: var(--wp--preset--font-family--ui); font-size: 3rem; font-weight: 700; line-height: 1; color: var(--martti-blue); }
.martti-election-themes h3 a { color: inherit; text-decoration: none; }
/* inline-block keeps the arrow outside the underline, so the line has no gap. */
.martti-election-themes h3 a::after { content: "→"; display: inline-block; margin-inline-start: .35em; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .martti-election-themes h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; } }

/* Voting section and positions list. */
.martti-election-dates .wp-block-buttons { justify-content: center; margin-top: 1.5rem; }
.martti-positions { padding-inline-start: 1.25rem; }
.martti-positions li { margin-block: .25rem; }
.kokoomus-spotlight .wp-block-buttons { margin-top: 1rem; }

/* The ballot numbers are what a voter must remember. */
@media (min-width: 782px) {
  :is(.kokoomus-hero, body.post-type-wp_block) p.martti-hero-ballot { grid-template-columns: 5rem minmax(0, 1fr); }
  .martti-hero-ballot-number { width: 5rem; height: 5rem; font-size: 2.6rem; }
}
.wp-block-button__link, .kokoomus-contact-form button { border-radius: 0; }

/* Return link: a quiet navigation label, set like the header menu. */
.kokoomus-back-link a { display: inline-block; padding-block: .6rem; font-family: var(--wp--preset--font-family--ui); font-size: .9375rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--martti-blue); text-decoration: none; }
.kokoomus-back-link a span { display: inline-block; margin-inline-end: .5rem; }
@media (hover: hover) and (pointer: fine) { .kokoomus-back-link a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .35em; } }
/* Line up with the article column, which is 760px inside the 768px single wrapper. */
.kokoomus-single > .kokoomus-back-link { max-width: 760px; margin-inline: auto !important; }

/* Ballot digits as written on the ballot: 1 is a stroke, 7 is crossed. */
.martti-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.martti-digit-7 { position: relative; display: inline-block; }
.martti-digit-7::after { content: ""; position: absolute; top: 52%; left: 18%; width: 64%; height: .09em; background: currentColor; }

/* Article list: each card is as tall as its text, with the date right below it. */
.kokoomus-blog .wp-block-post-template { align-items: start; }
.kokoomus-blog .kokoomus-blog-card { height: auto; }
.kokoomus-blog .kokoomus-blog-card .kokoomus-blog-meta { margin-top: 0; padding-top: .25rem; }

/* Contact form result: a quiet panel aligned with the fields, not a box like an input. */
.kokoomus-contact-feedback { margin: 0 0 1.5rem; padding: 1.25rem 1.5rem; background: var(--martti-pale); border: 0; border-inline-start: 4px solid var(--martti-blue); font-size: 1.125rem; line-height: 1.5; }
.kokoomus-contact-feedback--success { font-family: var(--wp--preset--font-family--ui); font-size: 1.375rem; font-weight: 700; color: var(--martti-blue); }
.kokoomus-contact-feedback:not(.kokoomus-contact-feedback--success) { border-inline-start-color: var(--wp--preset--color--accent); }
.kokoomus-contact-again { min-height: 44px; padding: .6rem 1.25rem; border: 2px solid var(--martti-blue); border-radius: 0; background: transparent; color: var(--martti-blue); font-family: var(--wp--preset--font-family--ui); font-size: 1.125rem; font-weight: 700; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
@media (hover: hover) and (pointer: fine) { .kokoomus-contact-again:hover { background: var(--martti-blue); color: var(--wp--preset--color--on-brand); } }
