/*
Theme Name: CYNERGEN
Theme URI: https://cynergen.pro/
Author: CYNERGEN
Description: CYNERGENin ylläpidettävä, nykyistä visuaalista ilmettä säilyttävä teema.
Version: 0.6.25
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: cynergen
*/

:root {
  --navy: #173a5e;
  --navy-deep: #102a45;
  --green: #0e9983;
  --ink: #142435;
  --muted: #5b6874;
  --line: #dbe3e7;
  --mist: #f3f7f7;
  --white: #fff;
  --shell: min(1180px, calc(100% - 48px));
  --font: Avenir, "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { height: 100%; overflow: hidden; scroll-behavior: smooth; color-scheme: light; }
body { height: 100vh; height: 100svh; display: flex; flex-direction: column; overflow: hidden; margin: 0; background: var(--white); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.65; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
iframe, video { max-width: 100%; }
audio, canvas, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; }
.shell { width: var(--shell); margin-inline: auto; }
.skip-link { position: fixed; left: 1rem; top: 1rem; z-index: 100; padding: .7rem 1rem; background: var(--navy); color: var(--white); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }
.site-header { position: relative; z-index: 10; flex: 0 0 auto; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 96%); }
.header-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; }
.brand img { width: 38px; aspect-ratio: 267 / 290; }
.wordmark { display: inline-flex; align-items: baseline; font-size: 1.25rem; font-weight: 500; letter-spacing: .035em; line-height: 1; }
.wordmark span:first-child { color: var(--navy); }
.wordmark span:last-child { color: var(--green); }
.primary-nav .menu { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.4rem); margin: 0; padding: 0; list-style: none; }
.primary-nav a { position: relative; display: flex; min-height: 44px; align-items: center; padding: 1.25rem 0; color: var(--navy-deep); font-size: .94rem; text-decoration: none; }
.primary-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 1.35rem; height: 2px; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform 160ms; }
.primary-nav a:hover::after, .primary-nav a:focus-visible::after, .primary-nav .current-menu-item a::after, .primary-nav a[aria-current="page"]::after { transform: scaleX(1); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--navy-deep); font-weight: 450; line-height: 1.13; }
h1 { margin-bottom: 2rem; font-size: clamp(2.8rem, 5.4vw, 4.8rem); letter-spacing: -.045em; }
h2 { margin-bottom: 1.6rem; font-size: clamp(2rem, 4vw, 3.6rem); letter-spacing: -.035em; }
h3 { margin-bottom: .9rem; font-size: 1.55rem; letter-spacing: -.02em; }
.page-intro { padding-block: clamp(6rem, 12vw, 10rem); }
.page-intro h1 { max-width: 980px; }
.page-intro-marked { display: flex; align-items: center; justify-content: space-between; gap: 4rem; }
.page-intro-marked img { width: min(180px, 25vw); aspect-ratio: 267 / 290; }
.prose { max-width: 680px; }
.prose p { margin-bottom: 1.35rem; font-size: 1.08rem; }
.text-link { display: inline-block; margin-top: .8rem; color: var(--navy); font-weight: 700; text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: .3em; }
.section { padding-block: clamp(5rem, 10vw, 9rem); border-top: 1px solid var(--line); }
.section-index, .step-number, .role-label, .card-kicker { margin: 0 0 1.2rem; color: var(--navy); font-size: .78rem; font-weight: 700; letter-spacing: .14em; line-height: 1.4; text-transform: uppercase; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-bottom: clamp(5rem, 10vw, 9rem); border: 1px solid var(--line); background: var(--line); }
.steps article { min-height: 360px; padding: clamp(2rem, 4vw, 3.6rem); background: var(--white); }
.steps article:nth-child(even) { background: var(--mist); }
.steps .step-number { color: var(--green); }
.steps h2 { font-size: clamp(1.7rem, 2.7vw, 2.5rem); }
.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; padding: 0; border: 1px solid var(--line); background: var(--line); }
.role-grid > * { padding: clamp(2rem, 5vw, 4.5rem); background: var(--white); }
.role-grid .role-intro { grid-column: 1 / -1; }
.role-grid article { min-height: 250px; }
.role-grid article:nth-child(2) { border-top: 4px solid var(--navy); }
.role-grid article:last-child { border-top: 4px solid var(--green); }
.site-main { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.site-main::-webkit-scrollbar { display: none; }
.content-page { padding-bottom: clamp(4rem, 9vw, 8rem); }
.content-page > .prose { max-width: 72ch; }
.content-page > .prose:has(.cynergen-founder) { max-width: 1040px; }
.cynergen-founder { gap: clamp(2rem, 5vw, 4.5rem); margin-block: clamp(2.75rem, 6vw, 5rem); }
.cynergen-founder .wp-block-media-text__content { padding: 0; }
.cynergen-founder img { width: min(100%, 420px); aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; box-shadow: 0 18px 48px rgb(7 34 61 / 12%); }
.site-footer { flex: 0 0 auto; border-top: 1px solid var(--line); background: var(--white); }
.footer-inner { min-height: 150px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.footer-inner p { margin: 0; color: var(--muted); font-size: .92rem; }
.footer-meta { display: grid; gap: .2rem; text-align: right; }
.footer-contact-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 1rem; }
.footer-contact-row a { min-height: 44px; display: inline-flex; align-items: center; color: var(--navy); text-underline-offset: .22em; }
.story-grid { counter-reset: cynergen-story; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-bottom: clamp(4rem, 8vw, 7rem); border: 1px solid var(--line); background: var(--line); }
.story-tools { margin-bottom: 2rem; padding-block: clamp(.5rem, 2vw, 1.25rem); }
.story-archive-intro { padding-block: clamp(3rem, 6vh, 5rem) clamp(1.5rem, 3vh, 2.5rem); }
.story-archive-lead { max-width: 900px; margin: -1rem 0 0; color: var(--muted); }
.story-filter-intro { display: flex; align-items: start; justify-content: space-between; gap: 2rem; margin-top: 1.25rem; }
.story-filter-intro p { max-width: none; margin: 0; color: var(--muted); white-space: nowrap; }
.story-filter-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.75rem, 1.8vw, 1.8rem); }
.story-filter-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.story-filter-group legend { width: 100%; margin-bottom: .65rem; padding: 0; color: var(--navy); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.story-filter-list { display: grid; gap: .12rem; margin: 0; padding: 0; list-style: none; }
.story-filter-option { width: 100%; min-height: 40px; overflow: hidden; padding: .33rem 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.story-filter-option:hover { color: var(--navy); }
.story-filter-option[aria-pressed="true"] { color: var(--navy-deep); text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: .32em; }
.story-filter-option[hidden] { display: none; }
.story-tool-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; }
.story-filter-reset { min-height: 44px; padding: .5rem .75rem; border: 1px solid var(--navy); border-radius: 2px; background: transparent; color: var(--navy); cursor: pointer; font-weight: 700; }
.story-filter-reset:hover { background: var(--navy); color: var(--white); }
.story-filter-status { margin: 0; color: var(--muted); }
.story-results-pane .story-timeline { margin-bottom: 0; }
.story-timeline { margin-bottom: clamp(4rem, 8vw, 7rem); }
.timeline-list { position: relative; display: grid; gap: .75rem; margin: 0; padding: 0 0 0 3rem; list-style: none; }
.timeline-list::before { content: ""; position: absolute; top: 0; bottom: 0; left: .45rem; width: 2px; background: var(--line); }
.timeline-item { position: relative; }
.timeline-item::before { content: ""; position: absolute; top: 2.5rem; left: calc(-2.55rem - 6px); width: 14px; height: 14px; border: 3px solid var(--white); border-radius: 50%; background: var(--green); box-shadow: 0 0 0 1px var(--green); }
.timeline-item .story-card { min-height: 0; border: 1px solid var(--line); }
.timeline-item .story-card::before { display: none; }
.story-classification { margin: .9rem 0 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.story-empty { padding: clamp(2rem, 5vw, 4rem); border: 1px solid var(--line); background: var(--mist); }
.story-empty h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; margin-block: 2rem 5rem; }
.pagination .page-numbers { display: inline-grid; min-width: 44px; min-height: 44px; place-items: center; padding: .45rem; border: 1px solid var(--line); text-decoration: none; }
.pagination .current { border-color: var(--navy); background: var(--navy); color: var(--white); }
.language-switch { display: inline-flex; gap: .35rem; margin-left: auto; }
.language-switch a { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--line); text-decoration: none; }
.language-switch a[aria-current="page"] { border-color: var(--navy); font-weight: 700; }
.story-card { display: flex; min-height: 0; flex-direction: column; padding: clamp(.85rem, 1.4vw, 1.3rem); background: var(--white); }
.story-card:nth-child(even) { background: var(--mist); }
.story-card::before { counter-increment: cynergen-story; content: counter(cynergen-story, decimal-leading-zero); margin-bottom: 1.2rem; color: var(--green); font-size: .78rem; font-weight: 700; letter-spacing: .14em; line-height: 1.4; }
.story-card time, .story-kicker { margin-bottom: 1rem; color: var(--navy); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.story-card h2 { margin-bottom: .75rem; font-size: clamp(1.2rem, 1.76vw, 1.72rem); }
.story-card > p:last-child { margin-bottom: 0; }
.story-card h2 a { color: inherit; text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: .28em; }
.story-card h2 a:hover { color: var(--navy); }
.story-detail { padding-bottom: clamp(5rem, 10vw, 9rem); }
.story-detail > .page-intro { padding-bottom: .75rem; }
.story-detail > .page-intro, .story-detail > .page-intro h1, .story-detail > .page-intro .prose { width: 100%; max-width: 100%; }
.story-detail > .page-intro h1 { margin-bottom: .75rem; font-size: clamp(1.6rem, 3.36vw, 3.2rem); white-space: normal; }
.story-detail > .page-intro .prose p:last-child { margin-bottom: .75rem; }
.story-facts { counter-reset: cynergen-fact; display: grid; gap: 1px; border: 1px solid var(--line); background: var(--line); }
.story-fact { display: grid; grid-template-columns: minmax(150px, .3fr) minmax(0, 1fr); gap: 1rem; padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 2vw, 1.5rem); background: var(--white); }
.story-fact:nth-child(even) { background: var(--mist); }
.story-fact h2 { position: relative; margin: 0; padding-top: 2rem; font-size: 1rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.story-fact h2::before { counter-increment: cynergen-fact; content: counter(cynergen-fact, decimal-leading-zero); position: absolute; top: 0; left: 0; color: var(--green); font-size: .72rem; letter-spacing: .14em; }
.story-fact p { margin: 0; }
.story-back-link { position: fixed; bottom: calc(var(--site-footer-height, 150px) + 1rem); left: calc(50% - 602px); z-index: 11; min-height: 44px; display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .65rem .55rem; border: 0; background: rgb(255 255 255 / 94%); color: var(--navy); font-weight: 700; text-decoration: none; transform: translateX(-100%); }
.content-scroll-cue { position: fixed; bottom: calc(var(--site-footer-height, 150px) + .65rem); z-index: 11; width: 40px; height: 40px; padding: 0; border: 0; background: transparent; color: var(--green); cursor: pointer; opacity: .82; transition: opacity 160ms ease; }
.content-scroll-cue:hover, .content-scroll-cue:focus-visible { opacity: 1; }
.content-scroll-cue[hidden] { display: none; }
.content-scroll-cue span { display: block; width: 11px; height: 11px; margin: 8px auto 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.story-filter-option[aria-disabled="true"] { cursor: default; }
.content-page :where(table) { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; -webkit-overflow-scrolling: touch; }
.content-page :where(th, td) { padding: .75rem; border: 1px solid var(--line); text-align: left; }
.content-page :where(.wp-block-image, .wp-block-embed, .wp-block-video) { max-width: 100%; }
@media (max-width: 820px) {
  :root { --shell: min(680px, calc(100% - 32px)); }
  .header-inner { min-height: auto; flex-direction: column; align-items: stretch; gap: .25rem; padding-top: 1rem; }
  .brand { align-self: flex-start; }
  .primary-nav .menu { flex-wrap: wrap; justify-content: flex-start; gap: 0 1.5rem; }
  .primary-nav a { min-height: 48px; padding-block: .75rem 1rem; white-space: nowrap; }
  .primary-nav a::after { bottom: .8rem; }
  .page-intro-marked { display: block; }
  .page-intro-marked img { display: none; }
  .story-grid { grid-template-columns: minmax(0, 1fr); }
  .steps, .role-grid { grid-template-columns: minmax(0, 1fr); }
  .steps article, .role-grid article { min-height: 0; }
  .role-grid .role-intro { grid-column: auto; }
  .story-card { min-height: 0; }
  .story-filter-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-filter-intro p { white-space: normal; }
  .story-filter-option { min-height: 44px; }
  .story-fact { grid-template-columns: 1fr; gap: .75rem; }
  .story-detail > .page-intro h1 { font-size: clamp(1.6rem, 4.16vw, 2.4rem); }
  .cynergen-founder { grid-template-columns: minmax(0, 1fr) !important; }
  .cynergen-founder .wp-block-media-text__media { width: min(100%, 320px); margin-inline: auto; }
  h1, h2, h3, .prose { overflow-wrap: anywhere; hyphens: auto; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 2rem; }
  .footer-meta { text-align: left; }
  .footer-contact-row { justify-content: flex-start; }
}
@media (min-width: 821px) {
  .story-tools.is-filter-complete { position: sticky; top: 0; z-index: 9; max-height: 55svh; overflow-y: auto; padding-bottom: 1rem; background: var(--white); overscroll-behavior: contain; scrollbar-gutter: stable; }
}
@media (max-width: 1399px) {
  .story-back-link { left: 1rem; transform: none; }
}
@media (max-width: 480px) {
  :root { --shell: min(100% - 24px, 680px); }
  h1 { font-size: clamp(2rem, 9vw, 2.75rem); line-height: 1.16; }
  h2 { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .page-intro { padding-block: 3rem; }
  .wordmark { font-size: 1.12rem; }
  .primary-nav { width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
  .primary-nav .menu { width: max-content; min-width: 100%; flex-wrap: nowrap; gap: 1.25rem; }
  .steps article, .role-grid > * { padding: 1.6rem; }
  .story-card, .story-fact { padding: 1.5rem; }
  .story-detail > .page-intro h1 { font-size: clamp(1.48rem, 6.8vw, 2rem); white-space: normal; }
  .cynergen-founder .wp-block-media-text__media { width: min(100%, 280px); }
  .story-filter-intro, .story-tool-actions { align-items: stretch; flex-direction: column; }
  .story-filter-groups { grid-template-columns: minmax(0, 1fr); }
  .story-filter-group { padding: 0; }
  .story-filter-reset { width: 100%; }
  .story-tool-actions { align-items: stretch; flex-direction: column; }
  .story-tool-actions a { justify-content: center; }
  .timeline-list { padding-left: 1.5rem; }
  .timeline-list::before { left: .35rem; }
  .timeline-item::before { left: calc(-1.15rem - 6px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* v0.6.3: neutral reset and stable right alignment. */
.story-tools:focus { outline: none; }
.story-tool-actions { min-height: 44px; }
.story-filter-reset { margin-inline-start: auto; width: auto; flex: 0 0 auto; }
.story-filter-reset[hidden] { display: none; }
@media (max-width: 480px) {
  .story-tool-actions { flex-direction: row; align-items: center; }
  .story-filter-status { flex: 1; }
}
/* Narrow navigation: one row; scrolling only when labels cannot fit. */
@media (max-width: 820px) {
  .header-inner { padding-top: .5rem; gap: 0; }
  .primary-nav { width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
  .primary-nav .menu { display: flex; width: max-content; min-width: 100%; flex-wrap: nowrap; justify-content: space-between; gap: clamp(.5rem, 2vw, .8rem); }
  .primary-nav a { min-height: 44px; padding: .65rem 0; white-space: nowrap; font-size: clamp(.8rem, 2.6vw, .94rem); }
  .primary-nav a::after { bottom: .45rem; }
}

/* Existing HTML content carried into editable WP pages. */
.hero { display:grid;grid-template-columns:minmax(0,1fr) 267px;align-items:center;gap:4rem;padding-block:clamp(4rem,8vw,8rem); }
.hero h1 {font-size:clamp(2.8rem,5.4vw,4.8rem)}
.eyebrow {color:var(--navy);font-size:.78rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase}
.lead {max-width:720px;font-size:1.15rem;color:var(--muted)}
.button {display:inline-flex;align-items:center;min-height:44px;padding:.75rem 1.4rem;background:var(--navy);color:white;text-decoration:none}
.signal-mark img {width:267px}.split {display:grid;grid-template-columns:1fr 1fr;gap:4rem}
.cta-band {background:var(--navy);color:white;padding-block:4rem}.cta-band h2 {color:white}.cta-band .eyebrow {color:white}.cta-inner {display:flex;justify-content:space-between;align-items:center;gap:2rem}.button-light {background:white;color:var(--navy)}
.contact-layout {display:grid;grid-template-columns:1.5fr 1fr;gap:4rem;padding-block:6rem}.contact-card {padding:2rem;background:var(--mist)}
@media(max-width:820px){.hero,.split,.contact-layout {grid-template-columns:1fr;gap:2rem}.signal-mark{display:none}.cta-inner{flex-direction:column;align-items:flex-start}.contact-layout{padding-block:3rem}}

/* v0.6.4: compact frame, reserved cue gutter and consistent link strokes. */
:root { --content-gutter: clamp(44px, 5vw, 64px); --shell: min(1180px, calc(100% - 2 * var(--content-gutter))); --link-stroke: 1.4px; }
.footer-inner { min-height: 64px; gap: .75rem 1.5rem; padding-block: .6rem; }
.footer-identity { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.footer-identity .wordmark { flex-shrink: 0; }
.footer-meta { display: flex; align-items: center; gap: .3rem 1rem; flex-wrap: wrap; justify-content: flex-end; }
.footer-inner p { font-size: .82rem; }
.footer-contact-row a { min-height: 32px; }
.primary-nav a::after { height: var(--link-stroke); }
.primary-nav .current-menu-ancestor > a::after,
.primary-nav .current-menu-parent > a::after { transform: scaleX(1); }
.text-link, .story-card h2 a, .story-filter-option[aria-pressed="true"],
.footer-contact-row a, .link-label { text-decoration-thickness: var(--link-stroke); text-decoration-skip-ink: none; }
.text-link:has(.link-label), .story-back-link { text-decoration: none; }
.link-label { text-decoration-line: underline; text-decoration-color: var(--green); text-underline-offset: .3em; }
.text-link .link-label { margin-inline-end: .35em; }
.story-back-link { left: var(--content-gutter); transform: none; bottom: calc(var(--site-footer-height, 64px) + .5rem); padding-inline: 0; }
.story-detail { padding-bottom: 5rem; }
body.single-cynergen_story .site-main { margin-bottom: 52px; }
body.admin-bar { height: calc(100svh - 32px); }
.content-scroll-cue { width: 32px; height: 40px; }
body.single-cynergen_story .content-scroll-cue { bottom: calc(var(--site-footer-height, 64px) + 3.5rem); }
.story-filter-option { cursor: pointer; }
.story-filter-option[aria-disabled="true"] { cursor: pointer; }
.story-filter-groups { gap: clamp(.6rem, 1.44vw, 1.44rem); }
.language-switch { flex: 0 0 auto; margin-left: 0; }
.language-switch a { border: 0; }
@media (max-width: 1000px) {
  .footer-inner { flex-wrap: wrap; }
  .footer-meta { margin-left: auto; }
}
@media (max-width: 820px) {
  .header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 .5rem; }
  .header-inner > .brand { grid-column: 1; }
  .header-inner > .language-switch { grid-column: 2; grid-row: 1; }
  .primary-nav { grid-column: 1 / -1; }
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; gap: .2rem .75rem; padding-block: .6rem; }
  .footer-identity { flex-wrap: wrap; gap: .25rem .6rem; }
  .footer-meta { text-align: left; justify-content: flex-start; margin-left: 0; }
  .footer-contact-row { justify-content: flex-start; }
  .hero h1 { font-size: clamp(2rem, 7vw, 3.6rem); }
  .story-tools.is-filter-complete { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 782px) {
  body.admin-bar { height: calc(100svh - 46px); }
}
@media (max-width: 480px) {
  .footer-inner { display: grid; }
  .header-inner, .footer-inner { width: calc(100% - 32px); }
  .footer-identity { flex-wrap: nowrap; }
  .footer-identity p { white-space: nowrap; font-size: .7rem; }
  .footer-meta { flex-wrap: nowrap; }
  .footer-identity .wordmark { font-size: 1rem; }
  .footer-inner p { font-size: .76rem; }
  .footer-meta { gap: 0 .75rem; }
  .story-filter-option { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
  .story-filter-intro p { white-space: normal; }
  .story-back-link { font-size: .85rem; }
  .story-filter-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .story-filter-group legend { font-size: .7rem; letter-spacing: .04em; }
  .story-filter-option { font-size: .9rem; }
}

/* WebWork v0.6.6: shared rules for the initial and filtered archive. */
:root { --link-stroke: 1px; }
html:has(body.admin-bar) { margin-top: 0 !important; }
body.admin-bar { position: relative; top: 32px; }
.site-header, .site-footer { border: 0; }
.header-inner { min-height: 68.8px; }
.primary-nav a { padding-block: 1rem; }
.primary-nav a::after { bottom: 1.08rem; }
.site-main :is(h1, h2, h3) { position: relative; left: var(--heading-inline-adjust, 0px); margin-inline-start: 0; padding-inline-start: 0; }
a, .link-label, .story-filter-option { text-decoration-thickness: var(--link-stroke); text-decoration-skip-ink: none; }
.story-card h2 a { text-underline-offset: .4em; }
.story-filter-groups { gap: clamp(.42rem, 1.008vw, 1.008rem); }
.story-filter-group legend { margin-bottom: .455rem; }
.story-filter-list { gap: .084rem; }
.story-filter-option { display: flex; align-items: baseline; gap: .25em; min-height: 28px; padding-block: .231rem; }
.filter-label { min-width: 0; }
.story-filter-intro { margin-top: .875rem; }
.story-filter-intro p { white-space: normal; }
.filter-count { flex: 0 0 auto; color: #9199a0; font: inherit; font-size: 66.666667%; white-space: nowrap; }
.story-filter-option[aria-pressed="true"] { text-decoration: none; }
.story-filter-option[data-selection="explicit"] .filter-label { text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: var(--link-stroke); text-underline-offset: .32em; text-decoration-skip-ink: none; }
.story-filter-option[aria-disabled="true"] { cursor: default; }
.story-filter-option[aria-disabled="true"]:hover { color: var(--navy-deep); }
.story-card { --card-padding: clamp(.85rem, 1.4vw, 1.3rem); padding: var(--card-padding); }
.story-card > :last-child, .story-card > :last-child > :last-child { margin-bottom: 0; }
.footer-identity { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .6rem; }
.footer-meta { margin-left: auto; }
.footer-contact-row { justify-content: flex-start; }
@media (max-width: 820px) {
  .header-inner { min-height: auto; padding-top: .4rem; }
  .primary-nav a { padding-block: .52rem; }
  .primary-nav a::after { bottom: .36rem; }
}
@media (max-width: 600px) {
  .story-filter-option { min-height: 30.8px; }
  .story-card { --card-padding: 1.5rem; }
}
@media (max-width: 782px) {
  body.admin-bar { top: 46px; }
}
@media (max-width: 480px) {
  .story-filter-groups { gap: .7rem; }
  .footer-inner { display: flex; flex-wrap: wrap; }
  .footer-identity { flex-wrap: wrap; }
  .footer-identity p { white-space: normal; }
  .footer-meta { margin-left: auto; text-align: right; }
}

/* WebWork v0.6.7: approved follow-up list. */
.site-footer { border-top: 1px solid var(--line); }
.footer-identity > .wordmark { font-size: 1.125rem; }
.story-back-link { left: calc((100% - var(--shell)) / 2); }
.back-arrow { position: relative; left: var(--back-arrow-inline-adjust, 0px); }
.story-detail .story-classification { font-family: var(--font); font-size: 1rem; font-weight: 400; line-height: 1.65; color: var(--ink); letter-spacing: normal; text-transform: none; }
@media (max-width: 480px) {
  .footer-identity > .wordmark { font-size: .9rem; }
  .story-detail .story-classification { font-size: .9rem; }
}

/* WebWork v0.6.8: content-box rhythm and literal footer spacing. */
.story-fact { --fact-padding: clamp(1rem, 2vw, 1.5rem); --fact-line: 1.65rem; align-items: center; padding: var(--fact-padding); }
.story-fact h2 { padding-top: var(--fact-line); line-height: var(--fact-line); }
.story-fact h2::before { line-height: var(--fact-line); }
.footer-copy.footer-contact-row { display: block; }
.footer-copy.footer-contact-row a { display: inline; min-height: 0; }
@media (max-width: 600px) {
  .story-fact { --fact-padding: 1.5rem; }
}

/* 23.10.2026 N01-N03: baseline, mirrored cue, larger anchored brand. */
.footer-inner, .footer-identity, .footer-meta { align-items: baseline; }
.footer-identity > .wordmark { line-height: 1.65; }
.header-inner > .brand { transform: scale(1.18); transform-origin: top left; margin-right: 2.4rem; }
@media (max-width: 820px) {
  .header-inner > .brand { transform: scale(1.18); margin-bottom: .48rem; }
}

/* V03: the fixed back link remains entirely unadorned. */
.story-back-link .link-label { text-decoration: none; }

.header-inner > .brand { width: max-content; justify-self: start; }

/* 23.10.2026: phone usability and tighter insight content boxes. */
.story-fact { --fact-line: 1.25rem; padding-block: calc(var(--fact-padding) * .55); }
@media (max-width: 600px) {
  :root { --content-gutter: 20px; }
  .header-inner, .footer-inner { width: calc(100% - 32px); }
  .primary-nav { width: 100%; overflow: visible; }
  .primary-nav .menu { width: 100%; min-width: 0; flex-wrap: wrap; justify-content: flex-start; gap: 0 .9rem; }
  .primary-nav a { min-height: 44px; padding-block: .4rem; font-size: .875rem; white-space: nowrap; }
  .primary-nav a::after { bottom: .35rem; }
  .story-filter-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; }
  .story-filter-group legend { font-size: .72rem; letter-spacing: .055em; line-height: 1.4; margin-bottom: .3rem; }
  .story-filter-option { min-height: 44px; font-size: .95rem; line-height: 1.35; padding-block: .45rem; align-items: baseline; gap: .28em; }
  .story-filter-list { gap: .08rem; }
  .filter-label { overflow-wrap: normal; hyphens: auto; }
  .story-filter-intro { margin-top: 1rem; }
  .story-filter-intro p { font-size: .9rem; line-height: 1.5; }
  .story-detail > .page-intro { padding-block: 2rem 1.5rem; }
  .story-detail > .page-intro h1 { font-size: clamp(1.5rem, 6vw, 2rem); line-height: 1.2; }
  .story-fact { --fact-padding: 16px; padding-inline: var(--fact-padding); padding-block: 12px; gap: .5rem; }
  .story-fact h2 { font-size: .88rem; letter-spacing: .055em; }
  .story-fact p { font-size: .95rem; line-height: 1.5; }
  .story-card { --card-padding: 16px; }
  .content-scroll-cue { width: 24px; }
}


/* Proofing 261027, 28.10.2026: shared heading hierarchy; ID 1 footer retained. */
:root {
  --proof-h1: clamp(2.38rem, 4.59vw, 4.08rem);
  --proof-h2: clamp(1.7rem, 2.35vw, 2.8rem);
  --proof-h3: 1.3rem;
}
.site-main h1, .site-main .hero h1, .site-main .page-intro h1 {
  max-width: 100%; font-size: var(--proof-h1); line-height: 1.13;
  overflow-wrap: normal; word-break: normal; hyphens: none; -webkit-hyphens: none;
  text-wrap: balance;
}
.site-main h2, .site-main .steps h2, .site-main .story-card h2,
.site-main .story-fact h2, .site-main .story-empty h2 {
  font-size: var(--proof-h2); line-height: 1.15;
  overflow-wrap: normal; word-break: normal; hyphens: none; -webkit-hyphens: none;
  text-wrap: balance;
}
.site-main h3 { font-size: var(--proof-h3); line-height: 1.2; overflow-wrap: normal; word-break: normal; hyphens: none; -webkit-hyphens: none; }
.steps article { padding: clamp(1.5rem, 2.5vw, 2.5rem); }
.story-fact h2 { padding-top: 1.5rem; }
.story-fact h2::before { line-height: 1.25rem; }
.hero .signal-mark { transform: translateY(-.5rem); }
.page-intro-marked { gap: 1.5rem; }
.page-intro-marked > div { min-width: 0; flex: 1; }
.page-intro-marked > img { width: 128px; flex: 0 0 128px; }
.role-grid .role-intro { padding-left: 0; padding-right: 0; }
.company-tagline { display: inline-block; margin-top: .18em; font-size: clamp(1.65rem, 3vw, 2.55rem); line-height: 1.2; letter-spacing: -.025em; }
.header-inner > .brand .wordmark { font-size: 1.5rem; transform: translateY(2px); }
.primary-nav .menu-item-language { align-self: center; }
.primary-nav .menu-item-language > a {
  display: inline-grid; place-items: center; width: 2.4em; height: 2.4em;
  min-height: 0; padding: .3em; border: 1px solid var(--green); line-height: 1;
}
.primary-nav .menu-item-language > a::after { display: none; }
.primary-nav .menu-item-language > a::before { content: ""; position: absolute; inset: -5px; }
@media (max-width: 820px) {
  :root { --proof-h1: clamp(1.6rem, 5.6vw, 3.06rem); --proof-h2: clamp(1.36rem, 3.4vw, 2.4rem); --proof-h3: 1.2rem; }
}
@media (max-width: 600px) {
  :root { --proof-h1: clamp(1.25rem, 6.4vw, 1.6rem); --proof-h2: clamp(1.36rem, 5.58vw, 1.76rem); --proof-h3: 1.1rem; }
  .site-main h1, .site-main .hero h1, .site-main .page-intro h1 { margin-bottom: 1rem; }
  .site-main h2, .site-main .steps h2, .site-main .story-card h2,
  .site-main .story-fact h2, .site-main .story-empty h2, .site-main h3 { margin-bottom: .75rem; }
  .site-main p, .site-main .prose p, .site-main .story-fact p, .site-main .story-filter-intro p { line-height: 1.325; }
  .site-main .split { gap: .75rem; }
  .site-main .split > div > h2:last-child { margin-bottom: 0; }
  .site-main .prose > p:last-child { margin-bottom: 0; }
  .site-main .section-index, .site-main .step-number, .site-main .role-label { margin-bottom: .5rem; }
  .story-archive-lead { margin-top: 0; }
  .steps article { padding: 1.5rem; }
  .story-fact h2 { margin-bottom: 0; }
  .company-tagline { font-size: clamp(1.05rem, 4.6vw, 1.35rem); line-height: 1.25; }
}
@media (max-width: 480px) {
  .header-inner > .brand .wordmark { font-size: 1.344rem; transform: translateY(1.792px); }
}

/* Proofing ID32–33, 4.11.2026: shared text edge and matching home panels. */
.site-main :is(.eyebrow, .story-kicker, .section-index, .role-label, .step-number) { position: relative; left: var(--heading-inline-adjust, 0px); }
.home .section.shell.split { padding: 0; gap: 1px; border: 1px solid var(--line); background: var(--line); }
.home .section.shell.split > div { min-width: 0; max-width: none; padding: clamp(2rem, 5vw, 4.5rem); background: var(--white); }
.home .role-grid .role-intro { padding-inline: clamp(2rem, 5vw, 4.5rem); }
@media (max-width: 480px) { .home .section.shell.split > div, .home .role-grid .role-intro { padding: 1.6rem; } }

/* All heading levels: preserve whole words on desktop and mobile. */
.site-main :is(h1,h2,h3,h4,h5,h6) { hyphens: none !important; -webkit-hyphens: none !important; word-break: normal; overflow-wrap: normal; }

/* Shared EN/FI frame: fixed width, closer horizontal edges. */
.primary-nav .menu-item-language > a { width: 1.895em !important; min-width: 1.895em !important; height: 1.5em !important; min-height: 1.5em !important; padding: 0 !important; border-color: transparent; }

/* Keep the navigation baseline; raise only the frame top by 1px. */
.primary-nav .menu-item-language > a::after { content: ""; display: block; position: absolute; inset: -2px -1.5px -2px -1px; width: auto; height: auto; border: 1px solid var(--green); background: transparent; transform: none; pointer-events: none; }

/* Optical EN centring; FI retains its existing centring. */
.primary-nav .menu-item-language > a[lang="en"] { padding-left: 1px !important; }

/* Company introduction: retain portrait dimensions; place full copy beside it. */
@media (min-width: 821px) {
 .page-id-10 .page-intro { padding-block: 24px 16px; }
 .page-id-10 .page-intro h1 { margin-bottom: 0; }
 .page-id-10 .content-page { padding-bottom: 16px; }
 .page-id-10 .content-page > .prose:has(.cynergen-founder) { max-width: none; }
 .page-id-10 .cynergen-founder { grid-template-columns: min(395.2px, 38%) minmax(0, 1fr) !important; gap: clamp(2rem, 3.5vw, 3rem); margin-block: 0; align-items: start !important; }
 .page-id-10 .cynergen-founder .wp-block-media-text__media { margin: 0; }
 .page-id-10 .cynergen-founder .wp-block-media-text__content { align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; }
 .page-id-10 .cynergen-founder .wp-block-media-text__content p { line-height: 1.65; margin-block: 0; }
 .page-id-10 .cynergen-founder .wp-block-media-text__content p:last-child { margin-bottom: 0; }
}
