/**
 * Windfonts catalog — font detail page.
 * A type-specimen stage, editorial sections and a sticky action rail.
 */

.wfd {
	max-width: 72rem;
	margin: 0 auto;
	padding: 0 1.25rem 3.5rem;
}

/* The single-windfonts_item template carries an 80px main top padding.
   The full-bleed stage must sit directly under the site header. */
body.single-windfonts_item main.wp-block-group {
	padding-top: 0 !important;
}

/* Breadcrumbs (below the stage) */
.wfd > .wfd-crumbs {
	padding: 1rem 0 0.85rem;
}

.wfd-crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem;
	margin: 0;
	padding: 1.1rem 0 1rem;
	color: var(--wf-faint);
	font-size: 11.5px;
	line-height: 1.5;
}

.wfd-crumbs a {
	color: var(--wf-muted);
	text-decoration: none;
}

.wfd-crumbs a:hover {
	color: var(--wf-ink);
}

.wfd-crumbs__sep {
	color: var(--wf-line-strong);
}

.wfd-stage {
	position: relative;
	overflow: hidden;
	margin-right: calc(50% - 50vw);
	margin-left: calc(50% - 50vw);
	padding: 0;
	border-radius: 0;
	background:
		linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px) 0 0 / 100% 5.5rem,
		linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px) 0 0 / 5.5rem 100%,
		radial-gradient(110% 120% at 92% 0%, rgba(255, 255, 255, 0.055) 0%, transparent 58%),
		var(--wf-header-bg);
	color: var(--wf-white);
}

.wfd-stage__inner {
	position: relative;
	max-width: 72rem;
	margin: 0 auto;
	padding: 3.2rem 2.4rem 2.2rem;
}

.wfd-stage__ghost {
	position: absolute;
	right: -0.02em;
	bottom: -0.3em;
	z-index: 0;
	color: rgba(255, 255, 255, 0.045);
	font-family: var(--wfd-family, var(--wf-serif)) !important;
	font-size: clamp(16rem, 34vw, 30rem);
	font-weight: var(--wfd-weight, 400) !important;
	font-style: var(--wfd-style, normal) !important;
	line-height: 0.78;
	pointer-events: none;
	user-select: none;
}

.wfd-stage__top {
	position: relative;
	z-index: 1;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.8rem 1rem;
	padding-bottom: 0.4rem;
}

.wfd-stage__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.wfd-stage__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.wfd-stage__actions .wf-btn {
	min-height: 2.25rem;
	padding: 0.4rem 0.8rem;
	font-size: 11.5px;
}

.wfd-stage__type {
	position: relative;
	z-index: 1;
	padding: 2.6rem 0 2.1rem;
}

.wfd-stage__name {
	margin: 0 0 0.7rem;
	color: var(--wf-white);
	font-family: var(--wfd-family, var(--wf-serif)) !important;
	font-size: clamp(2.8rem, 7.6vw, 6.2rem);
	font-style: var(--wfd-style, normal) !important;
	font-weight: var(--wfd-weight, 400) !important;
	letter-spacing: -0.035em;
	line-height: 0.98;
	overflow-wrap: anywhere;
}

.wfd-stage__en {
	margin: 0 0 1.8rem;
	color: rgba(255, 255, 255, 0.68);
	font-family: var(--wf-font);
	font-size: 11px;
	letter-spacing: 0.16em;
	line-height: 1.5;
	text-transform: uppercase;
}

.wfd-stage__sample {
	max-width: 52rem;
	margin: 0 0 0.8rem;
	color: rgba(255, 255, 255, 0.88);
	font-family: var(--wfd-family, var(--wf-serif)) !important;
	font-size: var(--wfd-sample-size, 30px);
	font-style: var(--wfd-style, normal) !important;
	font-weight: var(--wfd-weight, 400) !important;
	letter-spacing: 0.01em;
	line-height: 1.55;
	overflow-wrap: anywhere;
	transition: font-size 0.2s var(--wf-ease);
}

.wfd-stage__plate {
	max-width: 42rem;
	margin: 0;
	overflow: hidden;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.7);
}

.wfd-stage__plate img {
	display: block;
	width: 100%;
	height: auto;
}

.wfd-stage__latin {
	max-width: 48rem;
	margin: 0;
	color: rgba(255, 255, 255, 0.7);
	font-family: var(--wfd-family, var(--wf-serif)) !important;
	font-size: calc(var(--wfd-sample-size, 30px) * 0.47);
	font-style: var(--wfd-style, normal) !important;
	font-weight: var(--wfd-weight, 400) !important;
	letter-spacing: 0.04em;
	line-height: 1.6;
	overflow-wrap: anywhere;
	transition: font-size 0.2s var(--wf-ease);
}

.wfd-stage__bar {
	position: relative;
	z-index: 1;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.9rem 1.2rem;
	padding: 0.9rem 0 1.1rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.wfd-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
}

.wfd-controls__label {
	margin-right: 0.15rem;
	color: rgba(255, 255, 255, 0.35);
	font-family: var(--wf-font);
	font-size: 10px;
	letter-spacing: 0.08em;
}

.wfd-controls__sep {
	width: 1px;
	height: 1.1rem;
	margin: 0 0.35rem;
	background: rgba(255, 255, 255, 0.12);
}

.wfd-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.9rem;
	height: 1.9rem;
	padding: 0 0.55rem;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 6px;
	background: transparent;
	color: rgba(255, 255, 255, 0.75);
	font-family: var(--wf-font);
	font-size: 10.5px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.18s var(--wf-ease), border-color 0.18s var(--wf-ease), color 0.18s var(--wf-ease);
}

.wfd-chip:hover {
	border-color: rgba(255, 255, 255, 0.5);
	color: var(--wf-white);
}

.wfd-chip.is-active,
.wfd-chip[aria-pressed="true"] {
	border-color: var(--wf-white);
	background: var(--wf-white);
	color: var(--wf-ink);
}

.wfd-custom {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-width: 0;
	color: rgba(255, 255, 255, 0.5);
	font-size: 10px;
	letter-spacing: 0.06em;
}

.wfd-custom input {
	width: 13rem;
	max-width: 42vw;
	height: 1.9rem;
	padding: 0 0.6rem;
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 6px;
	outline: 0;
	background: rgba(255, 255, 255, 0.09);
	color: var(--wf-white);
	font-family: var(--wf-font);
	font-size: 11.5px;
}

.wfd-custom input::placeholder {
	color: rgba(255, 255, 255, 0.42);
}

.wfd-custom input:focus {
	border-color: rgba(255, 255, 255, 0.45);
}

.wfd-stage__notice {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: flex-start;
	gap: 0.55rem;
	margin: 0 0 1rem;
	padding: 0.7rem 0.85rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.05);
	color: rgba(255, 255, 255, 0.65);
	font-size: 11.5px;
	line-height: 1.65;
}

.wfd-stage__notice strong {
	color: var(--wf-white);
	font-weight: 500;
}

/* -------------------------------------------------------------------------
   Jump nav
   ---------------------------------------------------------------------- */
.wfd-jump {
	display: flex;
	gap: 1.3rem;
	margin: 0;
	padding: 0.95rem 0;
	overflow-x: auto;
	border-bottom: 1px solid var(--wf-line);
	scrollbar-width: none;
}

.wfd-jump::-webkit-scrollbar {
	display: none;
}

.wfd-jump a {
	flex-shrink: 0;
	color: var(--wf-muted);
	font-size: 12px;
	letter-spacing: 0.02em;
	text-decoration: none;
	white-space: nowrap;
}

.wfd-jump a:hover {
	color: var(--wf-ink);
}

.wfd-jump span {
	flex-shrink: 0;
	color: var(--wf-faint);
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* -------------------------------------------------------------------------
   Layout
   ---------------------------------------------------------------------- */
.wfd-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 19.5rem;
	gap: 2.8rem;
	align-items: start;
	padding-top: 0.4rem;
}

.wfd-main {
	min-width: 0;
}

.wfd-aside {
	position: sticky;
	top: 1.4rem;
	display: flex;
	flex-direction: column;
	gap: 1.15rem;
	min-width: 0;
}

/* Sections */
.wfd-section {
	padding: 2.15rem 0 2.3rem;
	border-bottom: 1px solid var(--wf-line);
}

.wfd-section:last-of-type {
	border-bottom: 0;
}

.wfd-section__head {
	display: flex;
	align-items: baseline;
	gap: 0.8rem;
	margin-bottom: 1.15rem;
}

.wfd-section__num {
	color: var(--wf-faint);
	font-family: var(--wf-mono);
	font-size: 10px;
	letter-spacing: 0.06em;
}

.wfd-section__head h2 {
	margin: 0;
	color: var(--wf-ink);
	font-family: var(--wf-font);
	font-size: 21px;
	font-weight: 500;
	letter-spacing: -0.015em;
	line-height: 1.3;
}

.wfd-section__head p {
	margin: 0 0 0 auto;
	color: var(--wf-muted);
	font-size: 11px;
}

.wfd-prose {
	max-width: 68ch;
	color: var(--wf-ink-soft);
	font-size: 14.5px;
	line-height: 1.9;
}

.wfd-prose p {
	margin: 0 0 1em;
}

.wfd-prose p:last-child {
	margin-bottom: 0;
}

.wfd-prose strong {
	color: var(--wf-ink);
	font-weight: 600;
}

.wfd-prose a {
	color: var(--wf-ink);
	text-decoration-color: var(--wf-line-strong);
	text-underline-offset: 3px;
}

/* Specs */
.wfd-specs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0;
	margin: 1.6rem 0 0;
	padding: 0;
	border-top: 1px solid var(--wf-line);
}

.wfd-spec {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
	margin: 0;
	padding: 0.8rem 0;
	border-bottom: 1px solid var(--wf-line);
}

.wfd-spec:nth-child(odd) {
	padding-right: 1rem;
}

.wfd-spec:nth-child(even) {
	padding-left: 1rem;
	border-left: 1px solid var(--wf-line);
}

.wfd-spec dt {
	color: var(--wf-faint);
	font-size: 10px;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
}

.wfd-spec dd {
	margin: 0;
	overflow-wrap: anywhere;
	color: var(--wf-ink);
	font-size: 13px;
	line-height: 1.55;
}

/* Embed code */
.wfd-note {
	margin: 0 0 0.9rem;
	color: var(--wf-muted);
	font-size: 12.5px;
	line-height: 1.7;
}

.wfd-codecard {
	overflow: hidden;
	margin: 0 0 0.9rem;
	border-radius: var(--wf-radius-sm);
	background: #1b1714;
	color: #f4f0e9;
}

.wfd-codecard__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
	padding: 0.6rem 0.8rem 0.6rem 1rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.wfd-codecard__label {
	color: rgba(255, 255, 255, 0.5);
	font-family: var(--wf-mono);
	font-size: 10px;
	letter-spacing: 0.06em;
}

.wfd-codecard__copy {
	padding: 0.28rem 0.6rem;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 5px;
	background: transparent;
	color: rgba(255, 255, 255, 0.75);
	font-family: var(--wf-font);
	font-size: 10px;
	cursor: pointer;
}

.wfd-codecard__copy:hover {
	border-color: rgba(255, 255, 255, 0.6);
	color: var(--wf-white);
}

.wfd-codecard__copy.is-done {
	border-color: #5c9b73;
	background: #2f6b46;
	color: var(--wf-white);
}

.wfd-codecard pre {
	margin: 0;
	padding: 0.95rem 1rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	font-family: var(--wf-mono);
	font-size: 11.5px;
	line-height: 1.75;
	white-space: pre;
}

.wfd-codecard code {
	color: #eee9e1;
	font-family: inherit;
}

.wfd-codeweight {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	margin: 0 0 1rem;
}

.wfd-codeweight__label {
	margin-right: 0.15rem;
	color: var(--wf-faint);
	font-size: 10px;
	letter-spacing: 0.06em;
}

.wfd-codeweight .wfd-chip {
	border-color: var(--wf-line-strong);
	color: var(--wf-muted);
}

.wfd-codeweight .wfd-chip:hover {
	border-color: var(--wf-ink);
	color: var(--wf-ink);
}

.wfd-codeweight .wfd-chip.is-active {
	border-color: var(--wf-ink);
	background: var(--wf-ink);
	color: var(--wf-white);
}

/* License */
.wfd-license {
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
	padding: 1.1rem 1.15rem;
	border: 1px solid var(--wf-line);
	border-radius: var(--wf-radius-md);
	background: var(--wf-paper);
}

.wfd-license__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem;
}

.wfd-license__name {
	margin: 0;
	color: var(--wf-ink);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.45;
}

.wfd-license__notes {
	margin: 0;
	color: var(--wf-muted);
	font-size: 12.5px;
	line-height: 1.75;
}

.wfd-license__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem 1rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--wf-line);
}

.wfd-license__links a {
	color: var(--wf-ink);
	font-size: 11.5px;
	text-decoration: underline;
	text-decoration-color: var(--wf-line-strong);
	text-underline-offset: 3px;
}

.wfd-license__links a:hover {
	text-decoration-color: var(--wf-ink);
}

.wfd-verify {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	color: var(--wf-green);
	font-size: 11px;
}

/* Tag chips */
.wfd-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0.9rem 0 0;
	padding: 0;
	list-style: none;
}

.wfd-tags a,
.wfd-tags span {
	display: inline-flex;
	padding: 0.3rem 0.65rem;
	border: 1px solid var(--wf-line-strong);
	border-radius: 999px;
	background: var(--wf-white);
	color: var(--wf-ink-soft);
	font-size: 11.5px;
	line-height: 1.3;
	text-decoration: none;
}

.wfd-tags a:hover {
	border-color: var(--wf-ink);
	background: var(--wf-ink);
	color: var(--wf-white);
}

/* Commercial callout */
.wfd-callout {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: 0 0 1.6rem;
	padding: 1.35rem 1.5rem;
	border-radius: var(--wf-radius-md);
	background:
		radial-gradient(120% 160% at 100% 0%, #f1ebe2 0%, transparent 60%),
		var(--wf-surface);
}

.wfd-callout__text {
	min-width: 0;
}

.wfd-callout h2 {
	margin: 0 0 0.25rem;
	color: var(--wf-ink);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.4;
}

.wfd-callout p {
	margin: 0;
	color: var(--wf-muted);
	font-size: 12px;
	line-height: 1.7;
}

/* -------------------------------------------------------------------------
   Rail cards
   ---------------------------------------------------------------------- */
.wfd-card {
	padding: 1.25rem;
	border: 0;
	border-radius: 15px;
	background: var(--wf-white);
	box-shadow: 0 0 10px rgba(10, 10, 10, 0.1);
}

.wfd-card__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin: 0 0 0.8rem;
	color: var(--wf-ink);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.06em;
	line-height: 1.4;
	text-transform: uppercase;
}

.wfd-card__title span {
	color: var(--wf-faint);
	font-family: var(--wf-mono);
	font-size: 9px;
	font-weight: 400;
	letter-spacing: 0.02em;
}

.wfd-actions {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.wfd-actions .wf-btn {
	width: 100%;
	min-height: 2.55rem;
	font-size: 12px;
}

.wfd-actions__note {
	margin: 0.7rem 0 0;
	color: var(--wf-muted);
	font-size: 10.5px;
	line-height: 1.6;
}

.wfd-facts {
	margin: 0;
	padding: 0;
}

.wfd-facts__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.8rem;
	padding: 0.52rem 0;
	border-bottom: 1px solid var(--wf-line);
	font-size: 11.5px;
	line-height: 1.5;
}

.wfd-facts__row:first-child {
	padding-top: 0;
}

.wfd-facts__row:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.wfd-facts__row dt {
	flex-shrink: 0;
	color: var(--wf-faint);
}

.wfd-facts__row dd {
	margin: 0;
	overflow-wrap: anywhere;
	color: var(--wf-ink);
	text-align: right;
}

.wfd-related {
	margin: 0;
	padding: 0;
	list-style: none;
}

.wfd-related li {
	border-top: 1px solid var(--wf-line);
}

.wfd-related li:first-child {
	border-top: 0;
}

.wfd-related a {
	display: grid;
	grid-template-columns: 1.25rem 2.2rem minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.55rem;
	min-width: 0;
	padding: 0.52rem 0;
	color: var(--wf-ink);
	text-decoration: none;
}

.wfd-related__idx {
	color: var(--wf-faint);
	font-family: var(--wf-mono);
	font-size: 9px;
	letter-spacing: 0.02em;
}

.wfd-related__thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.2rem;
	height: 2.2rem;
	overflow: hidden;
	border: 1px solid var(--wf-line);
	border-radius: 4px;
	background: var(--wf-white);
	color: var(--wf-faint);
	font-family: var(--wf-serif);
	font-size: 12px;
}

.wfd-related__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wfd-related__text {
	min-width: 0;
}

.wfd-related__name {
	display: block;
	overflow: hidden;
	color: var(--wf-ink);
	font-size: 12px;
	line-height: 1.45;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wfd-related__meta {
	display: block;
	overflow: hidden;
	color: var(--wf-faint);
	font-size: 9.5px;
	line-height: 1.4;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wfd-related__arrow {
	color: var(--wf-faint);
	font-size: 12px;
	transition: transform 0.2s var(--wf-ease), color 0.2s var(--wf-ease);
}

.wfd-related a:hover .wfd-related__name {
	color: var(--wf-accent);
}

.wfd-related a:hover .wfd-related__arrow {
	color: var(--wf-ink);
	transform: translateX(2px);
}

/* -------------------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------------- */
@media (max-width: 980px) {
	.wfd-layout {
		grid-template-columns: minmax(0, 1fr) 17rem;
		gap: 2rem;
	}
}

@media (max-width: 840px) {
	.wfd-layout {
		grid-template-columns: 1fr;
		gap: 1.4rem;
	}
	.wfd-aside {
		position: static;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: start;
	}
	.wfd-aside .wfd-card--actions {
		grid-column: 1 / -1;
	}
}

@media (max-width: 640px) {
	.wfd {
		padding: 0 0.9rem 3rem;
	}
	.wfd-crumbs {
		padding-top: 0.8rem;
		font-size: 10.5px;
	}
	.wfd-stage__inner {
		padding: 2rem 1.15rem 1.5rem;
	}
	.wfd-stage__ghost {
		right: -0.12em;
		bottom: -0.26em;
		font-size: 13rem;
	}
	.wfd-stage__type {
		padding: 1.8rem 0 1.5rem;
	}
	.wfd-stage__name {
		font-size: clamp(2.35rem, 12vw, 3.6rem);
	}
	.wfd-stage__en {
		margin-bottom: 1.2rem;
		font-size: 9.5px;
	}
	.wfd-stage__sample {
		font-size: calc(var(--wfd-sample-size, 24px) * 0.78);
		line-height: 1.6;
	}
	.wfd-stage__latin {
		font-size: calc(var(--wfd-sample-size, 24px) * 0.4);
	}
	.wfd-stage__actions {
		width: 100%;
	}
	.wfd-stage__actions .wf-btn {
		flex: 1 1 auto;
	}
	.wfd-stage__bar {
		align-items: flex-start;
	}
	.wfd-custom {
		width: 100%;
	}
	.wfd-custom input {
		flex: 1;
		width: auto;
		max-width: none;
	}
	.wfd-controls__label {
		display: inline;
	}
	.wfd-section {
		padding: 1.6rem 0 1.7rem;
	}
	.wfd-section__head h2 {
		font-size: 19px;
	}
	.wfd-specs {
		grid-template-columns: 1fr;
	}
	.wfd-spec:nth-child(odd) {
		padding-right: 0;
	}
	.wfd-spec:nth-child(even) {
		padding-left: 0;
		border-left: 0;
	}
	.wfd-aside {
		grid-template-columns: 1fr;
	}
	.wfd-callout {
		padding: 1.1rem;
	}
	.wfd-callout .wf-btn {
		width: 100%;
	}
	.wfd-codecard pre {
		font-size: 10.5px;
	}
}
