/**
 * 0xsp macOS — interface styles
 * ------------------------------------------------------------------
 * Reimagines the site as the macOS desktop: a translucent menu bar,
 * windows with traffic-light controls, a magnifying Dock, Spotlight,
 * and full vibrancy materials. Light & dark variables follow the
 * system appearance (overridable via the menu-bar toggle).
 */

/* ================================================================== *
 *  Design tokens
 * ================================================================== */

:root {
	--oxsp-font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--oxsp-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

	--oxsp-menubar-h: 30px;
	--oxsp-radius-win: 13px;
	--oxsp-radius-md: 10px;
	--oxsp-radius-sm: 7px;
	--oxsp-ease: cubic-bezier(0.32, 0.72, 0, 1);

	/* Traffic lights are fixed regardless of appearance. */
	--tl-close: #ff5f57;
	--tl-min: #febc2e;
	--tl-zoom: #28c840;
}

/* ---- Dark appearance (default for a security/research site) ------ */
[data-theme="dark"] {
	color-scheme: dark;
	--oxsp-wallpaper:
		radial-gradient(1200px 820px at 14% 8%, #2c1e57 0%, transparent 55%),
		radial-gradient(1000px 720px at 88% 16%, #0c3a54 0%, transparent 52%),
		radial-gradient(960px 940px at 72% 96%, #3a1c4e 0%, transparent 55%),
		linear-gradient(160deg, #0a0a12 0%, #131020 52%, #090f15 100%);
	--oxsp-text: #f5f5f7;
	--oxsp-text-2: #b6b9c0;
	--oxsp-text-3: #8a8d94;
	--oxsp-accent: #0a84ff;
	--oxsp-accent-soft: rgba(10, 132, 255, 0.18);
	--oxsp-hairline: rgba(255, 255, 255, 0.1);
	--oxsp-hairline-strong: rgba(255, 255, 255, 0.16);

	--oxsp-bar-bg: rgba(28, 28, 32, 0.55);
	--oxsp-win-bg: rgba(30, 30, 34, 0.72);
	--oxsp-win-solid: rgba(26, 26, 30, 0.86);
	--oxsp-sidebar-bg: rgba(40, 40, 46, 0.5);
	--oxsp-elevated: rgba(58, 58, 64, 0.5);
	--oxsp-elevated-hover: rgba(72, 72, 80, 0.6);
	--oxsp-code-bg: rgba(10, 12, 18, 0.85);
	--oxsp-inline-code: #ff9ec4;
	--oxsp-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.72), 0 10px 30px -15px rgba(0, 0, 0, 0.6);
}

/* ---- Light appearance -------------------------------------------- */
[data-theme="light"] {
	color-scheme: light;
	--oxsp-wallpaper:
		radial-gradient(1000px 720px at 18% 12%, #cfe0ff 0%, transparent 55%),
		radial-gradient(900px 700px at 86% 8%, #ffe1ed 0%, transparent 50%),
		radial-gradient(1000px 920px at 78% 96%, #d6f2ea 0%, transparent 55%),
		linear-gradient(160deg, #eef1f7 0%, #e6ebf4 100%);
	--oxsp-text: #1d1d1f;
	--oxsp-text-2: #46474b;
	--oxsp-text-3: #76777c;
	--oxsp-accent: #007aff;
	--oxsp-accent-soft: rgba(0, 122, 255, 0.12);
	--oxsp-hairline: rgba(0, 0, 0, 0.1);
	--oxsp-hairline-strong: rgba(0, 0, 0, 0.14);

	--oxsp-bar-bg: rgba(255, 255, 255, 0.58);
	--oxsp-win-bg: rgba(255, 255, 255, 0.74);
	--oxsp-win-solid: rgba(255, 255, 255, 0.9);
	--oxsp-sidebar-bg: rgba(246, 246, 248, 0.55);
	--oxsp-elevated: rgba(255, 255, 255, 0.66);
	--oxsp-elevated-hover: rgba(255, 255, 255, 0.92);
	--oxsp-code-bg: #0f1722;
	--oxsp-inline-code: #b0306b;
	--oxsp-shadow: 0 30px 70px -22px rgba(40, 50, 80, 0.4), 0 8px 24px -16px rgba(40, 50, 80, 0.3);
}

/* ================================================================== *
 *  Desktop
 * ================================================================== */

body.oxsp-desktop {
	font-family: var(--oxsp-font);
	color: var(--oxsp-text);
	background: #0a0a12;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	min-height: 100vh;
}

.oxsp-desktop-wrap {
	position: relative;
	min-height: 100vh;
	background: var(--oxsp-wallpaper) fixed;
	background-size: cover;
	display: flex;
	flex-direction: column;
}

::selection {
	background: var(--oxsp-accent);
	color: #fff;
}

a {
	color: var(--oxsp-accent);
}

img {
	max-width: 100%;
	height: auto;
}

/* ================================================================== *
 *  Menu bar
 * ================================================================== */

.oxsp-menubar {
	position: sticky;
	top: 0;
	z-index: 1000;
	height: var(--oxsp-menubar-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 14px;
	background: var(--oxsp-bar-bg);
	-webkit-backdrop-filter: saturate(180%) blur(22px);
	backdrop-filter: saturate(180%) blur(22px);
	border-bottom: 0.5px solid var(--oxsp-hairline);
	font-size: 13px;
	line-height: 1;
}

.oxsp-menubar-left,
.oxsp-menubar-right {
	display: flex;
	align-items: center;
	gap: 4px;
}

.oxsp-menubar-left {
	gap: 16px;
	min-width: 0;
}

.oxsp-apple {
	display: inline-flex;
	color: var(--oxsp-text);
	opacity: 0.92;
}

.oxsp-apple-glyph {
	width: 15px;
	height: 15px;
}

.oxsp-app-name {
	font-weight: 700;
	color: var(--oxsp-text);
	white-space: nowrap;
}

.oxsp-menubar-nav {
	min-width: 0;
	overflow: hidden;
}

.oxsp-menubar-menu {
	display: flex;
	align-items: center;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.oxsp-menubar-menu li {
	position: relative;
}

.oxsp-menubar-menu a {
	display: block;
	padding: 4px 9px;
	border-radius: 6px;
	color: var(--oxsp-text);
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.12s ease;
}

.oxsp-menubar-menu a:hover,
.oxsp-menubar-menu .current-menu-item > a {
	background: var(--oxsp-accent);
	color: #fff;
}

/* Submenus drop like real menu-bar menus. */
.oxsp-menubar-menu .sub-menu {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	min-width: 200px;
	margin: 0;
	padding: 5px;
	list-style: none;
	background: var(--oxsp-bar-bg);
	-webkit-backdrop-filter: saturate(180%) blur(28px);
	backdrop-filter: saturate(180%) blur(28px);
	border: 0.5px solid var(--oxsp-hairline-strong);
	border-radius: var(--oxsp-radius-md);
	box-shadow: var(--oxsp-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 0.14s ease, transform 0.14s var(--oxsp-ease), visibility 0.14s;
}

.oxsp-menubar-menu li:hover > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.oxsp-status-glyphs {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 6px;
	opacity: 0.9;
}

.oxsp-status-icon {
	width: 17px;
	height: 17px;
}

.oxsp-status-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 22px;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 6px;
	color: var(--oxsp-text);
	cursor: pointer;
	transition: background 0.12s ease;
}

.oxsp-status-btn:hover {
	background: var(--oxsp-accent-soft);
}

/* Appearance toggle shows only the relevant glyph. */
.oxsp-appearance-toggle .oxsp-icon-light { display: none; }
.oxsp-appearance-toggle .oxsp-icon-dark { display: inline; }
[data-theme="light"] .oxsp-appearance-toggle .oxsp-icon-light { display: inline; }
[data-theme="light"] .oxsp-appearance-toggle .oxsp-icon-dark { display: none; }

.oxsp-clock {
	margin-left: 4px;
	font-variant-numeric: tabular-nums;
	color: var(--oxsp-text);
	white-space: nowrap;
}

/* ================================================================== *
 *  Stage + windows
 * ================================================================== */

.oxsp-stage {
	flex: 1 0 auto;
	display: flex;
	justify-content: center;
	padding: 38px 22px 150px;
}

.oxsp-window {
	width: 100%;
	background: var(--oxsp-win-bg);
	-webkit-backdrop-filter: saturate(180%) blur(30px);
	backdrop-filter: saturate(180%) blur(30px);
	border: 0.5px solid var(--oxsp-hairline-strong);
	border-radius: var(--oxsp-radius-win);
	box-shadow: var(--oxsp-shadow);
	overflow: hidden;
	animation: oxsp-window-in 0.42s var(--oxsp-ease) both;
}

.oxsp-window--finder { max-width: 1120px; }
.oxsp-window--reader { max-width: 880px; }
.oxsp-window--alert { max-width: 460px; }

@keyframes oxsp-window-in {
	from { opacity: 0; transform: translateY(14px) scale(0.99); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Title bar --------------------------------------------------- */

.oxsp-titlebar {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	height: 46px;
	padding: 0 16px;
	background: linear-gradient( to bottom, color-mix(in srgb, var(--oxsp-win-bg) 60%, transparent), transparent );
	border-bottom: 0.5px solid var(--oxsp-hairline);
}

.oxsp-traffic {
	display: flex;
	gap: 8px;
	flex: 0 0 auto;
}

.oxsp-light {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.18);
}

.oxsp-light--close { background: var(--tl-close); }
.oxsp-light--min   { background: var(--tl-min); }
.oxsp-light--zoom  { background: var(--tl-zoom); }

.oxsp-window:hover .oxsp-light {
	filter: saturate(1.05) brightness(1.02);
}

.oxsp-titlebar-title {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	display: inline-flex;
	align-items: center;
	gap: 7px;
	max-width: 60%;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--oxsp-text-2);
	white-space: nowrap;
	overflow: hidden;
}

.oxsp-titlebar-title span {
	overflow: hidden;
	text-overflow: ellipsis;
}

.oxsp-title-icon {
	width: 15px;
	height: 15px;
	color: var(--oxsp-accent);
	flex: 0 0 auto;
}

.oxsp-titlebar-tools {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.oxsp-tool-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 26px;
	background: none;
	border: 0;
	border-radius: 6px;
	color: var(--oxsp-text-2);
	cursor: pointer;
	transition: background 0.12s ease, color 0.12s ease;
}

.oxsp-tool-btn:hover {
	background: var(--oxsp-elevated);
	color: var(--oxsp-text);
}

.oxsp-tool-icon { width: 17px; height: 17px; }

.oxsp-tool-pill {
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--oxsp-elevated);
	color: var(--oxsp-text-2);
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
}

/* ================================================================== *
 *  Finder window (listing)
 * ================================================================== */

.oxsp-finder-body {
	display: flex;
	align-items: stretch;
	min-height: 60vh;
}

.oxsp-finder-sidebar {
	flex: 0 0 232px;
	padding: 16px 12px;
	background: var(--oxsp-sidebar-bg);
	border-right: 0.5px solid var(--oxsp-hairline);
}

.oxsp-sidebar-label {
	margin: 14px 8px 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--oxsp-text-3);
}

.oxsp-source-group:first-child .oxsp-sidebar-label { margin-top: 0; }

.oxsp-source-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.oxsp-source-list a {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 6px 9px;
	border-radius: 7px;
	color: var(--oxsp-text);
	text-decoration: none;
	font-size: 13.5px;
	transition: background 0.12s ease;
}

.oxsp-source-list a:hover { background: var(--oxsp-elevated); }

.oxsp-source-list li.is-active a {
	background: var(--oxsp-accent);
	color: #fff;
}

.oxsp-source-list li.is-active a .oxsp-source-icon { color: #fff; }

.oxsp-source-icon {
	width: 17px;
	height: 17px;
	color: var(--oxsp-accent);
	flex: 0 0 auto;
}

.oxsp-source-bullet {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--oxsp-accent);
	flex: 0 0 auto;
}

.oxsp-source-count {
	margin-left: auto;
	font-size: 12px;
	color: var(--oxsp-text-3);
}

.oxsp-source-list li.is-active .oxsp-source-count { color: rgba(255,255,255,0.8); }

.oxsp-finder-main {
	flex: 1 1 auto;
	min-width: 0;
	padding: 22px 26px 30px;
	background: color-mix(in srgb, var(--oxsp-win-solid) 35%, transparent);
}

.oxsp-finder-pathbar {
	margin-bottom: 16px;
	font-size: 12.5px;
	color: var(--oxsp-text-3);
}

/* ---- Card grid (icon view) --------------------------------------- */

.oxsp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
	gap: 22px;
}

.oxsp-card {
	border-radius: var(--oxsp-radius-md);
}

.oxsp-card-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: var(--oxsp-radius-md);
	background: var(--oxsp-elevated);
	border: 0.5px solid var(--oxsp-hairline);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: transform 0.28s var(--oxsp-ease), box-shadow 0.28s var(--oxsp-ease), background 0.2s ease;
}

.oxsp-card-link:hover {
	transform: translateY(-4px);
	background: var(--oxsp-elevated-hover);
	box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.55);
}

.oxsp-card-thumb {
	position: relative;
	aspect-ratio: 16 / 10;
	background: linear-gradient(135deg, color-mix(in srgb, var(--oxsp-accent) 26%, transparent), transparent), var(--oxsp-elevated);
	overflow: hidden;
}

.oxsp-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s var(--oxsp-ease);
}

.oxsp-card-link:hover .oxsp-card-thumb img { transform: scale(1.04); }

.oxsp-card-thumb-fallback {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: color-mix(in srgb, var(--oxsp-text) 35%, transparent);
}

.oxsp-card-glyph { width: 46px; height: 46px; }

.oxsp-card-traffic {
	position: absolute;
	top: 11px;
	left: 12px;
	display: flex;
	gap: 6px;
}

.oxsp-card-traffic i {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 0.5px rgba(0,0,0,0.2);
}

.oxsp-card-traffic i:nth-child(1) { background: var(--tl-close); }
.oxsp-card-traffic i:nth-child(2) { background: var(--tl-min); }
.oxsp-card-traffic i:nth-child(3) { background: var(--tl-zoom); }

.oxsp-card-body {
	display: flex;
	flex-direction: column;
	gap: 7px;
	padding: 15px 16px 17px;
}

.oxsp-card-kicker {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--oxsp-accent);
}

.oxsp-card-title {
	margin: 0;
	font-size: 16.5px;
	font-weight: 650;
	line-height: 1.32;
	letter-spacing: -0.01em;
	color: var(--oxsp-text);
}

.oxsp-card-excerpt {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--oxsp-text-2);
}

.oxsp-card-meta {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-top: 2px;
	font-size: 12px;
	color: var(--oxsp-text-3);
}

/* ---- Pagination -------------------------------------------------- */

.oxsp-pagination {
	margin-top: 30px;
}

.oxsp-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
}

.oxsp-pagination a,
.oxsp-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	min-width: 34px;
	height: 34px;
	padding: 0 11px;
	justify-content: center;
	border-radius: 8px;
	background: var(--oxsp-elevated);
	border: 0.5px solid var(--oxsp-hairline);
	color: var(--oxsp-text);
	text-decoration: none;
	font-size: 13.5px;
	font-weight: 500;
}

.oxsp-pagination .current {
	background: var(--oxsp-accent);
	color: #fff;
	border-color: transparent;
}

.oxsp-pagination a:hover { background: var(--oxsp-elevated-hover); }

/* ---- Empty state ------------------------------------------------- */

.oxsp-empty {
	text-align: center;
	padding: 60px 20px;
	color: var(--oxsp-text-2);
}

.oxsp-empty-glyph { width: 56px; height: 56px; color: var(--oxsp-text-3); }
.oxsp-empty-title { margin: 16px 0 4px; font-size: 18px; font-weight: 600; color: var(--oxsp-text); }
.oxsp-empty-sub { margin: 0 0 20px; font-size: 14px; }

/* ================================================================== *
 *  Reader window (single / page)
 * ================================================================== */

.oxsp-reader-progress {
	height: 2px;
	background: transparent;
}

.oxsp-reader-progress span {
	display: block;
	height: 100%;
	width: 0;
	background: var(--oxsp-accent);
	transition: width 0.08s linear;
}

.oxsp-reader-body {
	background: var(--oxsp-win-solid);
	padding: 40px clamp(20px, 6vw, 64px) 56px;
}

.oxsp-doc {
	max-width: 720px;
	margin: 0 auto;
}

.oxsp-doc-kicker {
	display: inline-block;
	margin-bottom: 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--oxsp-accent);
	text-decoration: none;
}

.oxsp-doc-title {
	margin: 0 0 18px;
	font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.8rem);
	font-weight: 750;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var(--oxsp-text);
}

.oxsp-doc-byline {
	display: flex;
	align-items: center;
	gap: 11px;
	padding-bottom: 24px;
	border-bottom: 0.5px solid var(--oxsp-hairline);
}

.oxsp-byline-avatar { border-radius: 50%; }

.oxsp-byline-text { display: flex; flex-direction: column; line-height: 1.3; }
.oxsp-byline-author { font-weight: 600; font-size: 14px; color: var(--oxsp-text); }
.oxsp-byline-meta { font-size: 12.5px; color: var(--oxsp-text-3); display: flex; gap: 6px; align-items: center; }

.oxsp-doc-hero {
	margin: 28px 0;
}

.oxsp-doc-hero img {
	width: 100%;
	border-radius: var(--oxsp-radius-md);
	border: 0.5px solid var(--oxsp-hairline);
}

/* ---- Long-form typography ---------------------------------------- */

.oxsp-doc-content {
	margin-top: 30px;
	font-size: 1.06rem;
	line-height: 1.74;
	color: var(--oxsp-text);
}

.oxsp-doc-content > * + * { margin-top: 1.35em; }
.oxsp-doc-content p { margin: 0 0 1.35em; }

.oxsp-doc-content h2,
.oxsp-doc-content h3,
.oxsp-doc-content h4 {
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--oxsp-text);
	scroll-margin-top: 80px;
}

.oxsp-doc-content h2 { margin: 2.2em 0 0.7em; font-size: 1.5em; font-weight: 700; }
.oxsp-doc-content h3 { margin: 1.9em 0 0.6em; font-size: 1.24em; font-weight: 650; }
.oxsp-doc-content h4 { margin: 1.6em 0 0.5em; font-size: 1.05em; font-weight: 650; }

.oxsp-doc-content a {
	color: var(--oxsp-accent);
	text-decoration: underline;
	text-decoration-color: color-mix(in srgb, var(--oxsp-accent) 40%, transparent);
	text-underline-offset: 0.18em;
}

.oxsp-doc-content a:hover { text-decoration-color: var(--oxsp-accent); }

.oxsp-doc-content ul,
.oxsp-doc-content ol { margin: 0 0 1.35em; padding-left: 1.4em; }
.oxsp-doc-content li + li { margin-top: 0.4em; }

.oxsp-doc-content blockquote {
	margin: 1.8em 0;
	padding: 0.4em 0 0.4em 1.3em;
	border-left: 3px solid var(--oxsp-accent);
	color: var(--oxsp-text-2);
}

.oxsp-doc-content blockquote p:last-child { margin-bottom: 0; }

.oxsp-doc-content :not(pre) > code {
	font-family: var(--oxsp-mono);
	font-size: 0.86em;
	padding: 0.13em 0.42em;
	border-radius: 5px;
	background: var(--oxsp-accent-soft);
	color: var(--oxsp-inline-code);
}

.oxsp-doc-content pre {
	margin: 1.9em 0;
	padding: 1.15em 1.25em;
	background: var(--oxsp-code-bg);
	color: #e7edf5;
	border: 0.5px solid var(--oxsp-hairline);
	border-radius: var(--oxsp-radius-md);
	overflow-x: auto;
	font-family: var(--oxsp-mono);
	font-size: 0.86rem;
	line-height: 1.62;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.oxsp-doc-content pre code {
	font-family: inherit;
	color: inherit;
	background: none;
	padding: 0;
}

.oxsp-doc-content img,
.oxsp-doc-content figure { border-radius: var(--oxsp-radius-md); }

.oxsp-doc-content figcaption {
	margin-top: 0.6em;
	font-size: 0.85em;
	color: var(--oxsp-text-3);
	text-align: center;
}

.oxsp-doc-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.8em 0;
	font-size: 0.94em;
}

.oxsp-doc-content th,
.oxsp-doc-content td {
	padding: 0.6em 0.85em;
	border: 0.5px solid var(--oxsp-hairline-strong);
	text-align: left;
}

.oxsp-doc-content thead th { background: var(--oxsp-elevated); font-weight: 600; }

.oxsp-doc-content hr {
	border: 0;
	border-top: 0.5px solid var(--oxsp-hairline-strong);
	margin: 2.4em 0;
}

/* ---- Tags + author ----------------------------------------------- */

.oxsp-doc-tags {
	max-width: 720px;
	margin: 34px auto 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.oxsp-tag {
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--oxsp-elevated);
	border: 0.5px solid var(--oxsp-hairline);
	color: var(--oxsp-text-2);
	font-size: 12.5px;
	text-decoration: none;
}

.oxsp-tag:hover { background: var(--oxsp-elevated-hover); color: var(--oxsp-text); }

.oxsp-doc-author {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	max-width: 720px;
	margin: 34px auto 0;
	padding: 22px;
	background: var(--oxsp-elevated);
	border: 0.5px solid var(--oxsp-hairline);
	border-radius: var(--oxsp-radius-md);
}

.oxsp-author-avatar { border-radius: 50%; flex: 0 0 auto; }
.oxsp-author-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--oxsp-text-3); }
.oxsp-author-name { margin: 4px 0 8px; font-size: 1.2rem; font-weight: 700; color: var(--oxsp-text); }
.oxsp-author-bio { margin: 0 0 10px; font-size: 0.95rem; line-height: 1.6; color: var(--oxsp-text-2); }
.oxsp-author-link { font-size: 0.88rem; font-weight: 600; color: var(--oxsp-accent); text-decoration: none; }

/* ---- Post navigation --------------------------------------------- */

.oxsp-post-nav {
	max-width: 720px;
	margin: 40px auto 0;
	display: flex;
	gap: 14px;
}

.oxsp-post-nav .nav-links { display: contents; }

.oxsp-post-nav .nav-previous,
.oxsp-post-nav .nav-next {
	flex: 1 1 50%;
}

.oxsp-post-nav .nav-next { text-align: right; }

.oxsp-post-nav a {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px 16px;
	border-radius: var(--oxsp-radius-md);
	background: var(--oxsp-elevated);
	border: 0.5px solid var(--oxsp-hairline);
	text-decoration: none;
	transition: background 0.15s ease;
}

.oxsp-post-nav a:hover { background: var(--oxsp-elevated-hover); }
.oxsp-nav-dir { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--oxsp-text-3); }
.oxsp-nav-title { font-size: 14px; font-weight: 600; color: var(--oxsp-text); }

/* ================================================================== *
 *  Alert (404)
 * ================================================================== */

.oxsp-alert-body {
	background: var(--oxsp-win-solid);
	text-align: center;
	padding: 44px 36px 40px;
}

.oxsp-alert-glyph {
	font-size: 50px;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--oxsp-text-3);
	opacity: 0.5;
}

.oxsp-alert-title { margin: 12px 0 8px; font-size: 1.4rem; font-weight: 700; }
.oxsp-alert-text { margin: 0 auto 22px; max-width: 38ch; color: var(--oxsp-text-2); line-height: 1.6; }
.oxsp-alert-search { margin-bottom: 20px; }
.oxsp-alert-actions { display: flex; justify-content: center; }

/* ================================================================== *
 *  Buttons & forms
 * ================================================================== */

.oxsp-btn,
button,
input[type="submit"] {
	font-family: inherit;
}

.oxsp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 18px;
	border-radius: 9px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	border: 0.5px solid var(--oxsp-hairline-strong);
	background: var(--oxsp-elevated);
	color: var(--oxsp-text);
	transition: transform 0.1s ease, filter 0.15s ease, background 0.15s ease;
}

.oxsp-btn:hover { background: var(--oxsp-elevated-hover); }
.oxsp-btn:active { transform: scale(0.97); }

.oxsp-btn--primary {
	background: var(--oxsp-accent);
	border-color: transparent;
	color: #fff;
}

.oxsp-btn--primary:hover { filter: brightness(1.07); background: var(--oxsp-accent); }

.search-form,
.oxsp-search-form {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.search-field,
input[type="search"],
input[type="text"],
input[type="email"],
input[type="url"],
textarea {
	font-family: inherit;
	font-size: 14px;
	padding: 9px 13px;
	color: var(--oxsp-text);
	background: var(--oxsp-elevated);
	border: 0.5px solid var(--oxsp-hairline-strong);
	border-radius: 9px;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
textarea:focus {
	border-color: var(--oxsp-accent);
	box-shadow: 0 0 0 3px var(--oxsp-accent-soft);
}

.search-submit {
	padding: 9px 16px;
	border-radius: 9px;
	border: 0;
	background: var(--oxsp-accent);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

/* ================================================================== *
 *  Comments
 * ================================================================== */

.oxsp-comments {
	max-width: 720px;
	margin: 44px auto 0;
	padding-top: 28px;
	border-top: 0.5px solid var(--oxsp-hairline);
}

.oxsp-comments-title { font-size: 1.2rem; font-weight: 700; margin: 0 0 20px; }
.oxsp-comment-list { list-style: none; margin: 0 0 24px; padding: 0; }
.oxsp-comment-list ol { list-style: none; }
.oxsp-comment-list .children { margin-left: 28px; padding-left: 16px; border-left: 0.5px solid var(--oxsp-hairline); }

.oxsp-comment-list .comment-body {
	margin: 0 0 14px;
	padding: 14px 16px;
	background: var(--oxsp-elevated);
	border: 0.5px solid var(--oxsp-hairline);
	border-radius: var(--oxsp-radius-md);
}

.oxsp-comment-list .comment-author { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.oxsp-comment-list .comment-author img { border-radius: 50%; }
.oxsp-comment-list .comment-meta { font-size: 12px; color: var(--oxsp-text-3); margin: 4px 0 8px; }
.oxsp-comment-list .comment-meta a { color: var(--oxsp-text-3); text-decoration: none; }

.oxsp-comment-form { margin-top: 24px; }
.oxsp-comment-form label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 5px; color: var(--oxsp-text-2); }
.oxsp-comment-form input[type="text"],
.oxsp-comment-form input[type="email"],
.oxsp-comment-form input[type="url"],
.oxsp-comment-form textarea { width: 100%; margin-bottom: 14px; }
.oxsp-comments-closed { color: var(--oxsp-text-3); font-size: 14px; }

/* ================================================================== *
 *  Dock
 * ================================================================== */

.oxsp-dock-wrap {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 12px;
	z-index: 900;
	display: flex;
	justify-content: center;
	pointer-events: none;
	padding: 0 16px;
}

.oxsp-dock {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	margin: 0;
	padding: 7px 9px;
	list-style: none;
	background: var(--oxsp-bar-bg);
	-webkit-backdrop-filter: saturate(180%) blur(34px);
	backdrop-filter: saturate(180%) blur(34px);
	border: 0.5px solid var(--oxsp-hairline-strong);
	border-radius: 22px;
	box-shadow: var(--oxsp-shadow);
	pointer-events: auto;
}

.oxsp-dock-item {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.oxsp-dock-link {
	position: relative;
	display: block;
	border: 0;
	background: none;
	padding: 0;
	cursor: pointer;
	transform-origin: bottom center;
	transition: transform 0.18s var(--oxsp-ease);
}

.oxsp-dock-tile {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	border-radius: 15px;
	background: linear-gradient(160deg, color-mix(in srgb, var(--oxsp-accent) 85%, #fff 15%), color-mix(in srgb, var(--oxsp-accent) 70%, #000 18%));
	color: #fff;
	font-size: 22px;
	font-weight: 700;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 6px 14px -6px rgba(0,0,0,0.5);
}

.oxsp-dock-tile-glass {
	background: var(--oxsp-elevated);
	color: var(--oxsp-text);
	border: 0.5px solid var(--oxsp-hairline-strong);
}

.oxsp-dock-glyph { width: 24px; height: 24px; }

/* Running indicator dot. */
.oxsp-dock-dot {
	display: block;
	width: 4px;
	height: 4px;
	margin: 4px auto 0;
	border-radius: 50%;
	background: var(--oxsp-text-2);
	opacity: 0;
}

.current-menu-item .oxsp-dock-dot,
.oxsp-dock-item:hover .oxsp-dock-dot { opacity: 0.7; }

.oxsp-dock-sep {
	width: 0.5px;
	align-self: stretch;
	margin: 6px 2px;
	background: var(--oxsp-hairline-strong);
}

/* Tooltip label shown above a magnified tile (toggled by JS). */
.oxsp-dock-link::after {
	content: attr(data-title);
	position: absolute;
	bottom: calc(100% + 12px);
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	padding: 4px 10px;
	background: var(--oxsp-bar-bg);
	-webkit-backdrop-filter: blur(20px);
	backdrop-filter: blur(20px);
	border: 0.5px solid var(--oxsp-hairline-strong);
	border-radius: 7px;
	color: var(--oxsp-text);
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
	box-shadow: var(--oxsp-shadow);
}

.oxsp-dock-link:hover::after {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

/* ================================================================== *
 *  Spotlight
 * ================================================================== */

.oxsp-spotlight {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding-top: 18vh;
}

.oxsp-spotlight[hidden] { display: none; }

.oxsp-spotlight-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.28);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	animation: oxsp-fade 0.18s ease both;
}

.oxsp-spotlight-box {
	position: relative;
	width: min(640px, 92vw);
	background: var(--oxsp-bar-bg);
	-webkit-backdrop-filter: saturate(180%) blur(40px);
	backdrop-filter: saturate(180%) blur(40px);
	border: 0.5px solid var(--oxsp-hairline-strong);
	border-radius: 16px;
	box-shadow: 0 40px 90px -20px rgba(0,0,0,0.6);
	animation: oxsp-spotlight-in 0.22s var(--oxsp-ease) both;
}

@keyframes oxsp-spotlight-in {
	from { opacity: 0; transform: translateY(-12px) scale(0.985); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes oxsp-fade { from { opacity: 0; } to { opacity: 1; } }

.oxsp-spotlight-form {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 20px;
}

.oxsp-spotlight-icon { width: 26px; height: 26px; color: var(--oxsp-text-3); flex: 0 0 auto; }

.oxsp-spotlight-input {
	flex: 1 1 auto;
	border: 0;
	background: none;
	color: var(--oxsp-text);
	font-size: 26px;
	font-weight: 400;
	padding: 6px 0;
	outline: none;
}

.oxsp-spotlight-input::placeholder { color: var(--oxsp-text-3); }

/* ================================================================== *
 *  Footer status widgets
 * ================================================================== */

.oxsp-footer-widget {
	color: var(--oxsp-text-2);
	font-size: 13px;
}

/* ================================================================== *
 *  Responsive
 * ================================================================== */

@media (max-width: 880px) {
	.oxsp-app-name { display: none; }
	.oxsp-status-glyphs { display: none; }
	.oxsp-finder-body { flex-direction: column; }
	.oxsp-finder-sidebar {
		flex-basis: auto;
		border-right: 0;
		border-bottom: 0.5px solid var(--oxsp-hairline);
		display: flex;
		flex-wrap: wrap;
		gap: 6px 18px;
		padding: 12px 16px;
	}
	.oxsp-source-group { flex: 1 1 auto; }
	.oxsp-stage { padding: 18px 12px 140px; }
	.oxsp-post-nav { flex-direction: column; }
}

@media (max-width: 600px) {
	.oxsp-menubar-nav { display: none; }
	.oxsp-titlebar-title { max-width: 48%; font-size: 12.5px; }
	.oxsp-dock-tile { width: 46px; height: 46px; font-size: 18px; }
	.oxsp-reader-body { padding: 28px 20px 40px; }
	.oxsp-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
	.oxsp-doc-author { flex-direction: column; }
}

@media (max-width: 420px) {
	.oxsp-grid { grid-template-columns: 1fr; }
}

/* Reduced motion: drop the showy transitions. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
	}
}
