/* ==========================================================================
   G22 Article Polish — v1.5.0
   "Фірмовий журнал + маркер" — magazine article design.
   Reuses the theme's --g22-* tokens (tokens.css). No new colors invented
   beyond the documented palette (#432980 / #35205f / #fcc708 / #1a1a1a /
   #f7f5fb / #ece9f4 / #fffaf0, all already part of the brand's paint).
   Single-post rules are scoped under body.single-post so nothing else on
   the site is affected. Card rules are scoped to the card component class
   (.g22-news__card / .g22-news__item) so they apply wherever cards render
   (archive, related posts, homepage) without touching unrelated markup.
   ========================================================================== */

/* -----------------------------------------------------------------------
   0. Reader offset — floating header geometry (nav-taste.css):
      desktop: top 14px + height 68px = 82px, +24px breathing room = 106px
      mobile (<=960px): top 10px + height 56px = 66px, +24px = 90px
   ----------------------------------------------------------------------- */

body.single-post {
	--g22-reader-offset: 106px;
	--g22-sheet-top-gap: 38px;
	/* Purple head-band padding-top: clears the floating pill header with
	   extra breathing room above the chip (measured header bottom edge is
	   82px desktop / 66px mobile — see above). */
	--g22-band-pad-top: 140px;
	--g22-band-pad-bottom: 0px;
	--g22-band-pad-bottom-nocover: 56px;
}

@media (max-width: 960px) {
	body.single-post {
		--g22-reader-offset: 90px;
		--g22-sheet-top-gap: 34px;
		--g22-band-pad-top: 110px;
		--g22-band-pad-bottom: 0px;
		--g22-band-pad-bottom-nocover: 40px;
	}
}

/* -----------------------------------------------------------------------
   Page canvas — pure white, no grey canvas / card behind the article.
   Higher specificity than the theme's `body:has(.g22-news-article)` rule
   (inner-studio.css) so this reliably wins regardless of load order.
   ----------------------------------------------------------------------- */

html body.single-post {
	background: #fff;
}

/* The article element itself carries .g22-henna (home-henna.css sets a flat
   #e5e5e5 canvas background there for the homepage's editorial sections) —
   override it here so the white page canvas actually shows through. */
body.single-post .g22-news-article.g22-henna {
	background: #fff;
}

/* -----------------------------------------------------------------------
   1. Single post — shared centered column (body copy + share row): 700px.
   ----------------------------------------------------------------------- */

body.single-post .g22-news-article__body,
body.single-post .g22-news-article__share {
	box-sizing: border-box;
	width: 100%;
	max-width: 732px;
	margin-left: auto;
	margin-right: auto;
	padding-left: max(16px, env(safe-area-inset-left));
	padding-right: max(16px, env(safe-area-inset-right));
}

/* Head + cover share the wider 1040px "band" column. */
body.single-post .g22-news-article__head-inner,
body.single-post .g22-news-article__cover,
body.single-post .g22-news-article__cover-shell {
	box-sizing: border-box;
	width: 100%;
	max-width: 1072px;
	margin-left: auto;
	margin-right: auto;
	padding-left: max(16px, env(safe-area-inset-left));
	padding-right: max(16px, env(safe-area-inset-right));
}

body.single-post .g22-news-article__cover-shell {
	overflow: visible;
	padding: 0;
}

body.single-post .g22-news-article__cover {
	margin-top: 0;
	margin-bottom: 40px;
	background: transparent;
}

/* Cover image: fixed ratio, cropped, rounded, floating shadow. */
body.single-post .g22-news-article__cover-shell img,
body.single-post .g22-news-article__cover img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 20px;
	box-shadow: 0 24px 48px rgba(53, 32, 95, 0.18);
	position: relative;
	z-index: 1;
}

/* Excerpt intro duplicates the article's opening sentence(s) now that
   excerpts are verbatim copies of the body lede — hide it entirely. */
body.single-post .g22-news-article__intro {
	display: none;
}

/* -----------------------------------------------------------------------
   1b. Reading sheet — no more "paper card" look. Kept as a plain wrapper
   (JS moves head/cover/body/share into it), fully transparent.
   ----------------------------------------------------------------------- */

body.single-post .g22-reading-sheet {
	box-sizing: border-box;
	max-width: none;
	margin: 0;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
}

@media (min-width: 1100px) {
	body.single-post .g22-reading-sheet {
		padding: 0;
		border-radius: 0;
		box-shadow: none;
	}
}

/* -----------------------------------------------------------------------
   2. Head — the purple band.
   ----------------------------------------------------------------------- */

body.single-post .g22-news-article__head {
	position: relative;
	left: 50%;
	right: 50%;
	width: 100vw;
	margin-left: -50vw;
	margin-right: -50vw;
	box-sizing: border-box;
	background: var(--g22-purple);
	padding: var(--g22-band-pad-top) 0 var(--g22-band-pad-bottom);
	z-index: 0;
	overflow: hidden;
}

/* No cover on this post: the band ends 56px (40px mobile) below the meta
   row instead of continuing behind a cover image. */
body.single-post .g22-reading-sheet:not(:has(.g22-news-article__cover)) .g22-news-article__head {
	padding-bottom: var(--g22-band-pad-bottom-nocover);
}

body.single-post .g22-news-article__head-inner {
	position: relative;
	z-index: 1;
	color: #fff;
	padding-top: 0;
	margin-top: 0;
}

/* Decorative brand mark — atom line art, right of the band, desktop only. */
@media (min-width: 1100px) {
	body.single-post .g22-news-article__head::after {
		content: '';
		position: absolute;
		top: 50%;
		right: 48px;
		transform: translateY(-50%);
		width: clamp(220px, 22vw, 360px);
		height: clamp(220px, 22vw, 360px);
		background-image: none;
		background-repeat: no-repeat;
		background-position: center;
		background-size: contain;
		opacity: 0.1;
		pointer-events: none;
		z-index: 0;
	}
}

/* Cover — top half straddles the band (purple behind, white below). */
body.single-post .g22-news-article__cover {
	position: relative;
	z-index: 1;
}

body.single-post .g22-news-article__cover::before {
	content: '';
	position: absolute;
	top: 0;
	left: 50%;
	width: 100vw;
	height: 50%;
	transform: translateX(-50%);
	background: var(--g22-purple);
	z-index: 0;
}

/* Category chip */
body.single-post .g22-clean__eyebrow.g22-eyebrow-chip {
	display: block;
	margin-bottom: 16px;
}

body.single-post .g22-news-article__head .g22-eyebrow-chip__pill {
	display: inline-block;
	background: var(--g22-yellow);
	color: var(--g22-ink);
	font-family: var(--g22-font-label, 'IBM Plex Mono', monospace);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border-radius: 999px;
	padding: 4px 10px;
	text-decoration: none;
}

body.single-post .g22-news-article__head a.g22-eyebrow-chip__pill:hover {
	background: var(--g22-yellow-hot);
}

/* Title */
body.single-post .g22-news-article__title {
	margin: 0 0 16px;
	max-width: 18ch;
	font-family: var(--g22-font-display, 'Manrope', sans-serif);
	font-size: clamp(2.4rem, 5vw, 4rem);
	line-height: 1.05;
	letter-spacing: -0.03em;
	font-weight: 800;
	color: #fff;
	text-wrap: balance;
}

/* Meta row — author + role + date + reading time, white @ 78%. */
body.single-post .g22-head-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	color: rgba(255, 255, 255, 0.78);
	font-size: 15px;
}

body.single-post .g22-head-meta__author {
	display: flex;
	align-items: center;
	gap: 10px;
}

body.single-post .g22-head-meta__avatar {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--g22-yellow);
	color: var(--g22-purple-deep);
	font-size: 13px;
	font-weight: 600;
	font-family: var(--g22-font-label, 'IBM Plex Mono', monospace);
}

body.single-post .g22-head-meta__author-info {
	display: flex;
	align-items: baseline;
	gap: 6px;
	flex-wrap: wrap;
}

body.single-post .g22-head-meta__name {
	color: #fff;
	font-weight: 600;
	font-size: 15px;
}

body.single-post .g22-head-meta__role {
	color: rgba(255, 255, 255, 0.7);
	font-size: 14px;
}

body.single-post .g22-head-meta__sep {
	color: inherit;
}

body.single-post .g22-news-article__date,
body.single-post .g22-news-article__date time,
body.single-post .g22-readtime {
	margin: 0;
	color: inherit;
	font-weight: 500;
}

@media (max-width: 600px) {
	body.single-post .g22-head-meta__author-info {
		flex-direction: column;
		align-items: flex-start;
		gap: 2px;
	}
}

/* -----------------------------------------------------------------------
   3. Body copy typography
   ----------------------------------------------------------------------- */

body.single-post .g22-news-article__body {
	font-family: var(--g22-font-display, 'Manrope', sans-serif);
	font-size: 19px;
	line-height: 1.72;
	font-weight: 400;
	color: var(--g22-ink);
}

body.single-post .g22-news-article__body p {
	margin: 0 0 1.1em;
	color: var(--g22-ink);
}

body.single-post .g22-news-article__body h2 {
	font-family: var(--g22-font-display, 'Manrope', sans-serif);
	font-size: 32px;
	line-height: 1.2;
	font-weight: 800;
	margin: 72px 0 16px;
	color: var(--g22-purple-deep);
	text-wrap: balance;
}

body.single-post .g22-news-article__body h3 {
	font-size: 22px;
	line-height: 1.3;
	font-weight: 700;
	margin: 36px 0 12px;
	color: var(--g22-ink);
	text-wrap: balance;
}

@media (max-width: 600px) {
	body.single-post .g22-news-article__body {
		font-size: 17.5px;
	}
	body.single-post .g22-news-article__body h2 {
		font-size: 25px;
		margin-top: 56px;
	}
	body.single-post .g22-news-article__body h3 {
		margin-top: 20px;
	}
}

/* Section heading spacing (article.js adds .g22-has-toc to bodies with a
   TOC — >= 3 H2s). Keep the same rhythm for every H2, first one included. */
body.single-post .g22-news-article__body.g22-has-toc h2:not(:first-of-type) {
	margin-top: 72px;
	padding-top: 0;
	border-top: none;
}

@media (max-width: 600px) {
	body.single-post .g22-news-article__body.g22-has-toc h2:not(:first-of-type) {
		margin-top: 56px;
	}
}

/* Lead paragraph (article.js flags the first real paragraph). */
body.single-post .g22-news-article__body p.g22-lead {
	font-size: 22px;
	line-height: 1.6;
	color: var(--g22-ink);
}

@media (max-width: 600px) {
	body.single-post .g22-news-article__body p.g22-lead {
		font-size: 19px;
	}
}

/* -----------------------------------------------------------------------
   3b. The marker — highlighter treatment for bold text in paragraphs and
   list items. Not applied in headings, tables, FAQ summaries or the head.
   ----------------------------------------------------------------------- */

body.single-post .g22-news-article__body p strong,
body.single-post .g22-news-article__body p b,
body.single-post .g22-news-article__body li strong,
body.single-post .g22-news-article__body li b {
	background: none;
	padding: 0 0.12em;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	font-weight: 700;
	color: inherit;
}

/* Never inside tables, FAQ questions or callout/note blocks that already
   carry their own strong-styling. */
body.single-post .g22-news-article__body table strong,
body.single-post .g22-news-article__body table b,
body.single-post .g22-news-article__body .g22-faq__item summary strong,
body.single-post .g22-news-article__body .g22-faq__item summary b {
	background: none;
	padding: 0;
	box-decoration-break: initial;
	-webkit-box-decoration-break: initial;
}

/* Links */
body.single-post .g22-news-article__body p a,
body.single-post .g22-news-article__body li a {
	color: var(--g22-purple);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: background-color 160ms var(--g22-ease-out, ease);
}

body.single-post .g22-news-article__body p a:hover,
body.single-post .g22-news-article__body li a:hover {
	background: none;
	text-decoration: none;
}

/* -----------------------------------------------------------------------
   4. Lists — 8px yellow squares for ul, 26px purple circles for ol.
   ----------------------------------------------------------------------- */

body.single-post .g22-news-article__body ul,
body.single-post .g22-news-article__body ol {
	font-size: inherit;
	line-height: 1.7;
	color: var(--g22-ink);
	list-style: none;
	padding-left: 0;
	margin: 0 0 1.1em;
}

body.single-post .g22-news-article__body ul li,
body.single-post .g22-news-article__body ol li {
	position: relative;
	margin-bottom: 10px;
}

body.single-post .g22-news-article__body ul li {
	padding-left: 24px;
}

body.single-post .g22-news-article__body ul li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.6em;
	width: 8px;
	height: 8px;
	border-radius: 2px;
	background: var(--g22-yellow);
}

body.single-post .g22-news-article__body ol {
	counter-reset: g22-ol;
	margin-bottom: 1.1em;
}

body.single-post .g22-news-article__body ol li {
	padding-left: 36px;
	counter-increment: g22-ol;
}

body.single-post .g22-news-article__body ol li::before {
	content: counter(g22-ol);
	position: absolute;
	left: 0;
	top: 0;
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--g22-purple);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

/* -----------------------------------------------------------------------
   5. Inline images / figures
   ----------------------------------------------------------------------- */

body.single-post .g22-news-article__body figure.wp-block-image {
	width: 100%;
	margin: 32px 0;
}

body.single-post .g22-news-article__body figure.wp-block-image img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 16px;
}

body.single-post .g22-news-article__body figure.wp-block-image figcaption {
	font-size: 14px;
	color: var(--g22-ink-mute);
	text-align: center;
	margin-top: 8px;
}

@media (min-width: 1100px) {
	body.single-post .g22-news-article__body figure.wp-block-image {
		width: calc(100% + 64px);
		margin-left: -32px;
	}

	body.single-post .g22-news-article__body figure.wp-block-image figcaption {
		width: calc(100% - 64px);
		margin-left: 32px;
	}
}

/* Blockquote — pull-quote treatment. */
body.single-post .g22-news-article__body blockquote {
	border-left: none;
	padding-left: 0;
	margin: 40px 0;
	font-size: 24px;
	line-height: 1.45;
	font-weight: 500;
	font-style: normal;
	color: var(--g22-ink);
}

body.single-post .g22-news-article__body blockquote::before {
	content: "\201C";
	display: block;
	line-height: 0;
	font-size: 56px;
	font-weight: 700;
	color: var(--g22-purple);
	margin-bottom: 18px;
}

body.single-post .g22-news-article__body blockquote p {
	margin: 0;
}

/* "Key takeaway" callout — a paragraph whose entire content is a single
   <strong> (detected in article.js, class applied there). */
body.single-post .g22-news-article__body p.g22-callout {
	background: var(--g22-purple-08);
	border-radius: 12px;
	padding: 16px 20px;
	margin: 0 0 1.1em;
}

/* Separators — hr / Gutenberg wp-block-separator. */
body.single-post .g22-news-article__body hr,
body.single-post .g22-news-article__body .wp-block-separator {
	box-sizing: border-box;
	width: 100%;
	height: 0;
	margin: 40px auto;
	border: none;
	border-top: 1px solid var(--g22-line);
	background: none;
}

body.single-post .g22-news-article__body .wp-block-spacer {
	height: 24px !important;
}

/* -----------------------------------------------------------------------
   6. Tables — purple header, zebra rows, radius, no vertical borders.
   ----------------------------------------------------------------------- */

body.single-post .g22-news-article__body table,
body.single-post .g22-news-article__body .g22-table-scroll,
body.single-post .g22-news-article__body figure {
	margin: 32px 0;
}

body.single-post .g22-news-article__body .g22-table-scroll table,
body.single-post .g22-news-article__body .wp-block-table .g22-table-scroll {
	margin: 0;
}

body.single-post .g22-news-article__body .wp-block-table {
	margin: 32px 0;
}

body.single-post .g22-news-article__body .g22-table-scroll {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

body.single-post .g22-news-article__body table {
	width: 100%;
	min-width: 560px;
	border-collapse: collapse;
	font-size: 16px;
	color: var(--g22-ink);
}

body.single-post .g22-news-article__body table td,
body.single-post .g22-news-article__body table th {
	padding: 14px 16px;
	min-width: 130px;
	border: none;
	text-align: left;
	font-variant-numeric: tabular-nums;
}

body.single-post .g22-news-article__body table td:first-child,
body.single-post .g22-news-article__body table th:first-child {
	font-weight: 600;
}

/* Header row: thead row(s), or — when the table has no thead — the first
   row of the table. Purple bg, white text. */
body.single-post .g22-news-article__body table thead tr th,
body.single-post .g22-news-article__body table thead tr td,
body.single-post .g22-news-article__body table:not(:has(thead)) tr:first-child td,
body.single-post .g22-news-article__body table:not(:has(thead)) tr:first-child th {
	background: var(--g22-purple);
	color: #fff;
	font-weight: 600;
}

/* Zebra rows on the body. */
body.single-post .g22-news-article__body table tbody tr:nth-child(even) {
	background: #f7f5fb;
}

body.single-post .g22-news-article__body table:not(:has(thead)) tr:nth-child(even):not(:first-child) {
	background: #f7f5fb;
}

@media (min-width: 700px) {
	body.single-post .g22-news-article__body .g22-table-scroll {
		border-radius: 14px;
		overflow: hidden;
	}

	body.single-post .g22-news-article__body table {
		display: table;
		width: 100%;
		border-collapse: separate;
		border-spacing: 0;
		border: none;
	}

	body.single-post .g22-news-article__body table thead {
		display: table-header-group;
	}

	body.single-post .g22-news-article__body table tbody {
		display: table-row-group;
	}

	body.single-post .g22-news-article__body table tr {
		display: table-row;
	}

	body.single-post .g22-news-article__body table th,
	body.single-post .g22-news-article__body table td {
		display: table-cell;
		border: none;
	}
}

/* Mobile stacked cards. */
@media (max-width: 699.98px) {
	body.single-post .g22-news-article__body .g22-table-scroll {
		overflow-x: visible;
		border: none;
		border-radius: 0;
	}

	body.single-post .g22-news-article__body table.g22-table--cards {
		width: 100%;
		min-width: 0;
		border-collapse: separate;
		border-spacing: 0;
		display: block;
	}

	body.single-post .g22-news-article__body table.g22-table--cards thead {
		display: none;
	}

	body.single-post .g22-news-article__body table.g22-table--cards tbody,
	body.single-post .g22-news-article__body table.g22-table--cards tr {
		display: block;
		width: 100%;
		background: transparent !important;
	}

	body.single-post .g22-news-article__body table.g22-table--cards tr {
		background: #fff !important;
		border: 1px solid #ece9f4;
		border-radius: 14px;
		padding: 14px 16px;
		margin-bottom: 10px;
	}

	body.single-post .g22-news-article__body table.g22-table--cards tr:last-child {
		margin-bottom: 0;
	}

	body.single-post .g22-news-article__body table.g22-table--cards td {
		display: grid;
		grid-template-columns: 1fr auto;
		align-items: baseline;
		column-gap: 12px;
		border: none;
		padding: 6px 0;
		min-width: 0;
	}

	body.single-post .g22-news-article__body table.g22-table--cards td::before {
		content: attr(data-label);
		font-size: 14px;
		color: var(--g22-ink-mute);
		font-weight: 400;
	}

	body.single-post .g22-news-article__body table.g22-table--cards td:not([data-label]),
	body.single-post .g22-news-article__body table.g22-table--cards td[data-label=""] {
		grid-template-columns: 1fr;
	}

	body.single-post .g22-news-article__body table.g22-table--cards td span.g22-td-value {
		font-size: 16px;
		font-weight: 600;
		color: var(--g22-ink);
		text-align: right;
	}

	/* First column of each row: card title — full width, purple-deep. */
	body.single-post .g22-news-article__body table.g22-table--cards td:first-child {
		display: block;
		font-size: 16px;
		font-weight: 700;
		color: var(--g22-purple-deep);
		padding-bottom: 8px;
		margin-bottom: 6px;
		border-bottom: 1px solid #ece9f4;
	}

	body.single-post .g22-news-article__body table.g22-table--cards td:first-child::before {
		content: none;
	}

	body.single-post .g22-news-article__body table.g22-table--cards td:first-child span.g22-td-value {
		font-weight: 700;
		color: var(--g22-purple-deep);
		text-align: left;
	}
}

/* -----------------------------------------------------------------------
   7. Byline card
   ----------------------------------------------------------------------- */

body.single-post .g22-news-article__body .g22-byline {
	font-size: 15px;
	color: var(--g22-ink-mute);
	background: #f7f5fb;
	border: none;
	border-radius: 12px;
	padding: 14px 18px;
	margin: 0 0 32px;
}

body.single-post .g22-news-article__body .g22-byline strong {
	color: var(--g22-ink);
	font-weight: 600;
}

body.single-post .g22-readtime {
	color: inherit;
}

/* -----------------------------------------------------------------------
   8. Notes — soft cream background, yellow left bar.
   ----------------------------------------------------------------------- */

body.single-post .g22-news-article__body p.g22-note {
	background: #fffaf0;
	border-left: 4px solid var(--g22-yellow);
	border-radius: 0 12px 12px 0;
	padding: 16px 20px 16px 24px;
	margin: 0 0 1.1em;
}

body.single-post .g22-news-article__body p.g22-note strong,
body.single-post .g22-news-article__body p.g22-note b {
	display: block;
	color: var(--g22-ink);
	font-weight: 600;
	margin-bottom: 4px;
	background: none;
	padding: 0;
}

/* -----------------------------------------------------------------------
   9. FAQ accordion — quiet cards, purple +/- icon.
   ----------------------------------------------------------------------- */

body.single-post .g22-news-article__body .g22-faq {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 24px 0 32px;
}

body.single-post .g22-news-article__body .g22-faq__item {
	background: #f7f5fb;
	border: none;
	border-radius: 14px;
	overflow: hidden;
}

body.single-post .g22-news-article__body .g22-faq__item summary {
	position: relative;
	display: flex;
	align-items: center;
	text-align: left;
	list-style: none;
	gap: 16px;
	min-height: 56px;
	padding: 18px 56px 18px 20px;
	cursor: pointer;
	transition: background-color 160ms var(--g22-ease-out, ease);
}

body.single-post .g22-news-article__body .g22-faq__item summary::-webkit-details-marker {
	display: none;
}

body.single-post .g22-news-article__body .g22-faq__item summary::marker {
	content: '';
}

body.single-post .g22-news-article__body .g22-faq__item summary:hover {
	background: var(--g22-purple-08);
}

body.single-post .g22-news-article__body .g22-faq__item summary:focus-visible {
	outline: 2px solid var(--g22-purple);
	outline-offset: -2px;
}

body.single-post .g22-news-article__body .g22-faq__item summary h3 {
	margin: 0 !important;
	font-size: 18px !important;
	line-height: 1.35 !important;
	font-weight: 700 !important;
	color: var(--g22-ink);
	text-align: left;
	flex: 1;
	min-width: 0;
}

body.single-post .g22-news-article__body .g22-faq__item h3::before {
	content: none !important;
}

body.single-post .g22-news-article__body .g22-faq__item summary::before,
body.single-post .g22-news-article__body .g22-faq__item summary::after {
	content: '';
	position: absolute;
	top: 50%;
	background: var(--g22-purple);
	transition: transform 200ms var(--g22-ease-out, ease);
}

body.single-post .g22-news-article__body .g22-faq__item summary::before {
	right: 20px;
	width: 20px;
	height: 2px;
	transform: translateY(-50%);
}

body.single-post .g22-news-article__body .g22-faq__item summary::after {
	right: 29px;
	width: 2px;
	height: 20px;
	transform: translateY(-50%) scaleY(1);
}

body.single-post .g22-news-article__body .g22-faq__item[open] summary::after {
	transform: translateY(-50%) scaleY(0);
}

body.single-post .g22-news-article__body .g22-faq__item > div {
	padding: 0 20px 20px;
}

body.single-post .g22-news-article__body .g22-faq__item > div :first-child {
	margin-top: 0;
}

body.single-post .g22-news-article__body .g22-faq__item > div :last-child {
	margin-bottom: 0;
}

/* -----------------------------------------------------------------------
   10. Share row — round icon buttons, purple border/icons.
   ----------------------------------------------------------------------- */

body.single-post .g22-news-article__share {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 8px;
	margin-bottom: 24px;
	border: none;
}

body.single-post .g22-news-article__share-label {
	font-family: var(--g22-font-label, 'IBM Plex Mono', monospace);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--g22-ink-mute);
	margin: 0;
}

body.single-post .g22-share__links {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

body.single-post .g22-share__btn {
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: 1.5px solid var(--g22-purple-24);
	background: transparent;
	color: var(--g22-purple);
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	text-decoration: none;
	transition: background-color 160ms var(--g22-ease-out, ease), color 160ms var(--g22-ease-out, ease), border-color 160ms var(--g22-ease-out, ease);
}

body.single-post .g22-share__btn:hover {
	background: var(--g22-purple);
	border-color: var(--g22-purple);
	color: #fff;
}

body.single-post .g22-share__btn:focus-visible {
	outline: 2px solid var(--g22-purple);
	outline-offset: 2px;
}

body.single-post .g22-share__btn svg {
	width: 18px;
	height: 18px;
	display: block;
}

body.single-post .g22-share__toast-wrap {
	position: relative;
	display: inline-flex;
}

body.single-post .g22-share__toast {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	white-space: nowrap;
	background: var(--g22-ink);
	color: var(--g22-on-dark, #fff);
	font-size: 13px;
	font-weight: 500;
	padding: 6px 12px;
	border-radius: 8px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 160ms var(--g22-ease-out, ease), transform 160ms var(--g22-ease-out, ease);
}

body.single-post .g22-share__toast.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* -----------------------------------------------------------------------
   11. Table of contents — shared list styling (desktop dash-nav popover,
   mobile inline card, mobile sheet all reuse .g22-toc__list). Untouched
   visual language (grey dashes, purple active state) per spec — it lives
   on the plain white body area.
   ----------------------------------------------------------------------- */

body.single-post .g22-toc__label {
	display: block;
	font-family: var(--g22-font-label, 'IBM Plex Mono', monospace);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--g22-ink-mute);
}

body.single-post .g22-toc__list {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: g22-toc-item;
}

body.single-post .g22-toc__list li {
	position: static !important;
	margin: 0 0 6px !important;
	padding-left: 0 !important;
	counter-increment: g22-toc-item;
}

body.single-post .g22-toc__list li::before {
	content: none !important;
}

body.single-post .g22-toc__list li:last-child {
	margin-bottom: 0 !important;
}

body.single-post .g22-toc__list a {
	display: grid;
	grid-template-columns: 32px 1fr;
	column-gap: 10px;
	align-items: start;
	font-size: 14px !important;
	line-height: 1.4 !important;
	padding: 4px 0 !important;
	text-decoration: none !important;
	color: var(--g22-ink) !important;
	border-radius: 8px;
	transition: color 160ms var(--g22-ease-out, ease);
}

body.single-post .g22-toc__num {
	font-family: var(--g22-font-label, 'IBM Plex Mono', monospace);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	color: color-mix( in srgb, var(--g22-ink) 45%, transparent );
	transition: color 160ms var(--g22-ease-out, ease);
}

body.single-post .g22-toc__num::before {
	content: counter(g22-toc-item, decimal-leading-zero);
}

body.single-post .g22-toc__text {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	padding-inline: 8px;
	margin-inline: -8px;
	border-radius: 8px;
	transition: background-color 160ms var(--g22-ease-out, ease);
}

body.single-post .g22-toc__list a:hover .g22-toc__text,
body.single-post .g22-toc__list a:focus-visible .g22-toc__text {
	background: var(--g22-purple-08);
}

body.single-post .g22-toc__list a:hover,
body.single-post .g22-toc__list a:hover .g22-toc__num {
	color: var(--g22-ink) !important;
}

body.single-post .g22-toc__list a:focus-visible {
	outline: 2px solid var(--g22-purple);
	outline-offset: 2px;
}

body.single-post .g22-toc__list li.is-done a {
	color: color-mix( in srgb, var(--g22-ink) 70%, transparent ) !important;
}

body.single-post .g22-toc__list li.is-done .g22-toc__num {
	color: color-mix( in srgb, var(--g22-ink) 65%, transparent );
}

body.single-post .g22-toc__list li.is-upcoming a {
	color: color-mix( in srgb, var(--g22-ink) 70%, transparent ) !important;
}

body.single-post .g22-toc__list li.is-upcoming .g22-toc__num {
	color: color-mix( in srgb, var(--g22-ink) 65%, transparent );
}

body.single-post .g22-toc__list li.is-active a {
	color: var(--g22-ink) !important;
	font-weight: 600;
}

body.single-post .g22-toc__list li.is-active .g22-toc__num {
	color: var(--g22-purple);
}

/* Mobile / tablet (<1200px): inline collapsible card — quiet f7f5fb card,
   no border, per spec. */
body.single-post .g22-toc--inline {
	display: block;
	background: #f7f5fb;
	border: none;
	border-radius: 12px;
	padding: 14px 18px;
	margin: 0 0 32px;
	box-shadow: none;
}

body.single-post .g22-toc--inline summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 48px;
	width: 100%;
	font-family: var(--g22-font-label, 'IBM Plex Mono', monospace);
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--g22-ink-mute);
	cursor: pointer;
	list-style: none;
	border-radius: 8px;
}

body.single-post .g22-toc--inline summary:focus-visible {
	outline: 2px solid var(--g22-purple);
	outline-offset: 2px;
}

body.single-post .g22-toc--inline summary::-webkit-details-marker {
	display: none;
}

body.single-post .g22-toc--inline summary::marker {
	content: '';
}

body.single-post .g22-toc--inline summary .g22-toc__chevron {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	display: block;
	color: var(--g22-ink-mute);
	transition: transform 200ms var(--g22-ease-out, ease);
}

body.single-post .g22-toc--inline[open] summary .g22-toc__chevron {
	transform: rotate(180deg);
}

body.single-post .g22-toc--inline .g22-toc__list {
	margin-top: 12px;
}

body.single-post .g22-toc--inline .g22-toc__list a {
	padding: 13px 0 !important;
	font-size: 15px !important;
}

body.single-post .g22-toc--inline .g22-toc__list li {
	margin-bottom: 2px !important;
}

@media (min-width: 1200px) {
	body.single-post .g22-toc--inline {
		display: none;
	}
}

/* Sticky mini bar (title + chevron only) + bottom sheet. */
body.single-post .g22-toc-stickybar {
	position: fixed;
	top: calc(var(--g22-reader-offset) + 8px);
	left: 12px;
	right: 12px;
	height: 48px;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 14px;
	border-radius: 14px;
	background: #f7f5fb;
	border: none;
	box-shadow: var(--g22-shadow-md);
	z-index: 290;
	cursor: pointer;
	overflow: hidden;
	transform: translateY(-8px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 200ms var(--g22-ease-out, ease), transform 200ms var(--g22-ease-out, ease), visibility 200ms;
	appearance: none;
	-webkit-appearance: none;
	font: inherit;
	text-align: left;
	color: var(--g22-ink);
}

body.single-post .g22-toc-stickybar.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

body.single-post .g22-toc-stickybar:focus-visible {
	outline: 2px solid var(--g22-purple);
	outline-offset: 2px;
}

body.single-post .g22-toc-stickybar__title {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

body.single-post .g22-toc-stickybar__chevron {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	color: var(--g22-ink-mute);
}

@media (prefers-reduced-motion: reduce) {
	body.single-post .g22-toc-stickybar {
		transition: opacity 1ms linear, visibility 1ms;
		transform: none !important;
	}
}

@media (min-width: 1200px) {
	body.single-post .g22-toc-stickybar {
		display: none !important;
	}
}

body.single-post .g22-toc-sheet {
	border: none;
	padding: 0;
	margin: auto 0 0 0;
	width: 100%;
	max-width: none;
	max-height: 75vh;
	border-radius: 20px 20px 0 0;
	background: #fff;
	box-shadow: var(--g22-shadow-md);
	transform: translateY(100%);
	transition: transform 220ms var(--g22-ease-out, ease);
}

body.single-post .g22-toc-sheet[open] {
	transform: translateY(0);
	display: flex;
	flex-direction: column;
}

body.single-post .g22-toc-sheet::backdrop {
	background: rgba(0, 0, 0, 0.4);
}

@media (prefers-reduced-motion: reduce) {
	body.single-post .g22-toc-sheet {
		transition: none;
	}
}

body.single-post .g22-toc-sheet__handle {
	width: 36px;
	height: 4px;
	border-radius: 2px;
	background: var(--g22-line);
	margin: 10px auto 0;
	flex: 0 0 auto;
}

body.single-post .g22-toc-sheet__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 20px;
	flex: 0 0 auto;
}

body.single-post .g22-toc-sheet__close {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: none;
	background: #f7f5fb;
	color: var(--g22-ink);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

body.single-post .g22-toc-sheet__close:focus-visible {
	outline: 2px solid var(--g22-purple);
	outline-offset: 2px;
}

body.single-post .g22-toc-sheet__scroll {
	overflow-y: auto;
	padding: 4px 20px max(16px, env(safe-area-inset-bottom));
	flex: 1 1 auto;
}

body.single-post .g22-toc-sheet__scroll:focus {
	outline: none;
}

body.single-post .g22-toc-sheet__scroll .g22-toc__list a {
	padding: 13px 0 !important;
}

body.single-post .g22-toc-sheet__scroll .g22-toc__list li {
	margin-bottom: 2px !important;
}

body.single-post .g22-toc-sheet__scroll .g22-toc__list li.is-active .g22-toc__text::before {
	content: '';
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--g22-purple);
	margin-right: 6px;
	vertical-align: middle;
}

@media (min-width: 1200px) {
	body.single-post .g22-toc-sheet {
		display: none !important;
	}
}

/* Scroll offset so anchor-jumps / smooth-scroll TOC clicks don't hide the
   target heading under the floating header, landing 16px below it. */
body.single-post .g22-news-article__body h2 {
	scroll-margin-top: calc(var(--g22-reader-offset) + 16px);
}

/* -----------------------------------------------------------------------
   12. Back-to-top button
   ----------------------------------------------------------------------- */

body.single-post .g22-back-to-top {
	position: fixed;
	right: 20px;
	bottom: max(20px, env(safe-area-inset-bottom));
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #fff;
	border: 1px solid var(--g22-line);
	box-shadow: var(--g22-shadow-md);
	color: var(--g22-ink);
	cursor: pointer;
	z-index: 400;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 200ms var(--g22-ease-out, ease), transform 200ms var(--g22-ease-out, ease), visibility 200ms;
}

body.single-post .g22-back-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

body.single-post .g22-back-to-top:hover {
	background: var(--g22-paper);
}

body.single-post .g22-back-to-top:focus-visible {
	outline: 2px solid var(--g22-purple);
	outline-offset: 2px;
}

body.single-post .g22-back-to-top svg {
	width: 20px;
	height: 20px;
	display: block;
}

/* -----------------------------------------------------------------------
   13. Dash minimap navigation — desktop-only (>=1200px), fixed in the
   left margin. Position is computed in JS (article.js) from the text
   column's own bounding rect, so this file only holds sizing/visual
   states, never the actual offset.
   ----------------------------------------------------------------------- */

body.single-post .g22-dashnav {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	z-index: 260;
	width: 32px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 200ms ease;
}

body.single-post .g22-dashnav.is-visible {
	opacity: 1;
	pointer-events: auto;
}

body.single-post .g22-dashnav--range-hidden,
body.single-post .g22-dashnav--nospace {
	display: none !important;
}

@media (max-width: 1199.98px) {
	body.single-post .g22-dashnav {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.single-post .g22-dashnav {
		transition: none;
	}
}

body.single-post .g22-dashnav__list {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

body.single-post .g22-dashnav__dot {
	width: 32px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	text-decoration: none;
	border-radius: 4px;
}

body.single-post .g22-dashnav__dot:focus-visible {
	outline: 2px solid var(--g22-purple);
	outline-offset: 2px;
}

body.single-post .g22-dashnav__mark {
	display: block;
	width: 14px;
	height: 2px;
	border-radius: 1px;
	background: var(--g22-line);
	transition: width 200ms ease, background-color 200ms ease;
}

@media (prefers-reduced-motion: reduce) {
	body.single-post .g22-dashnav__mark {
		transition: none;
	}
}

body.single-post .g22-dashnav__dot.is-done .g22-dashnav__mark {
	width: 14px;
	background: color-mix( in srgb, var(--g22-ink) 35%, transparent );
}

body.single-post .g22-dashnav__dot.is-active .g22-dashnav__mark {
	width: 24px;
	background: var(--g22-purple);
}

body.single-post .g22-dashnav__pop {
	position: absolute;
	top: 50%;
	left: calc(100% + 12px);
	transform: translateY(-50%);
	width: 300px;
	max-height: 70vh;
	overflow-y: auto;
	background: #fff;
	border: 1px solid var(--g22-line);
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, .08);
	padding: 10px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 160ms ease;
}

body.single-post .g22-dashnav__pop.is-open {
	opacity: 1;
	pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
	body.single-post .g22-dashnav__pop {
		transition: none;
	}
}

body.single-post .g22-dashnav__pop-row {
	display: flex;
	align-items: center;
	padding: 8px 10px;
	border-radius: 8px;
	text-decoration: none;
	color: color-mix( in srgb, var(--g22-ink) 70%, transparent );
	font-size: 14px;
	line-height: 1.35;
}

body.single-post .g22-dashnav__pop-row:hover,
body.single-post .g22-dashnav__pop-row:focus-visible {
	background: var(--g22-purple-08);
}

body.single-post .g22-dashnav__pop-row:focus-visible {
	outline: 2px solid var(--g22-purple);
	outline-offset: -2px;
}

body.single-post .g22-dashnav__pop-title {
	flex: 1 1 auto;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

body.single-post .g22-dashnav__pop-row.is-active {
	color: var(--g22-ink);
	font-weight: 600;
}

body.single-post .g22-dashnav__pop-row.is-active .g22-dashnav__pop-title::before {
	content: '';
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--g22-purple);
	margin-right: 8px;
	vertical-align: middle;
}

/* ==========================================================================
   Cards — site-wide (archive, related posts, homepage). Scoped to the card
   component classes so nothing unrelated to news cards is affected.
   Unrelated to the article redesign above — left as-is from v1.4.
   ========================================================================== */

.g22-news__card .g22-news__more,
.g22-henna--clean .g22-news__card .g22-news__more {
	display: none !important;
}

.g22-news__grid,
.g22-henna--clean .g22-news__grid {
	align-items: stretch;
}

.g22-news__item,
.g22-henna--clean .g22-news__item {
	display: flex;
}

.g22-news__card,
.g22-henna--clean .g22-news__card {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
}

.g22-news__cap,
.g22-henna--clean .g22-news__cap {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 1 1 auto;
}

.g22-news__card-title,
.g22-henna--clean .g22-news__card-title {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
}

.g22-news__excerpt,
.g22-henna--clean .g22-news__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
}


/* Band runs from y=0 behind the floating header; page ground is white. */
html:has( body.single-post ) { background: #fff; }
body.single-post .g22-news-article__head {
	margin-top: calc( -1 * var( --g22-band-pull, 0px ) );
	padding-top: calc( 140px + var( --g22-band-pull, 0px ) );
}
@media ( max-width: 700px ) {
	body.single-post .g22-news-article__head {
		padding-top: calc( 104px + var( --g22-band-pull, 0px ) );
	}
}
/* Breathing room between the meta row and the straddling cover. */
body.single-post .g22-news-article__head .g22-head-meta {
	align-items: center;
	margin-bottom: 32px;
}
body.single-post .g22-news-article__head .g22-head-meta .g22-news-article__date {
	margin: 0;
}
/* Posts without an author: the date line is the whole meta row. */
body.single-post .g22-news-article__head > * > .g22-news-article__date,
body.single-post .g22-news-article__head-inner > .g22-news-article__date {
	margin-bottom: 32px;
}

/* Posts without a cover image: give the body air below the purple band. */
body.single-post .g22-reading-sheet:not(:has(.g22-news-article__cover img)) .g22-news-article__body {
	margin-top: 56px;
}
