/* Five mechanism branches, following the RSI road-tree visual language. */
.nfu-roadmap {
  margin: 1.4em 0 1.8em;
  font-size: 13px;
}

.nfu-root-wrap {
  position: relative;
  margin-bottom: 20px;
  text-align: center;
}

.nfu-root {
  display: inline-block;
  max-width: 100%;
  padding: 8px 24px;
  border-radius: 22px;
  background: #1e293b;
  color: #fff;
  font-weight: 600;
  line-height: 1.5;
}

.nfu-root small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 400;
  color: #cbd5e1;
}

.nfu-root-wrap::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 50%;
  width: 1px;
  height: 20px;
  background: #94a3b8;
}

.nfu-branches {
  position: relative;
}

.nfu-branches::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  border-top: 1px solid #94a3b8;
}

.nfu-lanes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.nfu-lane {
  position: relative;
  min-width: 0;
  padding-top: 16px;
  --nfu-accent: #3b82f6;
  --nfu-tint: #dbeafe;
  --nfu-text: #1e40af;
}

.nfu-lane::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 16px;
  background: #94a3b8;
}

.nfu-lane-b { --nfu-accent: #10b981; --nfu-tint: #d1fae5; --nfu-text: #065f46; }
.nfu-lane-c { --nfu-accent: #f59e0b; --nfu-tint: #fef3c7; --nfu-text: #92400e; }
.nfu-lane-d { --nfu-accent: #8b5cf6; --nfu-tint: #ede9fe; --nfu-text: #5b21b6; }
.nfu-lane-e { --nfu-accent: #ec4899; --nfu-tint: #fce7f3; --nfu-text: #9d174d; }

.nfu-roadmap a.nfu-lane-head {
  display: block;
  margin-bottom: 10px;
  padding: 8px 4px;
  border-radius: 8px;
  background: var(--nfu-tint);
  color: var(--nfu-text);
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.5;
}

.nfu-lane-head span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 400;
}

.nfu-card {
  margin-bottom: 10px;
  padding: 9px 10px 10px;
  border: 1px solid #e2e8f0;
  border-left: 3px solid var(--nfu-accent);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  overflow-wrap: anywhere;
}

.nfu-card-title {
  color: #1e293b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.nfu-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0;
}

.nfu-tag {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 9px;
  background: #f1f5f9;
  color: #475569;
  font-size: 10.5px;
  line-height: 1.3;
}

.nfu-tag-platform {
  background: var(--nfu-tint);
  color: var(--nfu-text);
}

.nfu-note,
.nfu-papers {
  color: #475569;
  font-size: 12px;
  line-height: 1.6;
}

.nfu-papers {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
}

.nfu-roadmap .nfu-paper {
  display: block;
}

.nfu-roadmap a:focus-visible {
  outline: 2px solid var(--nfu-accent, #3b82f6);
  outline-offset: 3px;
}

@media (max-width: 1400px) {
  .nfu-root-wrap::after,
  .nfu-branches::before,
  .nfu-lane::before { display: none; }
  .nfu-lanes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nfu-lane { padding-top: 0; }
}

@media (max-width: 1000px) {
  .nfu-lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .nfu-lanes { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .nfu-root-wrap::after,
  .nfu-branches::before,
  .nfu-lane::before { display: none; }
  .nfu-lanes { display: block; }
  .nfu-lane { padding-top: 0; }
  .nfu-card { break-inside: avoid; box-shadow: none; }
}
