.patch-detail-nav,
.patch-detail-rack {
	width: min(100%, 780px);
	margin-inline: auto;
}

.patch-detail-nav {
	margin-bottom: 8px;
}

.patch-detail-nav a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 13px;
	border-radius: 5px;
	background: #302231;
	font: 700 .86rem Barlow, sans-serif;
	text-decoration: none;
}

.patch-detail-nav a:hover { background: #433044; }

.patch-detail-nav a::before {
	content: "";
	width: 7px;
	height: 7px;
	border: solid currentColor;
	border-width: 0 0 1px 1px;
	transform: rotate(45deg);
}

.patch-detail-rack {
	display: grid;
	grid-template-columns: 26px minmax(0, 1fr) 26px;
	color: #fbeee2;
	border-radius: 5px;
	background: #251b27;
	box-shadow: 0 18px 40px -20px #08040c;
}

.patch-rack-ear {
	position: relative;
	background: linear-gradient(90deg, #1c1720, #392d3c 24%, #241c28 78%, #1a141c);
}

.patch-rack-ear--left { border-radius: 5px 0 0 5px; }
.patch-rack-ear--right { border-radius: 0 5px 5px 0; }

.patch-rack-ear::before,
.patch-rack-ear::after {
	content: "";
	position: absolute;
	inset-inline-start: 50%;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	transform: translateX(-50%);
	background: linear-gradient(135deg, transparent 43%, #211923 44% 57%, transparent 58%),
		linear-gradient(145deg, #8c7884, #50414f 56%, #352a38);
	box-shadow: 0 1px 2px #100b13;
}

.patch-rack-ear::before { top: 14px; }
.patch-rack-ear::after { bottom: 14px; }

.patch-rack-panel {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 16px;
	padding: clamp(18px, 3vw, 28px);
	background: linear-gradient(180deg, #3a2839, #2c202e);
	box-shadow: inset 0 1px #ffffff13;
}

#primary .patch-rack-nameplate h1 {
	margin: 0;
	font: 800 clamp(2rem, 4vw, 3.6rem)/1.05 Manrope, Barlow, sans-serif;
	letter-spacing: -.035em;
	overflow-wrap: anywhere;
	text-shadow: 0 -1px #120c15;
}

.patch-rack-nameplate p {
	margin: 8px 0 0;
	color: #ddc8cf;
	overflow-wrap: anywhere;
}

.patch-rack-output {
	display: grid;
	justify-items: center;
	gap: 7px;
	padding: 8px 10px;
	border-radius: 6px;
	background: #241922;
	box-shadow: inset 0 1px 3px #170e18;
}

.patch-editorial .patch-rack-download {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 18px;
	border-radius: 5px;
	color: #fbeee2;
	background: linear-gradient(#a84434, #873127);
	font: 700 .88rem Barlow, sans-serif;
	text-decoration: none;
	box-shadow: 0 3px #53221d, inset 0 1px #ffffff26;
}

.patch-rack-download:hover { background: #ad4637; }
.patch-rack-download:active { transform: translateY(2px); }
.patch-rack-download:focus-visible { outline: 2px solid #e6b98f; outline-offset: 3px; }

.patch-rack-format {
	color: #e6b98f;
	font: 600 .77rem Barlow, sans-serif;
	letter-spacing: .045em;
}

.patch-rack-notes,
.patch-rack-instructions {
	padding: clamp(16px, 2.5vw, 23px) clamp(18px, 3vw, 28px);
	background: #251b27;
	overflow-wrap: anywhere;
}

.patch-rack-notes p,
.patch-rack-instructions p {
	max-width: 65ch;
	margin: 0;
	line-height: 1.55;
}

.patch-rack-instructions {
	background: #1a141d;
	box-shadow: inset 0 1px #ffffff16;
	padding-block: clamp(14px, 2vw, 19px);
}

#primary .patch-rack-instructions h2 {
	margin: 0 0 7px;
	color: #e6b98f;
	font: 700 1.05rem/1.25 Barlow, sans-serif;
}

.patch-rack-instructions p { color: #dfcfc8; font-size: .95rem; }
.patch-rack-instructions strong { color: #fbeee2; }

.patch-directory-rack .patch-hero {
	position: relative;
	max-width: 920px;
	padding: 0 14px;
	border: 0;
	border-radius: 5px;
	background: linear-gradient(90deg, #1b151e, #362939 12px, #251b27 14px, #251b27 calc(100% - 14px), #362939 calc(100% - 12px), #1b151e);
	box-shadow: 0 18px 40px -20px #08040c;
}

.patch-directory-rack .patch-hero::before,
.patch-directory-rack .patch-hero::after {
	content: "";
	position: absolute;
	inset-inline: 4px;
	height: 6px;
	background: radial-gradient(circle, #796276 45%, transparent 55%) left,
		radial-gradient(circle, #796276 45%, transparent 55%) right;
	background-repeat: no-repeat;
	background-size: 6px 6px;
}

.patch-directory-rack .patch-hero::before { top: 10px; }
.patch-directory-rack .patch-hero::after { bottom: 10px; }

.patch-directory-heading,
.patch-rack-library > .page-intro {
	padding: clamp(20px, 4vw, 36px);
	border-radius: 5px 5px 0 0;
	background: linear-gradient(180deg, #3a2839, #2c202e);
	box-shadow: inset 0 1px #ffffff13;
}

.patch-directory-rack .patch-directory-heading {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 22px;
	padding-block: clamp(15px, 2vw, 23px);
}
.patch-directory-rack .patch-directory-heading nav { margin: 0; }
.patch-directory-rack .patch-directory-heading nav a {
	display: inline-flex;
	align-items: center;
	padding: 0 12px;
	min-height: 44px;
	background: #241922;
	border-radius: 5px;
	font-weight: 700;
}

#primary.patch-directory-rack h1,
.patch-rack-library > .page-intro h1 {
	margin: 0;
	font: 800 clamp(1.9rem, 4vw, 3.5rem)/1.08 Manrope, Barlow, sans-serif;
	letter-spacing: -.035em;
	overflow-wrap: anywhere;
}

@media (max-width: 600px) {
	.patch-directory-rack .patch-directory-heading { flex-direction: column; align-items: flex-start; }
}

.patch-directory-rack .patch-directory-content { padding: 8px clamp(20px, 4vw, 36px) 18px; }
.patch-directory-rack .oscillato-patch-list { margin: 0; }
.patch-directory-rack .oscillato-patch-list li { padding: 0; border-color: #fff1e21c; }
.patch-directory-rack .oscillato-patch-list li:first-child { border-top: 0; }
.patch-directory-rack .oscillato-patch-list li a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 48px;
	padding: 7px 0;
	font-weight: 700;
	text-decoration: none;
}

.patch-directory-rack .oscillato-patch-list li a:hover { text-decoration: underline; }
.patch-directory-rack .oscillato-patch-list li a::after {
	content: "";
	flex: 0 0 7px;
	width: 7px;
	height: 7px;
	margin-right: 3px;
	border: solid #e6b98f;
	border-width: 1px 1px 0 0;
	transform: rotate(45deg);
}

.patch-directory-rack .oscillato-patch-list li span { margin: -4px 0 9px; color: #ddc8cf; }
.patch-directory-rack .oscillato-pagination { margin-top: 14px; }

.patch-rack-library { padding-top: clamp(10px, 2vw, 24px); }
.patch-rack-library > .page-intro { margin: 0; align-items: center; }
.patch-rack-library .published-patches,
.patch-rack-library .workbench-view {
	border-radius: 5px;
	background: #251b27;
	box-shadow: 0 15px 28px -22px #08040c;
}
.patch-rack-library .published-patches { border-radius: 0 0 5px 5px; }
.patch-rack-library .view-heading { border-color: #fff1e226; }

@media (max-width: 600px) {
	.patch-detail-rack { grid-template-columns: 14px minmax(0, 1fr) 14px; }
	.patch-rack-panel { grid-template-columns: minmax(0, 1fr); gap: 17px; }
	.patch-rack-output { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
	.patch-rack-download { width: 100%; }
	.patch-rack-ear::before, .patch-rack-ear::after { width: 7px; height: 7px; }
}

@media (prefers-reduced-motion: reduce) {
	.patch-rack-download:active { transform: none; }
}
