/*
 * Q52 Author Grid — stylesheet
 * Palette: navy #112f42 · teal #2aacb8 · silver #9daab6 · surface #f2f5f7
 */

/* ── Grid layout ─────────────────────────────────────────────────────────── */

.q52ag-wrap {
	margin: 0 0 40px;
}

.q52ag-grid {
	display: grid;
	gap: 20px;
}

.q52ag-cols-1 { grid-template-columns: 1fr; }
.q52ag-cols-2 { grid-template-columns: repeat(2, 1fr); }
.q52ag-cols-3 { grid-template-columns: repeat(3, 1fr); }
.q52ag-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1100px) {
	.q52ag-cols-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
	.q52ag-cols-3,
	.q52ag-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.q52ag-cols-2,
	.q52ag-cols-3,
	.q52ag-cols-4 { grid-template-columns: 1fr; }
}

/* ── Filter strip ────────────────────────────────────────────────────────── */

.q52ag-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 20px;
}

.q52ag-filter-btn {
	padding: 5px 14px;
	font-size: 0.8rem;
	font-weight: 600;
	border: 1.5px solid #2aacb8;
	border-radius: 20px;
	background: transparent;
	color: #2aacb8;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
	white-space: nowrap;
}

.q52ag-filter-btn:hover,
.q52ag-filter-btn.is-active {
	background: #2aacb8;
	color: #fff;
}

/* ── Card ────────────────────────────────────────────────────────────────── */

.q52ag-card {
	background: #fff;
	border: 1px solid #e1e8ed;
	border-radius: 10px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	transition: box-shadow 0.15s;
}

.q52ag-card:hover {
	box-shadow: 0 4px 18px rgba(17, 47, 66, 0.09);
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.q52ag-header {
	display: flex;
	align-items: center;
	gap: 14px;
}

.q52ag-avatar-link {
	flex-shrink: 0;
	display: block;
}

.q52ag-avatar {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #e1e8ed;
	display: block;
	flex-shrink: 0;
}

.q52ag-meta {
	min-width: 0;
}

.q52ag-name {
	margin: 0 0 4px;
	font-size: 1.05rem;
	font-weight: 700;
	color: #112f42;
	line-height: 1.25;
}

.q52ag-name a {
	color: inherit;
	text-decoration: none;
}

.q52ag-name a:hover {
	color: #2aacb8;
}

.q52ag-cats {
	margin: 0;
	font-size: 0.72rem;
	font-weight: 600;
	color: #9daab6;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	line-height: 1.4;
}

/* ── Bio ─────────────────────────────────────────────────────────────────── */

.q52ag-bio {
	font-size: 0.86rem;
	line-height: 1.6;
	color: #3d5066;
	margin: 0;
}

/* ── Dimension wrapper ───────────────────────────────────────────────────── */

.q52ag-dims {
	display: flex;
	flex-direction: column;
	gap: 16px;
	border-top: 1px solid #f2f5f7;
	padding-top: 14px;
}

.q52ag-dim-section {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.q52ag-dim-heading {
	margin: 0 0 6px;
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: #9daab6;
}

/* ── Dimension row (shared) ──────────────────────────────────────────────── */

.q52ag-row {
	display: flex;
	align-items: center;
	gap: 6px;
	min-height: 20px;
}

.q52ag-icon {
	font-size: 0.85rem;
	width: 18px;
	text-align: center;
	flex-shrink: 0;
	line-height: 1;
}

.q52ag-lbl {
	font-size: 0.72rem;
	color: #3d5066;
	width: 72px;
	flex-shrink: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ── Bipolar spectrum (political dims, −1 → +1) ──────────────────────────── */

.q52ag-spectrum-wrap {
	display: flex;
	align-items: center;
	gap: 5px;
	flex: 1;
	min-width: 0;
}

.q52ag-pole {
	font-size: 0.62rem;
	color: #9daab6;
	white-space: nowrap;
	flex-shrink: 0;
	width: 54px;
	line-height: 1.2;
}

.q52ag-pole-l { text-align: right; }
.q52ag-pole-r { text-align: left; }

.q52ag-track {
	flex: 1;
	height: 6px;
	background: linear-gradient(
		to right,
		#9daab6 0%,
		#f2f5f7 50%,
		#2aacb8 100%
	);
	border-radius: 3px;
	position: relative;
}

.q52ag-dot {
	position: absolute;
	top: 50%;
	width: 13px;
	height: 13px;
	background: #112f42;
	border: 2px solid #fff;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	box-shadow: 0 1px 4px rgba(17, 47, 66, 0.35);
	pointer-events: none;
}

/* ── Unipolar bar (personality dims, 0 → 1) ──────────────────────────────── */

.q52ag-bar-track {
	flex: 1;
	height: 6px;
	background: #f2f5f7;
	border-radius: 3px;
	overflow: hidden;
}

.q52ag-bar-fill {
	height: 100%;
	background: #2aacb8;
	border-radius: 3px;
	min-width: 2px;
}

.q52ag-val {
	font-size: 0.68rem;
	color: #9daab6;
	width: 24px;
	text-align: right;
	flex-shrink: 0;
	font-variant-numeric: tabular-nums;
}

/* ── Category tiles ──────────────────────────────────────────────────────── */

.q52ag-cat-tiles {
	display: grid;
	gap: 16px;
	margin: 0 0 40px;
}

.q52ag-cat-cols-1 { grid-template-columns: 1fr; }
.q52ag-cat-cols-2 { grid-template-columns: repeat(2, 1fr); }
.q52ag-cat-cols-3 { grid-template-columns: repeat(3, 1fr); }
.q52ag-cat-cols-4 { grid-template-columns: repeat(4, 1fr); }
.q52ag-cat-cols-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 1100px) {
	.q52ag-cat-cols-5 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
	.q52ag-cat-cols-4,
	.q52ag-cat-cols-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 680px) {
	.q52ag-cat-cols-3,
	.q52ag-cat-cols-4,
	.q52ag-cat-cols-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 440px) {
	.q52ag-cat-cols-2,
	.q52ag-cat-cols-3,
	.q52ag-cat-cols-4,
	.q52ag-cat-cols-5 { grid-template-columns: 1fr; }
}

.q52ag-cat-tile {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	padding: 22px 20px 18px;
	background: #112f42;
	border-radius: 10px;
	border-top: 3px solid #2aacb8;
	text-decoration: none;
	transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.q52ag-cat-tile:hover {
	background: #0d2434;
	border-top-color: #38c5d2;
	box-shadow: 0 4px 18px rgba(17, 47, 66, 0.25);
	text-decoration: none;
}

.q52ag-cat-icon {
	font-size: 1.6rem;
	line-height: 1;
	display: block;
	margin-bottom: 4px;
}

.q52ag-cat-name {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	color: #fff;
	line-height: 1.3;
}

.q52ag-cat-desc {
	margin: 0;
	font-size: 0.78rem;
	line-height: 1.5;
	color: #9daab6;
}

.q52ag-cat-count {
	margin-top: auto;
	padding-top: 10px;
	font-size: 0.72rem;
	font-weight: 600;
	color: #2aacb8;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */

.q52ag-empty {
	color: #9daab6;
	font-style: italic;
	font-size: 0.9rem;
}

.q52ag-empty code {
	background: #f2f5f7;
	padding: 1px 4px;
	border-radius: 3px;
	font-style: normal;
}
