/* Cross-links between a territory and its country (territories.php).
   Loaded only on those archives. The lead's italics use Georgia until
   assets/js/lora-emphasis.js swaps in Lora, as elsewhere on the site. */

.olga-territory-place {
	color: var(--wp--preset--color--contrast);
	white-space: nowrap;
	text-decoration: none;
}

.olga-territory-place__name {
	font-family: var(--wp--preset--font-family--display);
	text-decoration: underline 1px color-mix(in srgb, var(--wp--preset--color--accent) 45%, transparent);
	text-underline-offset: 0.28em;
	transition: color 0.2s, text-decoration-color 0.2s;
}

a:hover .olga-territory-place__name,
a:focus-visible .olga-territory-place__name,
a.olga-territory-place:hover .olga-territory-place__name,
a.olga-territory-place:focus-visible .olga-territory-place__name {
	color: var(--wp--preset--color--link);
	text-decoration-color: currentColor;
}

.olga-territory-arrow {
	display: inline-block;
	margin-left: 0.1em;
	color: var(--wp--preset--color--accent);
	font-family: var(--wp--preset--font-family--ui);
	font-size: 0.8em;
	transition: transform 0.2s;
}

a:hover .olga-territory-arrow,
a:focus-visible .olga-territory-arrow {
	transform: translateX(0.15em);
}

.olga-territory-stamp {
	display: inline-block;
	flex: none;
	width: 1.75rem;
	margin-right: 0.55rem;
	vertical-align: -0.1em;
	transform: rotate(-2deg);
}

.olga-territory-stamp .olga-country-stamp__art {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
	filter: saturate(0.85) drop-shadow(0 0.5px 1px rgb(18 17 15 / 0.25));
}

/* Inward: the territory's line closes its quotation, so the quotation's
   own space moves below the line. */
.olga-country-intro:has(+ .olga-territory-of) {
	margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.olga-territory-of {
	box-sizing: border-box;
	width: min(100%, 58rem);
	margin-right: auto;
	margin-bottom: clamp(3rem, 7vw, 5.75rem);
	margin-left: 0;
	line-height: 1.7;
}

/* Under a quotation, the line starts where its text does. */
.olga-country-intro--quote + .olga-territory-of {
	padding-left: calc(2px + clamp(1.35rem, 4vw, 3.5rem));
}

.olga-territory-of a {
	display: inline-block;
	padding-top: 0.85rem;
	border-top: 1px solid var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.olga-territory-of__lead {
	color: var(--wp--preset--color--muted);
	font-family: Georgia, serif;
	font-size: 0.9375rem;
	font-style: italic;
	font-synthesis: weight style;
}

.olga-territory-of .olga-territory-place__name {
	font-size: 1.375rem;
}

/* Onward: the country's territories follow its stories. */
.olga-territories {
	display: grid;
	grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr);
	gap: 1rem 2.5rem;
	align-items: center;
	margin-top: clamp(3rem, 6vw, 4.5rem);
	padding: 1.5rem 0;
	border-top: 1px solid var(--wp--preset--color--surface);
	border-bottom: 1px solid var(--wp--preset--color--surface);
}

/* Further afield opens with its own rule. */
.olga-territories:has(+ .olga-pagination) {
	border-bottom: 0;
}

.olga-territories__label {
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--ui);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	line-height: 1.6;
	text-transform: uppercase;
	text-wrap: balance;
}

.olga-territories__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 2.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.olga-territories .olga-territory-place {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
}

.olga-territories .olga-territory-stamp {
	width: 3.25rem;
	margin-right: 0.9rem;
	transform: rotate(-3deg);
}

.olga-territories .olga-territory-place__name {
	font-size: clamp(1.5rem, 1.15rem + 1vw, 2.1rem);
	line-height: 1.15;
}

@media (max-width: 640px) {
	.olga-territories {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.75rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.olga-territory-place__name,
	.olga-territory-arrow {
		transition: none;
	}
}
