/*
 * Nego.Club — editorial refinement of Neurion.
 * Optional layer: all rules require the nego-refined body class.
 * Existing content, layout choices, fonts and navigation remain in place.
 */

body.nego-refined {
	font-size: 17px;
	--nego-accent: #d43f35;
	--nego-accent-contrast: #fff;
	--nego-ink: #282828;
	--nego-muted: #646464;
	--nego-surface: #f7f7f5;
	--nego-line: #e3e3e3;
	--nego-radius: 6px;
}

body.nego-refined :where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--nego-accent);
	outline-offset: 4px;
}

body.nego-refined :where(a, button, input, select, textarea) {
	-webkit-tap-highlight-color: transparent;
}

body.nego-refined :where(h1, h2, h3, h4, h5, h6),
body.nego-refined .site-description,
body.nego-refined .nego-home-intro {
	-webkit-hyphens: none;
	hyphens: none;
}

body.nego-refined .skip-link:focus {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 100000;
	padding: 12px 18px;
	background: var(--nego-ink);
	color: #fff;
}

/* Keep the existing centred masthead, with a quieter scale and more usable links. */
body.nego-refined .top-panel {
	border-bottom: 1px solid var(--nego-line);
	font-size: 13px;
	line-height: 1.5;
}

body.nego-refined .top-panel__message,
body.nego-refined .top-panel__menu {
	padding-block: 10px;
}

body.nego-refined .top-panel__message {
	margin: 0;
	letter-spacing: .02em;
}

body.nego-refined .top-panel__menu-list .menu-item a {
	font-size: 13px;
	font-weight: 300;
	line-height: 1.5;
}

body.nego-refined .header-container {
	padding-top: 28px;
	border-bottom: 1px solid var(--nego-line);
}

body.nego-refined .site-logo {
	margin-block: 0 12px;
	font-size: clamp(25px, 2.9vw, 40px);
	line-height: 1.2;
	letter-spacing: -.035em;
}

body.nego-refined .site-logo img {
	width: auto;
	max-width: min(100%, 220px);
	height: auto;
}

body.nego-refined .site-description {
	max-width: 40ch;
	margin-inline: auto;
	font-size: 13px;
	font-weight: 300;
	line-height: 1.65;
	letter-spacing: 0;
	color: var(--nego-muted);
	text-transform: none;
}

body.nego-refined .site-header.default .site-description,
body.nego-refined .site-header.minimal .site-description {
	margin-left: 0;
}

/* Telegram is not included in the theme's Font Awesome 4.6 icon map. */
body.nego-refined .social-list a[href*="t.me/"]::before {
	content: "\f1d8";
	font-family: FontAwesome;
}

body.nego-refined .main-navigation .menu > li > a {
	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: -.02em;
}

body.nego-refined .main-navigation .sub-menu {
	border: 1px solid var(--nego-line);
	border-radius: var(--nego-radius);
	box-shadow: 0 12px 32px rgb(0 0 0 / 7%);
}

body.nego-refined .main-navigation .sub-menu a {
	padding: 9px 20px;
	font-size: 14px;
	line-height: 1.55;
}

body.nego-refined .main-navigation .menu > li.current-menu-item > a {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 7px;
}

/* An editorial introduction, not a replacement of the blog homepage. */
body.nego-refined .nego-home-intro {
	padding-block: clamp(32px, 4.5vw, 68px);
	margin-bottom: 12px;
	border-bottom: 1px solid var(--nego-line);
}

body.nego-refined .nego-intro-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
	align-items: center;
}

body.nego-refined .nego-eyebrow {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 20px;
	color: var(--nego-accent);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.6;
	letter-spacing: .12em;
	text-transform: uppercase;
}

body.nego-refined .nego-eyebrow::before {
	content: "";
	width: 26px;
	height: 2px;
	background: currentColor;
	flex: 0 0 auto;
}

body.nego-refined .nego-intro-title {
	max-width: 22ch;
	margin: 0;
	font-size: clamp(31px, 3.25vw, 48px);
	font-weight: 500;
	line-height: 1.25;
	letter-spacing: -.045em;
	text-wrap: balance;
}

body.nego-refined .nego-intro-copy {
	max-width: 63ch;
	margin: 23px 0 0;
	color: var(--nego-muted);
	font-size: clamp(17px, 1.6vw, 19px);
	font-weight: 400;
	line-height: 1.8;
	letter-spacing: 0;
}

body.nego-refined .nego-intro-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 28px;
}

body.nego-refined .nego-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 48px;
	padding: 12px 22px;
	border: 1px solid var(--nego-accent);
	border-radius: var(--nego-radius);
	background: var(--nego-accent);
	color: var(--nego-accent-contrast);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.6;
	letter-spacing: 0;
	text-align: center;
	text-decoration: none;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

body.nego-refined .nego-button:hover {
	border-color: var(--nego-ink);
	background: var(--nego-ink);
	color: #fff;
}

body.nego-refined .nego-button--secondary {
	border-color: var(--nego-line);
	background: transparent;
	color: var(--nego-ink);
}

body.nego-refined .nego-intro-aside {
	min-width: 0;
	font-size: 16px;
	line-height: 1.75;
}

body.nego-refined .nego-intro-aside > :first-child { margin-top: 0; }
body.nego-refined .nego-intro-aside > :last-child { margin-bottom: 0; }
body.nego-refined .nego-intro-aside img { height: auto; }

body.nego-refined .nego-intro-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	margin-top: 22px;
	font-size: 14px;
	line-height: 1.7;
}

body.nego-refined .nego-intro-links a {
	color: var(--nego-muted);
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-color: var(--nego-line);
}

body.nego-refined .nego-intro-links a:hover {
	color: var(--nego-accent);
	text-decoration-color: currentColor;
}

body.nego-refined .nego-book-image {
	display: block;
	margin-bottom: 20px;
}

body.nego-refined .nego-book-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--nego-radius);
}

body.nego-refined .nego-book-caption {
	margin: 0 0 9px;
	color: var(--nego-muted);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.6;
	letter-spacing: .11em;
	text-transform: uppercase;
}

body.nego-refined .nego-book-title {
	margin: 0 0 8px;
	font-size: 21px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: -.025em;
}

body.nego-refined .nego-book-subtitle {
	margin: 0;
	color: var(--nego-muted);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.7;
}

body.nego-refined .nego-book-link {
	display: inline-block;
	margin-top: 14px;
	color: var(--nego-ink);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.7;
	text-decoration: underline;
	text-underline-offset: 5px;
	text-decoration-color: var(--nego-line);
}

body.nego-refined .nego-book-link:hover { color: var(--nego-accent); }

body.nego-refined .nego-latest-heading {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-top: 28px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--nego-line);
}

body.nego-refined .nego-latest-heading h2 {
	margin: 0;
	font-size: 19px;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: -.025em;
}

body.nego-refined .nego-latest-heading p {
	margin: 0;
	color: var(--nego-muted);
	font-size: 13px;
	line-height: 1.7;
}

/* Existing article list: clear rhythm, visible summaries on phones, quiet metadata. */
body.nego-refined .posts-list--default .posts-list__item {
	display: flow-root;
	margin-top: 0;
	padding-block: 36px;
	border-bottom: 1px solid var(--nego-line);
}

body.nego-refined .posts-list__item .entry-title {
	font-size: clamp(23px, 2.1vw, 30px);
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: -.035em;
	text-wrap: pretty;
}

body.nego-refined .posts-list__item .entry-title a {
	text-decoration: none;
	transition: color .18s ease;
}

body.nego-refined .posts-list__item .entry-title a:hover {
	color: var(--nego-accent);
}

body.nego-refined .posts-list .entry-content,
body.nego-refined .posts-list .entry-summary {
	display: block;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.85;
	letter-spacing: 0;
}

body.nego-refined .post-thumbnail__img {
	border-radius: var(--nego-radius);
	height: auto;
}

body.nego-refined .entry-meta,
body.nego-refined .entry-meta a {
	font-size: 13px;
	font-weight: 400;
	line-height: 1.8;
	color: var(--nego-muted);
	letter-spacing: 0;
}

body.nego-refined .entry-meta a:hover {
	color: var(--nego-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

body.nego-refined .posts-list .post__tags {
	margin-top: 5px;
	line-height: 1.6;
}

body.nego-refined .posts-list .post__tags a { margin-top: 0; }

body.nego-refined .posts-list .entry-footer {
	display: flow-root;
	margin-top: 16px;
}

body.nego-refined .posts-list .entry-footer .btn {
	min-height: 44px;
	margin: 0;
	padding: 9px 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--nego-ink);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.7;
	text-transform: none;
	letter-spacing: 0;
}

body.nego-refined .posts-list .entry-footer .btn:hover {
	color: var(--nego-accent);
}

body.nego-refined .posts-list .entry-footer .btn__text { display: inline; }
body.nego-refined .posts-list .entry-footer .btn .material-icons { margin-left: 9px; }

/* Long-form reading keeps the site's fonts and restores an easy line length. */
body.nego-refined.single .breadcrumbs__title { display: none; }
body.nego-refined.single .breadcrumbs__items { width: 100%; max-width: 100%; }
body.nego-refined.single .breadcrumbs__wrap {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 13px;
}

body.nego-refined.single-post .site-main > .post > .entry-header {
	margin-top: clamp(28px, 4vw, 52px);
	margin-bottom: 26px;
}

body.nego-refined.single-post .site-main > .post > .entry-header .entry-title {
	max-width: 30ch;
	font-size: clamp(30px, 3.45vw, 46px);
	line-height: 1.28;
	letter-spacing: -.04em;
	text-wrap: balance;
}

body.nego-refined.single-post .site-main > .post > .entry-content {
	max-width: 76ch;
	font-size: clamp(18px, 1.7vw, 20px);
	line-height: 1.85;
	font-weight: 400;
	letter-spacing: 0;
}

body.nego-refined.single-post .entry-content :where(h2, h3, h4) {
	margin-top: 1.8em;
	margin-bottom: .7em;
	line-height: 1.4;
	letter-spacing: -.025em;
	scroll-margin-top: 110px;
	text-wrap: pretty;
}

body.nego-refined.single-post .entry-content :where(p, li) > a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

body.nego-refined.single-post .entry-content blockquote {
	margin: 32px 0;
	padding: 8px 0 8px 24px;
	border-left: 3px solid var(--nego-accent);
	font-size: 1.15em;
	line-height: 1.65;
}

body.nego-refined.single-post .entry-content blockquote::before { display: none; }

body.nego-refined :where(.entry-content, .entry-summary) :where(img, iframe, video) {
	max-width: 100%;
}

body.nego-refined .nego-toc {
	max-width: 76ch;
	margin: 28px 0;
	padding: 20px 24px;
	border: 1px solid var(--nego-line);
	border-radius: var(--nego-radius);
	background: var(--nego-surface);
	font-size: 16px;
	line-height: 1.7;
}

body.nego-refined .nego-toc summary { cursor: pointer; font-weight: 500; }
body.nego-refined .nego-toc ol { margin: 14px 0 0; padding-left: 1.3em; }
body.nego-refined .nego-toc li { margin: 6px 0; }
body.nego-refined .nego-toc a { text-decoration: none; }
body.nego-refined .nego-toc a:hover { text-decoration: underline; }

/* Test layout only. Native inputs, validation and the plugin's scripts stay intact. */
body.nego-refined .wpt_test_form .question {
	padding: 24px 0;
	margin: 0;
	border-bottom: 1px solid var(--nego-line);
}

body.nego-refined .wpt_test_form .question > .title {
	margin-bottom: 14px;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.65;
}

body.nego-refined .wpt_test_form .question .number {
	color: var(--nego-accent);
	margin-right: 8px;
}

body.nego-refined .wpt_test_form .answer label {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	min-height: 46px;
	padding: 10px 14px;
	margin: 6px 0;
	border: 1px solid var(--nego-line);
	border-radius: var(--nego-radius);
	font-size: 17px;
	font-weight: 400;
	line-height: 1.65;
	cursor: pointer;
}

body.nego-refined .wpt_test_form .answer label:hover,
body.nego-refined .wpt_test_form .answer label:focus-within {
	border-color: var(--nego-accent);
}

body.nego-refined .wpt_test_form .answer input {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin-top: 4px;
	accent-color: var(--nego-accent);
}

body.nego-refined .wpt_test_form input[type="submit"] {
	min-height: 48px;
	margin-top: 22px;
	padding: 12px 24px;
	border-radius: var(--nego-radius);
	font-size: 16px;
}

body.nego-refined .pagination { margin-block: 36px 56px; }
body.nego-refined .page-numbers { min-width: 44px; min-height: 44px; }

body.nego-refined .widget { margin-bottom: 36px; }
body.nego-refined .widget-title { font-size: 19px; letter-spacing: -.02em; line-height: 1.4; }

body.nego-refined .footer-container {
	padding-block: 30px;
	border-top: 1px solid var(--nego-line);
}

body.nego-refined .footer-logo img {
	max-width: 170px;
	height: auto;
}

body.nego-refined .footer-copyright {
	font-size: 12px;
	font-weight: 400;
	line-height: 1.8;
	hyphens: none;
}

body.nego-refined .footer-copyright a { margin-left: 12px; }

/* Known brand marks only: keep their original shapes, without bright image tiles.
 * The enhancement script marks these specific images as excluded from WP Dark Mode.
 * Editorial photography, diagrams and test images receive no inversion rule.
 */
body.nego-refined .nego-logo-adaptive {
	filter: grayscale(1) contrast(4) invert(1);
	mix-blend-mode: multiply;
}

body.nego-refined .nego-partner-card,
body.nego-refined .nego-community-card {
	display: block;
	padding: 22px;
	border: 1px solid var(--nego-line);
	border-radius: var(--nego-radius);
	background: var(--nego-surface);
	text-align: center;
}

body.nego-refined .nego-partner-logo {
	display: block;
	max-width: 100%;
	width: 200px;
	height: auto;
	margin-inline: auto;
	filter: grayscale(.8) brightness(2.2) contrast(1.2) invert(1) hue-rotate(180deg);
	mix-blend-mode: multiply;
}

body.nego-refined .nego-community-code {
	display: block;
	max-width: 100%;
	width: 132px;
	height: auto;
	margin-inline: auto;
	padding: 8px;
	border-radius: 4px;
	background: #fff;
	filter: none;
}

html[data-wp-dark-mode-active] body.nego-refined,
html.wp-dark-mode-active body.nego-refined {
	--nego-accent: #ec766c;
	--nego-accent-contrast: #202020;
	--nego-ink: #ecebe8;
	--nego-muted: #b6b5b2;
	--nego-surface: #292a2a;
	--nego-line: #404141;
}

html[data-wp-dark-mode-active] body.nego-refined .nego-logo-adaptive,
html.wp-dark-mode-active body.nego-refined .nego-logo-adaptive {
	filter: grayscale(1) contrast(4);
	mix-blend-mode: screen;
}

html[data-wp-dark-mode-active] body.nego-refined .nego-partner-logo,
html.wp-dark-mode-active body.nego-refined .nego-partner-logo {
	filter: grayscale(.8) brightness(1.6) contrast(1.1);
	mix-blend-mode: screen;
}

html[data-wp-dark-mode-active] body.nego-refined .nego-community-code,
html.wp-dark-mode-active body.nego-refined .nego-community-code {
	filter: brightness(.84);
}

/* Inherit the dark-mode engine's readable foreground instead of tinting it twice. */
html[data-wp-dark-mode-active] body.nego-refined .nego-eyebrow,
html.wp-dark-mode-active body.nego-refined .nego-eyebrow {
	color: inherit;
}

@media (min-width: 768px) {
	body.nego-refined .main-navigation .menu > li > a { margin: 18px 15px; }
	body.nego-refined .main-navigation li:focus-within > .sub-menu {
		left: 0;
		top: 100%;
		visibility: visible;
		opacity: 1;
	}
	body.nego-refined .main-navigation li li:focus-within > .sub-menu { left: 100%; top: 0; }
}

@media (min-width: 992px) {
	body.nego-refined .nego-intro-grid:has(.nego-intro-aside) {
		grid-template-columns: minmax(0, 1fr) minmax(250px, .58fr);
		gap: clamp(48px, 6vw, 88px);
	}
	body.nego-refined .posts-list--default .post-thumbnail__link.post-thumbnail--small {
		max-width: 34%;
		margin-right: 28px;
	}
}

@media (max-width: 767px) {
	body.nego-refined .header-container { padding-top: 22px; }
	body.nego-refined .site-logo img { max-width: min(100%, 190px); }
	body.nego-refined .site-description { max-width: 33ch; font-size: 12px; }
	body.nego-refined .site-header .site-branding { margin-bottom: 22px; }
	body.nego-refined .site-header.centered .header-container_wrap { position: relative; }
	body.nego-refined .site-header.centered .site-logo { padding-inline: 44px; }
	body.nego-refined .site-header.centered .header_social-wrap:has(.social-list__items > .menu-item:only-child) {
		position: absolute;
		top: 6px;
		left: 0;
		z-index: 2;
		width: 44px;
		padding: 0;
	}
	body.nego-refined .site-header.centered .header_social-wrap .social-list { margin: 0; }
	body.nego-refined .site-header.centered .header_social-wrap .menu-item { height: 44px; line-height: 44px; }
	body.nego-refined .site-header.centered .header_social-wrap .menu-item > a {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		margin: 0;
	}
	body.nego-refined .main-navigation .menu-toggle { border-radius: var(--nego-radius); }
	body.nego-refined .main-navigation.toggled ul#main-menu {
		padding: 12px 16px;
		border: 1px solid var(--nego-line);
		border-radius: var(--nego-radius);
	}
	body.nego-refined .main-navigation .menu > li > a:not(.sublinklink) {
		min-height: 44px;
		padding-block: 12px;
		margin: 0;
	}
	body.nego-refined .main-navigation .sub-menu {
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}
	body.nego-refined .main-navigation .sub-menu a { width: auto; padding: 9px 4px; }
	body.nego-refined .nego-intro-actions { gap: 10px; }
	body.nego-refined .nego-button { padding: 12px 18px; }
	body.nego-refined .posts-list--default .posts-list__item { padding-block: 28px; }
	body.nego-refined .posts-list--default .posts-list__item:first-child { margin-top: 0; }
	body.nego-refined .posts-list__item .post-thumbnail__link { margin-bottom: 20px; }
	body.nego-refined .posts-list__item .entry-title { font-size: 24px; line-height: 1.4; }
	body.nego-refined .posts-list .entry-content { font-size: 16px; line-height: 1.8; }
	body.nego-refined .entry-meta { margin-top: 14px; }
	body.nego-refined .nego-toc { padding: 18px; }
	body.nego-refined .wpt_test_form .question > .title { font-size: 17px; }
	body.nego-refined .footer-logo img { max-width: 150px; }
	body.nego-refined .footer-copyright a { display: block; margin: 6px 0 0; padding: 0; }
	body.nego-refined .footer-copyright a::before { content: none; }
}

@media (prefers-reduced-motion: reduce) {
	body.nego-refined :where(.nego-button, .entry-title a, .main-navigation .sub-menu) { transition: none; }
}
