/* MOONSYS SOFT site styles.
   Rules marked COMPLIANCE implement the EU / Regio Nord-Est visibility rules and must hold. */

:root {
  --ink: #131a26;
  --muted: #4a5466;
  --paper: #ffffff;
  --soft: #f5f7fb;
  --tint: #eef2fa;
  --line: #d8deea;
  --line-strong: #b8c4dc;
  --accent: #003399; /* Reflex Blue, RGB 0-51-153 (MIV p.12) */
  --accent-deep: #00246e;
  --navy: #0b1a40;
  --on-dark: #e8edf7;
  --on-dark-muted: #b9c4dc;
  --yellow: #ffcc00;
  --max: 72rem;
  --read: 44rem;
  --gutter: clamp(16px, 4vw, 32px); /* px: a large text setting must not eat the line length */
  --radius: 0.75rem;
  --card-pad: clamp(1.1rem, 2.5vw, 1.75rem);
  --shadow: 0 1px 2px rgba(11, 26, 64, 0.06), 0 8px 24px -12px rgba(11, 26, 64, 0.18);
  /* COMPLIANCE: px, not rem, so a large text setting never pushes the logo strip past the viewport.
     48px is above the EU emblem minimum of 1 cm (MIV p.14). */
  --logo-h: 48px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); overflow-wrap: break-word; }
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
/* Hyphenate only where lines are short; wide columns read better unbroken. */
@media (max-width: 36em) {
  p, li, dd { hyphens: auto; }
  .lead, .hero p { hyphens: manual; }
}

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
main:focus-visible { outline: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -6rem; z-index: 10;
  background: var(--paper); color: var(--accent); font-weight: 700;
  padding: 0.75rem 1rem; border: 2px solid var(--accent); border-radius: 0.5rem;
}
.skip-link:focus { top: 0.5rem; }

/* ---------- Header ---------- */

/* Quiet but readable: muted ink on a pale strip, 7:1. */
.draft-notice {
  margin: 0; padding: 0.4rem max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  background: var(--soft); border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 0.8125rem; line-height: 1.45; hyphens: manual;
}
.draft-notice::before {
  content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.5rem;
  border-radius: 50%; background: #c99a00; vertical-align: 0.05em;
}

/* COMPLIANCE: mandatory logo set first, on white, visible without scrolling (MIV p.28);
   order UE, Guvern, Regio, ADR (MIV p.19); one height for all, so the EU emblem is never
   smaller than another logo (RDC Annex IX 1.7); clear space of half the logo height
   around the EU logo on every side (MIV p.14), including the row gap when the strip wraps. */
.funding-band { background: var(--paper); border-bottom: 1px solid var(--line); }
.funding-logos {
  max-width: var(--max); margin: 0 auto;
  padding: calc(var(--logo-h) * 0.5) max(var(--gutter), calc(var(--logo-h) * 0.5));
  display: flex; flex-wrap: wrap; align-items: center;
  gap: calc(var(--logo-h) * 0.5) calc(var(--logo-h) * 0.5);
}
.funding-logos .logo { display: block; height: var(--logo-h); width: auto; max-width: none; flex: none; }
/* COMPLIANCE (RDC Annex IX 1.7): in ue-cofinantat.png the flag fills 182 of 192 px rows, so the image is
   scaled up until the flag itself is --logo-h tall, never shorter than another logo. */
.funding-logos .logo-ue { height: calc(var(--logo-h) * 192 / 182); }
@media (min-width: 1024px) {
  :root { --logo-h: 56px; }
  .funding-logos { column-gap: calc(var(--logo-h) * 0.75); }
}
@media (max-width: 480px) {
  :root { --logo-h: 40px; } /* still above the 1 cm minimum */
}
/* COMPLIANCE: below 260 CSS px (a phone at browser zoom 200 %) the band wraps into two rows of two
   (UE + Guvern, Regio + ADR) with no horizontal scroll. 24 CSS px at that zoom is about 1.3 cm on
   screen, above the 1 cm minimum; clear space stays half the logo height. */
@media (max-width: 260px) {
  :root { --logo-h: 24px; }
}

.bar-band { background: var(--paper); border-bottom: 1px solid var(--line); }
.bar {
  max-width: var(--max); margin: 0 auto; padding: 0.5rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.65rem; min-height: 44px;
  text-decoration: none; color: var(--navy);
}
.brand-mark { width: 28px; height: 28px; flex: none; color: var(--accent); }
.brand-name { font-weight: 800; font-size: 1rem; letter-spacing: 0.18em; }

.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 0.25rem; }
.menu li { margin: 0; }
.menu a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 0.85rem;
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem;
  border-radius: 0.5rem; box-shadow: inset 0 -3px 0 transparent;
}
.menu a:hover { color: var(--accent); background: var(--soft); }
.menu a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0.5rem 0.5rem 0 0; }

.menu-toggle {
  min-height: 44px; min-width: 44px; padding: 0.5rem 0.9rem;
  border: 1px solid var(--line-strong); border-radius: 0.5rem; background: var(--paper); color: var(--ink);
  font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 0.6rem;
}
.menu-toggle[hidden] { display: none !important; }
.menu-toggle:hover { border-color: var(--accent); color: var(--accent); }
.menu-toggle-icon, .menu-toggle-icon::before, .menu-toggle-icon::after {
  display: block; width: 1.1rem; height: 2px; background: currentColor; position: relative; border-radius: 1px;
}
.menu-toggle-icon::before, .menu-toggle-icon::after { content: ""; position: absolute; left: 0; }
.menu-toggle-icon::before { top: -6px; }
.menu-toggle-icon::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon::after { top: 0; transform: rotate(-45deg); }

/* Mobile menu: only collapses when JS is present (menu.js adds .js); without JS the list stays visible. */
@media (max-width: 47.99em) {
  .js .site-nav { display: contents; }
  .js .menu { display: none; flex-direction: column; width: 100%; gap: 0; padding: 0.25rem 0 0.5rem; }
  .js .menu.is-open { display: flex; }
  .js .menu a {
    width: 100%; min-height: 48px; padding: 0 0.75rem; border-radius: 0;
    border-top: 1px solid var(--line); box-shadow: inset 3px 0 0 transparent;
  }
  .js .menu a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--accent); background: var(--tint); border-radius: 0; }
}
@media (min-width: 48em) {
  .menu-toggle { display: none !important; }
}

/* ---------- Content ---------- */

main { max-width: var(--max); margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) var(--gutter) clamp(3rem, 6vw, 5rem); }
main > * { max-width: var(--read); }

h1, h2, h3 { color: var(--navy); text-wrap: balance; }
h1 { font-size: clamp(1.85rem, 1.2rem + 2.6vw, 3rem); line-height: 1.12; letter-spacing: -0.015em; margin: 0.35rem 0 1rem; }
h2 { font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem); line-height: 1.25; letter-spacing: -0.01em; margin: 2.75rem 0 0.9rem; }
h3 { font-size: 1.05rem; line-height: 1.35; margin: 1.5rem 0 0.5rem; }
.eyebrow {
  margin: 0; color: var(--accent); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 0.8rem;
}
.eyebrow::before {
  content: ""; display: inline-block; vertical-align: middle; width: 1.75rem; height: 3px;
  margin: -0.15em 0.6rem 0 0; background: currentColor; border-radius: 2px;
}
.lead { font-size: clamp(1.08rem, 1rem + 0.35vw, 1.25rem); line-height: 1.55; color: var(--ink); }

ul, ol { padding-left: 1.35rem; }
li { margin-bottom: 0.45rem; }
li::marker { color: var(--accent); font-weight: 700; }

.page-head { padding-bottom: 1.5rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line); }
.page-head .lead { margin-bottom: 0; }
.page-head .download { margin: 1.25rem 0 0; }

.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.65rem 1.25rem;
  border-radius: 0.5rem; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none;
  border: 2px solid var(--accent); line-height: 1.25; text-align: center;
}
.button:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.button-secondary { background: var(--paper); color: var(--accent); }
.button-secondary:hover { background: var(--tint); color: var(--accent-deep); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 0; }

/* Fact list: label / value rows. */
.fact-list { margin: 0; display: grid; border-top: 2px solid var(--accent); }
.fact-list > div {
  display: grid; grid-template-columns: minmax(8rem, 15rem) minmax(0, 1fr); gap: 0.15rem 1.5rem;
  padding: 0.75rem 0; border-bottom: 1px solid var(--line);
}
.fact-list dt { font-weight: 600; color: var(--muted); }
.fact-list dd { margin: 0; overflow-wrap: anywhere; }
.fact-list address { font-style: normal; }
@media (max-width: 36em) { .fact-list > div { grid-template-columns: minmax(0, 1fr); } }

mark.todo {
  background: #ffe27a; color: #3a2b00; padding: 0.05em 0.35em; border-radius: 0.25em; font-weight: 700;
  outline: 1px dashed #8a6500; outline-offset: 1px; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

.source-note { color: var(--muted); font-size: 0.9rem; }

/* Shared line icon for the four services. */
.service-icon {
  flex: none; width: 2.75rem; height: 2.75rem; padding: 0.6rem; border-radius: 0.65rem;
  background: var(--tint); color: var(--accent);
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.service-icon .icon-bar { stroke-width: 2.5; }

/* Closing call to action: navy card, used on several pages. */
.contact-call {
  margin-top: clamp(2.5rem, 5vw, 4rem); padding: var(--card-pad) var(--card-pad) calc(var(--card-pad) + 0.25rem);
  border-radius: var(--radius); background: var(--navy); color: var(--on-dark);
  background-image: radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.09) 0, rgba(255, 255, 255, 0) 45%);
}
.contact-call h2 { color: #fff; margin-top: 0; }
.contact-call p { max-width: var(--read); margin-bottom: 0; }
.contact-call a:not(.button) { color: #fff; font-weight: 600; }
.contact-call .actions { margin-top: 1.25rem; }
.contact-call .button { background: #fff; color: var(--navy); border-color: #fff; }
.contact-call .button:hover { background: var(--tint); border-color: var(--tint); }
.contact-call :focus-visible { outline-color: var(--yellow); }

/* ---------- Home ---------- */

main > .hero, main > .mm-banner, main > .services-summary, main > .flow-summary, main > .contact-call { max-width: none; }
.hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 2rem;
  padding: clamp(20px, 5vw, 56px); border-radius: var(--radius);
  background-color: var(--navy);
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.5px),
    linear-gradient(135deg, var(--navy) 0%, var(--accent-deep) 100%);
  background-size: 22px 22px, auto;
  color: #fff;
}
.hero h1 { color: #fff; max-width: 22ch; margin-bottom: 0.85rem; hyphens: auto; overflow-wrap: break-word; }
.hero .eyebrow { color: var(--yellow); }
.hero .lead { color: var(--on-dark); max-width: 40rem; margin-bottom: 0; }
.hero .actions { margin-top: 1.5rem; }
.hero .button { background: #fff; color: var(--navy); border-color: #fff; }
.hero .button:hover { background: var(--tint); border-color: var(--tint); }
.hero .button-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.hero .button-secondary:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.hero :focus-visible, .legal-band :focus-visible { outline-color: var(--yellow); }
.hero-art { display: none; }
.hero-orbit { fill: none; stroke: rgba(255, 255, 255, 0.28); stroke-width: 1.5; stroke-dasharray: 3 7; }
.hero-orbit-inner { stroke: rgba(255, 255, 255, 0.14); stroke-dasharray: none; }
.hero-links { fill: none; stroke: rgba(255, 255, 255, 0.22); stroke-width: 1.25; }
.hero-hub { fill: var(--yellow); }
.hero-node { fill: #fff; }
.hero-node-first { fill: var(--yellow); }
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr) 15rem; gap: 3rem; }
  .hero-art { display: block; width: 15rem; height: auto; }
}

/* MindMerge banner: a distinct, lighter project block. The emblem sits on white, unaltered. */
.mm-banner {
  margin-top: clamp(1rem, 2.5vw, 1.75rem);
  border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--tint);
}
.mm-emblem-panel {
  background: var(--paper); border-bottom: 1px solid var(--line);
  padding: 0.85rem var(--card-pad);
}
/* Width-driven so a narrow viewport (zoom 200 %) scales the emblem down instead of clipping it. */
.mm-emblem { display: block; width: min(100%, calc(48px * 895 / 192)); height: auto; max-width: 100%; }
.mm-text { padding: clamp(1.1rem, 2.5vw, 1.75rem) var(--card-pad) var(--card-pad); }
.mm-text h2 { margin: 0.6rem 0 0.6rem; max-width: 34ch; }
.mm-text > p:not(.eyebrow):not(.actions) { max-width: var(--read); margin: 0; color: var(--ink); }
.mm-facts {
  margin: 1.25rem 0 0; padding: 0; display: grid; gap: 0.9rem 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
}
.mm-facts > div { padding: 0.1rem 0.75rem; border-left: 2px solid var(--accent); }
.mm-facts dt {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); line-height: 1.35;
  overflow-wrap: normal; hyphens: manual;
}
.mm-facts dd { margin: 0.15rem 0 0; font-weight: 600; color: var(--navy); line-height: 1.4; overflow-wrap: anywhere; }
.mm-banner .actions { margin: 0.9rem 0 1rem; }
/* Three columns on tablets (3 + 2), one row of five on wide screens. */
@media (min-width: 36em) and (max-width: 59.99em) {
  .mm-facts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
}
@media (min-width: 60em) {
  .mm-emblem { width: min(100%, calc(56px * 895 / 192)); }
  .mm-facts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); }
}

.services-summary > h2, .flow-summary > h2 { margin-top: clamp(2.5rem, 5vw, 4rem); }
.service-cards {
  list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem;
  /* Never more than two columns: the titles stay on one or two lines. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, max(20rem, 40%)), 1fr));
}
.service-card {
  position: relative; margin: 0; display: flex; flex-direction: column; gap: 0.85rem;
  padding: var(--card-pad); padding-right: calc(var(--card-pad) + 1.5rem);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.service-card h3 { margin: 0; font-size: 1.125rem; }
.service-card h3 a { color: var(--navy); text-decoration: none; }
/* The whole card is the link target. */
.service-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.service-card p { margin: 0; color: var(--muted); }
.service-card::after {
  content: ""; position: absolute; right: var(--card-pad); top: calc(var(--card-pad) + 1.15rem);
  width: 0.6rem; height: 0.6rem; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent);
  transform: rotate(45deg);
}
.service-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.service-card:hover h3 a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; }
.service-card:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.service-card h3 a:focus-visible { outline: none; }

/* Compact workflow: vertical stepper on small screens, horizontal at 48em. */
.flow-summary { padding: var(--card-pad); background: var(--soft); border-radius: var(--radius); margin-top: clamp(2.5rem, 5vw, 4rem); }
.flow-summary > h2 { margin-top: 0; }
.flow-summary > p:last-child { margin: 1.25rem 0 0; }
.flow-summary > p:last-child a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.flow-compact { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.flow-compact li {
  counter-increment: step; position: relative; margin: 0; padding: 0 0 0.9rem;
  display: flex; align-items: center; gap: 0.85rem; width: fit-content; max-width: 100%;
}
.flow-compact li::before {
  content: counter(step); flex: none; position: relative; z-index: 1;
  width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); border: 2px solid var(--accent); color: var(--accent); font-weight: 800; font-size: 0.95rem;
}
.flow-compact li::after {
  content: ""; position: absolute; left: calc(1.125rem - 1px); top: 2.25rem; bottom: 0; width: 2px; background: var(--line-strong);
}
.flow-compact li:last-child { padding-bottom: 0; }
.flow-compact li:last-child::after { display: none; }
.flow-compact strong { color: var(--navy); line-height: 1.3; }
.flow-compact .flow-loop::before { background: var(--accent); color: #fff; }
.flow-compact .flow-loop { padding-right: 2.25rem; }

/* Return arrow from step 4 back to step 3 (vertical layout): a dashed bracket on the right. */
.flow-loop-mark {
  position: absolute; right: 0.25rem; top: 1.125rem; width: 1.1rem;
  height: 100%;
  border: 2px dashed var(--accent); border-left: 0; border-radius: 0 0.6rem 0.6rem 0;
}
.flow-loop-mark::after {
  content: ""; position: absolute; left: -7px; top: -6px;
  border-style: solid; border-width: 5px 7px 5px 0; border-color: transparent var(--accent) transparent transparent;
}
@media (min-width: 48em) {
  .flow-compact { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 0.5rem; }
  .flow-compact li {
    flex-direction: column; text-align: center; width: auto; padding: 1.9rem 0 0; gap: 0.6rem;
  }
  .flow-compact li::before { width: 2.75rem; height: 2.75rem; font-size: 1.05rem; }
  .flow-compact li::after {
    left: 50%; right: auto; top: calc(1.9rem + 1.375rem - 1px); bottom: auto; width: calc(100% + 0.5rem); height: 2px;
  }
  .flow-compact .flow-loop { padding-right: 0; }
  /* Horizontal layout: the bracket arcs above circles 3 and 4 and points down into 3. */
  .flow-compact .flow-loop-mark {
    right: auto; left: 50%; top: 0.35rem; width: calc(100% + 0.5rem); height: 1.25rem;
    border: 2px dashed var(--accent); border-bottom: 0; border-radius: 0.6rem 0.6rem 0 0;
  }
  .flow-compact .flow-loop-mark::after {
    left: -6px; top: auto; bottom: -7px;
    border-width: 7px 5px 0 5px; border-color: var(--accent) transparent transparent transparent;
  }
}

/* ---------- Servicii ---------- */

main > .services { max-width: none; }
.services .page-head > * { max-width: var(--read); }
.service-index ul {
  list-style: none; padding: 0; margin: 1.5rem 0 0; counter-reset: svc;
  display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.service-index { max-width: none !important; }
.services .page-head .service-index ul { max-width: none; }
.service-index li { margin: 0; counter-increment: svc; }
.service-index a {
  display: flex; align-items: center; gap: 0.65rem; min-height: 48px; height: 100%; padding: 0.5rem 0.9rem;
  border: 1px solid var(--line); border-radius: 0.5rem; background: var(--paper);
  color: var(--navy); font-weight: 600; text-decoration: none; line-height: 1.3;
}
.service-index a::before {
  content: counter(svc, decimal-leading-zero); color: var(--accent); font-weight: 800; font-size: 0.85rem; letter-spacing: 0.04em;
}
.service-index a:hover { border-color: var(--accent); background: var(--tint); }

.services { counter-reset: service; }
.service {
  counter-increment: service; scroll-margin-top: 1rem;
  padding: var(--card-pad); margin-top: 1.25rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
}
@media (max-width: 36em) { .service { padding: 1.1rem 1rem 1.25rem; } }
.service-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
.service-head h2 { margin: 0; flex: 1 1 12rem; min-width: 0; }
.service-head::after { display: none; }
@media (min-width: 48em) { .service-head::after { display: block; } }
.service-head::after {
  content: counter(service, decimal-leading-zero) / ""; margin-left: auto; align-self: flex-start;
  color: #7c89a6; /* 3.6:1, large bold text */ font-weight: 800; font-size: 1.5rem; letter-spacing: 0.04em; line-height: 1;
}
.service > h3 { margin-top: 1.5rem; }
.service > p { max-width: var(--read); }
.service h3 {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent);
}
.service-cols { display: grid; gap: 1rem 2.5rem; }
@media (min-width: 56em) { .service-cols { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.service-steps ol { list-style: none; padding: 0; margin: 0; counter-reset: sstep; }
.service-steps li {
  counter-increment: sstep; position: relative; margin: 0; padding: 0 0 0.85rem 2.5rem; min-height: 1.75rem;
}
.service-steps li::before {
  content: counter(sstep); position: absolute; left: 0; top: 0;
  width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--accent); color: var(--accent); font-weight: 800; font-size: 0.8rem; background: var(--paper);
}
.service-steps li:last-child { padding-bottom: 0; }
.service-get { background: var(--tint); border-radius: 0.6rem; padding: 0.25rem 1.25rem 1.1rem; align-self: start; }
.service-get ul { list-style: none; padding: 0; margin: 0; }
.service-get li { position: relative; padding-left: 1.75rem; }
.service-get li:last-child { margin-bottom: 0; }
.service-get li::before {
  content: ""; position: absolute; left: 0.2rem; top: 0.35em; width: 0.45rem; height: 0.8rem;
  border-right: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(45deg);
}

/* ---------- Cum lucrăm: the workflow diagram ---------- */

main > .how { max-width: 54rem; }
.how .page-head > *, .how .contact-call p { max-width: var(--read); }

.flow:not(.flow-compact) { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.flow-step {
  --node: 2.75rem; --rail: calc(var(--node) + 1rem); --step-gap: 1.25rem;
  --gap-total: var(--step-gap); --mark-y: calc(0.85rem + var(--node) / 2);
  counter-increment: step; position: relative; margin: 0 0 var(--step-gap) var(--rail);
  padding: 1rem 1.25rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
}
.flow-step::before {
  content: counter(step); position: absolute; left: calc(-1 * var(--rail)); top: 0.85rem; z-index: 1;
  width: var(--node); height: var(--node); border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); border: 2px solid var(--accent); color: var(--accent); font-weight: 800; font-size: 1.05rem;
}
/* Connector from this node to the next one. */
.flow-step::after {
  content: ""; position: absolute; left: calc(-1 * var(--rail) + var(--node) / 2 - 1px);
  top: calc(0.85rem + var(--node)); bottom: calc(-1 * var(--gap-total) - 0.85rem); width: 2px; background: var(--line-strong);
}
.flow-step:last-child { margin-bottom: 0; }
.flow-step:last-child::after { display: none; }
.flow-step h2 { margin: 0.3rem 0 0.35rem; font-size: 1.2rem; }
.flow-step p { margin: 0 0 0.6rem; }
.flow-step .flow-out {
  margin: 0.75rem 0 0; padding-top: 0.65rem; border-top: 1px dashed var(--line-strong); color: var(--muted); font-size: 0.95rem;
}
.flow-step .flow-out strong { color: var(--navy); }
/* Steps 3 and 4 repeat: tinted cards, filled nodes, and a return bracket from 4 back to 3. */
.flow-step.flow-loop { background: var(--tint); border-color: var(--line-strong); margin-right: 28px; }
.flow-step.flow-loop::before { background: var(--accent); color: #fff; }
.flow-step .flow-loop-mark {
  right: auto; left: calc(100% + 7px); width: 16px;
  top: var(--mark-y); height: auto; bottom: calc(-1 * var(--gap-total) - var(--mark-y));
}
/* Narrow screens: no side rail; each node straddles the top edge of its card, so the text keeps the full width. */
@media (max-width: 36em) {
  .flow:not(.flow-compact) { padding-top: calc(2.25rem / 2); }
  .flow-step {
    --node: 2.25rem; --gap-total: calc(var(--step-gap) + var(--node) / 2); --mark-y: calc(var(--node) / 2 + 0.75rem);
    margin-left: 0; margin-bottom: var(--gap-total); padding: calc(var(--node) / 2 + 0.6rem) 1rem 1rem;
  }
  .flow-step::before { left: 1rem; top: calc(-1 * var(--node) / 2); }
  .flow-step::after { left: calc(1rem + var(--node) / 2 - 1px); top: 100%; bottom: auto; height: var(--step-gap); }
}

.principles ul {
  list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}
.principles li {
  margin: 0; padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--soft); border-top: 3px solid var(--accent);
}
.principles strong { display: block; color: var(--navy); margin-bottom: 0.2rem; }

/* ---------- Project page ---------- */

.timeline { list-style: none; padding: 0; counter-reset: step; }
.timeline li {
  counter-increment: step; position: relative; margin: 0; padding: 0.35rem 0 1.25rem 3.25rem;
}
.timeline li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); border: 2px solid var(--accent); color: var(--accent); font-weight: 800; font-size: 0.95rem;
}
.timeline li::after {
  content: ""; position: absolute; left: calc(1.125rem - 1px); top: 2.4rem; bottom: 0.15rem; width: 2px; background: var(--line);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline li:first-child::before { background: var(--accent); color: #fff; }
.timeline strong { color: var(--navy); }

.funding-block {
  margin-top: 2.75rem; padding: 0.25rem clamp(1rem, 3vw, 1.75rem) 1.5rem;
  background: var(--soft); border-radius: var(--radius); border: 1px solid var(--line);
}
.funding-block h2 { margin-top: 1.25rem; }

/* Press release: the field list reads as label / value rows. */
.release-facts { list-style: none; padding: 0; margin: 1.5rem 0; border-top: 2px solid var(--accent); }
.release-facts li { margin: 0; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.release-facts strong { color: var(--navy); }
.release-contact {
  margin-top: 2.5rem; padding: 0.25rem var(--card-pad) 1.25rem; background: var(--soft);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.release-contact h2 { margin-top: 1.1rem; font-size: 1.2rem; }
.release-contact p { margin: 0.3rem 0; }

/* ---------- Contact ---------- */

main > .contact { max-width: none; }
.contact .page-head { max-width: var(--read); }
.contact-grid { display: grid; gap: 1.25rem 1.5rem; align-items: start; }
.contact-grid > section {
  padding: 0.25rem var(--card-pad) var(--card-pad); border: 1px solid var(--line); border-radius: var(--radius);
}
.contact-grid h2 { margin-top: 1.1rem; font-size: 1.25rem; }
.contact-grid .source-note { margin-bottom: 0; }
@media (min-width: 64em) { .contact-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- 404 ---------- */

.not-found { padding-block: clamp(1rem, 5vw, 3rem); }
.nf-links { list-style: none; padding: 0; margin: 1.75rem 0 0; border-top: 1px solid var(--line); }
.nf-links li { margin: 0; border-bottom: 1px solid var(--line); }
.nf-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 52px; padding: 0.5rem 0.25rem; font-weight: 600; text-decoration: none;
}
.nf-links a::after {
  content: ""; flex: none; width: 0.55rem; height: 0.55rem;
  border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); margin-right: 0.35rem;
}
.nf-links a:hover { background: var(--tint); }

/* ---------- Footer ---------- */

.site-footer { background: var(--tint); border-top: 1px solid var(--line); }
.funding-strip { max-width: var(--max); margin: 0 auto; padding: 2rem var(--gutter) 1.75rem; }
.funding-strip p { margin: 0 0 0.75rem; max-width: 60rem; }
.funding-project { font-weight: 600; color: var(--navy); }
.funding-program { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem; margin-top: 1.25rem !important; }
.funding-program a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
/* Programme slogan badge: blue on EU yellow, 7.2:1. */
.slogan {
  display: inline-block; background: var(--yellow); color: var(--accent); font-weight: 800;
  padding: 0.3rem 0.9rem; border-radius: 999px; line-height: 1.3;
}

.legal-band { background: var(--navy); color: var(--on-dark); }
.legal { max-width: var(--max); margin: 0 auto; padding: 2rem var(--gutter) 1.5rem; }
.legal a { color: #fff; }
.legal-name { font-weight: 800; letter-spacing: 0.04em; margin: 0 0 0.75rem; color: #fff; }
.legal-data { margin: 0 0 1rem; font-size: 0.95rem; }
.legal-data > div { display: flex; flex-wrap: wrap; gap: 0 0.5rem; }
.legal-data dt { font-weight: 600; color: var(--on-dark-muted); }
.legal-data dt::after { content: ":"; }
.legal-data dd { margin: 0; overflow-wrap: anywhere; }
.footer-nav {
  list-style: none; padding: 0.5rem 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15); border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.footer-nav li { margin: 0; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-nav a[aria-current="page"] { text-decoration-thickness: 2px; }
.legal-note, .copyright { color: var(--on-dark-muted); font-size: 0.875rem; margin: 0.25rem 0; }

.print-only { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Print: a browser print of a page (A4) keeps the logo row and the programme coordinates. ---------- */
@media print {
  /* COMPLIANCE: one row, same order, all logos 15 mm high; 7.5 mm clear space after and below the EU logo.
     The row is checked in the rendered PDF: it ends inside the 182 mm between the page margins. */
  @page { size: A4; margin: 12mm 14mm 12mm; }
  :root { --logo-h: 15mm; font-size: 10pt; line-height: 1.45; }
  body { overflow-wrap: normal; }
  .skip-link, .bar-band, .no-print, .site-footer { display: none !important; }
  .funding-band { border: 0; }
  .funding-logos {
    max-width: none; flex-wrap: nowrap; justify-content: space-between;
    padding: 0 0 calc(var(--logo-h) * 0.5); gap: 0 5mm; border-bottom: 0.4mm solid var(--accent); margin-bottom: 6mm;
  }
  .funding-logos .logo-ue { margin-right: 2.5mm; }
  main { padding: 0; max-width: none; }
  main > * { max-width: none; }
  .page-head { padding-bottom: 0; margin-bottom: 4mm; border: 0; }
  h1 { font-size: 21pt; margin: 1.5mm 0 0; max-width: 165mm; }
  h2 { font-size: 12.5pt; margin: 5mm 0 2mm; break-after: avoid; }
  .eyebrow { font-size: 8pt; }
  .lead { font-size: 11pt; }
  p { margin: 0 0 2.5mm; orphans: 3; widows: 3; }
  ul, ol { margin: 0 0 2.5mm; }
  li { margin-bottom: 1mm; }
  a { color: var(--ink); text-decoration: none; }
  .fact-list > div { padding: 1.6mm 0; grid-template-columns: 62mm 1fr; break-inside: avoid; }
  /* The fact list never splits: with its heading it moves to page 2 whole. */
  .fact-list { display: block; break-inside: avoid; }
  .print-only { display: block; }
  .print-footer {
    margin-top: 6mm; padding-top: 3mm; border-top: 0.4mm solid var(--accent);
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2mm 6mm;
    break-inside: avoid;
  }
  .print-footer p { margin: 0; }
  .print-meta { color: var(--muted); font-size: 9pt; }
  .print-program { font-weight: 600; color: var(--accent); }
  .print-program .slogan { margin-right: 2mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  mark.todo { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
