
body.thesis-page {
	--gutter: 1.25rem;
	--bar: 3.5rem;
	--top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--bar));
	--warm: #a08868;
	--warm-wash: #eee9e1;
	--measure: 47.25rem;
}

@media (min-width: 40rem) {
	body.thesis-page {
		--gutter: 2rem;
	}
}

@media (min-width: 64rem) {
	body.thesis-page {
		--gutter: 3rem;
	}
}

.thesis-bar {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 40;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 1.5rem;
	height: var(--bar);
	padding-inline: var(--gutter);
	border-bottom: 1px solid var(--color-ink);
	background: var(--color-paper);
}

.thesis-bar__home {
	font-size: 1.375rem;
	font-weight: 800;
	font-stretch: 75%;
	line-height: 1;
	letter-spacing: -0.01em;
	white-space: nowrap;
	color: var(--color-ink);
	text-decoration: none;
	transition: color 0.3s ease-out;
}

.thesis-bar__home > span:first-child {
	margin-inline: 0.06em;
	font-weight: 240;
	color: var(--warm);
}

.thesis-bar__home:hover {
	color: #4a4a4a;
}

.thesis-bar__where {
	overflow: hidden;
	font-size: 0.875rem;
	color: var(--color-grey);
	white-space: nowrap;
	text-overflow: ellipsis;
	opacity: 0;
	transition: opacity 0.3s ease-out;
}

.thesis-bar__where.is-shown {
	opacity: 1;
}

.thesis-bar__actions {
	display: flex;
	gap: 0.5rem;
}

@media (width < 48rem) {
	.thesis-bar {
		gap: 0.75rem;
	}

	.thesis-bar__where {
		display: none;
	}

	.thesis-bar {
		grid-template-columns: auto auto;
		justify-content: space-between;
	}

	.thesis-bar__home {
		font-size: 1.2rem;
	}

	.thesis-bar__button {
		padding-inline: 0.55rem;
		font-size: 0.8125rem;
		letter-spacing: 0.02em;
	}
}

.thesis-bar__button {
	min-height: 2.5rem;
	padding: 0 0.875rem;
	border: 1px solid var(--color-ink);
	border-radius: 0.25rem;
	background: transparent;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--color-ink);
	cursor: pointer;
	transition: background-color 0.3s ease-out;
}

.thesis-bar__button:hover,
.thesis-bar__button:focus-visible,
.thesis-bar__button[aria-expanded="true"] {
	background: var(--warm-wash);
}

.thesis-bar__progress {
	position: absolute;
	inset: auto 0 -1px;
	height: 2px;
	background: var(--warm);
	transform: scaleX(var(--progress, 0));
	transform-origin: 0 50%;
}

.thesis-menu {
	position: fixed;
	inset: var(--top) 0 0;
	z-index: 50;
	overflow-y: auto;
	padding: 2.5rem var(--gutter) 4rem;
	background: var(--color-paper);
	opacity: 0;
	transform: translateY(-0.75rem);
	transition:
		opacity 0.35s var(--ease-soft, ease),
		transform 0.35s var(--ease-soft, ease);
}

.thesis-menu.is-open {
	opacity: 1;
	transform: none;
}

.thesis-menu.is-closing {
	opacity: 0;
	transform: translateY(-2.5rem);
}

.thesis-menu__close {
	float: right;
}

.thesis-menu nav {
	max-width: 40rem;
}

.thesis-menu #menu-main-menu > li > a.slash {
	font-size: var(--text-menu);
	line-height: 1;
}

.thesis {
	display: block;
	min-width: 0;
}

.thesis-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2rem;
	padding: 1rem var(--gutter) 5rem;
}

@media (min-width: 64rem) {
	.thesis-layout {
		grid-template-columns: minmax(19.5rem, 27rem) minmax(0, var(--measure));
		column-gap: clamp(2.5rem, 6vw, 6rem);
		padding-top: calc(4rem - 40px);
	}
}

.thesis-side {
	font-size: 0.9375rem;
	line-height: 1.35;
}

@media (min-width: 64rem) {
	.thesis-side {
		position: sticky;
		top: calc(var(--top) + 2rem);
		align-self: start;
		max-height: calc(100dvh - var(--top) - 4rem);
		overflow-y: auto;
		overscroll-behavior: contain;
		padding-right: 0.5rem;
		scrollbar-width: thin;
		scrollbar-color: var(--color-line) transparent;
	}

	.thesis-bar__button--toc {
		display: none;
	}
}

@media (width < 64rem) {
	.thesis-side {
		position: fixed;
		inset: var(--top) auto 0 0;
		z-index: 45;
		width: min(22rem, 88vw);
		overflow-y: auto;
		padding: 1.5rem var(--gutter) 3rem;
		border-right: 1px solid var(--color-ink);
		background: var(--color-paper);
		transform: translateX(-102%);
		visibility: hidden;
		transition:
			transform 0.35s var(--ease-soft, ease),
			visibility 0s linear 0.35s;
	}

	.thesis-side.is-open {
		transform: none;
		visibility: visible;
		transition: transform 0.35s var(--ease-soft, ease);
	}
}

.thesis-toc__title {
	margin: 0 0 1rem;
	font-size: 1.375rem;
	font-weight: 800;
	font-stretch: 75%;
	line-height: 1;
	letter-spacing: -0.01em;
	text-transform: lowercase;
	color: var(--color-ink);
}

.thesis-toc ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.thesis-toc a {
	position: relative;
	display: block;
	padding: 0.3rem 0 0.3rem 0.85rem;
	color: var(--color-ink);
	text-decoration: none;
}

.thesis-toc a::before {
	content: "/";
	position: absolute;
	left: 0;
	font-weight: 500;
	color: var(--slash-on, var(--warm));
	opacity: 0;
}

.thesis-toc a:is(:hover, :focus-visible, .is-current)::before {
	opacity: 1;
}

.thesis-toc > ol > li > a {
	font-weight: 500;
	color: var(--color-ink);
}

.thesis-toc > ol > li > ol {
	display: none;
	margin: 0.15rem 0 0.5rem 0.75rem;
	font-size: 0.875rem;
}

.thesis-toc > ol > li.is-open > ol {
	display: block;
}

.thesis-toc li li > ol {
	display: none;
	margin: 0 0 0.3rem 0.75rem;
	font-size: 0.8125rem;
}

.thesis-toc li li.is-open > ol {
	display: block;
}

.thesis-toc a.is-current {
	color: var(--color-ink);
}

.thesis-toc .h-num {
	font-variant-numeric: tabular-nums;
	color: var(--warm);
}

.thesis-head {
	padding-bottom: 2.5rem;
	margin-bottom: 1rem;
}

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

.thesis-head__title {
	overflow-wrap: break-word;
	word-spacing: 0.06em;
	font-size: calc(var(--text-display) * 0.7);
	line-height: var(--text-display--line-height);
	font-weight: 800;
	font-stretch: 75%;
	letter-spacing: -0.025em;
	text-transform: uppercase;
	text-wrap: balance;
}

.thesis-head__meta {
	margin-top: 1.25rem;
	color: var(--color-grey);
}

.thesis-head__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0.75rem;
	margin-top: 1.75rem;
}

.thesis-head__note {
	margin-top: 2rem;
}

.thesis-cite {
	position: relative;
}

.thesis-cite summary {
	list-style: none;
}

.thesis-cite summary::-webkit-details-marker {
	display: none;
}

.thesis-cite__panel {
	position: absolute;
	top: calc(100% + 0.5rem);
	left: 0;
	z-index: 30;
	width: min(34rem, calc(100vw - 2 * var(--gutter)));
	padding: 1.25rem;
	border: 1px solid var(--color-ink);
	border-radius: 0.25rem;
	background: var(--color-paper);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.thesis-cite__label {
	margin: 0 0 0.25rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-grey);
}

.thesis-cite__label:not(:first-child) {
	margin-top: 1rem;
}

.thesis-cite__text {
	margin: 0;
	white-space: pre-wrap;
	font: inherit;
	user-select: all;
}

.thesis-cite__copy {
	margin-top: 0.4rem;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--warm);
	cursor: pointer;
}

.thesis-text {
	font-size: var(--wp--preset--font-size--base);
	line-height: 1.6;
	hyphens: auto;
	overflow-wrap: break-word;
}

.thesis-text :is(h1, h2, h3, h4, li[id], p:has(> a.cite:target)) {
	scroll-margin-top: calc(var(--top) + 1.5rem);
}

.thesis-text h1 {
	margin: 5rem 0 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--color-ink);
	font-size: var(--text-heading);
	line-height: var(--text-heading--line-height);
	font-weight: 800;
	font-stretch: 75%;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	text-wrap: balance;
}

.thesis-text > h1:first-child {
	margin-top: 1rem;
}

.thesis-text h2 {
	margin: 3.5rem 0 1rem;
	font-size: 1.5rem;
	line-height: 1.2;
	font-weight: 700;
	text-wrap: balance;
}

.thesis-text h3 {
	margin: 2.5rem 0 0.75rem;
	font-size: 1.2rem;
	line-height: 1.3;
	font-weight: 700;
}

.thesis-text h4 {
	margin: 2rem 0 0.5rem;
	font-size: 1rem;
	font-weight: 600;
	font-style: italic;
}

.thesis-text .h-num {
	margin-right: 0.15em;
	font-variant-numeric: tabular-nums;
	color: var(--warm);
}

.thesis-text .h-link {
	margin-left: 0.4em;
	font-size: 0.7em;
	font-weight: 400;
	color: var(--color-mute);
	text-decoration: none;
	opacity: 0;
	transition: opacity 0.2s ease-out;
}

.thesis-text :is(h1, h2, h3, h4):hover .h-link,
.thesis-text .h-link:focus-visible {
	opacity: 1;
}

.thesis-text p {
	margin: 0 0 1.1em;
}

.thesis-text blockquote {
	margin: 1.75em 0;
	padding-left: 1.5rem;
	border-left: 1px solid var(--warm);
	font-size: 0.94em;
	line-height: 1.6;
	color: #2b2a28;
}

.thesis-text blockquote p:last-child {
	margin-bottom: 0;
}

.thesis-text :where(a:not([class]):not([href^="#"])) {
	background-image:
		linear-gradient(var(--warm), var(--warm)),
		linear-gradient(var(--color-line), var(--color-line));
	background-repeat: no-repeat;
	background-size: 0% 1px, 100% 1px;
	background-position: 100% 100%, 0 100%;
	color: inherit;
	text-decoration: none;
	transition: background-size 0.4s var(--ease-soft, ease);
}

.thesis-text :where(a:not([class]):not([href^="#"])):is(:hover, :focus-visible) {
	background-size: 100% 1px, 100% 1px;
	background-position: 0 100%, 0 100%;
}

.thesis-text :is(a.cite, a.xref) {
	color: inherit;
	text-decoration: underline dotted var(--color-mute);
	text-underline-offset: 0.22em;
	text-decoration-thickness: 1px;
	transition:
		color 0.2s ease-out,
		text-decoration-color 0.2s ease-out;
}

.thesis-text :is(a.cite, a.xref):is(:hover, :focus-visible),
.thesis-text a.cite.is-active {
	color: var(--color-ink);
	text-decoration-color: var(--warm);
	text-decoration-style: solid;
}

.thesis-text :is(a.cite, a.xref):target,
.thesis-text a.footnote-ref:target {
	background: var(--warm-wash);
}

.thesis-text a.footnote-ref {
	padding-inline: 0.1em;
	color: var(--warm);
	text-decoration: none;
}

.thesis-text a.footnote-ref sup {
	font-size: 0.7em;
	font-weight: 600;
}

.thesis-text .notes ol,
.thesis-text ol.references {
	margin: 0;
	padding: 0;
	font-size: 0.9375rem;
	line-height: 1.55;
}

.thesis-text .notes ol {
	padding-left: 1.5rem;
}

.thesis-text .notes li {
	margin-bottom: 0.75rem;
	padding-left: 0.25rem;
}

.thesis-text .notes li::marker {
	color: var(--warm);
	font-weight: 600;
}

.thesis-text .notes li p {
	margin: 0;
}

.thesis-text .footnote-back {
	margin-left: 0.3em;
	color: var(--warm);
	text-decoration: none;
}

.thesis-text ol.references {
	list-style: none;
}

.thesis-text ol.references > li {
	margin: 0;
	padding: 0.55rem 0.5rem 0.55rem 1.75rem;
	text-indent: -1.25rem;
	border-radius: 0.25rem;
	transition: background-color 0.6s ease-out;
}

.thesis-text :is(ol.references > li, .notes li):target {
	background: var(--warm-wash);
}

.thesis-text .ref-cited,
.thesis-text .ref-tools {
	font-size: 0.8125rem;
	color: var(--color-grey);
	white-space: nowrap;
}

.thesis-text .ref-cited {
	white-space: normal;
}

.thesis-text .ref-cited a,
.thesis-text .ref-tools a {
	color: var(--color-grey);
	text-decoration: underline;
	text-decoration-color: var(--color-line);
	text-underline-offset: 0.2em;
}

.thesis-text .ref-cited a:hover,
.thesis-text .ref-tools a:hover {
	color: var(--color-ink);
	text-decoration-color: var(--warm);
}

.thesis-text .ref-tools a + a::before {
	content: "·";
	display: inline-block;
	margin-inline: 0.45em;
	color: var(--color-mute);
}

.thesis-pop {
	position: absolute;
	z-index: 60;
	width: min(26rem, calc(100vw - 2rem));
	padding: 0.9rem 1rem;
	border: 1px solid var(--color-ink);
	border-radius: 0.25rem;
	background: var(--color-paper);
	box-shadow: 0 0.75rem 2rem -1rem rgb(21 21 21 / 0.35);
	font-size: 0.875rem;
	line-height: 1.5;
	opacity: 0;
	transform: translateY(4px);
	transition:
		opacity 0.18s ease-out,
		transform 0.18s ease-out;
}

.thesis-pop.is-shown {
	opacity: 1;
	transform: none;
}

.thesis-pop p {
	margin: 0;
}

.thesis-pop .ref-cited,
.thesis-pop .footnote-back {
	display: none;
}

.thesis-pop .ref-tools {
	display: block;
	margin-top: 0.4rem;
	font-size: 0.8125rem;
	color: var(--color-grey);
}

.thesis-pop .ref-tools a + a::before {
	content: "·";
	display: inline-block;
	margin-inline: 0.45em;
	color: var(--color-mute);
}

.thesis-pop a {
	color: inherit;
}

.thesis-pop__go {
	display: inline-block;
	margin-top: 0.5rem;
	font-weight: 600;
	color: var(--warm) !important;
	text-decoration: none;
}

.thesis-back {
	position: fixed;
	right: var(--gutter);
	bottom: 1.5rem;
	z-index: 35;
	padding: 0.6rem 1rem;
	border: 1px solid var(--color-ink);
	border-radius: 0.25rem;
	background: var(--color-paper);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--color-ink);
	cursor: pointer;
	box-shadow: 0 0.5rem 1.5rem -0.75rem rgb(21 21 21 / 0.35);
	transition: background-color 0.3s ease-out;
}

.thesis-back::before {
	content: "↑ ";
	color: var(--warm);
}

.thesis-back:hover {
	background: var(--warm-wash);
}

@media print {
	.thesis-bar,
	.thesis-menu,
	.thesis-side,
	.thesis-head__actions,
	.thesis-back,
	.thesis-pop,
	.thesis-page > footer,
	.h-link,
	.ref-tools {
		display: none !important;
	}

	.thesis-layout {
		display: block;
		padding: 0;
	}

	.thesis-text a.cite {
		text-decoration: none;
	}
}

.thesis-text p.epigraph {
	max-width: 28rem;
	margin: 0 0 3rem auto;
	text-align: right;
	line-height: 1.55;
	color: var(--color-grey);
	hyphens: manual;
}

:is(.thesis-side, .thesis-bar__home, .thesis-bar__button, .thesis-back, .thesis-cite__copy, .thesis-pop__go) {
	font-family: var(--font-sans);
}

@media (min-width: 64rem) {
	.thesis-layout {
		grid-template-columns: minmax(19.5rem, 27rem) minmax(0, var(--measure));
		padding-left: 0;
	}

	.thesis-side {
		padding-inline: 2rem;
	}
}

.a11y--bar {
	display: none;
	margin-right: 0.5rem;
}

.a11y--overlay {
	clear: both;
	margin-top: 2.5rem;
}

@media (min-width: 48rem) {
	.a11y--bar {
		display: flex;
	}

	.a11y--overlay {
		display: none;
	}
}

:root:not([data-theme="light"]) body.thesis-page {
	--warm-wash: #2a2724;
}

:root:not([data-theme="light"]) .thesis-text blockquote {
	color: var(--color-ink);
}

:root:not([data-theme="light"]) .thesis-bar__home:hover {
	color: #c9c3ba;
}

@media (width < 64rem) {
	.thesis-toc a {
		padding-top: 0.55rem;
		padding-bottom: 0.55rem;
	}
}
