/**
 * Brel Digital — mobile & tablet overrides only.
 * Desktop layout lives in style.css; nothing here applies above 1023px
 * except shared utilities and archive-filter progressive enhancement.
 */

/* ==========================================================================
   Shared utilities (all breakpoints)
   ========================================================================== */
html {
	overflow-x: clip;
	-webkit-text-size-adjust: 100%;
}

body {
	overflow-x: clip;
}

:focus-visible {
	outline: var(--focus-outline, 2px solid var(--blue));
	outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: none;
}

.newsletter-form__label {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--text-secondary);
	margin-bottom: 0.25rem;
}

.site-footer .newsletter-form__label {
	color: rgba(232, 230, 225, 0.85);
}

.table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 1rem 0;
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

/* Archive filters — details drawer on small screens */
.archive-filters__top {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.65rem;
	align-items: start;
	margin-bottom: 0.65rem;
}

.archive-filters__details {
	border: 1px solid var(--border-strong);
	border-radius: var(--radius);
	background: var(--bg);
}

.archive-filters__details summary {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 1rem;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--text);
	cursor: pointer;
	list-style: none;
	white-space: nowrap;
}

.archive-filters__details summary::-webkit-details-marker {
	display: none;
}

.archive-filters__details summary::after {
	content: "";
	display: inline-block;
	width: 0.45rem;
	height: 0.45rem;
	margin-left: 0.45rem;
	border-right: 2px solid var(--text-secondary);
	border-bottom: 2px solid var(--text-secondary);
	transform: rotate(45deg);
	transition: transform 0.2s ease;
}

.archive-filters__details[open] summary::after {
	transform: rotate(-135deg);
}

.archive-filters__panel {
	display: grid;
	gap: 0.65rem;
	padding: 0 0.85rem 0.85rem;
	border-top: 1px solid var(--border);
}

.archive-filters__field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	min-width: 0;
}

.archive-filters__field > label {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--text-secondary);
	line-height: 1.3;
}

.archive-filters__field--action {
	justify-content: flex-end;
}

.archive-filters__field--action .btn {
	align-self: stretch;
	width: 100%;
}

@media (min-width: 768px) {
	.archive-filters__top {
		grid-template-columns: 1fr;
		margin-bottom: 0;
	}

	.archive-filters__details {
		border: none;
		background: transparent;
	}

	.archive-filters__details summary {
		display: none;
	}

	.archive-filters__panel {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		padding: 0;
		border: none;
		gap: 0.75rem 0.65rem;
	}

	.archive-filters--founders .archive-filters__panel {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.archive-filters__field--action {
		justify-content: flex-end;
	}

	.archive-filters__field--action .btn {
		align-self: end;
		width: auto;
		min-width: 8.5rem;
	}
}

@media (min-width: 1024px) {
	/* Closed filter drawer: search + Filters toggle side-by-side */
	.archive-filters__top {
		grid-template-columns: 1.5fr auto;
		align-items: center;
	}

	/* Open filter drawer (Explorer): stack full-width so the panel is not squeezed */
	.archive-filters__top:has(.archive-filters__details[open]) {
		grid-template-columns: 1fr;
		align-items: stretch;
	}

	.archive-filters__top:has(.archive-filters__details[open]) > input[type="search"] {
		max-width: 28rem;
	}
}

.archive-filters__noscript {
	font-size: 0.875rem;
	color: var(--text-muted);
	margin: 0 0 1rem;
}

/* ==========================================================================
   Mobile header & drawer — max 1023px
   ========================================================================== */
@media (max-width: 1023px) {
	.site-header__bar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 0.75rem;
		padding: 0;
		height: var(--header-h);
		max-width: 100%;
	}

	.site-header.is-scrolled {
		box-shadow: none;
		background: var(--bg);
		backdrop-filter: none;
	}

	.site-branding {
		min-width: 0;
		flex: 0 1 auto;
	}

	.site-branding__wordmark {
		font-size: 1.5rem;
	}

	.site-branding__suffix {
		font-size: 0.75rem;
	}

	.header-cta {
		display: none;
	}

	/* Hero + sticky search cover discovery — free the header */
	.header-search {
		display: none !important;
	}

	.site-header__tools {
		flex: 0 0 auto;
		min-width: 0;
	}

	.menu-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 48px;
		height: 48px;
		min-width: 48px;
		min-height: 48px;
		padding: 0;
		background: var(--surface);
		border: 1px solid var(--border);
		border-radius: var(--radius);
		cursor: pointer;
		color: var(--text);
		flex-shrink: 0;
	}

	.menu-toggle__bars {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 5px;
		width: 18px;
	}

	.menu-toggle__bars span {
		display: block;
		height: 2px;
		background: currentColor;
		border-radius: 1px;
		transition: transform 0.2s ease, opacity 0.2s ease;
	}

	body.nav-open .menu-toggle__bars span:nth-child(1) {
		transform: translateY(7px) rotate(45deg);
	}

	body.nav-open .menu-toggle__bars span:nth-child(2) {
		opacity: 0;
	}

	body.nav-open .menu-toggle__bars span:nth-child(3) {
		transform: translateY(-7px) rotate(-45deg);
	}

	.site-nav {
		position: fixed;
		inset: 0;
		z-index: 300;
		pointer-events: none;
		visibility: hidden;
		overflow: hidden;
		width: 100%;
		max-width: 100vw;
	}

	.site-nav.is-open {
		pointer-events: auto;
		visibility: visible;
	}

	.site-nav__backdrop {
		position: absolute;
		inset: 0;
		border: none;
		background: rgba(15, 23, 42, 0.45);
		opacity: 0;
		transition: opacity 0.25s ease;
		cursor: pointer;
	}

	.site-nav.is-open .site-nav__backdrop {
		opacity: 1;
	}

	.site-nav__drawer {
		position: absolute;
		top: 0;
		right: 0;
		width: min(100%, 20rem);
		max-width: 100%;
		height: 100%;
		background: var(--surface);
		border-left: 1px solid var(--border);
		display: flex;
		flex-direction: column;
		padding: 0;
		transform: translateX(100%);
		transition: transform 0.28s ease;
		box-shadow: -8px 0 32px rgba(15, 23, 42, 0.1);
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.site-nav.is-open .site-nav__drawer {
		transform: translateX(0);
	}

	.site-nav__drawer-head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 1rem 1.125rem;
		border-bottom: 1px solid var(--border);
		flex-shrink: 0;
	}

	.site-nav__drawer-title {
		font-size: 0.8125rem;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: 0.1em;
		color: var(--text-secondary);
	}

	.site-nav__close {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 48px;
		height: 48px;
		border: none;
		background: transparent;
		font-size: 1.75rem;
		line-height: 1;
		color: var(--text-secondary);
		cursor: pointer;
		border-radius: var(--radius);
	}

	.site-nav__menu {
		list-style: none !important;
		margin: 0 !important;
		padding: 0.5rem 0 !important;
		flex: 1 1 auto;
		overflow-y: auto;
		overflow-x: hidden;
		display: block !important;
		flex-direction: column !important;
		flex-wrap: nowrap !important;
		gap: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
	}

	.site-nav__menu > li {
		display: block !important;
		width: 100%;
		margin: 0;
	}

	.site-nav__menu a,
	.site-nav__menu > li > a {
		display: flex !important;
		align-items: center;
		width: 100%;
		box-sizing: border-box;
		min-height: 52px;
		height: auto !important;
		padding: 0.85rem 1.25rem !important;
		margin: 0 !important;
		font-size: 1.0625rem !important;
		font-weight: 500;
		color: var(--text) !important;
		border-bottom: 1px solid var(--border) !important;
		border-radius: 0 !important;
		background: transparent !important;
		line-height: 1.3 !important;
	}

	.site-nav__menu > li.current-menu-item > a,
	.site-nav__menu > li.current_page_item > a {
		color: var(--blue) !important;
		background: var(--blue-light) !important;
		border-bottom-color: var(--border) !important;
		font-weight: 600;
	}

	.site-nav__menu .sub-menu {
		list-style: none;
		margin: 0;
		padding: 0 0 0.35rem 0.85rem;
	}

	.site-nav__menu .sub-menu a {
		min-height: 44px;
		font-size: 0.9875rem;
		font-weight: 400;
		color: var(--text-secondary);
	}

	.site-nav__cta {
		padding: 1.125rem;
		border-top: 1px solid var(--border);
		background: var(--bg);
	}

	.site-nav__cta-label {
		font-size: 0.8125rem;
		font-weight: 600;
		text-transform: uppercase;
		letter-spacing: 0.08em;
		color: var(--text-secondary);
		margin: 0 0 0.65rem;
	}

	.site-nav__cta .btn {
		width: 100%;
		justify-content: center;
		min-height: 48px;
	}

	body.nav-open {
		overflow: hidden;
	}
}

/* Desktop header — restore horizontal nav */
@media (min-width: 1024px) {
	.site-header__bar {
		display: grid;
		grid-template-columns: auto 1fr auto;
		align-items: center;
		gap: 1.5rem;
		padding: 0;
		height: var(--header-h);
	}

	.site-header__tools {
		justify-self: end;
	}

	.menu-toggle,
	.site-nav__drawer-head,
	.site-nav__close,
	.site-nav__cta,
	.site-nav__backdrop {
		display: none !important;
	}

	.site-nav {
		position: static;
		inset: auto;
		pointer-events: auto;
		visibility: visible;
		justify-self: center;
		z-index: auto;
	}

	.site-nav__drawer {
		position: static;
		width: auto;
		height: auto;
		transform: none;
		box-shadow: none;
		border: none;
		background: transparent;
		display: block;
		padding: 0;
	}

	.site-nav__menu {
		display: flex;
		flex-wrap: nowrap;
		justify-content: center;
		align-items: center;
		gap: 2rem;
		padding: 0;
		overflow: visible;
	}

	.site-nav__menu a {
		display: inline-flex;
		align-items: center;
		min-height: 48px;
		height: 48px;
		padding: 0;
		font-size: 1.0625rem;
		color: var(--text);
		border-bottom: 2px solid transparent;
		background: transparent;
	}

	.header-cta {
		display: inline-flex;
		align-items: center;
	}
}

/* ==========================================================================
   Mobile & tablet layout — max 767px
   ========================================================================== */
@media (max-width: 767px) {
	.site-container {
		padding-left: 1.125rem;
		padding-right: 1.125rem;
	}

	body {
		font-size: 1.0625rem;
		line-height: 1.65;
	}

	input[type="search"],
	input[type="email"],
	select {
		min-height: 48px;
		font-size: 1rem;
	}

	/* Hero */
	.hero {
		padding: 2rem 0 1.75rem;
	}

	.hero__grid {
		display: flex;
		flex-direction: column;
		gap: 1.75rem;
	}

	.hero__title {
		font-size: clamp(2.125rem, 9vw, 2.75rem);
		line-height: 1.12;
		margin-bottom: 1rem;
	}

	.hero__lead {
		font-size: 1.125rem;
		margin-bottom: 1.5rem;
		max-width: none;
	}

	.hero__actions {
		flex-direction: column;
		align-items: stretch;
		gap: 0.65rem;
		margin-bottom: 1.25rem;
	}

	.hero__actions .btn {
		width: 100%;
		justify-content: center;
		min-height: 50px;
	}

	.hero__actions .btn--secondary {
		background: transparent;
		border: 1px solid var(--border-strong);
		color: var(--text) !important;
	}

	.hero__credibility {
		font-size: 0.9375rem;
	}

	/* Intelligence digest */
	.intel-panel {
		border-radius: 6px;
		box-shadow: 0 1px 3px rgba(22, 22, 22, 0.04);
	}

	.intel-panel__tags {
		display: none;
	}

	.intel-panel__list .intel-item:nth-child(n + 4) {
		display: none;
	}

	.intel-panel__featured:nth-of-type(n + 2) {
		display: none;
	}

	.intel-item {
		padding: 0.875rem 1.125rem;
		align-items: flex-start;
	}

	.intel-item__meta {
		white-space: normal;
		text-align: right;
		max-width: 38%;
	}

	.intel-panel__footer-link {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 48px;
		padding: 0.75rem 1.125rem;
		border-top: 1px solid var(--border);
		font-size: 0.9375rem;
		font-weight: 600;
		color: var(--blue);
		background: var(--bg);
	}

	/* Sections */
	.section {
		padding: 2.25rem 0;
	}

	.site-main {
		padding: 0 0 3rem;
	}

	.site-main--front {
		padding-bottom: 0;
	}

	.section-header {
		margin-bottom: 1.5rem;
	}

	.section-header--row {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.65rem;
	}

	.section-title {
		font-size: clamp(1.75rem, 6vw, 2rem);
	}

	.section-header__action,
	.section-header--row .text-link {
		white-space: normal;
	}

	.home-section-grid > *:nth-child(n + 3) {
		display: none;
	}

	.home-section-table .company-row:nth-child(n + 4) {
		display: none;
	}

	/* Sector hubs — show all on mobile (navigation, not previews) */
	.sector-grid--home {
		display: grid;
		grid-template-columns: 1fr;
		gap: 0.75rem;
		background: transparent;
		border: none;
		border-radius: 0;
		overflow: visible;
	}

	.sector-grid--home .sector-card {
		border: 1px solid var(--border);
		border-radius: 6px;
		min-height: auto;
		padding: 1.125rem 1.25rem;
	}

	/* Insights — show all published previews on mobile */
	.insights-grid--home {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.matters-featured,
	.founder-grid.home-section-grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.founder-grid.home-section-grid > *:nth-child(n + 3) {
		display: none;
	}

	.section-empty {
		color: var(--text-secondary);
		font-size: 1rem;
		line-height: 1.6;
		margin: 0 0 1rem;
	}

	/* Cards */
	.card__link,
	.card__link--insight,
	.card__link--founder {
		padding: 1.25rem;
	}

	.card--insight .card__title,
	.card--matter .card__title {
		min-height: auto;
		-webkit-line-clamp: unset;
		display: block;
	}

	.card--insight .card__excerpt,
	.card--matter .card__excerpt {
		-webkit-line-clamp: unset;
		display: block;
	}

	.sector-card {
		min-height: auto;
		padding: 1.25rem;
	}

	.final-cta {
		padding: 2rem 1.25rem;
		text-align: left;
	}

	.final-cta__title,
	.final-cta__text {
		text-align: left;
		margin-left: 0;
		margin-right: 0;
	}

	.final-cta .btn {
		width: 100%;
		min-height: 50px;
	}

	/* Company mobile cards */
	.company-table {
		border: none;
		background: transparent;
		display: flex;
		flex-direction: column;
		gap: 0.75rem;
	}

	.company-table__head {
		display: none !important;
	}

	.company-row {
		border: 1px solid var(--border);
		border-radius: 6px;
		background: var(--surface);
		overflow: hidden;
	}

	.company-row__link {
		display: flex;
		flex-direction: column;
		gap: 0.75rem;
		padding: 1.125rem;
	}

	.company-row__head {
		display: flex;
		align-items: flex-start;
		gap: 0.85rem;
	}

	.company-row__logo {
		width: 44px;
		height: 44px;
	}

	.company-row__title {
		display: block;
		font-family: var(--font-serif);
		font-size: 1.125rem;
		font-weight: 600;
		line-height: 1.3;
		margin-bottom: 0.2rem;
	}

	.company-row__desc {
		font-size: 0.9375rem;
		color: var(--text-secondary);
		margin: 0;
		line-height: 1.5;
	}

	.company-row__meta {
		display: flex;
		flex-wrap: wrap;
		gap: 0.4rem;
	}

	.company-row__pill {
		display: inline-block;
		font-size: 0.8125rem;
		font-weight: 500;
		padding: 0.3rem 0.65rem;
		background: var(--bg);
		border: 1px solid var(--border);
		border-radius: 999px;
		color: var(--text-secondary);
	}

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

	.company-row__profile-link {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		margin-top: 0.15rem;
		font-weight: 600;
		color: var(--blue);
	}

	.company-row__sector::before,
	.company-row__country::before,
	.company-row__why::before {
		content: none !important;
	}

	/* Archives */
	.archive-main,
	.single-main {
		padding: 1.75rem 0 3rem;
	}

	.archive-header__title {
		font-size: clamp(2rem, 8vw, 2.5rem);
	}

	.archive-filters__top {
		flex-direction: column;
		display: flex;
	}

	/* Profiles */
	.profile-header__title {
		font-size: clamp(2rem, 8vw, 2.375rem);
	}

	.profile-header__actions .btn {
		width: 100%;
		min-height: 50px;
		justify-content: center;
	}

	.profile-meta-bar {
		grid-template-columns: 1fr 1fr;
	}

	.founder-profile-header {
		grid-template-columns: auto 1fr;
		gap: 1rem;
	}

	.founder-profile-header__photo {
		width: 72px;
		height: 72px;
	}

	.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__body {
		padding: 0 1.125rem 1.125rem;
		border-top: 1px solid var(--border);
	}

	.table-scroll::before {
		content: "Scroll horizontally \2192";
		display: block;
		font-size: 0.75rem;
		font-weight: 600;
		text-transform: uppercase;
		letter-spacing: 0.06em;
		color: var(--text-muted);
		padding: 0.5rem 0.85rem;
		background: var(--bg);
		border-bottom: 1px solid var(--border);
	}

	/* Newsletter */
	.newsletter-form input[type="email"],
	.newsletter-form .btn {
		width: 100%;
		min-height: 50px;
	}

	.newsletter-form .btn {
		justify-content: center;
	}

	.brief-block {
		grid-template-columns: 1fr;
		gap: 1.25rem;
		padding: 1.5rem 1.25rem;
	}

	.profile-cta .btn {
		width: 100%;
		min-height: 50px;
	}

	/* Footer — stacked columns on small screens */
	.site-footer__grid,
	.site-footer__grid--hub {
		grid-template-columns: 1fr;
		gap: 1.75rem;
	}

	.footer-nav-hub {
		grid-column: auto;
		grid-template-columns: 1fr;
		gap: 1.5rem;
		border-top: none;
		padding-top: 0;
	}

	.footer-col--brief {
		padding-top: 0.5rem;
		border-top: 1px solid rgba(255, 255, 255, 0.12);
		order: 6;
	}

	.footer-col--brand {
		order: 0;
	}

	.footer-nav-hub {
		order: 1;
	}

	.footer-links--legal {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.25rem;
	}
}

@media (min-width: 768px) {
	.intel-panel__footer-link {
		display: none;
	}
}

/* ==========================================================================
   Desktop company table — new card HTML in grid layout
   ========================================================================== */
@media (min-width: 900px) {
	.company-row__head {
		display: flex;
		align-items: center;
		gap: 0.75rem;
	}

	.company-row__title {
		display: block;
		font-family: var(--font-serif);
		font-size: 1.0625rem;
		font-weight: 600;
		margin-bottom: 0.15rem;
	}

	.company-row__desc {
		font-style: normal;
		font-size: 1rem;
		color: var(--text-secondary);
		margin: 0;
	}

	.company-row__meta {
		display: contents;
	}

	.company-row__pill {
		background: transparent;
		border: none;
		padding: 0;
		border-radius: 0;
		font-size: 1rem;
		color: var(--text-secondary);
	}

	.company-row__why-label {
		display: none;
	}

	.company-row__link {
		grid-template-columns: 1.4fr 0.8fr 0.7fr 1.6fr;
	}

	.company-row__sector {
		grid-column: 2;
	}

	.company-row__country {
		grid-column: 3;
	}

	.company-row__summary {
		grid-column: 4;
	}
}
