/* ==========================================================================
   Blog post: reading progress, article layout (sticky contents + body),
   article typography, tags/share/author.
   ========================================================================== */

/* Reading progress bar, pinned under the sticky header */
.fx-progress { position: sticky; top: var(--header-h); z-index: 45; height: 3px; margin-bottom: -3px; pointer-events: none; }
.admin-bar .fx-progress { top: calc(var(--header-h) + 32px); }
@media (max-width: 782px) { .admin-bar .fx-progress { top: calc(var(--header-h) + 46px); } }
@media (max-width: 600px) { .admin-bar .fx-progress { top: var(--header-h); } }
.fx-progress__bar { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--coral)); transform-origin: left center; transform: scaleX(0); }
@supports (animation-timeline: scroll()) {
	.fx-progress__bar:not(.is-js) { animation: fxProgress linear both; animation-timeline: scroll(root); }
}
@keyframes fxProgress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Layout: 280px contents column + 760px article */
.fx-post {
	width: var(--container); margin: 0 auto; padding-bottom: 96px;
	display: grid; grid-template-columns: 280px minmax(0, 760px); gap: 96px; justify-content: center; align-items: start;
}
.fx-post > * { margin: 0 !important; }
.fx-post__main { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.fx-post__main > * { margin: 0 !important; }

/* Contents */
.fx-ptoc { position: sticky; top: 108px; display: flex; flex-direction: column; gap: 18px; }
.admin-bar .fx-ptoc { top: 140px; }
.fx-ptoc__label { margin: 0 0 10px; padding-left: 10px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fx-ptoc__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.fx-ptoc__list a {
	display: flex; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-size: 15px; font-weight: 500; line-height: 1.3; text-decoration: none;
	transition: color 150ms, background-color 150ms;
}
.fx-ptoc__list a:hover { color: var(--ink); background: var(--violet-soft); }
.fx-ptoc__list a.is-current { color: var(--ink); background: var(--violet-soft); font-weight: 600; }
.fx-ptoc__n { flex: none; padding-top: 2px; font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: #8A83A5; }
.fx-ptoc__m { display: none; }
.fx-ptoc__card { padding: 20px; border-radius: 18px; background: var(--ink); color: #fff; display: flex; flex-direction: column; gap: 10px; }
.fx-ptoc__ct { font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1.2; }
.fx-ptoc__cx { font-size: 14px; line-height: 1.5; color: var(--dark-body); }
.fx-ptoc__card .fx-btn { margin-top: 0; font-size: 14.5px; }
.fx-ptoc__card :focus-visible { outline-color: var(--violet-400); }

/* Article typography */
.fx-art { display: flex; flex-direction: column; gap: 22px; }
.fx-main .fx-art > * { width: auto; max-width: none; margin: 0 !important; }
.fx-art > p { font-size: 18.5px; line-height: 1.75; color: #2B2445; }
.fx-main .fx-art > h2 { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1.1; letter-spacing: -0.025em; color: var(--ink); margin-top: 24px !important; scroll-margin-top: 20px; }
.fx-main .fx-art > h3 { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1.2; letter-spacing: -0.015em; margin-top: 8px !important; scroll-margin-top: 20px; }
.fx-art > ul, .fx-art > ol { padding-left: 24px; display: flex; flex-direction: column; gap: 10px; font-size: 18px; line-height: 1.65; color: #2B2445; }
.fx-art > ul li, .fx-art > ol li { margin: 0; }
.fx-art > ul li::marker, .fx-art > ol li::marker { color: var(--violet); font-weight: 600; }
.fx-art a:not([class]) { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.fx-art strong { font-weight: 600; color: var(--ink); }
.fx-art > blockquote { border-left: 3px solid var(--violet); padding-left: 20px; font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.4; }
.fx-art > figure img, .fx-art > .wp-block-image img { border-radius: 18px; }
.fx-main .fx-art > h2:first-child { margin-top: 0 !important; }
/* Sources list: the last ordered list after the "Sources" heading reads smaller. */
.fx-art > #sources + ol { font-size: 15.5px; line-height: 1.6; }

/* Tags, share, author */
.fx-pfoot { display: flex; flex-direction: column; gap: 40px; }
.fx-pfoot__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fx-pfoot__tags { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.fx-pfoot__tags a {
	display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
	font-size: 14px; color: var(--ink); text-decoration: none; transition: background-color 200ms, border-color 200ms, color 200ms, transform 200ms;
}
.fx-pfoot__tags a:hover { background: var(--violet-soft); border-color: #CFC6F2; color: #4A1FC0; transform: translateY(-2px); }
.fx-pfoot__share { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.fx-pfoot__sl { font-size: 14px; color: var(--muted); margin-right: 4px; }
.fx-pfoot__author { display: flex; gap: 18px; align-items: center; padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.fx-pfoot__at { display: flex; flex-direction: column; gap: 4px; }
.fx-pfoot__an { font-weight: 600; font-size: 17px; }
.fx-pfoot__ad { font-size: 15px; line-height: 1.55; color: var(--muted); }

/* Section spacing after the article */
.fx-single .fx-related { padding-top: 0; }

@media (max-width: 1100px) {
	.fx-post { grid-template-columns: 240px minmax(0, 1fr); gap: 56px; }
}
@media (max-width: 960px) {
	.fx-post { grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: 760px; }
	.fx-ptoc { position: static; }
	.fx-ptoc__d, .fx-ptoc__card { display: none; }
	.fx-ptoc.is-empty { display: none; }
	.fx-ptoc__m { display: block; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); padding: 4px 16px; }
	.fx-ptoc__m summary {
		min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 15.5px; cursor: pointer; list-style: none;
	}
	.fx-ptoc__m summary::-webkit-details-marker { display: none; }
	.fx-ptoc__m summary::after { content: ""; width: 8px; height: 8px; border-right: 1.6px solid var(--ink); border-bottom: 1.6px solid var(--ink); transform: rotate(45deg) translateY(-3px); margin-left: 4px; flex: none; transition: transform 200ms; }
	.fx-ptoc__m[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
	.fx-ptoc__count { margin-left: auto; font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--muted); }
	.fx-ptoc__m .fx-ptoc__list { padding-bottom: 10px; }
}
@media (max-width: 600px) {
	.fx-post { width: calc(100% - 40px); padding-bottom: 40px; gap: 28px; }
	.fx-post__main { gap: 28px; }
	.fx-single .fx-post { margin-top: 0; }
	.fx-art > p { font-size: 16.5px; line-height: 1.7; }
	.fx-main .fx-art > h2 { font-size: 26px; margin-top: 16px !important; }
	.fx-art > ul, .fx-art > ol { font-size: 16.5px; padding-left: 20px; }
	.fx-pfoot { gap: 28px; }
	.fx-pfoot__row { padding: 16px 0; }
	.fx-pfoot__tags { display: none; }
	.fx-pfoot__share { margin-left: 0; }
	.fx-pfoot__author { align-items: flex-start; }
}

/* "Keep reading" with a single other post: one wide card, cover on the left (V2-BlogPost-WebDesigner). */
.fx-related .fx-pgrid.is-single { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 701px) {
	.fx-related .fx-pgrid.is-single .fx-pcard__link { flex-direction: row; }
	.fx-related .fx-pgrid.is-single .fx-cv { flex: none; width: 32%; aspect-ratio: auto; min-height: 210px; }
	.fx-related .fx-pgrid.is-single .fx-pcard__body { justify-content: center; padding: 28px 32px; }
	.fx-related .fx-pgrid.is-single .fx-pcard__t { font-size: 26px; }
	.fx-related .fx-pgrid.is-single .fx-pcard__meta { margin-top: 6px; }
}
.fx-pcard__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.fx-pcard__more { font-weight: 600; color: var(--violet); white-space: nowrap; }
