/* Psychodium Article Studio 1.1 — frontend */

/* Astra and theme container reset only on plugin article pages. */
body.pas-article-page {
	overflow-x: clip !important;
	background: #1f1f1f;
}

body.pas-article-page .site-content,
body.pas-article-page #content {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: #1f1f1f;
}

body.pas-article-page .site-content > .ast-container,
body.pas-article-page #content > .ast-container,
body.pas-article-page .ast-container {
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

body.pas-article-page #primary,
body.pas-article-page .content-area,
body.pas-article-page .site-main,
body.pas-article-page .ast-article-single,
body.pas-article-page article.hentry {
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
}

body.pas-article-page.ast-plain-container.ast-no-sidebar #primary,
body.pas-article-page .ast-plain-container.ast-no-sidebar #primary {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

.pas-article,
.pas-article *,
.pas-article *::before,
.pas-article *::after {
	box-sizing: border-box;
}

.pas-article {
	--pas-bg: #1f1f1f;
	--pas-deep: #141414;
	--pas-card: #252525;
	--pas-card-light: #2a2a2a;
	--pas-text: #f0f0f0;
	--pas-muted: #b8b8b8;
	--pas-line: rgba(255,255,255,.13);
	--pas-line-strong: rgba(255,255,255,.27);
	--pas-shadow: 0 30px 90px rgba(0,0,0,.34);
	--pas-radius: 12px;
	--pas-container: 1480px;
	--pas-reading: 820px;

	position: relative;
	width: 100vw !important;
	max-width: 100vw !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	overflow: visible;
	background: var(--pas-bg);
	color: var(--pas-text);
	font-family: inherit;
}

.pas-article a,
.pas-article button {
	font-family: inherit;
}

.pas-article :where(a,button,[tabindex]):focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

/* Reading progress */
.pas-reading-progress {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 100000;
	width: 100%;
	height: 3px;
	background: rgba(255,255,255,.055);
	pointer-events: none;
}

.pas-reading-progress__bar {
	display: block;
	width: 100%;
	height: 100%;
	background: #fff;
	box-shadow: 0 0 18px rgba(255,255,255,.48);

	/* Полосу тянет transform, а не width: ширина пересчитывает раскладку
	   на каждом кадре прокрутки, трансформация — нет. scaleX(0) здесь же
	   задаёт стартовое состояние, чтобы без JS полоса не была полной. */
	transform: scaleX(0);
	transform-origin: 0 50%;
	will-change: transform;
}

/* Hero */
.pas-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	width: 100%;
	border-bottom: 1px solid var(--pas-line);
	background:
		radial-gradient(circle at 10% 0%, rgba(255,255,255,.065), transparent 28%),
		linear-gradient(180deg, #202020 0%, #171717 100%);
}

.pas-hero::before {
	content: "";
	position: absolute;
	z-index: -2;
	inset: 0;
	background-image:
		linear-gradient(rgba(255,255,255,.026) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,.026) 1px, transparent 1px);
	background-size: 56px 56px;
	mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.24) 100%);
	-webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.24) 100%);
	pointer-events: none;
}

.pas-hero::after {
	content: "PSYCHODIUM";
	position: absolute;
	z-index: -1;
	left: 50%;
	bottom: -.15em;
	transform: translateX(-50%);
	color: transparent;
	font-size: clamp(92px, 14vw, 245px);
	font-weight: 700;
	line-height: .78;
	letter-spacing: -.075em;
	white-space: nowrap;
	-webkit-text-stroke: 1px rgba(255,255,255,.035);
	pointer-events: none;
}

.pas-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, .9fr) minmax(560px, 1.1fr);
	gap: clamp(46px, 6vw, 100px);
	align-items: center;
	width: min(var(--pas-container), calc(100% - 80px));
	min-height: clamp(610px, 70vh, 760px);
	margin: 0 auto;
	padding: clamp(72px, 7vw, 112px) 0;
}

.pas-hero__content {
	position: relative;
	min-width: 0;
}

.pas-hero__content::before {
	content: "";
	position: absolute;
	top: -30px;
	left: 0;
	width: 88px;
	height: 1px;
	background: rgba(255,255,255,.55);
}

.pas-kicker {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 22px;
	color: rgba(255,255,255,.67);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .16em;
	text-transform: uppercase;
}

.pas-kicker::before {
	content: "";
	width: 30px;
	height: 1px;
	background: currentColor;
}

.pas-title {
	max-width: 760px;
	margin: 0;
	color: #fff;
	font-size: clamp(50px, 5.2vw, 82px);
	font-weight: 600;
	line-height: 1.01;
	letter-spacing: -.052em;
	text-wrap: balance;
	text-shadow: 0 20px 50px rgba(0,0,0,.30);
}

.pas-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
	align-items: center;
	margin-top: 30px;
	color: var(--pas-muted);
	font-size: 15px;
	line-height: 1.4;
}

.pas-meta span {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.pas-meta span + span::before {
	content: "";
	width: 4px;
	height: 4px;
	margin-right: 8px;
	border-radius: 50%;
	background: rgba(255,255,255,.36);
}

.pas-meta a {
	color: #fff;
	text-decoration: none;
}

.pas-meta a:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.pas-hero__media {
	position: relative;
	min-width: 0;
}

.pas-hero__media::before {
	content: "";
	position: absolute;
	z-index: 2;
	top: -18px;
	right: -18px;
	width: 96px;
	height: 96px;
	border-top: 1px solid rgba(255,255,255,.27);
	border-right: 1px solid rgba(255,255,255,.27);
	pointer-events: none;
}

.pas-hero__media::after {
	content: "FEATURED";
	position: absolute;
	z-index: 3;
	left: 18px;
	bottom: 16px;
	color: rgba(255,255,255,.72);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .18em;
	pointer-events: none;
}

.pas-cover {
	position: relative;
	overflow: hidden;
	width: 100%;
	aspect-ratio: 16 / 9;
	margin: 0;
	border: 1px solid var(--pas-line-strong);
	border-radius: var(--pas-radius);
	background: #202020;
	box-shadow: var(--pas-shadow);
}

.pas-cover::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.18)),
		linear-gradient(90deg, rgba(0,0,0,.05), transparent 45%);
	pointer-events: none;
}

.pas-cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.pas-cover--empty {
	display: grid;
	place-items: center;
	min-height: 360px;
	background:
		linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
		#222;
	background-size: 34px 34px;
}

.pas-cover--empty span {
	color: rgba(255,255,255,.18);
	font-size: clamp(48px, 8vw, 96px);
	font-weight: 700;
	letter-spacing: -.07em;
}

/* Main article area */
.pas-layout {
	display: grid;
	grid-template-columns: 310px minmax(0, var(--pas-reading));
	gap: clamp(42px, 5vw, 82px);
	justify-content: center;
	align-items: start;
	width: min(1320px, calc(100% - 64px));
	margin: 0 auto;
	padding: clamp(76px, 8vw, 120px) 0;
}

.pas-sidebar {
	display: grid;
	gap: 16px;
	align-self: start;
	min-width: 0;
}

.pas-side-card {
	border: 1px solid var(--pas-line);
	border-radius: var(--pas-radius);
	background:
		linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.008)),
		var(--pas-card);
	box-shadow: 0 18px 52px rgba(0,0,0,.16);
}

.pas-author-mini {
	position: relative;
	overflow: hidden;
	padding: 22px;
}

.pas-author-mini::after {
	content: "MB";
	position: absolute;
	right: -4px;
	bottom: -20px;
	color: transparent;
	font-size: 92px;
	font-weight: 700;
	line-height: 1;
	-webkit-text-stroke: 1px rgba(255,255,255,.035);
	pointer-events: none;
}

.pas-author-mini__top {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 14px;
	align-items: center;
}

.pas-author-mini__photo {
	display: grid;
	place-items: center;
	overflow: hidden;
	width: 64px;
	height: 64px;
	border: 1px solid var(--pas-line-strong);
	border-radius: 50%;
	background: #1b1b1b;
	color: #fff;
	font-weight: 700;
}

.pas-author-mini__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

.pas-author-mini__label {
	display: block;
	margin-bottom: 4px;
	color: var(--pas-muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .13em;
	text-transform: uppercase;
}

.pas-author-mini__name {
	color: var(--pas-text);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.15;
	text-decoration: none;
}

.pas-author-mini p {
	position: relative;
	z-index: 1;
	margin: 17px 0 0;
	color: var(--pas-muted);
	font-size: 14px;
	line-height: 1.62;
}

.pas-author-mini__link {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 43px;
	margin-top: 17px;
	padding: 11px 14px;
	border: 1px solid var(--pas-line-strong);
	border-radius: 6px;
	color: var(--pas-text);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: .04em;
	transition: .2s ease;
}

.pas-author-mini__link:hover {
	border-color: #fff;
	background: #fff;
	color: #111;
}

.pas-toc {
	position: sticky;
	top: 28px;
	overflow: hidden;
}

.admin-bar .pas-toc {
	top: 60px;
}

.pas-toc summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 62px;
	padding: 18px 20px;
	cursor: pointer;
	color: var(--pas-text);
	font-size: 16px;
	font-weight: 600;
	list-style: none;
}

.pas-toc summary::-webkit-details-marker { display: none; }
.pas-toc summary::after { content: "−"; color: var(--pas-muted); font-size: 20px; }
.pas-toc:not([open]) summary::after { content: "+"; }

.pas-toc__nav {
	max-height: min(42vh, 470px);
	overflow: auto;
	padding: 0 12px 16px 20px;
	scrollbar-width: thin;
	scrollbar-color: rgba(255,255,255,.22) transparent;

	/* Докрутив список до конца, колесо больше не подхватывает страницу
	   рывком: прокрутка не уходит за пределы блока. */
	overscroll-behavior: contain;
}

.pas-toc__list {
	display: grid;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pas-toc__item a {
	position: relative;
	display: block;
	padding: 9px 10px 9px 16px;
	border-radius: 5px;
	color: var(--pas-muted);
	font-size: 14px;
	line-height: 1.4;
	text-decoration: none;
	transition: color .18s ease, background-color .18s ease;
}

.pas-toc__item a::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 1px;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: rgba(255,255,255,.22);
	transform: translateY(-50%);
}

.pas-toc__item--h3 a {
	padding-left: 28px;
	font-size: 13px;
}

.pas-toc__item a:hover,
.pas-toc__item a.is-active {
	color: #fff;
	background: rgba(255,255,255,.055);
}

.pas-toc__item a.is-active::before {
	background: #fff;
	box-shadow: 0 0 10px rgba(255,255,255,.55);
}

.pas-share {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	padding: 12px;
	overflow: hidden;
}

.pas-share button {
	min-height: 42px;
	padding: 10px 8px;
	border: 1px solid var(--pas-line);
	border-radius: 6px;
	background: rgba(255,255,255,.025);
	color: var(--pas-muted);
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	transition: .18s ease;
}

.pas-share button:hover {
	border-color: var(--pas-line-strong);
	background: rgba(255,255,255,.06);
	color: #fff;
}

/* Article typography */
.pas-content {
	min-width: 0;
	max-width: var(--pas-reading);
	margin: 0;
	color: #d3d3d3;
	font-size: clamp(17px, 1.2vw, 19px);
	line-height: 1.8;
	overflow-wrap: anywhere;
}

.pas-content > :first-child {
	margin-top: 0 !important;
}

.pas-content > p:first-of-type:not(.pas-callout) {
	color: #e7e7e7;
	font-size: 1.13em;
	line-height: 1.72;
}

.pas-content p {
	margin: 0 0 1.38em;
}

.pas-content h2,
.pas-content h3,
.pas-content h4 {
	position: relative;
	scroll-margin-top: 110px;
	color: var(--pas-text);
	font-weight: 600;
	text-wrap: balance;
}

.pas-content h2 {
	margin: 2.05em 0 .7em;
	padding-top: .28em;
	font-size: clamp(31px, 3vw, 46px);
	line-height: 1.12;
	letter-spacing: -.038em;
}

.pas-content h2::before {
	content: "";
	display: block;
	width: 52px;
	height: 1px;
	margin-bottom: 19px;
	background: rgba(255,255,255,.45);
}

.pas-content h3 {
	margin: 1.8em 0 .62em;
	font-size: clamp(24px, 2.1vw, 32px);
	line-height: 1.18;
	letter-spacing: -.027em;
}

.pas-content h4 {
	margin: 1.55em 0 .52em;
	font-size: clamp(20px, 1.7vw, 25px);
	line-height: 1.25;
}

.pas-content a {
	color: #fff;
	text-decoration-color: rgba(255,255,255,.42);
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

.pas-content a:hover {
	text-decoration-color: #fff;
}

.pas-content strong {
	color: #f4f4f4;
	font-weight: 600;
}

.pas-content ul,
.pas-content ol {
	display: grid;
	gap: .58em;
	margin: 0 0 1.55em;
	padding-left: 1.35em;
}

.pas-content li {
	padding-left: .2em;
}

.pas-content li::marker {
	color: rgba(255,255,255,.7);
	font-weight: 600;
}

.pas-content blockquote {
	position: relative;
	margin: 2em 0;
	padding: 27px 30px 27px 36px;
	border: 1px solid var(--pas-line);
	border-left: 3px solid rgba(255,255,255,.82);
	border-radius: 0 var(--pas-radius) var(--pas-radius) 0;
	background:
		linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.01)),
		var(--pas-card);
	color: #dfdfdf;
	box-shadow: 0 20px 56px rgba(0,0,0,.17);
}

.pas-content blockquote::after {
	content: "“";
	position: absolute;
	top: 4px;
	right: 18px;
	color: rgba(255,255,255,.07);
	font-size: 82px;
	font-weight: 700;
	line-height: 1;
}

.pas-content img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: var(--pas-radius);
}

.pas-content :is(figure, .wp-block-image, .wp-caption) {
	max-width: 100%;
	margin: 2.1em 0;
}

.pas-content figure img,
.pas-content .wp-block-image img {
	width: 100%;
	border: 1px solid var(--pas-line);
	box-shadow: 0 24px 68px rgba(0,0,0,.25);
}

.pas-content figcaption,
.pas-content .wp-caption-text {
	margin-top: 10px;
	color: #969696;
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
}

.pas-table-wrap {
	width: 100%;
	margin: 2em 0;
	overflow-x: auto;
	border: 1px solid var(--pas-line);
	border-radius: var(--pas-radius);
	background: var(--pas-card);
	box-shadow: 0 18px 50px rgba(0,0,0,.16);
	-webkit-overflow-scrolling: touch;
}

.pas-content table {
	width: 100%;
	min-width: 620px;
	margin: 0;
	border-collapse: collapse;
	color: #d4d4d4;
	font-size: 15px;
}

.pas-content th,
.pas-content td {
	padding: 14px 16px;
	border: 1px solid var(--pas-line);
	text-align: left;
	vertical-align: top;
}

.pas-content th {
	background: rgba(255,255,255,.065);
	color: #fff;
	font-weight: 600;
}

.pas-content tr:nth-child(even) td {
	background: rgba(255,255,255,.018);
}

.pas-content pre {
	max-width: 100%;
	margin: 2em 0;
	overflow-x: auto;
	padding: 22px;
	border: 1px solid var(--pas-line);
	border-radius: var(--pas-radius);
	background: #101010;
	color: #ddd;
	font-size: 14px;
	line-height: 1.65;
}

.pas-content code {
	padding: .12em .35em;
	border-radius: 4px;
	background: rgba(255,255,255,.08);
	color: #f2f2f2;
}

.pas-content pre code {
	padding: 0;
	background: transparent;
}

.pas-callout,
.pas-content .psy-note {
	position: relative;
	margin: 1.85em 0 !important;
	padding: 23px 24px 23px 66px;
	border: 1px solid var(--pas-line);
	border-left: 3px solid rgba(255,255,255,.68);
	border-radius: var(--pas-radius);
	background:
		linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.01)),
		var(--pas-card);
	box-shadow: 0 16px 42px rgba(0,0,0,.13);
}

.pas-callout::before,
.pas-content .psy-note::before {
	content: attr(data-pas-icon);
	position: absolute;
	top: 21px;
	left: 22px;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border: 1px solid var(--pas-line-strong);
	border-radius: 50%;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}

.pas-content .psy-note::before {
	content: "!";
}

.pas-related-link {
	position: relative;
	margin: 2em 0;
	padding: 23px 25px;
	border: 1px solid var(--pas-line);
	border-radius: var(--pas-radius);
	background:
		linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.008)),
		var(--pas-card);
	box-shadow: 0 18px 50px rgba(0,0,0,.15);
}

.pas-related-link__label {
	display: block;
	margin-bottom: 8px;
	color: var(--pas-muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .13em;
	text-transform: uppercase;
}

.pas-related-link__title {
	display: block;
	color: #fff;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none !important;
}

.pas-related-link__description {
	margin: 8px 0 0 !important;
	color: var(--pas-muted);
	font-size: 15px;
}

/* Full author block */
.pas-author-section {
	overflow: hidden;
	border-top: 1px solid var(--pas-line);
	background:
		radial-gradient(circle at 14% 0%, rgba(255,255,255,.06), transparent 31%),
		var(--pas-deep);
}

.pas-author-section__inner {
	width: min(1080px, calc(100% - 64px));
	margin: 0 auto;
	padding: clamp(72px, 7vw, 104px) 0;
}

.pas-author-card {
	position: relative;
	display: grid;
	grid-template-columns: 176px minmax(0, 1fr);
	gap: clamp(28px, 4vw, 52px);
	align-items: center;
	overflow: visible;
	padding: clamp(28px, 4vw, 46px);
	border: 1px solid var(--pas-line);
	border-radius: var(--pas-radius);
	background:
		linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.009)),
		var(--pas-card);
	box-shadow: var(--pas-shadow);
}

.pas-author-card::after {
	content: "AUTHOR";
	position: absolute;
	right: -.02em;
	bottom: -.16em;
	color: transparent;
	font-size: clamp(72px, 10vw, 136px);
	font-weight: 700;
	line-height: .8;
	letter-spacing: -.07em;
	-webkit-text-stroke: 1px rgba(255,255,255,.035);
	pointer-events: none;
}

.pas-author-card__photo {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	overflow: hidden;
	aspect-ratio: 1;
	border: 1px solid var(--pas-line-strong);
	border-radius: 50%;
	background: #1b1b1b;
	color: #fff;
	font-size: 42px;
	font-weight: 700;
	box-shadow: 0 18px 48px rgba(0,0,0,.25);
}

.pas-author-card__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

.pas-author-card__content {
	position: relative;
	z-index: 1;
	min-width: 0;
}

.pas-author-card__eyebrow {
	margin-bottom: 10px;
	color: var(--pas-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.pas-author-card h2 {
	margin: 0;
	color: #fff;
	font-size: clamp(32px, 4vw, 50px);
	font-weight: 600;
	line-height: 1.06;
	letter-spacing: -.04em;
}

.pas-author-card p {
	max-width: 680px;
	margin: 16px 0 0;
	color: var(--pas-muted);
	font-size: 16px;
	line-height: 1.72;
}

.pas-author-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 24px;
}

.pas-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 12px 19px;
	border: 1px solid var(--pas-line-strong);
	border-radius: 6px;
	color: var(--pas-text);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: .04em;
	transition: .2s ease;
}

.pas-button--primary,
.pas-button:hover {
	border-color: #fff;
	background: #fff;
	color: #111;
}

.pas-button--primary:hover {
	background: transparent;
	color: #fff;
}

.pas-comments {
	width: min(920px, calc(100% - 64px));
	margin: 0 auto;
	padding: 72px 0;
}

.pas-back-top {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 9998;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border: 1px solid var(--pas-line-strong);
	border-radius: 50%;
	background: rgba(20,20,20,.9);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 16px 40px rgba(0,0,0,.30);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);

	/* backdrop-filter отсюда убран намеренно. Кнопка висит position: fixed
	   и видна всю статью, поэтому размытие подложки пересчитывалось на
	   каждом кадре прокрутки — это третий источник рывков. При фоне
	   rgba(20,20,20,.9) размытия всё равно почти не видно. */
	transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.pas-back-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}

/* Compact desktop and landscape tablets */
@media (max-width: 1250px) {
	.pas-hero__inner {
		grid-template-columns: minmax(0, .9fr) minmax(480px, 1.1fr);
		width: calc(100% - 48px);
	}

	.pas-layout {
		grid-template-columns: 286px minmax(0, var(--pas-reading));
		width: calc(100% - 48px);
		gap: 44px;
	}
}

/* Tablets: single-column article layout */
@media (max-width: 980px) {
	.pas-hero__inner {
		grid-template-columns: 1fr;
		gap: 38px;
		min-height: auto;
		padding: 66px 0 58px;
	}

	.pas-title {
		max-width: 820px;
		font-size: clamp(48px, 8vw, 72px);
	}

	.pas-hero__media {
		width: 100%;
	}

	.pas-layout {
		grid-template-columns: 1fr;
		width: min(820px, calc(100% - 40px));
		padding: 62px 0 86px;
	}

	.pas-sidebar {
		order: 0;
	}

	.pas-author-mini {
		display: none;
	}

	.pas-toc {
		position: static;
	}

	.pas-toc__nav {
		max-height: 360px;
	}

	.pas-content {
		max-width: none;
	}
}

/* Mobile */
@media (max-width: 767px) {
	.pas-article {
		--pas-radius: 8px;
	}

	.pas-reading-progress {
		height: 2px;
	}

	.pas-hero::before {
		background-size: 34px 34px;
	}

	.pas-hero::after {
		font-size: 25vw;
	}

	.pas-hero__inner {
		width: calc(100% - 28px);
		gap: 30px;
		padding: 52px 0 44px;
	}

	.pas-hero__content::before {
		top: -20px;
		width: 54px;
	}

	.pas-kicker {
		margin-bottom: 16px;
		font-size: 11px;
		letter-spacing: .12em;
	}

	.pas-kicker::before {
		width: 24px;
	}

	.pas-title {
		font-size: clamp(37px, 11vw, 52px);
		line-height: 1.035;
		letter-spacing: -.045em;
	}

	.pas-meta {
		gap: 8px 12px;
		margin-top: 22px;
		font-size: 13px;
	}

	.pas-meta span + span::before {
		display: none;
	}

	.pas-hero__media::before {
		top: -9px;
		right: -9px;
		width: 52px;
		height: 52px;
	}

	.pas-hero__media::after {
		left: 12px;
		bottom: 10px;
		font-size: 8px;
	}

	.pas-cover {
		aspect-ratio: 16 / 9;
	}

	.pas-cover--empty {
		min-height: 210px;
	}

	.pas-layout {
		width: calc(100% - 28px);
		gap: 28px;
		padding: 42px 0 66px;
	}

	.pas-toc:not([open]) .pas-toc__nav {
		display: none;
	}

	.pas-toc__nav {
		max-height: none;
		padding: 0 10px 14px 16px;
	}

	.pas-toc summary {
		min-height: 58px;
		padding: 16px;
		font-size: 15px;
	}

	.pas-share {
		grid-template-columns: 1fr 1fr;
	}

	.pas-content {
		font-size: 17px;
		line-height: 1.72;
	}

	.pas-content > p:first-of-type:not(.pas-callout) {
		font-size: 1.06em;
	}

	.pas-content h2 {
		margin-top: 1.9em;
		font-size: clamp(29px, 9vw, 39px);
	}

	.pas-content h3 {
		font-size: clamp(23px, 7vw, 30px);
	}

	.pas-content blockquote {
		padding: 22px 20px 22px 24px;
	}

	.pas-callout,
	.pas-content .psy-note {
		padding: 20px 18px 20px 54px;
	}

	.pas-callout::before,
	.pas-content .psy-note::before {
		top: 18px;
		left: 16px;
	}

	.pas-author-section__inner {
		width: calc(100% - 28px);
		padding: 56px 0;
	}

	.pas-author-card {
		grid-template-columns: 88px minmax(0, 1fr);
		gap: 18px;
		padding: 21px;
	}

	.pas-author-card::after {
		font-size: 22vw;
	}

	.pas-author-card h2 {
		font-size: clamp(28px, 8vw, 39px);
	}

	.pas-author-card p,
	.pas-author-card__actions {
		grid-column: 1 / -1;
	}

	.pas-author-card__actions {
		display: grid;
		grid-template-columns: 1fr;
	}

	.pas-button {
		width: 100%;
	}

	.pas-comments {
		width: calc(100% - 28px);
		padding: 56px 0;
	}

	.pas-back-top {
		right: 14px;
		bottom: 14px;
		width: 42px;
		height: 42px;
	}
}

@media (max-width: 390px) {
	.pas-title {
		font-size: 36px;
	}

	.pas-author-card {
		grid-template-columns: 74px minmax(0, 1fr);
		gap: 15px;
		padding: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pas-article *,
	.pas-article *::before,
	.pas-article *::after {
		scroll-behavior: auto !important;
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}


/* =========================================================
   PSYCHODIUM ARTICLE STUDIO 1.2
   Clean author layout and sticky navigation
   ========================================================= */

.pas-hero__media::after {
	content: none !important;
	display: none !important;
}


.pas-layout {
	align-items: start;
}

.pas-sidebar {
	position: sticky;
	top: var(--pas-sticky-top, 28px);
	align-self: start;
	max-height: calc(100vh - var(--pas-sticky-top, 28px) - 18px);
	overflow: visible;
}

.pas-toc {
	position: relative !important;
	top: auto !important;
	min-height: 0;
	overflow: hidden;
}

.admin-bar .pas-toc {
	top: auto !important;
}

.pas-toc__nav {
	max-height: calc(100vh - var(--pas-sticky-top, 28px) - 330px);
	min-height: 120px;
}

.pas-author-mini {
	flex: none;
}

.pas-author-mini__photo {
	flex: none;
}

.pas-share,
.pas-author-section {
	display: none !important;
}

@media (max-width: 980px) {
	.pas-sidebar {
		position: static;
		top: auto;
		max-height: none;
	}

	.pas-toc__nav {
		max-height: 360px;
		min-height: 0;
	}
}

@media (max-width: 767px) {

	.pas-sidebar {
		max-height: none;
	}

	.pas-toc__nav {
		max-height: none;
	}
}


/* Bottom breathing space before the site footer */
.pas-article {
	padding-bottom: clamp(48px, 5vw, 76px);
	border-bottom: 1px solid var(--pas-line);
}

.pas-comments {
	padding-bottom: 0;
}

@media (max-width: 767px) {
	.pas-article {
		padding-bottom: 38px;
	}
}


/* =========================================================
   PAS 1.3.1 — adaptive hero typography for long article titles
   ========================================================= */

.pas-title {
	text-wrap: balance;
	overflow-wrap: normal;
	hyphens: none;
}

/* 56–80 characters */
.pas-title--medium {
	max-width: 820px;
	font-size: clamp(46px, 4.55vw, 74px);
	line-height: 1.025;
	letter-spacing: -.049em;
}

/* 81–110 characters */
.pas-hero--title-long .pas-hero__inner {
	grid-template-columns: minmax(0, 1.08fr) minmax(520px, .92fr);
	gap: clamp(38px, 4.8vw, 78px);
	min-height: clamp(560px, 64vh, 700px);
}

.pas-title--long {
	max-width: 880px;
	font-size: clamp(39px, 3.55vw, 59px);
	line-height: 1.045;
	letter-spacing: -.043em;
}

/* More than 110 characters */
.pas-hero--title-xlong .pas-hero__inner {
	grid-template-columns: minmax(0, 1.16fr) minmax(470px, .84fr);
	gap: clamp(34px, 4vw, 66px);
	min-height: clamp(540px, 61vh, 680px);
}

.pas-title--xlong {
	max-width: 920px;
	font-size: clamp(35px, 3.05vw, 51px);
	line-height: 1.06;
	letter-spacing: -.039em;
}

/* Keep metadata visually attached to compact titles. */
.pas-hero--title-long .pas-meta,
.pas-hero--title-xlong .pas-meta {
	margin-top: 24px;
}

@media (max-width: 1250px) and (min-width: 981px) {
	.pas-hero--title-long .pas-hero__inner {
		grid-template-columns: minmax(0, 1.06fr) minmax(440px, .94fr);
		gap: 38px;
	}

	.pas-hero--title-xlong .pas-hero__inner {
		grid-template-columns: minmax(0, 1.12fr) minmax(410px, .88fr);
		gap: 34px;
	}

	.pas-title--medium {
		font-size: clamp(43px, 4.8vw, 64px);
	}

	.pas-title--long {
		font-size: clamp(37px, 4.15vw, 53px);
	}

	.pas-title--xlong {
		font-size: clamp(34px, 3.65vw, 47px);
	}
}

@media (max-width: 980px) {
	.pas-title--medium {
		font-size: clamp(42px, 7vw, 62px);
	}

	.pas-title--long {
		max-width: 880px;
		font-size: clamp(38px, 6.1vw, 54px);
		line-height: 1.055;
	}

	.pas-title--xlong {
		max-width: 900px;
		font-size: clamp(35px, 5.45vw, 48px);
		line-height: 1.07;
	}
}

@media (max-width: 767px) {
	.pas-title--medium {
		font-size: clamp(34px, 9.4vw, 46px);
	}

	.pas-title--long {
		font-size: clamp(31px, 8.5vw, 41px);
		line-height: 1.07;
		letter-spacing: -.038em;
	}

	.pas-title--xlong {
		font-size: clamp(29px, 7.8vw, 37px);
		line-height: 1.09;
		letter-spacing: -.034em;
	}
}

@media (max-width: 390px) {
	.pas-title--medium { font-size: 33px; }
	.pas-title--long { font-size: 30px; }
	.pas-title--xlong { font-size: 28px; }
}
