/**
 * Information Design Excellence — presentation layer only.
 * Aligns page types with DESIGN_SYSTEM.md scanability rules.
 * No architecture / navigation / template redesign.
 */

/* ==========================================================================
   Intelligence Summary — ATF structured intelligence
   ========================================================================== */

.intel-summary {
	margin: 0 0 var(--space-lg);
}

.intel-summary--panel {
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	background: var(--surface);
	box-shadow: var(--shadow-soft);
	overflow: hidden;
}

.intel-summary__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.65rem 1rem;
	padding: 0.85rem 1.15rem;
	border-bottom: 1px solid var(--border);
	background: color-mix(in srgb, var(--bg) 70%, var(--surface));
}

.intel-summary__titles {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	flex-wrap: wrap;
}

.intel-summary__eyebrow {
	margin: 0;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-muted);
}

.intel-summary__entity {
	display: inline-flex;
	align-items: center;
	padding: 0.15rem 0.5rem;
	border: 1px solid var(--border);
	border-radius: 4px;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--text-secondary);
	background: var(--surface);
}

.intel-summary__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.intel-summary__badges li {
	padding: 0.2rem 0.55rem;
	border: 1px solid var(--border);
	border-radius: 999px;
	font-size: 0.6875rem;
	font-weight: 600;
	color: var(--text-secondary);
	background: var(--hover);
}

.intel-summary__facts {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 1px;
	background: var(--border);
}

.intel-summary__fact {
	padding: 0.95rem 1.1rem;
	background: var(--surface);
}

.intel-summary__fact span {
	display: block;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-muted);
	margin-bottom: 0.25rem;
}

.intel-summary__fact strong {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--text);
	line-height: 1.35;
}

.intel-summary__fact a {
	color: var(--text);
	text-decoration: underline;
	text-decoration-color: var(--border-strong);
	text-underline-offset: 0.12em;
}

.intel-summary__fact a:hover {
	color: var(--blue);
	text-decoration-color: var(--blue);
}

.intel-summary__coverage {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
	gap: 1px;
	background: var(--border);
	border-top: 1px solid var(--border);
}

.intel-summary__coverage div {
	padding: 0.75rem 0.85rem;
	background: color-mix(in srgb, var(--bg) 55%, var(--surface));
	text-align: left;
}

.intel-summary__coverage strong {
	display: block;
	font-family: var(--font-serif);
	font-size: 1.25rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.1;
	color: var(--text);
}

.intel-summary__coverage span {
	display: block;
	margin-top: 0.15rem;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--text-muted);
}

.intel-relations {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	margin: 0 0 var(--space-lg);
	padding: 1rem 1.15rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--surface);
}

.intel-relations__label {
	margin: 0 0 0.45rem;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-muted);
}

.intel-relations__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.intel-relations__chip {
	display: inline-block;
	padding: 0.3rem 0.65rem;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--hover);
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--text);
	text-decoration: none;
}

.intel-relations__chip:hover {
	border-color: var(--blue);
	color: var(--blue);
	background: var(--blue-light);
}

.card__badges,
.insight-card__badges,
.company-row__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
	margin-top: 0.45rem;
}

.card__badge,
.insight-card__badge,
.company-row__badge {
	display: inline-block;
	padding: 0.12rem 0.45rem;
	border: 1px solid var(--border);
	border-radius: 4px;
	font-size: 0.625rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-muted);
	background: var(--hover);
}

.brel-ac__meta {
	display: block;
	font-size: 0.75rem;
	color: var(--text-muted);
	margin-top: 0.1rem;
}

.brel-ac__label {
	font-weight: 600;
}

.brel-ac__item {
	line-height: 1.35;
}

.brel-ac__type {
	display: inline-block;
	min-width: 4.5rem;
	margin-right: 0.5rem;
	font-weight: 700;
}

/* ==========================================================================
   FAQ accordion — premium (all breakpoints)
   ========================================================================== */

.intel-faq {
	margin: 0 0 var(--space-lg);
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--surface);
	box-shadow: var(--shadow-soft);
	overflow: hidden;
}

.intel-faq__head {
	padding: 0.95rem 1.2rem;
	border-bottom: 1px solid var(--border);
	background: color-mix(in srgb, var(--bg) 65%, var(--surface));
}

.intel-faq__eyebrow {
	margin: 0;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-muted);
}

.intel-faq__title {
	margin: 0.25rem 0 0;
	font-family: var(--font-serif);
	font-size: 1.25rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--text);
}

.intel-faq__item {
	border-bottom: 1px solid var(--border);
	margin: 0;
	background: transparent;
	border-radius: 0;
}

.intel-faq__item:last-of-type {
	border-bottom: 0;
}

.intel-faq__item summary {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 1rem 3rem 1rem 1.2rem;
	font-family: var(--font-sans);
	font-size: 0.975rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--text);
	cursor: pointer;
	list-style: none;
	min-height: 3.25rem;
	transition: background var(--transition);
}

.intel-faq__item summary::-webkit-details-marker {
	display: none;
}

.intel-faq__item summary::marker {
	content: '';
}

.intel-faq__item summary::after {
	content: '';
	position: absolute;
	right: 1.2rem;
	top: 50%;
	width: 0.55rem;
	height: 0.55rem;
	border-right: 1.5px solid var(--text-muted);
	border-bottom: 1.5px solid var(--text-muted);
	transform: translateY(-65%) rotate(45deg);
	transition: transform 0.2s ease, border-color 0.2s ease;
}

.intel-faq__item[open] summary {
	background: var(--hover);
	color: var(--text);
}

.intel-faq__item[open] summary::after {
	transform: translateY(-25%) rotate(225deg);
	border-color: var(--blue);
}

.intel-faq__item summary:hover {
	background: var(--hover);
}

.intel-faq__body {
	padding: 0 1.2rem 1.15rem;
	border-top: 1px solid var(--border);
	background: var(--surface);
}

.intel-faq__body p {
	margin: 0.85rem 0 0;
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--text-secondary);
	max-width: 42rem;
}

.intel-faq__note {
	margin: 0;
	padding: 0.85rem 1.2rem;
	border-top: 1px solid var(--border);
	font-size: 0.8125rem;
	color: var(--text-muted);
	background: color-mix(in srgb, var(--bg) 50%, var(--surface));
	line-height: 1.5;
}

/* Nested profile-details inside FAQ must not look like browser defaults */
.intel-faq .profile-details,
.profile-highlight .profile-details.intel-faq__item {
	border: 0;
	background: transparent;
}

/* Generic profile-details (all breakpoints — was mobile-only before) */
.profile-details {
	margin: 1.25rem 0;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--surface);
}

.profile-details > summary {
	padding: 1rem 1.125rem;
	font-family: var(--font-serif);
	font-size: 1.0625rem;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
	min-height: 48px;
	display: flex;
	align-items: center;
}

.profile-details > summary::-webkit-details-marker {
	display: none;
}

.profile-details > summary::marker {
	content: '';
}

.profile-details__body {
	padding: 0 1.125rem 1.125rem;
	border-top: 1px solid var(--border);
}

/* ==========================================================================
   TOC — static, scannable (never sticky overlay)
   ========================================================================== */

.toc {
	margin: 0 0 var(--space-lg);
	padding: 0;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	box-shadow: var(--shadow-soft);
	overflow: hidden;
	position: static !important;
	top: auto !important;
}

.toc__heading {
	margin: 0;
	padding: 0.85rem 1.2rem;
	font-family: var(--font-sans);
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-muted);
	background: color-mix(in srgb, var(--bg) 65%, var(--surface));
	border-bottom: 1px solid var(--border);
}

.toc__list {
	margin: 0;
	padding: 0.65rem 0;
	list-style: none;
	counter-reset: toc;
}

.toc__list li {
	counter-increment: toc;
	margin: 0;
}

.toc__list a {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	padding: 0.45rem 1.2rem;
	color: var(--text);
	text-decoration: none;
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.4;
	transition: background var(--transition), color var(--transition);
}

.toc__list a::before {
	content: counter(toc, decimal-leading-zero);
	flex: 0 0 1.5rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--text-muted);
	font-variant-numeric: tabular-nums;
}

.toc__list a:hover {
	background: var(--hover);
	color: var(--blue);
	text-decoration: none;
}

.toc--sticky {
	position: static !important;
	top: auto !important;
}


/* ==========================================================================
   Orphan utilities used across hubs
   ========================================================================== */

.archive-header__status {
	margin: 0.65rem 0 0;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--text-secondary);
	letter-spacing: 0.01em;
}

.archive-header__status a.text-link {
	font-weight: 600;
}

.sector-hub__explore {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.15rem;
	margin: var(--space-xl) 0 0;
	padding-top: var(--space-md);
	border-top: 1px solid var(--border);
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--text-muted);
}

.sector-hub__explore .text-link {
	color: var(--blue);
	font-weight: 600;
	text-decoration: none;
	padding: 0.2rem 0.45rem;
	border-radius: 4px;
}

.sector-hub__explore .text-link:hover {
	background: var(--hover);
	color: var(--blue-hover);
}

/* ==========================================================================
   Homepage density strip
   ========================================================================== */

.hero__facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
	gap: 1px;
	background: var(--border);
	border: 1px solid var(--border);
	border-radius: 6px;
	overflow: hidden;
	margin: 1.25rem 0 0;
	max-width: 36rem;
}

.hero__facts div,
.hero__facts a {
	padding: 0.85rem 0.75rem;
	background: var(--surface);
	text-align: left;
	text-decoration: none;
	color: inherit;
	display: block;
	transition: background 0.15s ease;
}

.hero__facts a:hover,
.hero__facts a:focus-visible {
	background: var(--hover);
}

.hero__facts span {
	display: block;
	font-size: 0.625rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-muted);
	margin-bottom: 0.2rem;
}

.hero__facts strong {
	display: block;
	font-family: var(--font-serif);
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--text);
	letter-spacing: -0.02em;
	line-height: 1.15;
}

.hero__credibility {
	font-size: 0.875rem;
	color: var(--text-muted);
	margin: 0.85rem 0 0;
	max-width: 34rem;
	line-height: 1.5;
}

/* Intelligence feed tags — full wrap, never clipped */
.hero__panel .intel-panel__tags {
	max-height: none;
	overflow: visible;
	padding: 0.9rem 1.15rem;
	gap: 0.45rem;
	background: color-mix(in srgb, var(--bg) 55%, var(--surface));
}

.hero__panel .intel-tag {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	padding: 0.4rem 0.75rem;
	line-height: 1.25;
	white-space: nowrap;
}

/* ==========================================================================
   Entity ATF: meta bar hierarchy
   ========================================================================== */

.profile-meta-bar {
	box-shadow: var(--shadow-soft);
}

.profile-meta-bar a {
	color: var(--text);
	text-decoration: underline;
	text-decoration-color: var(--border-strong);
	text-underline-offset: 0.12em;
}

.profile-meta-bar a:hover {
	color: var(--blue);
	text-decoration-color: var(--blue);
}

.profile-header__tags {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-top: 0.85rem;
}

.profile-header__tags .sector-tags,
.profile-header__tags .technology-tags {
	margin: 0;
}

/* Primary takeaway only — demote subsequent gold callouts */
.profile-article > .profile-highlight {
	margin-top: 0;
}

.profile-article > .profile-highlight ~ .profile-highlight,
.profile-article section.profile-highlight ~ section.profile-highlight {
	background: var(--surface);
	border: 1px solid var(--border);
	border-left: 3px solid var(--border-strong);
	box-shadow: none;
}

.profile-article > .profile-highlight ~ .profile-highlight h2,
.profile-article section.profile-highlight ~ section.profile-highlight h2 {
	color: var(--text-muted);
}

/* Relationship lists as scannable chips when nested in highlights */
.profile-highlight .product-link-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 0.5rem;
}

.profile-highlight .product-link-list li {
	margin: 0;
}

.profile-highlight .product-link-list a {
	display: inline-block;
	padding: 0.3rem 0.65rem;
	background: var(--hover);
	border: 1px solid var(--border);
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--text);
	text-decoration: none;
}

.profile-highlight .product-link-list a:hover {
	border-color: var(--blue);
	color: var(--blue);
	background: var(--blue-light);
}

/* ==========================================================================
   Hub / model fact bars
   ========================================================================== */

.hub-fact-bar {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 1px;
	background: var(--border);
	border: 1px solid var(--border);
	border-radius: 6px;
	overflow: hidden;
	margin: 0 0 var(--space-lg);
	box-shadow: var(--shadow-soft);
}

.hub-fact-bar div {
	padding: 0.95rem 1.1rem;
	background: var(--surface);
}

.hub-fact-bar span {
	display: block;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-muted);
	margin-bottom: 0.25rem;
}

.hub-fact-bar strong {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--text);
	line-height: 1.35;
}

.hub-fact-bar a {
	color: var(--text);
	text-decoration: underline;
	text-underline-offset: 0.12em;
}

.hub-fact-bar a:hover {
	color: var(--blue);
}

/* ==========================================================================
   Cards — denser, clearer hierarchy
   ========================================================================== */

.card__meta,
.sector-card__meta,
.matter-card__meta {
	font-size: 0.8125rem;
	color: var(--text-muted);
	letter-spacing: 0.01em;
}

.card__title,
.sector-card__title {
	letter-spacing: -0.02em;
}

.card__excerpt,
.sector-card__desc {
	font-size: 0.9375rem;
	color: var(--text-secondary);
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ==========================================================================
   Tables — Bloomberg density
   ========================================================================== */

.company-table {
	box-shadow: var(--shadow-soft);
}

@media (min-width: 900px) {
	.company-table__head {
		position: sticky;
		top: 4.5rem;
		z-index: 5;
		background: var(--bg);
		backdrop-filter: saturate(1.05);
	}
}

.company-row__link {
	transition: background var(--transition);
}

.company-row__name {
	font-weight: 600;
	letter-spacing: -0.01em;
}

/* ==========================================================================
   Glossary / lists scan
   ========================================================================== */

.glossary-list li {
	padding: 0.85rem 0;
	border-bottom: 1px solid var(--border);
}

.glossary-list li:last-child {
	border-bottom: 0;
}

.glossary-list strong {
	font-family: var(--font-serif);
	font-size: 1.0625rem;
	font-weight: 600;
	letter-spacing: -0.015em;
}

.glossary-list p {
	margin: 0.35rem 0 0;
	font-size: 0.9375rem;
	color: var(--text-secondary);
	line-height: 1.55;
}

.glossary-alpha {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0 0 var(--space-lg);
	padding: 0.75rem 0;
	position: sticky;
	top: 4.25rem;
	z-index: 4;
	background: color-mix(in srgb, var(--bg) 92%, transparent);
	backdrop-filter: blur(6px);
}

.glossary-alpha a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2rem;
	min-height: 2rem;
	padding: 0.25rem 0.45rem;
	border: 1px solid var(--border);
	border-radius: 4px;
	background: var(--surface);
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--text-secondary);
	text-decoration: none;
}

.glossary-alpha a:hover {
	border-color: var(--blue);
	color: var(--blue);
	background: var(--blue-light);
}

/* ==========================================================================
   Explorer / Compare — tool first
   ========================================================================== */

.method-disclosure {
	margin: 0 0 var(--space-md);
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--surface);
}

.method-disclosure summary {
	cursor: pointer;
	list-style: none;
	padding: 0.85rem 1.1rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--text-secondary);
}

.method-disclosure summary::-webkit-details-marker {
	display: none;
}

.method-disclosure[open] summary {
	border-bottom: 1px solid var(--border);
	color: var(--text);
}

.method-disclosure__body {
	padding: 0.85rem 1.1rem 1.1rem;
	font-size: 0.9375rem;
	color: var(--text-secondary);
	line-height: 1.6;
}

.method-disclosure__body p:last-child {
	margin-bottom: 0;
}

.explorer-results-label {
	margin: 0 0 0.75rem;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-muted);
}

.compare-matrix__row.is-match .compare-matrix__cell {
	background: color-mix(in srgb, var(--success) 6%, var(--surface));
}

.compare-matrix__row.is-diff .compare-matrix__cell:not(.compare-matrix__attr) {
	background: color-mix(in srgb, var(--warning) 7%, var(--surface));
}

.compare-filters__panel {
	display: grid;
	gap: 0.85rem;
	grid-template-columns: 1fr;
	max-width: 44rem;
	margin-bottom: var(--space-md);
}

@media (min-width: 720px) {
	.compare-filters__panel {
		grid-template-columns: 1fr 1fr auto;
		align-items: end;
	}
}

.compare-filters .archive-filters__field label,
.compare-filters label {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--text-muted);
	margin-bottom: 0.35rem;
}

.compare-filters select {
	width: 100%;
}

.collection-card__stat {
	display: flex;
	align-items: baseline;
	gap: 0.4rem;
	margin: 0.65rem 0 0;
}

.collection-card__stat strong {
	font-family: var(--font-serif);
	font-size: 1.5rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--text);
	line-height: 1;
}

.collection-card__stat span {
	font-size: 0.8125rem;
	color: var(--text-muted);
}

.profile-header__actions {
	margin: 0.85rem 0 0;
}

.article-meta--reviewed,
.editorial-disclosure {
	font-size: 0.8125rem;
	color: var(--text-muted);
}

.compare-matrix {
	box-shadow: var(--shadow-soft);
	border-radius: 6px;
	overflow: hidden;
}

.compare-matrix__head {
	position: sticky;
	top: 4.5rem;
	z-index: 4;
}

/* ==========================================================================
   Section rhythm — scannable hubs
   ========================================================================== */

.tech-hub-section {
	padding-top: 0.25rem;
}

.tech-hub-section + .tech-hub-section {
	margin-top: var(--space-md);
	padding-top: var(--space-md);
	border-top: 1px solid var(--border);
}

.section-subtitle {
	scroll-margin-top: 5rem;
}

.archive-header {
	max-width: 46rem;
}

.archive-header__lead {
	font-size: 1.0625rem;
	line-height: 1.65;
}

/* ==========================================================================
   Mobile touch / density
   ========================================================================== */

@media (max-width: 767px) {
	.hero__facts {
		grid-template-columns: repeat(2, 1fr);
		max-width: none;
	}

	.hub-fact-bar,
	.profile-meta-bar {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.glossary-alpha {
		top: 3.75rem;
	}

	.company-table__head {
		position: static;
	}
}
