/*
Corporate Power Reset — State Progress
Public-facing only.
Sticky header + body scroll (iOS-safe).
*/


/* ============================
   CPR ADMIN NAV
   ============================ */

.cpr-admin-nav {
  background: #0a2a66;
  color: white;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cpr-admin-nav-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cpr-admin-brand {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 14px;
  text-transform: uppercase;
}

.cpr-admin-links {
  display: flex;
  gap: 18px;
}

.cpr-admin-links a {
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.9;
}

.cpr-admin-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* iOS-friendly wrapping */
@media (max-width: 600px) {
  .cpr-admin-nav-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .cpr-admin-links {
    flex-wrap: wrap;
    gap: 12px;
  }
}

/* ---------- BASE LAYOUT ---------- */

html, body {
	height: 100%;
	margin: 0;
}

body {
	display: flex;
	flex-direction: column;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	background: #e8e8ed;   /* match chat page desktop field */
	color: #111;
}

/* ---------- HEADER ---------- */

.states-header {
	flex: 0 0 auto;
	background: #ffffff;
	border-bottom: 3px solid #0b3c6d;
	padding: 14px 20px;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
	position: sticky;
	top: 0;
	z-index: 1000;
}

.states-header-inner {
	max-width: 720px;          /* visually matches content frame */
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 16px;
}

.cap-logo {
	width: 64px;
	height: auto;
}

.header-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.title-main {
	font-size: 26px;
	font-weight: 700;
	color: #0a2a66;
}

.title-sub {
	font-size: 22px;
	font-weight: 600;
	color: #0a2a66;
}

.header-meta {
	font-size: 16px;
	color: #333;
}

.header-meta .sep {
	margin: 0 6px;
	color: #888;
}

.as-of {
	font-size: 14px;
	color: #555;
}

/* ---------- SCROLLING CONTENT ---------- */

.states-content {
	flex: 1 1 auto;
	overflow-y: auto;
	background: #e8e8ed;
	padding-bottom: max(24px, env(safe-area-inset-bottom));
}

/* ---------- CONTENT FRAME ---------- */

.states-content-inner {
	max-width: 720px;
	margin: 32px auto;
	padding: 28px 28px 72px;
	background: #ffffff;
	border-radius: 18px;
	box-shadow: 0 0 28px rgba(0, 0, 0, 0.12);
}

/* ---------- MOBILE OVERRIDES ---------- */

@media (max-width: 899px) {
	.states-header-inner {
		max-width: 100%;
	}

	.states-content-inner {
		max-width: 100%;
		margin: 0;
		padding: 20px 20px 72px;
		border-radius: 0;
		box-shadow: none;
	}
}

/* ---------- TEXT ---------- */

.narrative,
.summary {
	font-size: 18px;
	line-height: 1.55;
	margin: 12px 0;
}

/* ---------- TABLE ---------- */

.states-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 16px;
	margin-top: 18px;
}

.state-row td {
	padding: 12px 8px;
	border-top: 1px solid #e2e2e2;
	vertical-align: top;
}

.state-name {
	font-weight: 700;
	width: 42%;
}

.status {
	white-space: nowrap;
}

/* ---------- PILLS ---------- */

.pill {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	color: #ffffff;
}

.pill.leg {
	background: #2e7d32;
}

.pill.init {
	background: #1565c0;
}

/* ---------- DETAILS ---------- */

.detail-content {
	padding: 8px 12px 14px 28px;
	font-size: 17px;
	color: #333;
}

/* ---------- FOOTER ---------- */

.footer {
	margin-top: 28px;
	font-size: 17px;
}
/* ---------- MOBILE TABLE FIX ---------- */

@media (max-width: 600px) {
	.states-table,
	.states-table tbody,
	.states-table tr,
	.states-table td {
		display: block;
		width: 100%;
	}

	.state-row {
		padding: 12px 0;
		border-top: 1px solid #e2e2e2;
	}

	.state-row td {
		border: none;
		padding: 4px 0;
	}

	.state-name {
		width: 100%;
		font-size: 18px;
		margin-bottom: 6px;
	}

	.status {
		display: inline-block;
		margin-right: 8px;
	}

	.pill {
		font-size: 12px;
		padding: 3px 8px;
	}

	.detail-row td {
		padding: 0;
	}

	.detail-content {
		padding: 8px 0 14px 0;
		font-size: 16px;
	}

	/* Header adjustments */
	.states-header {
		padding: 12px 16px;
	}

	.cap-logo {
		width: 48px;
	}

	.title-main {
		font-size: 20px;
	}

	.title-sub {
		font-size: 16px;
	}

	.header-meta {
		font-size: 14px;
	}

	.header-btn {
		padding: 6px 10px;
		font-size: 13px;
	}
}
