/* ============================================================================
   NNN Research Evidence Bank — Frontend CSS
   ============================================================================
   Design rules:
   - All backgrounds: crisp white (#FFFFFF)
   - Text: grey (not black, not charcoal)
   - Accents: NNN green (#7EBB3E / #4F8418)
   ============================================================================ */

.nnn-rb-section {
	--rb-bg:       #FFFFFF;
	--rb-bg-soft:  #FAFAFA;
	--rb-heading:  #4A4A4A;
	--rb-body:     #555555;
	--rb-soft:     #7A7A7A;
	--rb-line:     #E8E8E8;
	--rb-line-soft:#F1F1F1;
	--rb-green:    #7EBB3E;
	--rb-green-dk: #4F8418;
	--rb-green-pale:#F4F9EB;
	--rb-card:      #F3F8E8;
	--rb-card-hover:#E4EFCE;
	--rb-r:   12px;
	--rb-r-md:18px;
	--rb-r-lg:28px;

	background: var(--rb-bg);
	padding: 56px 0 80px;
	position: relative;
	color: var(--rb-body);
	font-family: 'Lato', system-ui, -apple-system, sans-serif;
	box-sizing: border-box;
}
@media (min-width: 700px)  { .nnn-rb-section { padding: 80px 0 100px; } }
@media (min-width: 1100px) { .nnn-rb-section { padding: 100px 0 120px; } }

.nnn-rb-section *,
.nnn-rb-section *::before,
.nnn-rb-section *::after { box-sizing: border-box; }

.nnn-rb-section img { max-width: 100%; height: auto; display: block; }
.nnn-rb-section a   { text-decoration: none; color: var(--rb-green-dk); }

/* ═══════════════════════════════════════════════════════════════════════
   THEME / ELEMENTOR GUARD (v1.7.1)
   1) [hidden] must actually hide. Our grid/controls set an explicit display,
      which beats the UA [hidden] rule — that broke the keyword search (the
      grid never hid, so results appeared below it and it looked like nothing
      happened).
   2) Elementor's global "kit" paints EVERY <button> with a green gradient,
      white text, padding and a border-radius. Our structural buttons opt back
      out. Base selectors are scoped with .nnn-rb-section (0,2,0) to beat
      `.elementor-kit-XXXX button` (0,1,1); hover/focus are scoped one deeper.
   ═══════════════════════════════════════════════════════════════════════ */
.nnn-rb-section [hidden] { display: none !important; }

.nnn-rb-section .nnn-rb-article-head,
.nnn-rb-section .nnn-rb-panel-back,
.nnn-rb-section .nnn-rb-card-toggle,
.nnn-rb-section .nnn-rb-cp-copy {
	background-image: none;
	box-shadow: none;
	text-transform: none;
	letter-spacing: normal;
}
.nnn-rb-section .nnn-rb-article-head {
	background-color: transparent;
	border: 0;
	border-radius: 0;
	color: inherit;
	padding: 16px 44px 16px 18px;
}
.nnn-rb-section .nnn-rb-article-head:focus-visible {
	box-shadow: inset 0 0 0 2px rgba(126,187,62,.4);
	border-radius: var(--rb-r);
}
.nnn-rb-section .nnn-rb-panel-back {
	background-color: transparent;
	border: 1.5px solid var(--rb-line);
	border-radius: 50%;
	color: var(--rb-heading);
	padding: 0;
}
.nnn-rb-section .nnn-rb-panel-back:hover,
.nnn-rb-section .nnn-rb-panel-back:focus-visible {
	background-color: var(--rb-heading);
	border-color: var(--rb-heading);
	color: var(--rb-bg);
}
.nnn-rb-section .nnn-rb-card-toggle {
	background-color: var(--rb-bg);
	border: 1.5px solid var(--rb-line);
	border-radius: 50%;
	color: var(--rb-soft);
	padding: 0;
}
.nnn-rb-section .nnn-rb-card-toggle:hover {
	background-color: var(--rb-green-pale);
	border-color: var(--rb-green);
	color: var(--rb-green-dk);
}
.nnn-rb-section .nnn-rb-cp-copy {
	background-color: transparent;
	border: 1.5px solid var(--rb-line);
	border-radius: 6px;
	color: var(--rb-body);
	padding: 8px 12px;
}
.nnn-rb-section .nnn-rb-cp-copy:hover {
	border-color: var(--rb-green);
	color: var(--rb-green-dk);
}
.nnn-rb-section .nnn-rb-cp-copy.is-copied {
	background-color: var(--rb-green-pale);
	border-color: var(--rb-green);
	color: var(--rb-green-dk);
}

.nnn-rb-container {
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 32px;
	width: 100%;
	position: relative;
	z-index: 2;
}
@media (max-width: 700px) { .nnn-rb-container { padding: 0 24px; } }

/* ━━━ HEADER ━━━ */
.nnn-rb-head { margin-bottom: 32px; }
@media (min-width: 1100px) {
	.nnn-rb-head {
		display: grid;
		grid-template-columns: 1.4fr 1fr;
		gap: 56px;
		align-items: end;
		margin-bottom: 48px;
		padding-bottom: 40px;
		border-bottom: 1px solid var(--rb-line);
	}
}

.nnn-rb-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--rb-green-dk);
	margin-bottom: 14px;
}
.nnn-rb-eyebrow::before {
	content: '';
	width: 24px;
	height: 1px;
	background: var(--rb-green);
}

.nnn-rb-section h1 {
	font-family: inherit;
	font-size: clamp(36px, 5vw, 56px);
	font-weight: 900;
	line-height: 1.04;
	letter-spacing: -0.025em;
	color: var(--rb-heading);
	margin: 0;
	max-width: 16ch;
}
.nnn-rb-section h1 em {
	font-style: normal;
	color: var(--rb-green-dk);
	font-weight: 900;
}

.nnn-rb-head-r { margin-top: 24px; }
@media (min-width: 1100px) { .nnn-rb-head-r { margin-top: 0; padding-bottom: 8px; } }
.nnn-rb-head-r p {
	font-size: 14.5px;
	color: var(--rb-body);
	line-height: 1.65;
	margin: 0 0 18px;
	max-width: 460px;
}

/* ━━━ SEARCH ━━━ */
.nnn-rb-search {
	position: relative;
	max-width: 460px;
}
.nnn-rb-search input {
	width: 100%;
	padding: 13px 100px 13px 44px;
	border: 1.5px solid var(--rb-line);
	border-radius: 50px;
	background: var(--rb-bg);
	font-family: inherit;
	font-size: 14px;
	color: var(--rb-heading);
	outline: none;
	transition: border-color .2s, box-shadow .2s;
	min-height: 48px;
}
.nnn-rb-search input::placeholder { color: var(--rb-soft); }
.nnn-rb-search input:focus {
	border-color: var(--rb-green);
	box-shadow: 0 0 0 3px rgba(126,187,62,.15);
}
.nnn-rb-search-icon {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--rb-soft);
	pointer-events: none;
}
.nnn-rb-search-icon svg { width: 16px; height: 16px; display: block; }
.nnn-rb-kbd {
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 10.5px;
	font-weight: 700;
	color: var(--rb-soft);
	background: var(--rb-bg-soft);
	padding: 4px 8px;
	border-radius: 5px;
	pointer-events: none;
	letter-spacing: 0.04em;
	display: none;
	font-family: inherit;
}
@media (min-width: 700px) { .nnn-rb-kbd { display: inline-block; } }

/* ━━━ STATS ROW ━━━ */
.nnn-rb-stats-row {
	display: flex;
	gap: 24px;
	margin: 24px 0 32px;
	flex-wrap: wrap;
	padding-top: 24px;
	border-top: 1px solid var(--rb-line);
}
@media (min-width: 1100px) {
	.nnn-rb-stats-row {
		gap: 36px;
		margin: 0 0 40px;
		padding-top: 0;
		border-top: 0;
	}
}
.nnn-rb-stat-row {
	display: flex;
	align-items: baseline;
	gap: 8px;
}
.nnn-rb-stat-row-num {
	font-size: 22px;
	font-weight: 900;
	color: var(--rb-heading);
	line-height: 1;
}
.nnn-rb-stat-row-lbl {
	font-size: 11px;
	letter-spacing: 0.10em;
	text-transform: uppercase;
	color: var(--rb-soft);
	font-weight: 700;
}

/* ━━━ CATEGORY GRID ━━━ */
/* ━━━ GRID CONTROLS (v1.6.0) ━━━ */
.nnn-rb-grid-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
}
.nnn-rb-grid-filter {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	min-width: 200px;
	max-width: 360px;
	padding: 9px 14px;
	border: 1.5px solid var(--rb-line);
	border-radius: 999px;
	background: var(--rb-bg);
	color: var(--rb-soft);
	transition: border-color .2s;
}
.nnn-rb-grid-filter:focus-within { border-color: var(--rb-green); }
.nnn-rb-grid-filter svg { width: 15px; height: 15px; flex-shrink: 0; }
.nnn-rb-grid-filter input {
	border: 0;
	outline: 0;
	background: transparent;
	font: inherit;
	font-size: 14px;
	color: var(--rb-heading);
	width: 100%;
}
.nnn-rb-grid-sortwrap {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--rb-soft);
}
.nnn-rb-grid-sortwrap select {
	font: inherit;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 600;
	color: var(--rb-heading);
	padding: 8px 12px;
	border: 1.5px solid var(--rb-line);
	border-radius: 8px;
	background: var(--rb-bg);
	cursor: pointer;
}
.nnn-rb-grid-sortwrap select:focus-visible { outline: none; border-color: var(--rb-green); box-shadow: 0 0 0 3px rgba(126,187,62,.25); }
@media (max-width: 600px) {
	.nnn-rb-grid-filter { max-width: none; }
}

.nnn-rb-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}
@media (min-width: 700px)  { .nnn-rb-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1100px) { .nnn-rb-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; } }

.nnn-rb-card {
	position: relative;
	background: var(--rb-card);
	border: 1.5px solid var(--rb-line);
	border-radius: var(--rb-r-md);
	padding: 22px 20px 18px;
	cursor: pointer;
	transition: transform .25s cubic-bezier(.2,.8,.2,1),
				box-shadow .25s cubic-bezier(.2,.8,.2,1),
				border-color .25s;
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-height: 168px;
	text-decoration: none;
	color: inherit;
	isolation: isolate;
}
@media (min-width: 700px) {
	.nnn-rb-card { padding: 26px 24px 22px; min-height: 192px; gap: 16px; }
}
.nnn-rb-card:hover,
.nnn-rb-card:focus-visible {
	transform: translateY(-5px);
	box-shadow: 0 22px 48px -18px rgba(42,42,42,.28);
	border-color: var(--rb-green);
	background: var(--rb-card-hover);
	outline: none;
}
.nnn-rb-card:focus-visible {
	box-shadow: 0 0 0 3px rgba(126,187,62,.30), 0 16px 36px -16px rgba(42,42,42,.10);
}

.nnn-rb-card-icon {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: #FFFFFF;
	border: 1px solid var(--rb-line);
	color: var(--rb-green-dk);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .25s, color .25s;
	flex-shrink: 0;
}
.nnn-rb-card:hover .nnn-rb-card-icon,
.nnn-rb-card:focus-visible .nnn-rb-card-icon {
	background: var(--rb-green);
	color: var(--rb-heading);
}
.nnn-rb-card-icon svg { width: 20px; height: 20px; }
.nnn-rb-card-icon-img {
	width: 78%;
	height: 78%;
	object-fit: contain;
	display: block;
}

.nnn-rb-card h3 {
	font-family: inherit;
	font-size: 15.5px;
	font-weight: 900;
	letter-spacing: -.005em;
	line-height: 1.25;
	color: var(--rb-heading);
	margin: 0;
	flex: 1;
}
@media (min-width: 700px) {
	.nnn-rb-card h3 { font-size: 16.5px; }
}

.nnn-rb-card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding-top: 12px;
	border-top: 1px solid var(--rb-line-soft);
}
.nnn-rb-card-count {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.10em;
	text-transform: uppercase;
	color: var(--rb-green-dk);
}
.nnn-rb-card-arrow {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: transparent;
	color: var(--rb-heading);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all .25s;
	flex-shrink: 0;
}
.nnn-rb-card:hover .nnn-rb-card-arrow,
.nnn-rb-card:focus-visible .nnn-rb-card-arrow {
	background: var(--rb-heading);
	color: var(--rb-bg);
	transform: translateX(3px);
}
.nnn-rb-card-arrow svg { width: 13px; height: 13px; }

/* ━━━ CARD: main link + inline expander (v1.3.0) ━━━ */
.nnn-rb-card { gap: 0; cursor: default; }
.nnn-rb-card-main {
	display: flex;
	flex-direction: column;
	gap: 14px;
	flex: 1;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}
@media (min-width: 700px) { .nnn-rb-card-main { gap: 16px; } }

/* Expanded card takes the full row so its paper list has room to breathe. */
.nnn-rb-card.is-expanded { grid-column: 1 / -1; }
.nnn-rb-card.is-expanded:hover { transform: none; }

/* Chevron toggle, top-right */
.nnn-rb-card-toggle {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 1.5px solid var(--rb-line);
	border-radius: 50%;
	background: var(--rb-bg);
	color: var(--rb-soft);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all .2s;
	z-index: 3;
}
.nnn-rb-card-toggle:hover {
	border-color: var(--rb-green);
	background: var(--rb-green-pale);
	color: var(--rb-green-dk);
}
.nnn-rb-card-toggle:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(126,187,62,.35);
}
.nnn-rb-card-toggle svg { width: 14px; height: 14px; transition: transform .25s; }
.nnn-rb-card-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Inline papers list (animated open/close via JS-set max-height) */
.nnn-rb-card-papers {
	max-height: 0;
	overflow: hidden;
	transition: max-height .32s cubic-bezier(.2,.8,.2,1);
}
.nnn-rb-cp-inner {
	padding-top: 16px;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 12px;
}
.nnn-rb-cp-item {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px;
	border: 1px solid var(--rb-line);
	border-radius: 10px;
	background: var(--rb-bg-soft);
}
.nnn-rb-cp-title {
	font-weight: 800;
	font-size: 14px;
	line-height: 1.3;
	color: var(--rb-heading);
}
.nnn-rb-cp-title:hover { color: var(--rb-green-dk); }
.nnn-rb-cp-meta {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--rb-soft);
}
.nnn-rb-cp-excerpt {
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--rb-body);
	margin: 0;
}
.nnn-rb-cp-links {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 4px;
}
.nnn-rb-cp-btn {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 8px 12px;
	border-radius: 6px;
	transition: all .2s;
	white-space: nowrap;
}
.nnn-rb-cp-ext { background: var(--rb-green-dk); color: #fff; }
.nnn-rb-cp-ext:hover { background: #3d6a12; color: #fff; }
.nnn-rb-cp-int { border: 1.5px solid var(--rb-line); color: var(--rb-green-dk); background: transparent; }
.nnn-rb-cp-int:hover { border-color: var(--rb-green); background: var(--rb-green-pale); }
.nnn-rb-cp-pdf { background: var(--rb-green-pale); border: 1.5px solid var(--rb-green); color: var(--rb-green-dk); }
.nnn-rb-cp-pdf:hover { background: #e9f3d6; }
.nnn-rb-cp-copy { background: transparent; border: 1.5px solid var(--rb-line); color: var(--rb-body); cursor: pointer; font-family: inherit; font-size: 10.5px; }
.nnn-rb-cp-copy:hover { border-color: var(--rb-green); color: var(--rb-green-dk); }
.nnn-rb-cp-copy.is-copied { border-color: var(--rb-green); background: var(--rb-green-pale); color: var(--rb-green-dk); }
.nnn-rb-cp-new { align-self: flex-start; font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--rb-green); padding: 2px 7px; border-radius: 4px; }
.nnn-rb-cp-empty { font-size: 13px; color: var(--rb-soft); padding: 4px 0; }

/* Mobile: concise expander — hide excerpt, stack full-width buttons */
@media (max-width: 600px) {
	.nnn-rb-cp-inner { grid-template-columns: 1fr; }
	.nnn-rb-cp-excerpt { display: none; }
	.nnn-rb-cp-links { flex-direction: column; }
	.nnn-rb-cp-btn { text-align: center; padding: 11px 12px; font-size: 12px; }
}

/* ━━━ DRILLDOWN PANEL ━━━ */
.nnn-rb-panel {
	position: fixed;
	top: 0;
	right: 0;
	width: 100%;
	height: 100vh;
	max-height: 100dvh;
	background: var(--rb-bg);
	z-index: 9999;
	transform: translateX(100%);
	transition: transform .35s cubic-bezier(.2,.8,.2,1);
	display: flex;
	flex-direction: column;
	box-shadow: -32px 0 80px -20px rgba(42,42,42,.20);
}
@media (min-width: 700px) { .nnn-rb-panel { width: 80%; max-width: 760px; } }
.nnn-rb-panel.is-open { transform: translateX(0); }

.nnn-rb-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(42,42,42,.40);
	z-index: 9998;
	opacity: 0;
	pointer-events: none;
	transition: opacity .3s;
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}
.nnn-rb-backdrop.is-open { opacity: 1; pointer-events: auto; }

.nnn-rb-panel-head {
	padding: 20px 24px;
	border-bottom: 1px solid var(--rb-line);
	display: flex;
	align-items: center;
	gap: 16px;
	background: var(--rb-bg);
	flex-shrink: 0;
}
@media (min-width: 700px) { .nnn-rb-panel-head { padding: 24px 32px; } }

.nnn-rb-panel-back {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1.5px solid var(--rb-line);
	background: transparent;
	color: var(--rb-heading);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all .2s;
	flex-shrink: 0;
	font-family: inherit;
}
.nnn-rb-panel-back:hover,
.nnn-rb-panel-back:focus-visible {
	background: var(--rb-heading);
	color: var(--rb-bg);
	border-color: var(--rb-heading);
}
.nnn-rb-panel-back svg { width: 16px; height: 16px; }

.nnn-rb-panel-title { flex: 1; min-width: 0; }
.nnn-rb-panel-title-eyebrow {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--rb-green-dk);
	display: block;
	margin-bottom: 4px;
}
.nnn-rb-section .nnn-rb-panel-title h2 {
	font-family: inherit;
	font-size: 22px;
	font-weight: 900;
	color: var(--rb-heading);
	letter-spacing: -.01em;
	line-height: 1.15;
	margin: 0;
}
@media (min-width: 700px) {
	.nnn-rb-section .nnn-rb-panel-title h2 { font-size: 26px; }
}

.nnn-rb-panel-search {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 24px;
	border-bottom: 1px solid var(--rb-line);
	background: var(--rb-bg);
	color: var(--rb-soft);
	flex-shrink: 0;
}
@media (min-width: 700px) { .nnn-rb-panel-search { padding: 14px 32px; } }
.nnn-rb-panel-search:focus-within { color: var(--rb-green-dk); }
.nnn-rb-panel-search svg { width: 16px; height: 16px; flex-shrink: 0; }
.nnn-rb-panel-search input {
	flex: 1;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	font-family: inherit;
	font-size: 14.5px;
	color: var(--rb-heading);
	padding: 4px 0;
}
.nnn-rb-panel-noresults { margin-top: 4px; }

.nnn-rb-panel-body {
	flex: 1;
	overflow-y: auto;
	padding: 20px 24px 40px;
	-webkit-overflow-scrolling: touch;
	background: var(--rb-bg);
}
@media (min-width: 700px) {
	.nnn-rb-panel-body { padding: 28px 32px 48px; }
}

.nnn-rb-panel-tools {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}
.nnn-rb-panel-tools-l {
	font-size: 12.5px;
	color: var(--rb-soft);
}
.nnn-rb-panel-tools-l strong {
	color: var(--rb-heading);
	font-weight: 900;
}
.nnn-rb-panel-sort {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--rb-soft);
}
.nnn-rb-panel-sort select {
	border: 1px solid var(--rb-line);
	border-radius: 6px;
	padding: 5px 8px;
	font-family: inherit;
	font-size: 12px;
	color: var(--rb-heading);
	background: var(--rb-bg);
	cursor: pointer;
	min-height: 32px;
}

.nnn-rb-articles {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.nnn-rb-article {
	background: var(--rb-bg);
	border: 1.5px solid var(--rb-line);
	border-radius: var(--rb-r);
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	cursor: pointer;
	transition: border-color .2s, transform .2s;
	text-decoration: none;
	color: inherit;
}
.nnn-rb-article:hover,
.nnn-rb-article:focus-visible {
	border-color: var(--rb-green);
	transform: translateX(2px);
	outline: none;
}
.nnn-rb-article-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.nnn-rb-article-tag {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 4px;
	background: var(--rb-bg-soft);
	color: var(--rb-body);
}
.nnn-rb-article-tag.year {
	background: var(--rb-green-pale);
	color: var(--rb-green-dk);
}
.nnn-rb-article h4 {
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--rb-heading);
	margin: 0;
}
.nnn-rb-article-meta {
	font-size: 12.5px;
	color: var(--rb-soft);
	line-height: 1.5;
}
.nnn-rb-article-meta strong {
	color: var(--rb-body);
	font-weight: 700;
}

/* Panel result → expandable card (v1.5.0) */
.nnn-rb-article { cursor: default; gap: 0; padding: 0; overflow: hidden; }
.nnn-rb-article:hover { transform: none; border-color: var(--rb-line); }
.nnn-rb-article.is-open { border-color: var(--rb-green); }
.nnn-rb-article-head {
	width: 100%;
	text-align: left;
	background: transparent;
	border: 0;
	cursor: pointer;
	font-family: inherit;
	color: inherit;
	position: relative;
	padding: 16px 44px 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 9px;
}
.nnn-rb-article-head:focus-visible { outline: none; box-shadow: inset 0 0 0 2px rgba(126,187,62,.4); border-radius: var(--rb-r); }
.nnn-rb-article-chev {
	position: absolute;
	top: 15px;
	right: 15px;
	color: var(--rb-soft);
	display: flex;
	transition: transform .25s, color .2s;
}
.nnn-rb-article-chev svg { width: 16px; height: 16px; }
.nnn-rb-article-head:hover .nnn-rb-article-chev { color: var(--rb-green-dk); }
.nnn-rb-article-head[aria-expanded="true"] .nnn-rb-article-chev { transform: rotate(180deg); color: var(--rb-green-dk); }
.nnn-rb-article-detail {
	max-height: 0;
	overflow: hidden;
	transition: max-height .3s cubic-bezier(.2,.8,.2,1);
}
.nnn-rb-ad-inner {
	padding: 14px 18px 18px;
	border-top: 1px solid var(--rb-line-soft);
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.nnn-rb-ad-citation { font-size: 12.5px; line-height: 1.6; color: var(--rb-body); }
.nnn-rb-ad-excerpt  { font-size: 13px; line-height: 1.6; color: var(--rb-body); margin: 0; }
.nnn-rb-ad-links { display: flex; flex-wrap: wrap; gap: 8px; }
.nnn-rb-article-tag.nnn-rb-new { background: var(--rb-green); color: #fff; }
@media (max-width: 600px) {
	.nnn-rb-ad-links { flex-direction: column; }
	.nnn-rb-ad-links .nnn-rb-cp-btn { text-align: center; }
}

.nnn-rb-empty {
	padding: 48px 24px;
	text-align: center;
	background: var(--rb-bg);
	border: 1px dashed var(--rb-line);
	border-radius: var(--rb-r-md);
	color: var(--rb-soft);
}
.nnn-rb-empty h4 {
	font-family: inherit;
	font-size: 16px;
	font-weight: 900;
	color: var(--rb-heading);
	margin: 0 0 6px;
}
.nnn-rb-empty p {
	font-size: 13.5px;
	color: var(--rb-soft);
	margin: 0 auto;
	max-width: 320px;
}

.nnn-rb-loading {
	padding: 40px 20px;
	text-align: center;
	color: var(--rb-soft);
	font-size: 13.5px;
}

.nnn-rb-empty-grid {
	grid-column: 1 / -1;
	padding: 40px;
	text-align: center;
	background: var(--rb-bg-soft);
	border-radius: var(--rb-r-md);
	border: 1px dashed var(--rb-line);
	color: var(--rb-soft);
}

/* ============================================================================
   SINGLE PAPER PAGE
   ============================================================================ */

.nnn-rb-paper {
	--rb-bg:       #FFFFFF;
	--rb-bg-soft:  #FAFAFA;
	--rb-heading:  #4A4A4A;
	--rb-body:     #555555;
	--rb-soft:     #7A7A7A;
	--rb-line:     #E8E8E8;
	--rb-line-soft:#F1F1F1;
	--rb-green:    #7EBB3E;
	--rb-green-dk: #4F8418;
	--rb-green-pale:#F4F9EB;
	--rb-r: 12px;
	--rb-r-md: 18px;

	background: var(--rb-bg);
	color: var(--rb-body);
	font-family: 'Lato', system-ui, -apple-system, sans-serif;
	padding: 48px 0 96px;
	box-sizing: border-box;
}
@media (min-width: 768px)  { .nnn-rb-paper { padding: 64px 0 120px; } }

.nnn-rb-paper *,
.nnn-rb-paper *::before,
.nnn-rb-paper *::after { box-sizing: border-box; }

.nnn-rb-paper-wrap {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 24px;
	width: 100%;
}
@media (min-width: 768px) { .nnn-rb-paper-wrap { padding: 0 32px; } }

.nnn-rb-paper-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 36px;
	gap: 12px;
}

.nnn-rb-paper-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 16px 9px 12px;
	background: var(--rb-bg);
	border: 1.5px solid var(--rb-line);
	border-radius: 50px;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--rb-body);
	transition: all .2s;
	text-decoration: none !important;
}
.nnn-rb-paper-back:hover,
.nnn-rb-paper-back:focus-visible {
	background: var(--rb-bg-soft);
	border-color: var(--rb-heading);
	color: var(--rb-heading);
}
.nnn-rb-paper-back svg { width: 14px; height: 14px; }

.nnn-rb-paper-print {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	background: transparent;
	border: none;
	border-radius: 50px;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--rb-body);
	cursor: pointer;
	transition: color .2s;
}
.nnn-rb-paper-print:hover,
.nnn-rb-paper-print:focus-visible {
	color: var(--rb-heading);
	outline: none;
}
.nnn-rb-paper-print svg { width: 16px; height: 16px; }

.nnn-rb-paper-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 48px;
}
@media (min-width: 900px) {
	.nnn-rb-paper-grid {
		grid-template-columns: minmax(0, 1fr) 280px;
		gap: 64px;
	}
}

.nnn-rb-paper-main { min-width: 0; }

.nnn-rb-paper-header { margin-bottom: 40px; }
.nnn-rb-paper-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 16px;
}
.nnn-rb-paper-cat {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.10em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 4px;
	background: var(--rb-green-pale);
	color: var(--rb-green-dk);
	text-decoration: none !important;
	transition: background .2s;
}
.nnn-rb-paper-cat:hover { background: var(--rb-green); color: var(--rb-bg); }

.nnn-rb-paper-title {
	font-family: inherit;
	font-size: clamp(28px, 4vw, 42px);
	font-weight: 900;
	line-height: 1.15;
	letter-spacing: -.015em;
	color: var(--rb-heading);
	margin: 0 0 18px;
	text-transform: uppercase;
}

.nnn-rb-paper-posted {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 14px;
	color: var(--rb-soft);
	font-weight: 700;
}
.nnn-rb-paper-posted svg { color: var(--rb-soft); }

.nnn-rb-paper-block {
	margin-bottom: 36px;
	padding-top: 4px;
}
.nnn-rb-paper-block-h {
	font-family: inherit;
	font-size: 12.5px;
	font-weight: 900;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--rb-heading);
	margin: 0 0 14px;
}

.nnn-rb-paper-citation {
	font-size: 16px;
	line-height: 1.7;
	color: var(--rb-body);
}

.nnn-rb-paper-doi {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--rb-green-dk);
	font-weight: 700;
	font-size: 15px;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color .2s;
}
.nnn-rb-paper-doi:hover { color: var(--rb-heading); }
.nnn-rb-paper-doi svg { opacity: 0.6; }

.nnn-rb-paper-extract {
	font-size: 15.5px;
	line-height: 1.75;
	color: var(--rb-body);
}
.nnn-rb-paper-extract p { margin: 0 0 14px; }
.nnn-rb-paper-extract p:last-child { margin-bottom: 0; }

.nnn-rb-paper-cta {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid var(--rb-line);
}
.nnn-rb-paper-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 24px;
	background: var(--rb-green-dk);
	color: var(--rb-bg) !important;
	border-radius: 50px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
	transition: all .25s;
}
.nnn-rb-paper-link:hover,
.nnn-rb-paper-link:focus-visible {
	background: var(--rb-heading);
	transform: translateY(-2px);
	box-shadow: 0 12px 24px -10px rgba(42,42,42,.20);
}
.nnn-rb-paper-link svg { width: 14px; height: 14px; }
.nnn-rb-paper-link-note {
	margin: 10px 0 0;
	font-size: 12.5px;
	color: var(--rb-soft);
}

/* SIDEBAR */
.nnn-rb-paper-sidebar { min-width: 0; }
@media (min-width: 900px) {
	.nnn-rb-paper-sidebar {
		position: sticky;
		top: 100px;
		align-self: flex-start;
	}
}

.nnn-rb-paper-toc {
	background: var(--rb-bg);
	border: 1px solid var(--rb-line);
	border-radius: var(--rb-r);
	padding: 22px 22px 18px;
	margin-bottom: 20px;
}
.nnn-rb-paper-toc-h {
	font-family: inherit;
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--rb-soft);
	margin: 0 0 14px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--rb-line-soft);
}
.nnn-rb-paper-toc-nav {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.nnn-rb-paper-toc-link {
	display: block;
	padding: 8px 12px;
	border-radius: 6px;
	color: var(--rb-body);
	font-size: 13.5px;
	font-weight: 700;
	text-decoration: none !important;
	transition: all .2s;
	line-height: 1.4;
	word-break: break-word;
}
.nnn-rb-paper-toc-link:hover {
	background: var(--rb-bg-soft);
	color: var(--rb-heading);
}
.nnn-rb-paper-toc-link.is-active {
	background: var(--rb-green-dk);
	color: var(--rb-bg);
}

.nnn-rb-paper-meta-card {
	background: var(--rb-bg-soft);
	border-radius: var(--rb-r);
	padding: 18px 22px;
}
.nnn-rb-paper-meta-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 0;
}
.nnn-rb-paper-meta-row + .nnn-rb-paper-meta-row {
	border-top: 1px solid var(--rb-line-soft);
	margin-top: 6px;
	padding-top: 12px;
}
.nnn-rb-paper-meta-lbl {
	font-size: 10.5px;
	font-weight: 900;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--rb-soft);
}
.nnn-rb-paper-meta-val {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--rb-heading);
	text-align: right;
	line-height: 1.4;
}

/* ━━━ ACCESSIBILITY ━━━ */
@media (prefers-reduced-motion: reduce) {
	.nnn-rb-section *,
	.nnn-rb-section *::before,
	.nnn-rb-section *::after,
	.nnn-rb-paper *,
	.nnn-rb-paper *::before,
	.nnn-rb-paper *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ============================================================================
   SEARCH RESULTS (v1.2.0)
   ============================================================================ */
.nnn-rb-results {
	margin: 24px 0 48px;
}
.nnn-rb-results-head {
	font-family: 'Lato', sans-serif;
	font-size: 14px;
	color: var(--rb-soft, #7A7A7A);
	margin: 0 0 16px;
}
.nnn-rb-results-head strong {
	color: var(--rb-heading, #4A4A4A);
	font-weight: 900;
}
.nnn-rb-results-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.nnn-rb-result {
	display: block;
	background: #FFFFFF;
	border: 1.5px solid #E8E8E8;
	border-radius: 14px;
	padding: 20px 24px;
	text-decoration: none;
	color: var(--rb-heading, #4A4A4A);
	transition: border-color .2s, transform .2s, box-shadow .2s;
}
.nnn-rb-result:hover,
.nnn-rb-result:focus-visible {
	border-color: #7EBB3E;
	transform: translateY(-2px);
	box-shadow: 0 20px 40px -20px rgba(42,42,42,.16);
	outline: none;
	text-decoration: none;
}
.nnn-rb-result-topic {
	display: inline-block;
	font-family: 'Lato', sans-serif;
	font-size: 11px;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: #4F8418;
	background: #F4F9EB;
	padding: 4px 10px;
	border-radius: 50px;
	margin-bottom: 10px;
}
.nnn-rb-result-title {
	font-family: 'Lato', sans-serif;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--rb-heading, #4A4A4A);
	margin: 0 0 8px;
}
.nnn-rb-result-meta {
	font-family: 'Lato', sans-serif;
	font-size: 13px;
	color: var(--rb-soft, #7A7A7A);
	margin: 0 0 8px;
}
.nnn-rb-result-snippet {
	font-family: 'Lato', sans-serif;
	font-size: 13.5px;
	line-height: 1.55;
	color: var(--rb-body, #555555);
	margin: 8px 0 0;
}
.nnn-rb-result mark {
	background: #FFF3C2;
	color: inherit;
	padding: 0 2px;
	border-radius: 2px;
	font-weight: 700;
}
.nnn-rb-results .nnn-rb-empty {
	background: var(--rb-bg-soft, #FAFAFA);
	border-radius: 14px;
	padding: 40px 24px;
	text-align: center;
}
.nnn-rb-results .nnn-rb-empty h4 {
	margin: 0 0 8px;
	color: var(--rb-heading, #4A4A4A);
	font-size: 16px;
	font-weight: 700;
}
.nnn-rb-results .nnn-rb-empty p {
	color: var(--rb-soft, #7A7A7A);
	font-size: 14px;
	margin: 0;
}

/* ━━━ RELATED PAPERS (single paper, v1.5.0) ━━━ */
.nnn-rb-related-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.nnn-rb-related-item { margin: 0; }
.nnn-rb-related-link {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px 16px;
	border: 1px solid var(--rb-line);
	border-radius: var(--rb-r);
	background: var(--rb-bg);
	transition: border-color .2s, transform .2s;
}
.nnn-rb-related-link:hover { border-color: var(--rb-green); transform: translateX(2px); }
.nnn-rb-related-title { font-weight: 700; font-size: 14px; line-height: 1.4; color: var(--rb-heading); }
.nnn-rb-related-link:hover .nnn-rb-related-title { color: var(--rb-green-dk); }
.nnn-rb-related-meta { font-size: 12px; color: var(--rb-soft); }
@media (min-width: 700px) { .nnn-rb-related-list { grid-template-columns: 1fr 1fr; } }
