* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 0 4rem;
	color: #1A1A1A;
	background: #F7F7F7;
	line-height: 1.5;
}

/* --- Hero & Navigation Section (Void Black #080808) --- */
.hero-header {
	background: #080808;
	color: #FFFFFF;
	padding: 2.5rem 2rem 2rem;
	margin-bottom: 2rem;
	border-bottom: 1px solid #1f2937;
}

.header-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1.5rem;
}

.eyebrow {
	font-size: 0.75rem;
	font-weight: 700;
	color: #F5A623;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin-bottom: 0.5rem;
	display: block;
}

h1 {
	margin: 0 0 .5rem;
	font-size: 2.2rem;
	font-weight: 700;
	color: #FFFFFF;
	letter-spacing: -0.02em;
	line-height: 1.15;
}

.hero-subheadline {
	margin: 0;
	color: #9CA3AF;
	font-size: 1.05rem;
	max-width: 720px;
}

/* --- Main Layout Container --- */
main {
	padding: 0 2rem;
}

h2 { font-size: 1.25rem; margin: 0 0 .5rem; font-weight: 700; color: #1A1A1A; }
.section-desc { margin: 0 0 1.25rem; color: #6B7280; font-size: 0.9rem; }

/* --- Cards (Style Guide: 12-16px Radius, White Surface, 1px Border) --- */
section {
	background: #FFFFFF;
	border: 1px solid #E5E7EB;
	border-radius: 16px;
	padding: 1.75rem;
	margin-bottom: 1.75rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

label {
	display: block;
	margin-bottom: .85rem;
	font-size: .88rem;
	font-weight: 600;
	color: #1A1A1A;
}

input[type="text"], input[type="password"], select, textarea {
	display: block;
	width: 100%;
	margin-top: .35rem;
	padding: .7rem .9rem;
	border: 1px solid #D1D5DB;
	border-radius: 8px;
	font: inherit;
	font-size: 0.92rem;
	background: #FFFFFF;
	color: #1A1A1A;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="text"]:focus, input[type="password"]:focus, select:focus, textarea:focus {
	outline: none;
	border-color: #F5A623;
	box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.2);
}

textarea { resize: vertical; font-family: inherit; }

/* --- Buttons (Style Guide 4.1 Specifications) --- */
button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	background: #F5A623;
	color: #FFFFFF;
	border: 0;
	border-radius: 8px;
	padding: .65rem 1.25rem;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	letter-spacing: 0.01em;
	transition: opacity 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
}
button:hover { opacity: 0.92; transform: translateY(-1px); }
button:active { transform: translateY(0); }
button:disabled { background: #D1D5DB; color: #9CA3AF; cursor: not-allowed; transform: none; opacity: 1; }

.btn-primary-dark {
	background: #080808;
	color: #FFFFFF;
}
.btn-primary-dark:hover {
	background: #141414;
}

.btn-secondary {
	background: transparent;
	color: #1A1A1A;
	border: 1px solid #D1D5DB;
}
.btn-secondary:hover {
	background: #F7F7F7;
	border-color: #1A1A1A;
}

.btn-danger-ghost {
	background: transparent;
	color: #DC2626;
	border: 1px solid #FCA5A5;
	padding: 0.4rem 0.75rem;
	font-size: 0.82rem;
}
.btn-danger-ghost:hover {
	background: #FEF2F2;
	border-color: #DC2626;
}

.status {
	margin: .75rem 0 0;
	font-size: .88rem;
	color: #6B7280;
	min-height: 1.25rem;
}
.status.err { color: #DC2626; font-weight: 600; }
.status.ok { color: #16A34A; font-weight: 600; }

table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 1rem;
	font-size: .88rem;
}
th, td {
	text-align: left;
	padding: .85rem .95rem;
	border-bottom: 1px solid #E5E7EB;
	vertical-align: middle;
}
th { background: #F2F2F2; font-weight: 700; color: #1A1A1A; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; }
td.pct { font-variant-numeric: tabular-nums; font-weight: 600; width: 210px; }
td.id { font-family: ui-monospace, SFMono-Regular, monospace; font-size: .82rem; }
td.id a { color: #F5A623; font-weight: 700; text-decoration: none; }
td.id a:hover { text-decoration: underline; }

/* --- AI Alignment Progress Bar --- */
.score-container {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.score-num {
	font-size: 0.95rem;
	font-weight: 700;
	color: #1A1A1A;
	min-width: 48px;
}
.score-bar-bg {
	flex: 1;
	height: 8px;
	background: #E5E7EB;
	border-radius: 4px;
	overflow: hidden;
}
.score-bar-fill {
	height: 100%;
	background: #F5A623;
	border-radius: 4px;
	transition: width 0.4s ease;
}

/* --- Status Badges (Style Guide 4.6) --- */
.badge {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.7rem;
	border-radius: 6px;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.01em;
}
.badge-ai-status { background: #FEF3DC; color: #B45309; border: 1px solid #FDE68A; }
.fit-exceptional { background: #DCFCE7; color: #15803D; border: 1px solid #BBF7D0; }
.fit-high { background: #DBEAFE; color: #1D4ED8; border: 1px solid #BFDBFE; }
.fit-moderate { background: #FEF3C7; color: #B45309; border: 1px solid #FDE68A; }
.fit-pending { background: #F2F2F2; color: #6B7280; border: 1px solid #E5E7EB; }

.status-pill {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	border-radius: 6px;
	font-size: 0.78rem;
	font-weight: 600;
}
.status-open { background: #DCFCE7; color: #15803D; }
.status-forthcoming { background: #FEF3C7; color: #B45309; }
.status-closed { background: #F2F2F2; color: #6B7280; }

.section-header-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.5rem;
	gap: 1rem;
}

.table-responsive {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-top: 1rem;
	border-radius: 8px;
}
.table-responsive table {
	margin-top: 0;
	min-width: 620px;
}

/* --- Touch Targets (Style Guide 4.1 Touch Specs) --- */
input[type="text"], input[type="password"], select, textarea {
	min-height: 44px;
}

button {
	min-height: 44px;
}

.btn-danger-ghost {
	min-height: 36px;
}

/* --- Navigation Bar Touch Scroll --- */
.tabs {
	display: flex;
	gap: 0.5rem;
	margin-top: 1.75rem;
	border-bottom: 1px solid #374151;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
	display: none;
}
.tab-btn {
	white-space: nowrap;
	flex-shrink: 0;
}

/* --- Modal Dialog (Style Guide 5.4 Elevation Level 2) --- */
.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(8, 8, 8, 0.75);
	backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	padding: 1.5rem;
}

.modal-card {
	background: #FFFFFF;
	border-radius: 16px;
	width: 100%;
	max-width: 620px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
	border: 1px solid #E5E7EB;
	overflow: hidden;
}

.modal-header {
	background: #080808;
	color: #FFFFFF;
	padding: 1.5rem 1.75rem;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
}

.modal-close-btn {
	background: transparent;
	color: #9CA3AF;
	border: 0;
	font-size: 1.75rem;
	line-height: 1;
	padding: 0;
	cursor: pointer;
	box-shadow: none;
	min-height: auto;
}
.modal-close-btn:hover { color: #F5A623; background: transparent; transform: none; }

.modal-body {
	padding: 1.5rem 1.75rem;
	overflow-y: auto;
}

.modal-desc {
	margin: 0;
	font-size: 0.92rem;
	color: #6B7280;
	line-height: 1.55;
	background: #F8FAFC;
	padding: 0.85rem 1rem;
	border-radius: 8px;
	border: 1px solid #E2E8F0;
}

.modal-footer {
	padding: 1rem 1.75rem;
	border-top: 1px solid #E5E7EB;
	background: #F7F7F7;
	display: flex;
	justify-content: flex-end;
}

.tags-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	max-height: 280px;
	overflow-y: auto;
	padding-right: 0.25rem;
}

.tag-chip {
	display: inline-flex;
	align-items: center;
	background: #FEF3DC;
	color: #B45309;
	border: 1px solid #FDE68A;
	padding: 0.35rem 0.75rem;
	border-radius: 8px;
	font-size: 0.84rem;
	font-weight: 600;
	letter-spacing: 0.01em;
}

/* --- Mobile Media Queries --- */
@media (max-width: 768px) {
	body {
		padding-bottom: 2rem;
	}
	.hero-header {
		padding: 1.5rem 1rem 1rem;
		margin-bottom: 1.25rem;
	}
	.header-top {
		flex-direction: column;
		gap: 0.75rem;
	}
	h1 {
		font-size: 1.55rem;
	}
	.hero-subheadline {
		font-size: 0.9rem;
	}
	main {
		padding: 0 0.75rem;
	}
	section {
		padding: 1.1rem;
		border-radius: 12px;
		margin-bottom: 1.25rem;
	}
	.section-header-row {
		flex-direction: column;
		align-items: stretch;
		gap: 0.75rem;
	}
	.section-header-row button {
		width: 100%;
	}
	.filter-row {
		flex-direction: column;
		align-items: stretch;
	}
	.filter-row label {
		min-width: auto;
		width: 100%;
	}
	.filter-row button {
		width: 100%;
	}
	.action-group {
		flex-wrap: wrap;
		justify-content: flex-end;
	}
	.action-group button {
		padding: 0.4rem 0.6rem;
		font-size: 0.8rem;
	}
	.modal-overlay {
		padding: 0.5rem;
	}
	.modal-card {
		max-height: 94vh;
		border-radius: 12px;
	}
	.modal-header {
		padding: 1.1rem 1.25rem;
	}
	.modal-body {
		padding: 1.1rem 1.25rem;
	}
	.modal-footer {
		padding: 0.85rem 1.25rem;
	}
}


