/* Data Center Index front-end styles.
   Interactive elements use explicit colors (never inherit) so theme
   button/link styling can't render them illegible — same rule as
   WP Advocacy. Colors can be overridden via the custom properties. */

.dcidx {
	--dcidx-ink: #1f2937;
	--dcidx-muted: #4b5563;
	--dcidx-line: #d7dce2;
	--dcidx-panel: #f7f8fa;
	--dcidx-accent: #1a4b8c;
	--dcidx-accent-ink: #fff;
	color: var(--dcidx-ink);
}

/* ---- Badges ------------------------------------------------------------ */

.dcidx-badge {
	display: inline-block;
	padding: 0.15em 0.6em;
	border-radius: 999px;
	font-size: 0.78em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	line-height: 1.5;
	white-space: nowrap;
}

.dcidx-badge--muted  { background: #e5e7eb; color: #374151; }
.dcidx-badge--early  { background: #dbeafe; color: #1e40af; }
.dcidx-badge--review { background: #fef3c7; color: #92400e; }
.dcidx-badge--go     { background: #ffedd5; color: #9a3412; }
.dcidx-badge--live   { background: #ede9fe; color: #5b21b6; }
.dcidx-badge--halt   { background: #fee2e2; color: #991b1b; }

.dcidx-asof,
.dcidx-muted {
	color: var(--dcidx-muted);
	font-size: 0.9em;
}

.dcidx-location {
	color: var(--dcidx-muted);
	font-weight: 600;
}

/* ---- Buttons ----------------------------------------------------------- */

.dcidx .dcidx-button,
.dcidx a.dcidx-button,
.dcidx a.dcidx-button:visited {
	display: inline-block;
	padding: 0.45em 1em;
	background: var(--dcidx-accent);
	color: var(--dcidx-accent-ink);
	border: 1px solid var(--dcidx-accent);
	border-radius: 4px;
	font: inherit;
	font-size: 0.92em;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
}

.dcidx .dcidx-button:hover,
.dcidx .dcidx-button:focus,
.dcidx a.dcidx-button:hover,
.dcidx a.dcidx-button:focus {
	background: #123661;
	border-color: #123661;
	color: #fff;
}

.dcidx .dcidx-button--ghost,
.dcidx a.dcidx-button--ghost,
.dcidx a.dcidx-button--ghost:visited {
	background: #fff;
	color: var(--dcidx-accent);
}

.dcidx .dcidx-button--ghost:hover,
.dcidx .dcidx-button--ghost:focus,
.dcidx a.dcidx-button--ghost:hover,
.dcidx a.dcidx-button--ghost:focus {
	background: #eef3fa;
	color: #123661;
}

/* ---- Single: header + facts -------------------------------------------- */

.dcidx-header {
	border: 1px solid var(--dcidx-line);
	border-radius: 8px;
	padding: 1em 1.25em;
	background: var(--dcidx-panel);
	margin-bottom: 1.5em;
}

.dcidx-status-line {
	margin: 0 0 0.5em;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.4em 0.6em;
}

.dcidx-summary {
	margin: 0 0 0.75em;
	font-size: 1.05em;
}

.dcidx-header-actions {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em;
}

.dcidx-copy-status {
	font-size: 0.9em;
	color: #166534;
	font-weight: 600;
}

.dcidx-copy-fallback {
	flex-basis: 100%;
	width: 100%;
	font-family: inherit;
	font-size: 0.9em;
}

.dcidx-facts {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 2em;
	font-size: 0.97em;
}

.dcidx-facts caption {
	text-align: left;
	font-weight: 700;
	font-size: 1.1em;
	padding-bottom: 0.4em;
}

.dcidx-facts th,
.dcidx-facts td {
	text-align: left;
	vertical-align: top;
	padding: 0.5em 0.75em 0.5em 0;
	border-top: 1px solid var(--dcidx-line);
}

.dcidx-facts th {
	width: 32%;
	font-weight: 600;
	color: var(--dcidx-muted);
}

.dcidx-cite {
	font-size: 0.75em;
	line-height: 0;
	margin-left: 0.1em;
}

.dcidx-cite a {
	text-decoration: none;
	color: var(--dcidx-accent);
	font-weight: 600;
}

.dcidx-basis {
	display: inline-block;
	margin-left: 0.35em;
	padding: 0 0.45em;
	border-radius: 3px;
	font-size: 0.75em;
	font-weight: 600;
	border: 1px solid currentColor;
	white-space: nowrap;
}

.dcidx-basis--record   { color: #166534; }
.dcidx-basis--claim    { color: #92400e; }
.dcidx-basis--reported { color: #1e40af; }
.dcidx-basis--estimate { color: #6b21a8; }

/* ---- Single: timeline + records ---------------------------------------- */

.dcidx-section {
	margin: 2.5em 0 0;
}

.dcidx-timeline {
	list-style: none;
	margin: 0;
	padding: 0 0 0 1.1em;
	border-left: 3px solid var(--dcidx-line);
}

.dcidx-event {
	position: relative;
	margin: 0 0 1.1em;
	padding-left: 0.6em;
}

.dcidx-event::before {
	content: "";
	position: absolute;
	left: -1.6em;
	top: 0.35em;
	width: 0.7em;
	height: 0.7em;
	border-radius: 50%;
	background: var(--dcidx-accent);
	border: 2px solid #fff;
}

.dcidx-event p {
	margin: 0;
}

.dcidx-event-date {
	font-size: 0.85em;
	font-weight: 700;
	color: var(--dcidx-muted);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.dcidx-event-title {
	font-weight: 600;
}

.dcidx-event-note {
	color: var(--dcidx-muted);
	font-size: 0.95em;
	margin-top: 0.2em !important;
}

.dcidx-records-group {
	font-size: 1em;
	margin: 1.5em 0 0.5em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--dcidx-muted);
}

.dcidx-records-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.dcidx-record {
	padding: 0.5em 0.6em;
	border-top: 1px solid var(--dcidx-line);
	scroll-margin-top: 5em;
}

.dcidx-record:target {
	background: #fef9c3;
	border-radius: 4px;
}

.dcidx-record-n {
	color: var(--dcidx-muted);
	font-variant-numeric: tabular-nums;
	font-size: 0.85em;
}

.dcidx-record-title {
	font-weight: 600;
}

.dcidx-record-meta {
	color: var(--dcidx-muted);
	font-size: 0.88em;
}

.dcidx-record-note {
	display: block;
	font-size: 0.93em;
	margin-top: 0.15em;
}

.dcidx-verified {
	margin-top: 2.5em;
	padding-top: 0.75em;
	border-top: 1px solid var(--dcidx-line);
	font-size: 0.88em;
	color: var(--dcidx-muted);
}

/* ---- Index ------------------------------------------------------------- */

.dcidx-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.75em 1em;
	margin: 0 0 1.25em;
	padding: 0.85em 1em;
	border: 1px solid var(--dcidx-line);
	border-radius: 8px;
	background: var(--dcidx-panel);
}

.dcidx-filter span {
	display: block;
	font-size: 0.82em;
	font-weight: 600;
	margin-bottom: 0.2em;
	color: var(--dcidx-muted);
}

.dcidx-filter input,
.dcidx-filter select {
	padding: 0.4em 0.6em;
	border: 1px solid #9aa3af;
	border-radius: 4px;
	background: #fff;
	color: var(--dcidx-ink);
	font: inherit;
	font-size: 0.95em;
}

.dcidx-filter--q {
	flex: 1 1 14em;
}

.dcidx-filter--q input {
	width: 100%;
	box-sizing: border-box;
}

.dcidx-count {
	flex-basis: 100%;
	margin: 0;
	font-size: 0.88em;
	color: var(--dcidx-muted);
}

.dcidx-count:empty {
	display: none;
}

.dcidx-cards {
	display: grid;
	/* px, not rem: themes that shrink the root font size would otherwise
	   collapse the columns. auto-fit lets a short list use the full width. */
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
	gap: 1em;
}

/* A single project shouldn't stretch across a wide page. */
.dcidx-cards > .dcidx-card:only-child {
	max-width: 640px;
}

.dcidx-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--dcidx-line);
	border-radius: 8px;
	padding: 1em 1.1em;
	background: #fff;
}

.dcidx-card[hidden],
.dcidx-table tr[hidden] {
	display: none;
}

.dcidx-card p {
	margin: 0 0 0.5em;
}

.dcidx-card-title {
	margin: 0.25em 0 0.2em;
	font-size: 1.15em;
	line-height: 1.3;
}

.dcidx-card-title a {
	text-decoration: none;
}

.dcidx-card-facts {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.1em 0.75em;
	margin: 0.25em 0 0.6em;
	font-size: 0.9em;
}

.dcidx-card-facts dt {
	color: var(--dcidx-muted);
	font-weight: 600;
}

.dcidx-card-facts dd {
	margin: 0;
}

.dcidx-card-summary {
	font-size: 0.95em;
}

.dcidx-card-actions {
	margin-top: auto !important;
	padding-top: 0.5em;
}

.dcidx-embed {
	margin: 1.5em 0;
	max-width: 40em;
}

.dcidx-table-wrap {
	overflow-x: auto;
}

.dcidx-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
}

.dcidx-table th,
.dcidx-table td {
	text-align: left;
	vertical-align: top;
	padding: 0.55em 0.75em 0.55em 0;
	border-bottom: 1px solid var(--dcidx-line);
}

.dcidx-table thead th {
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--dcidx-muted);
	border-bottom-width: 2px;
}

.dcidx-table td a {
	font-weight: 600;
}

.dcidx-nomatch,
.dcidx-empty {
	color: var(--dcidx-muted);
	font-style: italic;
}

@media (max-width: 600px) {
	.dcidx-facts th,
	.dcidx-facts td {
		display: block;
		width: auto;
		padding-right: 0;
	}

	.dcidx-facts td {
		border-top: 0;
		padding-top: 0;
	}
}
