/**
 * Armchair Journal — Section / Category Styles
 * Masthead, Category jump grid, How it reads, Aisle match pairs, Filterable list, CTA.
 */

/* ─── 01 Masthead ─── */
.aj-sec-masthead {
	position: relative;
	overflow: hidden;
	background-color: var(--aj-color-navy-hero, #14304f);
	color: #f6f7fa;
}

.aj-sec-hero-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.aj-sec-hero-bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.aj-sec-hero-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: rgba(20, 48, 79, 0.90);
	pointer-events: none;
}

.aj-sec-masthead-inner {
	position: relative;
	z-index: 2;
	padding: 26px 0 40px;
}

.aj-sec-eyebrow-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 22px;
	font-family: var(--aj-font-mono, 'IBM Plex Mono', monospace);
	font-size: 10px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #a8bcda;
	font-weight: 600;
}

.aj-sec-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: 38px;
	align-items: start;
}

.aj-sec-title {
	font-family: var(--aj-font-serif, 'EB Garamond', serif);
	font-size: 54px;
	color: #ffffff;
	font-weight: 500;
	line-height: 1;
	letter-spacing: -0.015em;
	margin: 0 0 16px;
}

.aj-sec-dek {
	font-family: var(--aj-font-serif, 'EB Garamond', serif);
	font-style: italic;
	font-size: 17px;
	color: #a8bcda;
	max-width: 560px;
	line-height: 1.6;
	text-wrap: pretty;
	margin: 0 0 32px;
}

.aj-sec-stats-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	padding-top: 22px;
	margin-bottom: 26px;
}

.aj-sec-stat-item {
	padding: 0 32px;
	border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.aj-sec-stat-item:first-child {
	padding-left: 0;
}

.aj-sec-stat-item:last-child {
	border-right: none;
}

.aj-sec-stat-val {
	font-family: var(--aj-font-serif, 'EB Garamond', serif);
	font-size: 34px;
	font-weight: 600;
	color: #ffffff;
	line-height: 1;
}

.aj-sec-stat-lbl {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #9badce;
	margin-top: 7px;
}

/* ─── Masthead Share & Tray ─── */
.aj-sec-share-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.aj-sec-share-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 1px solid rgba(255, 255, 255, 0.45);
	background: transparent;
	color: #f6f7fa;
	padding: 9px 18px;
	font-family: var(--aj-font-sans, 'IBM Plex Sans', sans-serif);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.aj-sec-share-toggle:hover,
.aj-sec-share-toggle:focus,
.aj-sec-share-toggle[aria-expanded="true"] {
	background-color: rgba(255, 255, 255, 0.12);
	color: #ffffff;
}

.aj-sec-mobile-kicker,
.aj-sec-mobile-title,
.aj-sec-mobile-dek,
.aj-sec-index-mobile-label,
.aj-sec-index-mobile-count {
	display: none;
}

.aj-sec-share-tray {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	flex-wrap: wrap;
}

.aj-sec-share-tray[hidden] {
	display: none;
}

.aj-sec-share-tray .aj-social-copy {
	background-color: #ffffff;
	border: 1.5px solid #d9e0ec;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.aj-sec-share-tray .aj-social-copy.is-copied {
	background-color: #dcb352;
	border-color: #dcb352;
}

.aj-sec-share-copied {
	font-family: var(--aj-font-mono, 'IBM Plex Mono', monospace);
	font-size: 10px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #dcb352;
	font-weight: 600;
}

/* Category Jump Index Box */
.aj-sec-index-box {
	background-color: #ffffff;
	padding: 24px 26px 26px;
}

.aj-sec-index-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	padding-bottom: 13px;
	border-bottom: 1px solid #e8ecf3;
	margin-bottom: 18px;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--aj-color-crimson, #c33d29);
}

.aj-sec-index-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
}

.aj-sec-group-title {
	order: 2;
	margin: 6px 0 0;
	font-size: 7.5px;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--aj-color-text-muted, #8a94a3);
	text-align: center;
}

.aj-sec-index-grid > div {
	display: flex;
	min-width: 0;
	flex-direction: column;
}

.aj-sec-group-links {
	display: flex;
	order: 1;
	align-items: flex-end;
	justify-content: center;
	gap: 3px;
	min-height: 112px;
	padding: 0 2px;
	border-bottom: 2px solid #b28a32;
}

.aj-sec-link-item {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 0;
	width: auto;
	max-width: 20px;
	height: 84px;
	min-height: 0;
	padding: 5px 2px;
	border: 0 !important;
	background-color: var(--aj-color-navy-light, #1a3d74);
	color: #fff;
	font-family: var(--aj-font-serif, 'EB Garamond', serif);
	font-size: 7.5px;
	font-weight: 500;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.18s ease, color 0.18s ease;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
}

.aj-sec-link-item:nth-child(2n) { height: 99px; }
.aj-sec-link-item:nth-child(3n) { height: 75px; }

.aj-sec-link-item:hover,
.aj-sec-link-item.active {
	background-color: var(--aj-color-crimson, #c33d29);
	color: #fff;
	font-weight: 700;
}

/* ─── 02 How This Category Reads ─── */
.aj-sec-how-reads {
	background-color: #ffffff;
	border-bottom: 1px solid var(--aj-color-rule-section, #eef1f6);
	padding: 34px 0 44px;
}

.aj-sec-how-reads-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	padding-bottom: 13px;
	border-bottom: 1px solid var(--aj-color-rule-section, #eef1f6);
	margin-bottom: 20px;
}

.aj-sec-num-eyebrow {
	display: flex;
	align-items: baseline;
	gap: 14px;
}

.aj-sec-num {
	font-family: var(--aj-font-serif, 'EB Garamond', serif);
	font-size: 19px;
	color: #60708c;
	line-height: 1;
}

.aj-sec-step-label {
	font-family: var(--aj-font-mono, 'IBM Plex Mono', monospace);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--aj-color-crimson, #c33d29);
}

.aj-sec-intro-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	gap: 38px;
	align-items: end;
	margin-bottom: 26px;
}

.aj-sec-h2 {
	font-family: var(--aj-font-serif, 'EB Garamond', serif);
	font-size: 37px;
	line-height: 1.12;
	font-weight: 500;
	color: var(--aj-color-navy-light, #1a3d74);
	letter-spacing: -0.015em;
	margin: 0;
	text-wrap: pretty;
}

.aj-sec-intro-dek {
	font-family: var(--aj-font-serif, 'EB Garamond', serif);
	font-style: italic;
	font-size: 16px;
	line-height: 1.55;
	color: var(--aj-color-text-secondary, #616a78);
	text-wrap: pretty;
	margin: 0;
}

.aj-sec-lens-spread {
	border-top: 1px solid var(--aj-color-border-light, #eef1f6);
	border-bottom: 1px solid var(--aj-color-rule-section, #eef1f6);
	padding: 28px 0;
}

.aj-sec-lens-grid {
	display: grid;
	grid-template-columns: 300px 1fr;
	gap: 46px;
	align-items: stretch;
}

.aj-sec-lens-left {
	border-right: 1px solid var(--aj-color-border-light, #eef1f6);
	padding-right: 42px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.aj-sec-verdict-text {
	font-family: var(--aj-font-serif, 'EB Garamond', serif);
	font-style: italic;
	font-size: 26px;
	color: var(--aj-color-navy-light, #1a3d74);
	line-height: 1.15;
	margin: 8px 0;
}

.aj-sec-breakdown-text {
	font-size: 12px;
	color: var(--aj-color-text-muted, #5f697a);
	line-height: 1.5;
	margin-bottom: 18px;
}

/*
 * Both lenses are rendered server-side; only the active one is shown. The section
 * root carries data-lens, moved by section-filters.js on `aj-lens-change`, so the
 * swap costs no round trip and the panel is correct before JS runs.
 */
.aj-sec-lens-pane {
	display: none;
}
.aj-sec-how-reads[data-lens='academic'] .aj-sec-lens-pane[data-lens-block='academic'],
.aj-sec-how-reads[data-lens='indic'] .aj-sec-lens-pane[data-lens-block='indic'] {
	display: block;
}

.aj-sec-whole-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: var(--aj-space-12, 12px);
	margin-bottom: 10px;
}

.aj-sec-whole-label {
	font-size: var(--aj-fs-11, 11px);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--aj-color-text-muted, #5f697a);
}

.aj-sec-shape-label {
	font-family: var(--aj-font-mono, 'IBM Plex Mono', monospace);
	font-size: var(--aj-fs-10, 10px);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--aj-color-crimson, #c33d29);
	white-space: nowrap;
}

/* Axis poles under the curve — the labels the active lens names its ends by. */
.aj-sec-axis-row {
	display: flex;
	justify-content: space-between;
	gap: var(--aj-space-12, 12px);
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid var(--aj-color-border-light, #eef1f6);
	font-size: var(--aj-fs-10, 10px);
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.aj-sec-curve-note {
	font-size: 12px;
	color: #586373;
	line-height: 1.5;
	margin: 12px 0 0;
}

.aj-sec-lens-right {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
}

.aj-sec-dims-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
	padding-bottom: 11px;
	border-bottom: 1px solid var(--aj-color-rule-section, #eef1f6);
}

.aj-sec-dims-title {
	font-size: var(--aj-fs-11, 11px);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--aj-color-text-muted, #5f697a);
}

.aj-sec-dims-legend {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: var(--aj-fs-10, 10px);
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #58616f;
}

.aj-sec-dims-legend > span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.aj-sec-legend-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
}

/*
 * Shown where a lens carries a whole-category stance but no five-dimension set.
 * The panel says so rather than reusing the other lens's figures.
 */
.aj-sec-dims-unscored {
	margin: 0;
	padding: 22px 0;
	font-family: var(--aj-font-serif, 'EB Garamond', serif);
	font-style: italic;
	font-size: var(--aj-fs-16, 16px);
	line-height: 1.55;
	color: var(--aj-color-text-muted, #5f697a);
	text-wrap: pretty;
}

/* ─── 03 Across the Aisle ─── */
.aj-sec-aisle {
	background-color: var(--aj-color-bg-alt, #f6f7fa);
	border-top: 3px solid var(--aj-color-crimson, #c33d29);
	border-bottom: 1px solid var(--aj-color-rule-section, #eef1f6);
	padding: 46px 0 50px;
}

.aj-sec-aisle-header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px 32px;
	margin-bottom: 24px;
}

.aj-sec-aisle-stack {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* ─── 04 The Full List ─── */
.aj-sec-full-list {
	background-color: #ffffff;
	border-bottom: 1px solid var(--aj-color-rule-section, #eef1f6);
	padding: 46px 0 52px;
}

.aj-sec-mobile-feed-head {
	display: none;
}

.aj-sec-list-header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px 32px;
	margin-bottom: 20px;
}

.aj-sec-filters-wrap {
	display: flex;
	align-items: center;
	gap: 14px 18px;
	flex-wrap: wrap;
}

.aj-filter-chips {
	display: flex;
	border: 1px solid var(--aj-color-border-default, #dfe3ea);
	background-color: #ffffff;
}

.aj-filter-chip {
	font-family: var(--aj-font-mono, 'IBM Plex Mono', monospace);
	font-size: 12px;
	font-weight: 600;
	padding: 9px 17px;
	cursor: pointer;
	background-color: transparent;
	color: var(--aj-color-text-secondary, #616a78);
	border: none;
	border-left: 1px solid var(--aj-color-border-light, #eef1f6);
	transition: all 0.18s ease;
}

.aj-filter-chip:first-child {
	border-left: none;
}

.aj-filter-chip:hover,
.aj-filter-chip.active {
	background-color: var(--aj-color-navy-light, #1a3d74);
	color: #ffffff;
}

.aj-sec-list-meta {
	font-size: 13px;
	color: var(--aj-color-text-muted, #677487);
	margin-bottom: 16px;
}

.aj-sec-table-wrap {
	border-top: var(--aj-border-section, 3px) solid var(--aj-color-ink-heading, #16233a);
}

.aj-sec-thead {
	display: grid;
	grid-template-columns: 172px 1fr 152px;
	gap: 0 26px;
	align-items: start;
	padding: 11px 0 0;
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--aj-color-text-muted, #5f697a);
}

.aj-sec-thead span:last-child {
	text-align: right;
}

.aj-sec-load-more-wrap {
	text-align: center;
	margin-top: 30px;
}

/*
 * On a real category the Load more control is the next-page link, so it is an <a>
 * rather than a <button>. It carries no class of its own, so it borrows the outline
 * button's look here instead of duplicating those declarations in the template.
 */
.aj-sec-load-more-wrap a,
.aj-sec-load-more-wrap button {
	display: inline-block;
	background: transparent;
	border: var(--aj-border-emphasis, 1.5px) solid var(--aj-color-navy-primary, #1a3d74);
	color: var(--aj-color-navy-primary, #1a3d74);
	font-family: var(--aj-font-sans, 'IBM Plex Sans', sans-serif);
	font-size: var(--aj-fs-12-5, 12.5px);
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 14px 34px;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--aj-transition-color, 0.3s ease), color var(--aj-transition-color, 0.3s ease), opacity var(--aj-transition-color, 0.3s ease);
}

.aj-sec-load-more-wrap a:hover,
.aj-sec-load-more-wrap a:focus-visible,
.aj-sec-load-more-wrap button:hover,
.aj-sec-load-more-wrap button:focus-visible {
	background: var(--aj-color-navy-primary, #1a3d74);
	color: #ffffff;
}

.aj-sec-load-more-wrap [disabled],
.aj-sec-load-more-wrap.is-loading a,
.aj-sec-load-more-wrap.is-loading button {
	opacity: 0.6;
	cursor: wait;
	pointer-events: none;
}

/* ─── Full List: control groups ─── */
.aj-sec-control-group {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--aj-space-12, 12px);
}

.aj-sec-control-label {
	font-size: var(--aj-fs-9-5, 9.5px);
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #58616f;
	white-space: nowrap;
}

/*
 * Empty state — shown when a lean filter matches nothing. Kept in the markup and
 * toggled with [hidden] so the row list keeps its place in the document.
 */
.aj-sec-empty {
	margin: 0;
	text-align: center;
	padding: 60px 20px;
	color: var(--aj-color-ink-body, #616a78);
	font-family: var(--aj-font-serif, 'EB Garamond', serif);
	font-style: italic;
	font-size: var(--aj-fs-19, 19px);
}

/* ─── Responsive Media Queries ─── */
@media (max-width: 900px) {
	.aj-sec-grid {
		grid-template-columns: 1fr;
		gap: 30px;
	}
	.aj-sec-lens-grid {
		grid-template-columns: 1fr;
		gap: 26px;
	}
	.aj-sec-lens-left {
		border-right: none;
		padding-right: 0;
		border-bottom: 1px solid var(--aj-color-rule-section, #eef1f6);
		padding-bottom: 22px;
	}
	.aj-sec-intro-grid {
		grid-template-columns: 1fr;
		gap: 14px;
		align-items: start;
	}
}

@media (max-width: 760px) {
	.aj-sec-thead {
		display: none;
	}
	.aj-sec-title {
		font-size: 38px;
	}
	.aj-sec-h2 {
		font-size: 28px;
	}
}
