.hdx-notes,
.hdx-main.hdx-notes {
	width: 100%;
	max-width: 820px;
	margin: 0 auto;
	padding: clamp(32px, 5vw, 64px) clamp(20px, 4vw, 44px) 110px;
}

.hdx-notes__intro h1,
.hdx-notes > h1 {
	font-family: 'Newsreader', Georgia, serif;
	font-weight: 700;
	font-size: clamp(36px, 4.6vw, 54px);
	line-height: 1;
	margin: 0 0 12px;
}

.hdx-notes__intro .hdx-page-tagline,
.hdx-notes > .hdx-tagline {
	font-size: clamp(14.5px, 1.3vw, 16.5px);
	color: var(--muted);
	margin: 0 0 clamp(30px, 4vw, 46px);
}

.hdx-notes__toolbar,
.hdx-notes-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	border-bottom: 1px solid var(--line);
	padding-bottom: 14px;
	margin-bottom: clamp(10px, 1.4vw, 18px);
}

.hdx-notes-sort {
	display: flex;
	gap: 20px;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 11.5px;
	letter-spacing: 0.16em;
}

.hdx-notes-sort button {
	appearance: none;
	background: none;
	border: 0;
	border-bottom: 1px solid transparent;
	padding: 0 0 3px;
	color: var(--faint);
	cursor: pointer;
}

.hdx-notes-sort button.is-active,
.hdx-notes-sort button[aria-pressed="true"] {
	color: var(--ink);
	border-bottom-color: var(--ink);
}

.hdx-notes-count {
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 11.5px;
	letter-spacing: 0.16em;
	color: var(--faint);
	white-space: nowrap;
}

.hdx-notes__feed,
.hdx-notes-list {
	width: 100%;
}

.hdx-note {
	display: flex;
	gap: clamp(18px, 3.2vw, 40px);
	padding: clamp(30px, 4vw, 46px) 0;
	border-bottom: 1px solid var(--line);
}

.hdx-note__meta,
.hdx-note-rail {
	flex: 0 0 clamp(70px, 9vw, 104px);
	display: flex;
	flex-direction: column;
	gap: 10px;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
}

@media (min-width: 721px) {
	.hdx-note__meta,
	.hdx-note-rail {
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + 90px);
		align-self: flex-start;
	}
}

.hdx-note-pin {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 10px;
	letter-spacing: 0.16em;
	color: var(--accent-ink);
}

.hdx-note-rail time {
	font-size: 11px;
	letter-spacing: 0.12em;
	color: var(--ink);
}

.hdx-note-rail > span:not(.hdx-note-pin) {
	font-size: 10.5px;
	letter-spacing: 0.12em;
	color: var(--faint);
	text-transform: uppercase;
}

.hdx-note__body,
.hdx-note-body {
	flex: 1;
	min-width: 0;
}

.hdx-note-prose > * {
	font-family: 'Newsreader', Georgia, serif;
	font-size: clamp(19px, 1.35vw, 21px);
	line-height: 1.62;
	color: var(--ink);
	margin: 0 0 8px;
	text-wrap: pretty;
}

.hdx-note-prose > *:last-child {
	margin-bottom: 0;
}

.hdx-note-prose {
	position: relative;
}

.hdx-note-prose.is-collapsed {
	max-height: calc(6 * 1.62 * clamp(19px, 1.35vw, 21px));
	overflow: hidden;
}

.hdx-note-prose.is-collapsed::after {
	content: '';
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 3.2em;
	pointer-events: none;
	background: linear-gradient(to bottom, transparent, var(--bg) 88%);
}

.hdx-note-toggle {
	appearance: none;
	margin: 12px 0 0;
	padding: 3px 0;
	border: 0;
	border-bottom: 1px solid color-mix(in srgb, currentColor 34%, transparent);
	background: transparent;
	color: var(--muted);
	cursor: pointer;
	font-family: 'Hanken Grotesk', sans-serif;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
}

.hdx-note-toggle:hover,
.hdx-note-toggle:focus-visible {
	color: var(--ink);
}

.hdx-link-card {
	display: block;
	position: relative;
	margin-top: 24px;
	padding: 22px 26px;
	border-left: 3px solid var(--accent);
	border-radius: 0 10px 10px 0;
	text-decoration: none;
	background: var(--tint);
	transition: background 0.2s ease;
}

.hdx-link-card:hover {
	background: var(--tint);
	color: var(--ink);
}

.hdx-link-card strong {
	display: block;
	font-weight: 700;
	font-size: clamp(16px, 1.6vw, 18.5px);
	color: var(--ink);
	line-height: 1.32;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hdx-link-card p {
	font-family: 'Hanken Grotesk', sans-serif;
	font-size: 14px;
	color: var(--muted);
	line-height: 1.5;
	margin: 8px 0 0;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.hdx-link-card__meta {
	display: flex;
	align-items: center;
	gap: 9px;
	margin-top: 16px;
}

.hdx-link-card__meta > span {
	font-size: 13px;
	color: var(--faint);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hdx-link-card__favicon {
	display: block;
	flex: 0 0 auto;
	width: 17px;
	height: 17px;
	border-radius: 3px;
	object-fit: cover;
}

.hdx-note__media,
.hdx-note-image {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	border-radius: 10px;
	overflow: hidden;
	object-fit: cover;
	background: var(--thumb);
	margin-top: 22px;
}

.hdx-note-reference {
	display: inline-flex;
	gap: 13px;
	align-items: center;
	box-sizing: border-box;
	max-width: 100%;
	margin-top: 22px;
	padding: 10px 16px 10px 12px;
	border: 1px solid var(--line);
	border-radius: 11px;
	background: var(--card);
	color: var(--ink);
	text-decoration: none;
	transition: border-color 0.18s ease, background 0.18s ease;
}

.hdx-note-reference:hover {
	border-color: var(--faint);
	background: color-mix(in srgb, var(--tint) 70%, transparent);
	color: var(--ink);
}

.hdx-note-reference__icon {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	background: var(--tint);
	color: var(--accent-ink);
}

.hdx-note-reference__copy {
	min-width: 0;
}

.hdx-note-reference__label {
	display: block;
	margin-bottom: 3px;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 9.5px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--faint);
}

.hdx-note-reference__title {
	display: block;
	overflow: hidden;
	font-family: 'Newsreader', Georgia, serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.28;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hdx-note-reference__arrow {
	flex: 0 0 auto;
	margin-left: 4px;
	color: var(--faint);
	transition: transform 0.18s ease;
}

.hdx-note-reference:hover .hdx-note-reference__arrow {
	transform: translateX(3px);
}

.hdx-note-mosaic {
	display: grid;
	gap: 3px;
	width: 100%;
	margin-top: 20px;
	overflow: hidden;
	border-radius: 13px;
	background: var(--thumb);
}

.hdx-note-mosaic--single {
	grid-template-columns: 1fr;
}

.hdx-note-mosaic--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hdx-note-mosaic--3 {
	grid-template-columns: 2fr 1fr;
	grid-template-rows: repeat(2, minmax(0, 1fr));
	aspect-ratio: 3 / 2;
}

.hdx-note-mosaic--3 .hdx-note-mosaic-tile:first-child {
	grid-row: 1 / 3;
}

.hdx-note-mosaic--4 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: repeat(2, minmax(0, 1fr));
	aspect-ratio: 1 / 1;
}

.hdx-note-mosaic--many {
	grid-template-columns: repeat(6, minmax(0, 1fr));
	grid-template-rows: repeat(2, minmax(0, 1fr));
	aspect-ratio: 3 / 2;
}

.hdx-note-mosaic--many .hdx-note-mosaic-tile:first-child {
	grid-column: 1 / 4;
	grid-row: 1;
}

.hdx-note-mosaic--many .hdx-note-mosaic-tile:nth-child(2) {
	grid-column: 4 / 7;
	grid-row: 1;
}

.hdx-note-mosaic--many .hdx-note-mosaic-tile:nth-child(3) {
	grid-column: 1 / 3;
	grid-row: 2;
}

.hdx-note-mosaic--many .hdx-note-mosaic-tile:nth-child(4) {
	grid-column: 3 / 5;
	grid-row: 2;
}

.hdx-note-mosaic--many .hdx-note-mosaic-tile:nth-child(5) {
	grid-column: 5 / 7;
	grid-row: 2;
}

.hdx-note-mosaic-tile {
	position: relative;
	min-width: 0;
	min-height: 128px;
	padding: 0;
	appearance: none;
	border: 0;
	border-radius: 0;
	overflow: hidden;
	background: var(--thumb);
	cursor: zoom-in;
}

.hdx-note-mosaic--single .hdx-note-mosaic-tile {
	aspect-ratio: 16 / 10;
	max-height: 540px;
}

.hdx-note-mosaic--2 .hdx-note-mosaic-tile {
	aspect-ratio: 1 / 1;
}

.hdx-note-mosaic-tile img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.45s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.hdx-note-mosaic-tile:hover img,
.hdx-note-mosaic-tile:focus-visible img {
	transform: scale(1.025);
}

.hdx-note-mosaic-more {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(35, 40, 47, 0.52);
	backdrop-filter: blur(1px);
	color: #fff;
	font-family: 'Newsreader', Georgia, serif;
	font-size: 23px;
	font-weight: 500;
}

.hdx-note-lightbox {
	position: fixed;
	inset: 0;
	z-index: 110;
	display: flex;
	flex-direction: column;
	background: #14130f;
	color: #f4f1ea;
	animation: softIn 0.2s ease;
}

.hdx-note-lightbox-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px clamp(18px, 4vw, 32px);
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 11px;
	letter-spacing: 0.16em;
	color: #8f897c;
}

.hdx-note-lightbox-head button {
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid #38352d;
	border-radius: 50%;
	background: none;
	color: #c9c2b4;
	font-size: 25px;
	line-height: 1;
	cursor: pointer;
}

.hdx-note-lightbox-stage {
	flex: 1;
	min-height: 0;
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr) 48px;
	align-items: center;
	gap: clamp(8px, 2vw, 22px);
	padding: 0 clamp(10px, 3vw, 28px) 28px;
}

.hdx-note-lightbox-stage > button {
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid #38352d;
	border-radius: 50%;
	background: rgba(20, 19, 15, 0.5);
	color: #c9c2b4;
	cursor: pointer;
}

.hdx-note-lightbox-stage img {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 130px);
	margin: auto;
	object-fit: contain;
}

.hdx-note__share,
.hdx-note-share {
	position: relative;
	display: inline-block;
	margin-top: 20px;
}

.hdx-note-share > button {
	appearance: none;
	background: none;
	border: 0;
	border-radius: 0;
	padding: 5px 0;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	cursor: pointer;
	font-family: 'Hanken Grotesk', sans-serif;
	font-size: 12.5px;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: var(--muted);
}

.hdx-note-share > button:hover,
.hdx-note-share > button[aria-expanded="true"] {
	color: var(--ink);
}

.hdx-note-share .hdx-share-menu {
	left: 0;
	right: auto;
	top: calc(100% + 12px);
	z-index: 40;
}

.hdx-single-note > .hdx-back-link {
	margin-bottom: clamp(26px, 3.6vw, 40px);
}

.hdx-single-note .hdx-note {
	border-bottom: 0;
}

@media (max-width: 720px) {
	.hdx-note {
		display: block;
	}

	.hdx-note-rail {
		flex-direction: row;
		align-items: center;
		gap: 12px;
		margin-bottom: 18px;
	}

	.hdx-note-mosaic--3,
	.hdx-note-mosaic--4,
	.hdx-note-mosaic--many {
		min-height: 270px;
	}

	.hdx-note-lightbox-stage {
		grid-template-columns: 40px minmax(0, 1fr) 40px;
		padding-inline: 8px;
	}

	.hdx-note-lightbox-stage > button {
		width: 38px;
		height: 38px;
	}
}
