:root {
  --bf-bg: #ffecaa;
  --bf-text: #001355;
  --bf-border: #ccc5a4;
  --bf-heading: #001355;
  --bf-accent: #001355;
  --bf-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  --bf-success: #198754;
  --bf-warning: #f0ad4e;
  --bf-muted: #6c757d;
}
.fade-in {
  animation: fadeIn 1s ease-in-out both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.tm-nipo-block {
  background: var(--bf-bg);
  color: var(--bf-text);
  border: 1px solid var(--bf-border);
  border-radius: 12px;
  padding: 20px 32px;
  font-family: 'Segoe UI', sans-serif;
  box-shadow: var(--bf-shadow);
  max-width: 720px;
  margin: 2rem auto;
  line-height: 1.6;
}
.tm-nipo-block h2 {
  color: var(--bf-heading);
  border-left: 6px solid var(--bf-accent);
  padding-left: 12px;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.tm-nipo-block h3 {
  color: var(--bf-heading);
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--bf-border);
  padding-bottom: 4px;
}
.tm-nipo-block img.tm-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 16px 0;
  border: 1px solid var(--bf-border);
}
.tm-nipo-timeline {
  display: flex;
  overflow-x: auto;
  gap: 24px;
  padding: 16px 0;
  margin-bottom: 16px;
}
.tm-timeline-stage {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 100px;
}
.tm-stage-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
}
.tm-stage-label {
  font-size: 0.9rem;
}
.tm-nipo-stage--done .tm-stage-icon { color: var(--bf-success); }
.tm-nipo-stage--current .tm-stage-icon { color: var(--bf-warning); }
.tm-nipo-stage--not-active .tm-stage-icon { color: var(--bf-muted); }
.tm-nipo-services {
  max-height: 260px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--bf-border);
  padding: 12px 16px;
  border-radius: 8px;
}
.tm-nipo-block a {
  color: var(--bf-accent);
  text-decoration: underline;
}
.tm-nipo-block a:hover {
  color: #0033aa;
}
.tm-source {
  font-size: 0.85em;
  color: var(--bf-muted);
  margin-top: 1rem;
}
.tm-progress {
  background: #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  margin: 1rem 0;
  height: 14px;
}
.tm-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #001355, #3349a0);
  transition: width 0.6s ease;
}
@media screen and (max-width: 600px) {
  .tm-nipo-block { padding: 12px 16px; }
  .tm-nipo-block h2 { font-size: 1.25rem; }
}

.tm-readiness-box {
  margin-bottom: 2rem;
  padding: 12px 16px;
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  text-align: center;
}
.tm-readiness-bar {
  width: 100%;
  height: 14px;
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 8px;
  margin-bottom: 8px;
}
.tm-readiness-fill {
  height: 100%;
  background: linear-gradient(90deg, #001355, #3366cc);
  transition: width 1s ease-in-out;
}
.tm-readiness-text {
  font-weight: bold;
  color: #001355;
  margin-top: 4px;
}


/* === Борисфен - розширене відображення TM + етапів === */

.tm-image-stages-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 16px;
  margin-bottom: 24px;
}

.tm-image-smaller {
  width: 200px;
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid var(--bf-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tm-timeline-side {
  flex: 1;
  min-width: 260px;
  background: rgba(255, 255, 255, 0.6);
  padding: 12px;
  border: 1px dashed var(--bf-border);
  border-radius: 12px;
}

.tm-timeline-side h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--bf-heading);
}

.tm-nipo-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 8px 0;
}

.tm-timeline-stage {
  flex: 0 0 auto;
  text-align: center;
  min-width: 90px;
  padding: 4px;
}

.tm-stage-icon {
  font-size: 1.4rem;
}

@media (max-width: 768px) {
  .tm-image-stages-wrapper {
    flex-direction: column;
    align-items: center;
  }
  .tm-timeline-side {
    width: 100%;
  }
}

.tm-stage-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.tm-stage-label {
  font-size: 0.95rem;
  text-align: left;
}