/* =============================================================================
   Technologies (Research Calculator) — /tools/research/
   ============================================================================= */

/* ── Guest Landing Gate ── */
.inv-rgate {
	position: relative;
	min-height: calc(100vh - 80px);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 5rem 1.5rem 3rem;
	overflow: hidden;
	text-align: center;
	isolation: isolate;
}

.inv-rgate__blob {
	position: absolute;
	border-radius: 50%;
	filter: blur(90px);
	pointer-events: none;
	z-index: 0;
}
.inv-rgate__blob--amber {
	width: 500px;
	height: 500px;
	background: radial-gradient(circle, rgba(245,158,11,0.18) 0%, transparent 70%);
	top: -80px;
	left: 50%;
	transform: translateX(-50%);
}
.inv-rgate__blob--blue {
	width: 360px;
	height: 360px;
	background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, transparent 70%);
	bottom: 40px;
	right: -60px;
}

.inv-rgate > *:not(.inv-rgate__blob) { position: relative; z-index: 1; }

/* Icons row */
.inv-rgate__icons {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	margin-bottom: 2rem;
}
.inv-rgate__icon {
	width: 56px;
	height: 56px;
	object-fit: contain;
	transition: transform .3s ease;
}
.inv-rgate__icon--military { filter: drop-shadow(0 0 14px rgba(239,68,68,0.55)); }
.inv-rgate__icon--castle   { filter: drop-shadow(0 0 14px rgba(168,85,247,0.55)); }
.inv-rgate__icon--economy  { filter: drop-shadow(0 0 14px rgba(245,158,11,0.55)); }
.inv-rgate__icon--merc     { filter: drop-shadow(0 0 14px rgba(16,185,129,0.55)); }

.inv-rgate__icon:hover { transform: scale(1.15) translateY(-3px); }

/* Label above title */
.inv-rgate__eyebrow {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #f59e0b;
	background: rgba(245,158,11,0.1);
	padding: 4px 14px;
	border-radius: 100px;
	margin-bottom: 1rem;
}

/* Title */
.inv-rgate__title {
	font-family: Rajdhani, sans-serif;
	font-size: clamp(2.4rem, 8vw, 4rem);
	font-weight: 700;
	color: #fff;
	line-height: 1.05;
	margin: 0 0 0.6rem;
	text-transform: uppercase;
}
.inv-rgate__title span {
	background: linear-gradient(90deg, #f59e0b, #f97316);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* Tagline */
.inv-rgate__tagline {
	font-size: 1rem;
	color: rgba(255,255,255,0.5);
	margin: 0 0 2rem;
	max-width: 340px;
	line-height: 1.5;
}

/* Feature chips */
.inv-rgate__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	margin-bottom: 2.5rem;
}
.inv-rgate__chip {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.8rem;
	font-weight: 600;
	color: rgba(255,255,255,0.7);
	background: rgba(255,255,255,0.06);
	padding: 7px 14px;
	border-radius: 100px;
}

/* CTAs */
.inv-rgate__ctas {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	max-width: 320px;
}
.inv-rgate__btn-join {
	display: block;
	width: 100%;
	padding: 15px 24px;
	background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
	color: #080d1a;
	font-family: Rajdhani, sans-serif;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 12px;
	box-shadow: 0 0 30px rgba(245,158,11,0.35), 0 4px 16px rgba(0,0,0,0.3);
	transition: box-shadow .25s ease, transform .2s ease;
}
.inv-rgate__btn-join:hover {
	box-shadow: 0 0 48px rgba(245,158,11,0.5), 0 6px 24px rgba(0,0,0,0.3);
	transform: translateY(-2px);
}
.inv-rgate__btn-login {
	display: block;
	width: 100%;
	padding: 12px 24px;
	background: rgba(255,255,255,0.05);
	color: rgba(255,255,255,0.7);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: 12px;
	transition: background .2s ease, color .2s ease;
}
.inv-rgate__btn-login:hover {
	background: rgba(255,255,255,0.1);
	color: #fff;
}

/* ── Research tool itself ── */
.inv-research {
	max-width: 100%;
	margin: 5.5rem auto 2rem;
	padding: 0 1rem;
}

/* ── Compact Header ── */
.inv-research-header {
	margin-bottom: 1rem;
}

.inv-research-header__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.inv-research-breadcrumb {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.4);
	margin-bottom: 0.25rem;
}

.inv-research-breadcrumb a {
	color: #f59e0b;
	text-decoration: none;
}

.inv-research-breadcrumb a:hover {
	text-decoration: underline;
}

.inv-research__title {
	font-family: var(--font-display, 'Rajdhani', sans-serif);
	font-size: 1.4rem;
	font-weight: 800;
	color: #fff;
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

/* ── Toolbar ── */
.inv-research-toolbar {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	flex-wrap: wrap;
}

/* ── Total Stats Bar ── */
.inv-research-stats {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 16px;
	background: linear-gradient(135deg, rgba(34, 197, 94, 0.06), rgba(59, 130, 246, 0.06));
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 8px;
	margin: 0 16px 8px;
	flex-wrap: wrap;
	font-size: 0.74rem;
	font-weight: 600;
}

.inv-stat {
	display: flex;
	align-items: center;
	gap: 3px;
	color: rgba(255, 255, 255, 0.7);
}

.inv-stat--label {
	color: rgba(255, 255, 255, 0.4);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: 0.65rem;
	margin-right: 4px;
}

.inv-stat-icon {
	width: 16px;
	height: 16px;
	object-fit: contain;
}

#inv-stat-food-val   { color: #a3e635; }
#inv-stat-wood-val   { color: #c08b5c; }
#inv-stat-stone-val  { color: #94a3b8; }
#inv-stat-gold-val   { color: #fbbf24; }
#inv-stat-torches-val { color: #fb923c; }
#inv-stat-time-val   { color: #60a5fa; }
#inv-stat-power-val  { color: #c084fc; }

@media (max-width: 640px) {
	.inv-research-stats { gap: 8px; padding: 6px 10px; font-size: 0.68rem; }
	.inv-stat-icon { width: 14px; height: 14px; }
}

.inv-view-btn {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 6px;
	color: rgba(255, 255, 255, 0.6);
	font-size: 0.72rem;
	font-weight: 600;
	padding: 0.35rem 0.7rem;
	cursor: pointer;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.inv-view-btn svg {
	width: 14px;
	height: 14px;
}

.inv-view-btn:hover {
	background: rgba(245, 158, 11, 0.08);
	border-color: rgba(245, 158, 11, 0.25);
	color: #f59e0b;
}

/* ── Research Speed Input ── */
.inv-speed-input-wrap {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	font-size: 0.72rem;
}

.inv-speed-label {
	color: rgba(255, 255, 255, 0.5);
	font-weight: 600;
	white-space: nowrap;
}

.inv-speed-field {
	display: flex;
	align-items: center;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 6px;
	padding: 2px 4px;
}

.inv-speed-input {
	width: 52px;
	background: transparent;
	border: none;
	color: #f59e0b;
	font-size: 0.75rem;
	font-weight: 700;
	text-align: right;
	outline: none;
	-moz-appearance: textfield;
}
.inv-speed-input::-webkit-inner-spin-button,
.inv-speed-input::-webkit-outer-spin-button {
	-webkit-appearance: none;
}

.inv-stepper-btn {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: rgba(255, 255, 255, 0.6);
	border-radius: 4px;
	width: 22px;
	height: 22px;
	font-size: 0.8rem;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
	flex-shrink: 0;
	padding: 0;
	line-height: 1;
}
.inv-stepper-btn:hover {
	background: rgba(245, 158, 11, 0.15);
	color: #f59e0b;
	border-color: rgba(245, 158, 11, 0.3);
}

.inv-speed-pct {
	color: rgba(255, 255, 255, 0.4);
	font-weight: 600;
	font-size: 0.72rem;
}

.inv-speed-save-main {
	background: rgba(34, 197, 94, 0.15);
	border: 1px solid rgba(34, 197, 94, 0.3);
	color: #22c55e;
	border-radius: 6px;
	padding: 4px 12px;
	font-size: 0.72rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s;
	white-space: nowrap;
}
.inv-speed-save-main:hover {
	background: rgba(34, 197, 94, 0.25);
}

.inv-speed-save {
	background: rgba(34, 197, 94, 0.15);
	border: 1px solid rgba(34, 197, 94, 0.3);
	color: #22c55e;
	border-radius: 4px;
	padding: 2px 6px;
	font-size: 0.7rem;
	font-weight: 700;
	cursor: pointer;
	margin-left: 4px;
	transition: background 0.15s;
}
.inv-speed-save:hover {
	background: rgba(34, 197, 94, 0.25);
}

@media (max-width: 640px) {
	.inv-research-toolbar { flex-wrap: wrap; }
	.inv-speed-input-wrap { margin-left: 0; width: 100%; justify-content: center; }
}

.inv-view-btn--active {
	background: rgba(245, 158, 11, 0.14);
	border-color: #f59e0b;
	color: #f59e0b;
}

.inv-research-search {
	min-width: 140px;
	max-width: 180px;
}

.inv-research-search input {
	width: 100%;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 6px;
	color: #fff;
	padding: 0.35rem 0.6rem;
	font-size: 0.78rem;
	outline: none;
	transition: border-color 0.2s;
}

.inv-research-search input:focus {
	border-color: #f59e0b;
}

.inv-research-reset-btn {
	background: rgba(239, 68, 68, 0.08);
	border: 1px solid rgba(239, 68, 68, 0.2);
	border-radius: 6px;
	color: rgba(239, 68, 68, 0.7);
	font-size: 0.72rem;
	font-weight: 600;
	padding: 0.35rem 0.7rem;
	cursor: pointer;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.inv-research-reset-btn:hover {
	background: rgba(239, 68, 68, 0.15);
	border-color: rgba(239, 68, 68, 0.4);
	color: #ef4444;
}

/* =============================================================================
   Main Layout: Sidebar + Content
   ============================================================================= */

.inv-research-main {
	display: flex;
	gap: 0;
	min-height: 78vh;
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 12px;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.15);
}

/* ── Category Sidebar ── */
.inv-research-sidebar {
	width: 100px;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1.25rem;
	padding: 1.25rem 0.5rem;
	background:
		linear-gradient(180deg, rgba(10, 5, 15, 0.95) 0%, rgba(5, 3, 10, 0.98) 100%);
	border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.inv-research-sidebar__cat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	cursor: pointer;
	background: none;
	border: none;
	padding: 0.6rem;
	border-radius: 12px;
	transition: all 0.3s;
	opacity: 0.55;
}

.inv-research-sidebar__cat:hover {
	opacity: 0.85;
}

.inv-research-sidebar__cat--active {
	opacity: 1;
}

.inv-research-sidebar__icon {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	background: radial-gradient(circle at 40% 35%, rgba(40, 20, 30, 0.8), rgba(15, 8, 12, 0.95));
	transition: all 0.3s;
	position: relative;
}

/* Progress ring */
.inv-research-sidebar__ring {
	position: absolute;
	inset: -3px;
	width: calc(100% + 6px);
	height: calc(100% + 6px);
	transform: rotate(-90deg);
	pointer-events: none;
}

.inv-research-sidebar__ring-bg {
	fill: none;
	stroke: rgba(255, 255, 255, 0.1);
	stroke-width: 3;
}

.inv-research-sidebar__ring-fill {
	fill: none;
	stroke: var(--cat-color, #f59e0b);
	stroke-width: 3;
	stroke-linecap: round;
	stroke-dasharray: 207.35;
	stroke-dashoffset: 207.35;
	transition: stroke-dashoffset 0.6s ease;
}

.inv-research-sidebar__icon-img {
	width: 64px;
	height: 64px;
	object-fit: contain;
	opacity: 0.65;
	transition: opacity 0.3s;
}

.inv-research-sidebar__cat--active .inv-research-sidebar__icon {
	border-color: var(--cat-color);
	box-shadow:
		0 0 15px color-mix(in srgb, var(--cat-color) 40%, transparent),
		0 0 30px color-mix(in srgb, var(--cat-color) 15%, transparent),
		0 0 0 3px color-mix(in srgb, var(--cat-color) 10%, transparent);
}

.inv-research-sidebar__cat--active .inv-research-sidebar__icon-img {
	opacity: 1;
}

.inv-research-sidebar__cat:hover .inv-research-sidebar__icon {
	border-color: color-mix(in srgb, var(--cat-color) 60%, transparent);
}

.inv-research-sidebar__label {
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.62rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: rgba(255, 255, 255, 0.45);
	transition: color 0.3s;
}

.inv-research-sidebar__cat--active .inv-research-sidebar__label {
	color: var(--cat-color);
}

.inv-research-sidebar__progress {
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.72rem;
	font-weight: 700;
	color: #22c55e;
	opacity: 0;
	transition: opacity 0.3s;
}

.inv-research-sidebar__cat--active .inv-research-sidebar__progress {
	opacity: 1;
}

/* ── Content Area ── */
.inv-research-content {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

/* ── Calculator Panel (collapsible) ── */
.inv-research-calculator {
	background: rgba(255, 255, 255, 0.04);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	padding: 1.25rem;
}

.inv-research-calculator__title {
	font-size: 0.85rem;
	font-weight: 700;
	color: #f59e0b;
	margin: 0 0 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.inv-research-calculator__form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: flex-end;
}

.inv-research-calculator__field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	flex: 1;
	min-width: 120px;
}

.inv-research-calculator__field label {
	font-size: 0.68rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.5);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.inv-research-calculator__field select,
.inv-research-calculator__field input {
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 6px;
	color: #fff;
	padding: 0.4rem 0.6rem;
	font-size: 0.82rem;
	outline: none;
	transition: border-color 0.2s;
}

.inv-research-calculator__field select:focus,
.inv-research-calculator__field input:focus {
	border-color: #f59e0b;
}

.inv-research-calculator__field select option {
	background: #1a1a2e;
	color: #fff;
}

.inv-research-calculator__levels {
	display: flex;
	align-items: flex-end;
	gap: 0.5rem;
	flex: 1;
	min-width: 200px;
}

.inv-research-calculator__levels .inv-research-calculator__field {
	flex: 1;
	min-width: 70px;
}

.inv-research-calculator__arrow {
	color: rgba(255, 255, 255, 0.3);
	font-size: 1rem;
	padding-bottom: 0.4rem;
}

.inv-research-calculator__btn {
	background: #f59e0b;
	color: #000;
	border: none;
	border-radius: 6px;
	padding: 0.45rem 1.2rem;
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	cursor: pointer;
	transition: opacity 0.15s;
	white-space: nowrap;
}

.inv-research-calculator__btn:hover {
	opacity: 0.85;
}

.inv-research-calculator__result {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.inv-calc-res-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	gap: 0.6rem;
}

.inv-calc-res-item {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 0.6rem;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.2);
	text-align: center;
}

.inv-calc-res-label {
	font-size: 0.65rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: rgba(255, 255, 255, 0.45);
}

.inv-calc-res-value {
	font-size: 0.95rem;
	font-weight: 700;
	color: #fff;
	font-variant-numeric: tabular-nums;
}

.inv-calc-res-item--food   .inv-calc-res-value { color: #a3e635; }
.inv-calc-res-item--wood   .inv-calc-res-value { color: #c08b5c; }
.inv-calc-res-item--stone  .inv-calc-res-value { color: #94a3b8; }
.inv-calc-res-item--gold   .inv-calc-res-value { color: #fbbf24; }
.inv-calc-res-item--torches .inv-calc-res-value { color: #fb923c; }
.inv-calc-res-item--time   .inv-calc-res-value { color: #60a5fa; }
.inv-calc-res-item--power  .inv-calc-res-value { color: #c084fc; }

.inv-calc-res-icon {
	width: 18px;
	height: 18px;
	object-fit: contain;
	vertical-align: middle;
	margin-right: 4px;
	filter: drop-shadow(0 0 2px rgba(251, 146, 60, 0.4));
}

.inv-table-res-icon {
	width: 14px;
	height: 14px;
	object-fit: contain;
	vertical-align: middle;
	margin-right: 2px;
}

.inv-torch-val {
	color: #fb923c;
}

/* =============================================================================
   Research Items List (secondary view)
   ============================================================================= */

.inv-research-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1rem;
	overflow-y: auto;
	flex: 1;
}

.inv-research-empty {
	color: rgba(255, 255, 255, 0.4);
	text-align: center;
	padding: 2rem 0;
}

.inv-research-item--locked {
	position: relative !important;
	overflow: hidden;
}
.inv-research-item--locked .inv-research-item__header,
.inv-research-item--locked .inv-research-item__body {
	filter: blur(2px) saturate(0.5);
	pointer-events: none;
	user-select: none;
}

.inv-research-item {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.07);
	border-radius: 10px;
	overflow: hidden;
	transition: border-color 0.2s;
}

.inv-research-item:hover {
	border-color: rgba(255, 255, 255, 0.12);
}

.inv-research-item__header {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	cursor: pointer;
	user-select: none;
}

.inv-research-item__header:focus-visible {
	outline: 2px solid #f59e0b;
	outline-offset: -2px;
	border-radius: 10px;
}

.inv-research-item__icon {
	width: 32px;
	height: 32px;
	border-radius: 6px;
	object-fit: cover;
	flex-shrink: 0;
}

.inv-research-item__icon--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(245, 158, 11, 0.1);
	color: #f59e0b;
}

.inv-research-item__icon--placeholder svg {
	width: 18px;
	height: 18px;
}

.inv-research-item__info {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	flex: 1;
	min-width: 0;
}

.inv-research-item__name {
	font-size: 0.88rem;
	font-weight: 600;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.inv-research-item__meta {
	font-size: 0.7rem;
	color: rgba(255, 255, 255, 0.4);
}

.inv-research-item__chevron {
	width: 14px;
	height: 14px;
	color: rgba(255, 255, 255, 0.3);
	flex-shrink: 0;
	transition: transform 0.2s;
}

.inv-research-item--open .inv-research-item__chevron {
	transform: rotate(180deg);
}

/* Level badge in header */
.inv-research-item__lvl-badge {
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.68rem;
	font-weight: 700;
	color: rgba(200, 160, 80, 0.7);
	background: rgba(200, 160, 80, 0.08);
	padding: 2px 7px;
	border-radius: 4px;
	flex-shrink: 0;
	white-space: nowrap;
}

/* Progress states */
.inv-research-item--complete {
	border-color: rgba(34, 197, 94, 0.25);
}

.inv-research-item--complete .inv-research-item__lvl-badge {
	color: #22c55e;
	background: rgba(34, 197, 94, 0.12);
}

.inv-research-item--in-progress {
	border-color: rgba(245, 158, 11, 0.2);
}

.inv-research-item--in-progress .inv-research-item__lvl-badge {
	color: #f59e0b;
	background: rgba(245, 158, 11, 0.12);
}

/* Level Details Table */
.inv-research-item__body {
	padding: 0 1rem 1rem;
}

.inv-research-levels-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.inv-research-levels-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.78rem;
	white-space: nowrap;
}

.inv-research-levels-table th {
	text-align: left;
	font-size: 0.65rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: rgba(255, 255, 255, 0.4);
	padding: 0.45rem 0.5rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.inv-research-levels-table td {
	padding: 0.4rem 0.5rem;
	color: rgba(255, 255, 255, 0.8);
	border-bottom: 1px solid rgba(255, 255, 255, 0.04);
	font-variant-numeric: tabular-nums;
}

.inv-research-levels-table tr:last-child td {
	border-bottom: none;
}

.inv-research-levels-table tbody tr:hover td {
	background: rgba(245, 158, 11, 0.04);
}

.inv-research-no-levels {
	color: rgba(255, 255, 255, 0.35);
	font-size: 0.8rem;
	padding: 0.5rem 0;
}

/* Level picker inside expanded body */
.inv-research-item__progress {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0.5rem 0;
	margin-bottom: 0.6rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.inv-research-item__progress-label {
	font-size: 0.7rem;
	color: rgba(255, 255, 255, 0.45);
	font-weight: 500;
}

.inv-research-item__progress-max {
	font-size: 0.7rem;
	color: rgba(255, 255, 255, 0.35);
}

.inv-research-item__lvl-btn {
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.04);
	color: #c8cce8;
	font-size: 1rem;
	cursor: pointer;
	transition: all 0.15s;
	line-height: 1;
}

.inv-research-item__lvl-btn:hover {
	background: rgba(245, 158, 11, 0.15);
	border-color: rgba(245, 158, 11, 0.4);
	color: #f59e0b;
}

.inv-research-item__lvl-val {
	font-family: 'Rajdhani', sans-serif;
	font-size: 1rem;
	font-weight: 700;
	color: #f59e0b;
	min-width: 18px;
	text-align: center;
}

.inv-research-list--loading {
	opacity: 0.5;
	pointer-events: none;
}

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

@media (max-width: 768px) {
	.inv-research {
		margin-top: 4.5rem;
		padding: 0 0.5rem;
	}

	.inv-research-header__top {
		flex-direction: column;
		gap: 0.5rem;
	}

	.inv-research__title {
		font-size: 1.1rem;
	}

	.inv-research-toolbar {
		width: 100%;
		overflow-x: auto;
	}

	.inv-research-main {
		flex-direction: column;
		min-height: auto;
	}

	.inv-research-sidebar {
		width: 100%;
		flex-direction: row;
		justify-content: center;
		border-right: none;
		border-bottom: 1px solid rgba(255, 255, 255, 0.06);
		padding: 0.75rem 0.5rem;
		gap: 0.75rem;
	}

	.inv-research-sidebar__icon {
		width: 46px;
		height: 46px;
	}

	.inv-research-sidebar__icon-img {
		width: 46px;
		height: 46px;
	}

	.inv-research-sidebar__label {
		font-size: 0.55rem;
	}

	.inv-research-sidebar__progress {
		font-size: 0.6rem;
	}

	.inv-research-calculator__form {
		flex-direction: column;
	}

	.inv-research-calculator__levels {
		width: 100%;
	}

	.inv-research-calculator__btn {
		width: 100%;
	}

	.inv-calc-res-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.inv-research-search {
		min-width: 0;
		max-width: none;
		flex: 1;
	}

	.inv-research-item__lvl-badge {
		font-size: 0.6rem;
	}
}
