/* =========================================================================
   NN EDGE — Development Horizon
   ========================================================================= */

.nnh {
	--nnh-awarded:  #FFCF01;
	--nnh-awaiting: #D8D7D6;
	--nnh-rfq:      #00807F;
	--nnh-rfp:      #1EBBB9;

	--nnh-ink:      #13303A;  /* text + ground line */
	--nnh-muted:    #5B6B70;
	--nnh-gap:      10px;     /* between buildings */
	--nnh-group-gap: 28px;    /* between groups */
	--nnh-ground:   6px;

	color: var(--nnh-ink);
}

/* Status → color. Everything else reads var(--nnh-color). */
.nnh .is-awarded  { --nnh-color: var(--nnh-awarded); }
.nnh .is-awaiting { --nnh-color: var(--nnh-awaiting); }
.nnh .is-rfq      { --nnh-color: var(--nnh-rfq); }
.nnh .is-rfp      { --nnh-color: var(--nnh-rfp); }

/* ---- Lists reset ------------------------------------------------------ */
.nnh ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ---- Legend ----------------------------------------------------------- */
.nnh-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin-bottom: 40px !important;
	font-size: 0.9rem;
}
.nnh-legend__item {
	display: flex;
	align-items: center;
	gap: 8px;
}
.nnh-legend__swatch {
	width: 14px;
	height: 14px;
	background: var(--nnh-color);
}

/* ---- Groups (desktop) -------------------------------------------------- */
.nnh-groups {
	display: flex;
	align-items: flex-end;
	gap: var(--nnh-group-gap);
}
.nnh-group {
	/* Width proportional to number of buildings in the group */
	flex: var(--nnh-count) 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

/* Header is first in the DOM (for screen readers) but sits below on desktop */
.nnh-group__header {
	order: 2;
	padding-top: 20px;
}
.nnh-group__title {
	margin: 0 0 6px;
	font-size: 1.35rem;
	line-height: 1.2;
	color: var(--nnh-ink);
}
.nnh-group__sub {
	margin: 0;
	color: var(--nnh-muted);
}

/* ---- Skyline ---------------------------------------------------------- */
.nnh-buildings {
	order: 1;
	display: flex;
	align-items: flex-end;
	gap: var(--nnh-gap);
	height: var(--nnh-chart-h);
	border-bottom: var(--nnh-ground) solid var(--nnh-ink);
}
.nnh-item {
	flex: 1 1 0;
	min-width: 0;
	height: 100%;
	display: flex;
	align-items: flex-end;
}

.nnh-building {
	position: relative;
	display: block;
	width: 100%;
	height: var(--h, 70%);
	background: var(--nnh-color);
	text-decoration: none;
	color: inherit;
	transition: transform 0.2s ease, filter 0.2s ease;
}
.nnh-building:hover,
.nnh-building:focus-visible {
	transform: translateY(-6px);
	filter: brightness(1.06);
}
.nnh-building:focus-visible {
	outline: 3px solid var(--nnh-ink);
	outline-offset: 3px;
}

/* Window layer — yours to style. Covers the whole building.
   Put masks/patterns HERE, not on .nnh-building, or the tooltip gets masked too. */
.nnh-building__windows {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

/* ---- Tooltip (desktop) ------------------------------------------------- */
.nnh-building__info {
	position: absolute;
	bottom: calc(100% + 12px);
	left: 50%;
	z-index: 5;
	display: flex;
	flex-direction: column;
	gap: 2px;
	width: max-content;
	max-width: 220px;
	padding: 10px 12px;
	background: var(--nnh-ink);
	color: #fff;
	font-size: 0.85rem;
	line-height: 1.35;
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, 4px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
	pointer-events: none;
}
.nnh-building:hover .nnh-building__info,
.nnh-building:focus-visible .nnh-building__info {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
}
.nnh-building__name {
	font-weight: 700;
}
.nnh-building__status::before {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 6px;
	background: var(--nnh-color);
	vertical-align: middle;
}
.nnh-building__acreage {
	opacity: 0.8;
}

/* ---- Summary ----------------------------------------------------------- */
.nnh-summary {
	margin: 40px 0 4px;
	color: var(--nnh-muted);
}
.nnh-note {
	margin: 0;
	font-size: 0.85rem;
	color: var(--nnh-muted);
}

/* =========================================================================
   Mobile — stacked list
   ========================================================================= */
@media (max-width: 767px) {
	.nnh-groups {
		flex-direction: column;
		align-items: stretch;
		gap: 32px;
	}
	.nnh-group__header {
		order: 0;
		padding: 0 0 12px;
	}
	.nnh-buildings {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
		height: auto;
		border-bottom: 0;
	}
	.nnh-item {
		height: auto;
	}
	.nnh-building {
		height: auto;
		padding: 14px 16px;
		background: #fff;
		border-left: 10px solid var(--nnh-color);
		box-shadow: 0 1px 2px rgba(19, 48, 58, 0.12);
	}
	.nnh-building:hover,
	.nnh-building:focus-visible {
		transform: none;
	}
	.nnh-building__windows {
		display: none;
	}
	.nnh-building__info {
		position: static;
		width: auto;
		max-width: none;
		padding: 0;
		background: none;
		color: var(--nnh-ink);
		font-size: 1rem;
		opacity: 1;
		visibility: visible;
		transform: none;
	}
	.nnh-building__status,
	.nnh-building__acreage {
		font-size: 0.875rem;
		color: var(--nnh-muted);
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nnh-building,
	.nnh-building__info {
		transition: none;
	}
}
