/**
 * DopamineDriven.io — /resources index page
 *
 * App-shell layout: fixed sidebar + scrollable main.
 * Completely self-contained; does not affect any other page.
 * Card images are calming nature thumbnails from picsum.photos —
 * the article's own featured image is never used here.
 *
 * @package DopamineDriven
 */

/* ── Shell variables ─────────────────────────────────────────────
   These are scoped to .dd-res-page so they don't pollute global CSS.
   ──────────────────────────────────────────────────────────────── */
.dd-res-page {
	--rp-lime:       #CCFF00;
	--rp-lime-dim:   rgba(204,255,0,0.07);
	--rp-lime-mid:   rgba(204,255,0,0.28);
	--rp-lime-glow:  0 0 0 1px rgba(204,255,0,0.2), 0 4px 28px rgba(204,255,0,0.07);
	--rp-teal:       #00E8E8;
	--rp-amber:      #FFB800;
	--rp-bg:         #060609;
	--rp-surface:    #0c0c12;
	--rp-surface-2:  #12121a;
	--rp-surface-3:  #1a1a24;
	--rp-border:     rgba(255,255,255,0.065);
	--rp-border-hi:  rgba(255,255,255,0.12);
	--rp-text:       #dddde8;
	--rp-muted:      rgba(221,221,232,0.42);
	--rp-muted-2:    rgba(221,221,232,0.22);
	--rp-sb-w:       268px;       /* sidebar width */
	--rp-tb-h:       48px;        /* toolbar height */
	--rp-nav-h:      var(--nav-h, 87px);
}

/* ── Outer wrapper ───────────────────────────────────────────────
   Fills the full viewport below the fixed nav.
   ──────────────────────────────────────────────────────────────── */
.dd-res-page {
	display: block;
	background: var(--rp-bg);
	min-height: calc(100vh - var(--rp-nav-h));
	font-family: 'Inter', system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
	color: var(--rp-text);
}

/* ════════════════════════════════════════════════════════════════
   SIDEBAR (fixed)
   ════════════════════════════════════════════════════════════════ */
.dd-res-sidebar {
	position: fixed;
	top: var(--rp-nav-h);
	left: 0;
	bottom: 0;
	width: var(--rp-sb-w);
	background: var(--rp-surface);
	border-right: 1px solid var(--rp-border);
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	overflow-x: hidden;
	z-index: 100;
	scrollbar-width: thin;
	scrollbar-color: rgba(204,255,0,0.15) transparent;
}
.dd-res-sidebar::-webkit-scrollbar { width: 3px; }
.dd-res-sidebar::-webkit-scrollbar-thumb { background: rgba(204,255,0,0.15); }

/* Admin bar offset */
.admin-bar .dd-res-sidebar {
	top: calc(var(--rp-nav-h) + 32px);
}

/* ── Sidebar stats strip ─────────────────────────────────────────*/
.dd-res-stats {
	padding: 1.25rem 1.25rem 1rem;
	border-bottom: 1px solid var(--rp-border);
	flex-shrink: 0;
}
.dd-res-stats-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
}
.dd-res-stat {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 0.5rem 0;
}
.dd-res-stat + .dd-res-stat {
	border-left: 1px solid var(--rp-border);
	padding-left: 1rem;
}
.dd-res-stat-val {
	font-family: 'JetBrains Mono', monospace;
	font-size: 1.45rem;
	font-weight: 700;
	color: var(--rp-lime);
	line-height: 1;
}
.dd-res-stat-label {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.54rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--rp-muted);
}
.dd-res-pulse {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.9rem;
	padding-top: 0.9rem;
	border-top: 1px solid var(--rp-border);
}
.dd-res-pulse-dot {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--rp-lime);
	flex-shrink: 0;
	animation: rp-pulse 2.2s ease-in-out infinite;
}
@keyframes rp-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50%       { opacity: 0.3; transform: scale(0.6); }
}
.dd-res-pulse-text {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.56rem;
	color: var(--rp-muted);
}

/* ── Sidebar section labels ──────────────────────────────────────*/
.dd-res-sb-label {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.52rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--rp-muted-2);
	padding: 1rem 1.25rem 0.45rem;
	flex-shrink: 0;
}

/* ── Category nav ────────────────────────────────────────────────*/
.dd-res-cat-nav {
	padding: 0 0 0.5rem;
	flex-shrink: 0;
}
.dd-res-cat-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 0.52rem 1.25rem;
	background: none;
	border: none;
	border-left: 2px solid transparent;
	cursor: pointer;
	transition: background 0.12s, border-color 0.12s;
	gap: 0.5rem;
	text-align: left;
}
.dd-res-cat-row:hover {
	background: var(--rp-surface-2);
}
.dd-res-cat-row.is-on {
	background: var(--rp-lime-dim);
	border-left-color: var(--rp-lime);
}
.dd-res-cat-left {
	display: flex;
	align-items: center;
	gap: 0.55rem;
}
.dd-res-cat-icon {
	font-size: 0.72rem;
	width: 1rem;
	text-align: center;
	opacity: 0.6;
	color: var(--rp-muted);
}
.dd-res-cat-row.is-on .dd-res-cat-icon {
	opacity: 1;
	color: var(--rp-lime);
}
.dd-res-cat-name {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.63rem;
	font-weight: 500;
	color: var(--rp-muted);
	transition: color 0.12s;
}
.dd-res-cat-row:hover .dd-res-cat-name { color: var(--rp-text); }
.dd-res-cat-row.is-on .dd-res-cat-name { color: var(--rp-lime); }

.dd-res-cat-badge {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.53rem;
	color: var(--rp-muted-2);
	background: var(--rp-surface-3);
	padding: 0.08rem 0.4rem;
	border-radius: 1px;
	flex-shrink: 0;
}
.dd-res-cat-row.is-on .dd-res-cat-badge {
	color: var(--rp-lime);
	background: rgba(204,255,0,0.1);
}

/* ── Filters ─────────────────────────────────────────────────────*/
.dd-res-filters {
	padding: 0.5rem 1.25rem 1rem;
	border-top: 1px solid var(--rp-border);
	flex-shrink: 0;
}
.dd-res-toggle-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.44rem 0;
}
.dd-res-toggle-label {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.6rem;
	color: var(--rp-muted);
}
.dd-res-switch {
	width: 28px;
	height: 16px;
	border-radius: 8px;
	background: var(--rp-surface-3);
	border: 1px solid var(--rp-border);
	position: relative;
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.2s, border-color 0.2s;
	appearance: none;
	-webkit-appearance: none;
}
.dd-res-switch.is-on {
	background: var(--rp-lime);
	border-color: var(--rp-lime);
}
.dd-res-switch::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--rp-muted);
	transition: transform 0.18s ease, background 0.18s;
}
.dd-res-switch.is-on::after {
	transform: translateX(12px);
	background: #000;
}

/* ════════════════════════════════════════════════════════════════
   MAIN CONTENT AREA
   ════════════════════════════════════════════════════════════════ */
.dd-res-main {
	margin-left: var(--rp-sb-w);
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - var(--rp-nav-h));
}

/* ── Toolbar ─────────────────────────────────────────────────────*/
.dd-res-toolbar {
	position: sticky;
	top: var(--rp-nav-h);
	z-index: 90;
	height: var(--rp-tb-h);
	background: rgba(6,6,9,0.94);
	backdrop-filter: blur(16px) saturate(1.4);
	-webkit-backdrop-filter: blur(16px) saturate(1.4);
	border-bottom: 1px solid var(--rp-border);
	display: flex;
	align-items: center;
	padding: 0 1.75rem;
	gap: 0.9rem;
}
.admin-bar .dd-res-toolbar {
	top: calc(var(--rp-nav-h) + 32px);
}

.dd-res-tb-left {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	flex: 1;
	min-width: 0;
}
.dd-res-tb-title {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.66rem;
	font-weight: 700;
	color: var(--rp-lime);
	letter-spacing: 0.06em;
	white-space: nowrap;
	flex-shrink: 0;
}
.dd-res-tb-count {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.6rem;
	color: var(--rp-muted);
	white-space: nowrap;
	flex-shrink: 0;
}
.dd-res-tb-sep {
	width: 1px;
	height: 18px;
	background: var(--rp-border);
	flex-shrink: 0;
}

/* Chip row: horizontally scrollable topic tags */
.dd-res-chip-row {
	display: flex;
	gap: 0.3rem;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.dd-res-chip-row::-webkit-scrollbar { display: none; }
.dd-res-chip {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.53rem;
	font-weight: 600;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	white-space: nowrap;
	padding: 0.2rem 0.55rem;
	border: 1px solid var(--rp-border);
	border-radius: 1px;
	color: var(--rp-muted);
	background: transparent;
	cursor: pointer;
	transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.dd-res-chip:hover {
	border-color: var(--rp-border-hi);
	color: var(--rp-text);
}
.dd-res-chip.is-on {
	background: var(--rp-lime);
	color: #000;
	border-color: var(--rp-lime);
}

.dd-res-tb-right {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	flex-shrink: 0;
}
.dd-res-sort {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.6rem;
	background: var(--rp-surface-2);
	color: var(--rp-muted);
	border: 1px solid var(--rp-border);
	padding: 0.3rem 0.6rem;
	cursor: pointer;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color 0.15s;
}
.dd-res-sort:focus { border-color: var(--rp-lime-mid); }

.dd-res-view-group {
	display: flex;
	border: 1px solid var(--rp-border);
	overflow: hidden;
}
.dd-res-vbtn {
	background: transparent;
	border: none;
	border-right: 1px solid var(--rp-border);
	padding: 0.3rem 0.58rem;
	cursor: pointer;
	color: var(--rp-muted);
	font-size: 0.82rem;
	display: flex;
	align-items: center;
	line-height: 1;
	transition: background 0.12s, color 0.12s;
}
.dd-res-vbtn:last-child { border-right: none; }
.dd-res-vbtn.is-on {
	background: var(--rp-lime-dim);
	color: var(--rp-lime);
}
.dd-res-vbtn:hover:not(.is-on) {
	background: var(--rp-surface-2);
	color: var(--rp-text);
}

/* ── Body ────────────────────────────────────────────────────────*/
.dd-res-body {
	padding: 1.75rem 1.75rem 5rem;
	flex: 1;
}

/* ════════════════════════════════════════════════════════════════
   HERO ROW — Featured left · Latest Drop right
   ════════════════════════════════════════════════════════════════ */
.dd-res-hero-row {
	display: grid;
	grid-template-columns: 1fr 380px;
	height: 320px;
	border-bottom: 1px solid var(--rp-border);
	margin-bottom: 0;
	animation: rp-fade-up 0.45s 0.05s ease both;
}

/* ── LEFT · Featured article ─────────────────────────────────── */
.dd-res-hero-main {
	position: relative;
	overflow: hidden;
	background: #08080e;
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: var(--rp-text);
}

/* Low-opacity tonal background — atmospheric, not structural */
.dd-res-hero-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0.18;
	filter: saturate(0.5);
	transition: opacity 0.4s ease;
}
.dd-res-hero-main:hover .dd-res-hero-bg { opacity: 0.26; }

.dd-res-hero-gradient {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(6,6,9,0.1) 0%, rgba(6,6,9,0.75) 100%);
	pointer-events: none;
}

/* Chrome bar */
.dd-res-hero-head {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 24px;
	border-bottom: 1px solid rgba(255,255,255,0.05);
	flex-shrink: 0;
}
.dd-res-hero-head-label {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.56rem;
	color: var(--rp-muted-2);
	letter-spacing: 0.1em;
}
.dd-res-hero-head-tag {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.5rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--rp-lime);
	border: 1px solid rgba(204,255,0,0.3);
	padding: 3px 8px;
	background: rgba(204,255,0,0.06);
}

/* Body — text stacked to bottom */
.dd-res-hero-body {
	position: relative;
	z-index: 2;
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 24px;
}

.dd-res-hero-cat {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.58rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--rp-teal);
	margin-bottom: 10px;
}

.dd-res-hero-title {
	font-family: 'Inter', sans-serif;
	font-size: clamp(1.1rem, 1.55vw, 1.45rem);
	font-weight: 800;
	letter-spacing: -0.025em;
	line-height: 1.2;
	color: var(--rp-text);
	margin-bottom: 10px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.2s;
}
.dd-res-hero-main:hover .dd-res-hero-title { color: #fff; }

.dd-res-hero-summary {
	font-family: 'Inter', sans-serif;
	font-size: 0.8rem;
	line-height: 1.62;
	color: rgba(221,221,232,0.6);
	margin-bottom: 18px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.dd-res-hero-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 14px;
	border-top: 1px solid rgba(255,255,255,0.07);
}
.dd-res-hero-foot-meta {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.54rem;
	letter-spacing: 0.1em;
	color: var(--rp-muted);
	text-transform: uppercase;
	white-space: nowrap;
}
.dd-res-hero-foot-right {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}
.dd-res-hero-cta {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.58rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	color: var(--rp-lime);
	text-decoration: none;
	transition: gap 0.15s;
	white-space: nowrap;
}
.dd-res-hero-cta:hover { gap: 7px; }

/* ── RIGHT · Latest Drop ─────────────────────────────────────── */
.dd-res-hero-side {
	border-left: 1px solid var(--rp-border);
	background: var(--rp-surface);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.dd-res-hero-side-hd {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 18px;
	border-bottom: 1px solid var(--rp-border);
	flex-shrink: 0;
}
.dd-res-hero-side-hd-label {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.56rem;
	color: var(--rp-muted);
	letter-spacing: 0.08em;
	white-space: nowrap;
}
.dd-res-hero-side-hd-rule {
	flex: 1;
	height: 1px;
	background: var(--rp-border);
}
.dd-res-hero-side-hd-badge {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.5rem;
	color: #060609;
	background: var(--rp-lime);
	padding: 2px 8px;
	border-radius: 100px;
	letter-spacing: 0.06em;
	font-weight: 700;
	white-space: nowrap;
}

.dd-res-latest-rows {
	flex: 1;
	display: flex;
	flex-direction: column;
}

/* Shared class kept for JS filter compatibility */
.dd-res-side-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 0 16px;
	height: calc((320px - 45px) / 3);
	border-bottom: 1px solid var(--rp-border);
	text-decoration: none;
	color: var(--rp-text);
	transition: background 0.15s;
	position: relative;
}
.dd-res-side-item:last-child { border-bottom: none; }
.dd-res-side-item::before {
	content: '';
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 2px;
	background: var(--rp-lime);
	transform: scaleY(0);
	transform-origin: top;
	transition: transform 0.2s cubic-bezier(0.16,1,0.3,1);
}
.dd-res-side-item:hover { background: rgba(255,255,255,0.025); }
.dd-res-side-item:hover::before { transform: scaleY(1); }

.dd-res-latest-thumb {
	width: 80px;
	height: 45px;
	background-size: cover;
	background-position: center;
	background-color: var(--rp-surface-2);
	flex-shrink: 0;
	filter: brightness(0.8) saturate(0.65);
	transition: filter 0.25s ease;
}
.dd-res-side-item:hover .dd-res-latest-thumb {
	filter: brightness(0.95) saturate(0.9);
}

.dd-res-latest-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.dd-res-latest-meta {
	display: flex;
	align-items: center;
	gap: 6px;
}
.dd-res-latest-cat {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.5rem;
	color: var(--rp-muted-2);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.dd-res-latest-title {
	font-family: 'Inter', sans-serif;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--rp-text);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.15s;
}
.dd-res-side-item:hover .dd-res-latest-title { color: var(--rp-lime); }
.dd-res-latest-rt {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.5rem;
	color: var(--rp-muted-2);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* ── Mobile collapse ─────────────────────────────────────────── */
@media (max-width: 900px) {
	.dd-res-hero-row {
		grid-template-columns: 1fr;
		height: auto;
	}
	.dd-res-hero-main { min-height: 260px; }
	.dd-res-hero-side {
		border-left: none;
		border-top: 1px solid var(--rp-border);
	}
	.dd-res-side-item { height: 80px; }
}

/* ════════════════════════════════════════════════════════════════
   NEW BADGE — articles published within the last 7 days
   ════════════════════════════════════════════════════════════════ */
.dd-res-new-badge {
	display: inline-block;
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.46rem;
	font-weight: 700;
	color: #060609;
	background: var(--rp-lime);
	padding: 2px 5px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	line-height: 1;
	flex-shrink: 0;
	vertical-align: middle;
}

/* ════════════════════════════════════════════════════════════════
   MONTH GROUP DIVIDERS
   ════════════════════════════════════════════════════════════════ */
.dd-res-month-divider {
	display: flex;
	align-items: center;
	padding: 22px 0 12px;
}
.dd-res-month-rule-left {
	width: 36px;
	height: 1px;
	background: var(--rp-lime);
	flex-shrink: 0;
	margin-right: 10px;
}
.dd-res-month-label {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.6rem;
	font-weight: 700;
	color: var(--rp-lime);
	letter-spacing: 0.2em;
	text-transform: uppercase;
	white-space: nowrap;
	flex-shrink: 0;
}
.dd-res-month-count {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.56rem;
	color: var(--rp-muted);
	letter-spacing: 0.06em;
	margin-left: 8px;
	white-space: nowrap;
	flex-shrink: 0;
}
.dd-res-month-rule-right {
	flex: 1;
	height: 1px;
	background: var(--rp-border);
	margin-left: 14px;
}

/* ════════════════════════════════════════════════════════════════
   SECTION HEADING
   ════════════════════════════════════════════════════════════════ */
.dd-res-section-head {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 2rem 0 1.25rem;
}
.dd-res-sh-label {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.58rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--rp-muted);
	white-space: nowrap;
}
.dd-res-sh-title {
	font-family: 'Inter', sans-serif;
	font-size: 1.25rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	white-space: nowrap;
	background: linear-gradient(90deg, #ccff00 0%, #a0d900 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}
.dd-res-sh-line {
	flex: 1;
	height: 1px;
	background: var(--rp-border);
}
.dd-res-sh-count {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.57rem;
	color: var(--rp-muted-2);
	white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════════
   CARD GRID
   Card images are position:absolute and invisible at rest.
   On hover they dissolve in (opacity 0 → 1) and simultaneously
   de-zoom (scale 1.06 → 1) so the image "emerges" from behind.
   A gradient overlay keeps text legible throughout.
   Zero layout shift — the image never occupies document flow.
   ════════════════════════════════════════════════════════════════ */
.dd-res-grid {
	display: none;
	grid-template-columns: repeat(3, 1fr);
	gap: 1px;
	background: var(--rp-border);
	border: 1px solid var(--rp-border);
}
.dd-res-grid.is-show { display: grid; }
.dd-res-grid.is-dense { grid-template-columns: repeat(4, 1fr); }

.dd-res-card {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	background: var(--rp-surface);
	padding: 1.6rem 1.4rem 1.35rem;
	display: flex;
	flex-direction: column;
	text-decoration: none;
	cursor: pointer;
	min-height: 224px;
	transition: background 0.25s ease, box-shadow 0.25s ease;
}
.dd-res-card:hover {
	background: var(--rp-surface-2);
	box-shadow: var(--rp-lime-glow);
	z-index: 1;
}

/* Dissolve nature image */
.dd-res-card-img {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0;
	transform: scale(1.06);
	transition: opacity 0.5s ease, transform 0.62s ease;
	will-change: opacity, transform;
	z-index: 1;
}
/* Gradient overlay always lives on the image element */
.dd-res-card-img::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		152deg,
		rgba(6,6,9,0.3)  0%,
		rgba(6,6,9,0.7)  45%,
		rgba(6,6,9,0.97) 100%
	);
}
.dd-res-card:hover .dd-res-card-img {
	opacity: 1;
	transform: scale(1);
}

/* Left lime bar emerges on hover */
.dd-res-card::before {
	content: '';
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 2px;
	background: var(--rp-lime);
	transform: scaleY(0);
	transform-origin: bottom;
	transition: transform 0.3s ease;
	z-index: 3;
}
.dd-res-card:hover::before { transform: scaleY(1); }

/* Read-time badge appears with image */
.dd-res-card-label {
	position: absolute;
	top: 0.9rem;
	right: 0.9rem;
	z-index: 4;
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.52rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: rgba(221,221,232,0.92);
	background: rgba(6,6,9,0.72);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	padding: 0.22rem 0.52rem;
	border-radius: 1px;
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity 0.35s 0.1s ease, transform 0.35s 0.1s ease;
}
.dd-res-card:hover .dd-res-card-label {
	opacity: 1;
	transform: translateY(0);
}

/* Card text content — always above image */
.dd-res-card-content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	height: 100%;
}
.dd-res-card-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.dd-res-card-cat-row {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

/* Category colour dots */
.dd-res-cdot {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	flex-shrink: 0;
	background: rgba(255,255,255,0.28);
}
/* Teal — science / neurodiversity / connection */
.dd-res-cdot--the-science,
.dd-res-cdot--audhd,
.dd-res-cdot--relationships-adhd  { background: var(--rp-teal); }
/* Amber — lifestyle / wellbeing / burnout */
.dd-res-cdot--life-systems,
.dd-res-cdot--burnout-mental-health { background: var(--rp-amber); }
/* Lime — tactics / discovery / identity */
.dd-res-cdot--tactical-procedures,
.dd-res-cdot--late-discovery,
.dd-res-cdot--women-adhd          { background: var(--rp-lime); }
/* Dim white — general ADHD */
.dd-res-cdot--adhd                { background: rgba(255,255,255,0.3); }

.dd-res-card-cat {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.54rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--rp-muted);
	transition: color 0.2s;
}
.dd-res-card:hover .dd-res-card-cat { color: var(--rp-lime); opacity: 0.9; }

.dd-res-card-title {
	font-family: 'Inter', sans-serif;
	font-size: 0.97rem;
	font-weight: 700;
	line-height: 1.22;
	letter-spacing: -0.015em;
	color: var(--rp-text);
	transition: color 0.2s;
}
.dd-res-card:hover .dd-res-card-title { color: #fff; }

.dd-res-card-excerpt {
	font-size: 0.77rem;
	line-height: 1.67;
	color: var(--rp-muted);
	flex: 1;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.2s;
}
.dd-res-card:hover .dd-res-card-excerpt { color: rgba(221,221,232,0.62); }

.dd-res-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	padding-top: 0.75rem;
	border-top: 1px solid var(--rp-border);
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.54rem;
	color: var(--rp-muted-2);
}
.dd-res-card-rt::before {
	content: '◷ ';
	font-size: 0.68rem;
}
.dd-res-card-arrow {
	transition: transform 0.18s ease;
	opacity: 0;
}
.dd-res-card:hover .dd-res-card-arrow {
	opacity: 1;
	transform: translateX(4px);
}

/* Enter animation — staggered on load */
.dd-res-card {
	animation: rp-card-in 0.38s ease both;
}
.dd-res-card:nth-child(1)  { animation-delay: 0.05s; }
.dd-res-card:nth-child(2)  { animation-delay: 0.09s; }
.dd-res-card:nth-child(3)  { animation-delay: 0.13s; }
.dd-res-card:nth-child(4)  { animation-delay: 0.17s; }
.dd-res-card:nth-child(5)  { animation-delay: 0.21s; }
.dd-res-card:nth-child(6)  { animation-delay: 0.25s; }
.dd-res-card:nth-child(7)  { animation-delay: 0.29s; }
.dd-res-card:nth-child(8)  { animation-delay: 0.33s; }
.dd-res-card:nth-child(9)  { animation-delay: 0.37s; }
.dd-res-card:nth-child(10) { animation-delay: 0.41s; }
.dd-res-card:nth-child(n+11) { animation-delay: 0.45s; }
@keyframes rp-card-in {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════════════════════
   LIST VIEW
   Persistent left thumbnail always visible.
   ════════════════════════════════════════════════════════════════ */
.dd-res-list {
	display: none;
	flex-direction: column;
	gap: 14px;
}
.dd-res-list.is-show { display: flex; }

.dd-res-list-item {
	position: relative;
	display: grid;
	grid-template-columns: 240px 1fr auto;
	gap: 0;
	align-items: stretch;
	border: 1px solid var(--rp-border);
	border-radius: 4px;
	text-decoration: none;
	background: var(--rp-surface);
	overflow: hidden;
	transition: background 0.18s, border-color 0.18s, transform 0.18s;
	height: 136px; /* fixed — keeps all rows uniform regardless of title wrap */
	cursor: pointer;
}
.dd-res-list-item::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 2px;
	background: var(--rp-lime);
	transform: scaleY(0);
	transform-origin: top;
	transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
	z-index: 2;
}
.dd-res-list-item:hover {
	background: var(--rp-surface-2);
	border-color: var(--rp-border-hi);
	transform: translateX(2px);
}
.dd-res-list-item:hover::before {
	transform: scaleY(1);
}

/* Persistent thumbnail */
.dd-res-list-thumb {
	background-size: cover;
	background-position: center;
	filter: brightness(0.58) saturate(0.68);
	transition: filter 0.3s ease;
	position: relative;
	flex-shrink: 0;
}
.dd-res-list-thumb::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		90deg,
		rgba(12,12,18,0) 50%,
		rgba(12,12,18,0.6) 100%
	);
}
.dd-res-list-item:hover .dd-res-list-thumb {
	filter: brightness(0.75) saturate(0.86);
}

.dd-res-list-body {
	padding: 1.15rem 1.25rem 1.15rem 1.6rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.42rem;
	min-width: 0;
}
.dd-res-list-meta {
	display: flex;
	align-items: center;
	gap: 0.65rem;
}
.dd-res-list-cat {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.54rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--rp-lime);
	opacity: 0.8;
}
.dd-res-list-title {
	font-family: 'Inter', sans-serif;
	font-size: 0.97rem;
	font-weight: 700;
	line-height: 1.28;
	letter-spacing: -0.01em;
	color: var(--rp-text);
	transition: color 0.15s;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.dd-res-list-item:hover .dd-res-list-title { color: var(--rp-lime); }

.dd-res-list-excerpt {
	font-size: 0.77rem;
	line-height: 1.62;
	color: var(--rp-muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.dd-res-list-right {
	padding: 1rem 1.25rem;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: space-between;
	flex-shrink: 0;
}
.dd-res-list-rt {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.57rem;
	color: var(--rp-muted-2);
	white-space: nowrap;
}
.dd-res-list-rt::before { content: '◷ '; font-size: 0.72rem; }
/* Podcast badge inside list-right column */
.dd-podcast-badge--list {
	font-size: 10px;
	padding: 4px 8px;
	gap: 5px;
}
.dd-res-list-arrow {
	font-size: 0.85rem;
	color: var(--rp-lime);
	opacity: 0;
	transform: translateX(-4px);
	transition: opacity 0.18s, transform 0.18s;
}
.dd-res-list-item:hover .dd-res-list-arrow {
	opacity: 1;
	transform: translateX(0);
}

/* ── Empty state ─────────────────────────────────────────────────*/
.dd-res-empty {
	padding: 3rem 0;
	text-align: center;
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.75rem;
	color: var(--rp-muted);
}

/* ── Section head entry animation ───────────────────────────────*/
.dd-res-section-head {
	animation: rp-fade-up 0.38s 0.15s ease both;
}
@keyframes rp-fade-up {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ── Mobile-only shell collapse ──────────────────────────────────
   The desktop research shell uses a fixed left rail and offset main
   column. On phones, collapse that into a single flow so the rail
   stops covering the content area.
   ──────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
	.dd-res-sidebar {
		position: static;
		top: auto;
		left: auto;
		bottom: auto;
		width: 100%;
		max-width: 100%;
		border-right: none;
		border-bottom: 1px solid var(--rp-border);
		overflow: visible;
		z-index: auto;
	}

	.admin-bar .dd-res-sidebar {
		top: auto;
	}

	.dd-res-main {
		margin-left: 0;
		width: 100%;
		min-width: 0;
		min-height: auto;
	}

	.dd-res-toolbar {
		position: static;
		height: auto;
		padding: 0.9rem 1rem;
		flex-direction: column;
		align-items: stretch;
		gap: 0.85rem;
	}

	.admin-bar .dd-res-toolbar {
		top: auto;
	}

	.dd-res-tb-left {
		flex-wrap: wrap;
		gap: 0.65rem;
	}

	.dd-res-tb-sep {
		display: none;
	}

	.dd-res-chip-row {
		flex-basis: 100%;
		width: 100%;
	}

	.dd-res-tb-right {
		width: 100%;
		justify-content: space-between;
	}

	.dd-res-sort {
		max-width: calc(100vw - 9.5rem);
	}

	.dd-res-body {
		padding: 1rem 1rem 3rem;
	}

	.dd-res-section-head {
		flex-wrap: wrap;
		gap: 0.7rem;
		padding: 1.5rem 0 1rem;
	}

	.dd-res-sh-line {
		order: 4;
		width: 100%;
		flex-basis: 100%;
	}

	.dd-res-list {
		gap: 10px;
	}

	.dd-res-list-item {
		grid-template-columns: 104px minmax(0, 1fr);
		align-items: center;
		height: auto;
		border-radius: 0;
	}

	.dd-res-list-thumb {
		margin: 0.85rem 0 0.85rem 0.85rem;
		aspect-ratio: 16 / 9;
		border: 1px solid var(--rp-border);
	}

	.dd-res-list-thumb::after {
		background: linear-gradient(
			90deg,
			rgba(12,12,18,0.08) 0%,
			rgba(12,12,18,0.26) 100%
		);
	}

	.dd-res-list-body {
		padding: 0.85rem 0.95rem 0.85rem 0.2rem;
		gap: 0.32rem;
	}

	.dd-res-list-meta {
		gap: 0.4rem;
	}

	.dd-res-list-cat {
		font-size: 0.48rem;
		letter-spacing: 0.14em;
	}

	.dd-res-list-title {
		font-size: 0.76rem;
		line-height: 1.2;
		display: -webkit-box;
		-webkit-line-clamp: 3;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.dd-res-list-excerpt,
	.dd-res-list-right {
		display: none;
	}
}

/* ── Spicy Brain Dictionary sidebar callout ─────────────────────── */
.dd-res-dict-callout {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 1rem 1.25rem 1.25rem;
	padding: 14px 16px;
	background: rgba(255, 184, 48, 0.07);
	border: 1px solid rgba(255, 184, 48, 0.22);
	border-radius: 10px;
	text-decoration: none;
	transition: background 0.15s, border-color 0.15s;
	flex-shrink: 0;
}
.dd-res-dict-callout:hover {
	background: rgba(255, 184, 48, 0.12);
	border-color: rgba(255, 184, 48, 0.4);
}
.dd-res-dict-callout-emoji {
	font-size: 1.5rem;
	flex-shrink: 0;
	line-height: 1;
}
.dd-res-dict-callout-title {
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--color-text);
	margin-bottom: 2px;
}
.dd-res-dict-callout-desc {
	font-size: 0.7rem;
	color: var(--color-muted);
	line-height: 1.4;
}
.dd-res-dict-callout-arrow {
	margin-left: auto;
	font-size: 0.9rem;
	color: rgba(255, 184, 48, 0.7);
	flex-shrink: 0;
}
