/* RAVAGED library shell v2 — dark fantasy ember */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600&display=swap');

:root {
	--bg-deep: #0a0908;
	--bg-panel: rgba(14, 12, 11, 0.88);
	--bg-content: rgba(18, 15, 13, 0.92);
	--ember: #c23a1a;
	--ember-hot: #e85a2a;
	--ash: #9a9188;
	--text: #efe8df;
	--text-muted: #b7aea3;
	--line: rgba(194, 58, 26, 0.35);
	--shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
	--radius: 10px;
	--font-display: 'Cinzel', 'Times New Roman', serif;
	--font-body: 'Source Serif 4', Georgia, serif;
	--wrap: min(1100px, calc(100% - 28px));
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
	margin: 0;
	padding: 0;
	min-height: 100%;
	background: var(--bg-deep);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.55;
}

body.lib-body {
	background:
		linear-gradient(180deg, rgba(10, 9, 8, 0.55) 0%, rgba(10, 9, 8, 0.82) 55%, #0a0908 100%),
		url('/img/landing/hero_bg.jpg?v=20260808') center top / cover no-repeat fixed;
}

a {
	color: var(--ember-hot);
	text-decoration: none;
	font-weight: 600;
	transition: color .2s ease;
}
a:hover { color: #ff7a45; }

img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }

.lib-shell {
	width: var(--wrap);
	margin: 0 auto;
	padding: 28px 0 40px;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.lib-header {
	text-align: center;
	margin-bottom: 22px;
	animation: libRise .6s ease both;
}
.lib-brand {
	display: inline-block;
}
.lib-brand img {
	width: min(280px, 70vw);
	filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.6));
}
.lib-title {
	margin: 14px 0 0;
	font-family: var(--font-display);
	font-size: clamp(22px, 3.2vw, 32px);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text);
}
.lib-title a { color: inherit; font-weight: inherit; }
.lib-title a:hover { color: var(--ember-hot); }
.lib-sub {
	margin: 8px 0 0;
	color: var(--ash);
	font-size: 14px;
}
.lib-home-link {
	display: inline-block;
	margin-top: 12px;
	font-family: var(--font-display);
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--text-muted);
	border-bottom: 1px solid transparent;
}
.lib-home-link:hover {
	color: var(--ember-hot);
	border-bottom-color: var(--ember);
}

.lib-layout {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 20px;
	align-items: start;
	flex: 1;
	animation: libRise .75s ease both;
}

.lib-nav {
	background: var(--bg-panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 18px 14px 20px;
	position: sticky;
	top: 16px;
}
.lib-nav h2 {
	margin: 0 0 14px;
	text-align: center;
	font-family: var(--font-display);
	font-size: 13px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--text);
}
.lib-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.lib-nav a.menu,
a.menu {
	display: block;
	padding: 9px 12px;
	border-radius: 6px;
	font-family: var(--font-display);
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-weight: 500;
	color: var(--text-muted);
}
.lib-nav a.menu:hover,
a.menu:hover {
	color: var(--text);
	background: rgba(194, 58, 26, 0.12);
	text-decoration: none;
}

.lib-content {
	background: var(--bg-content);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 28px 26px 32px;
	min-width: 0;
	color: var(--text);
}

.lib-content .header,
.lib-content p.header,
.lib-content b.header {
	display: block;
	font-family: var(--font-display);
	font-size: 1.15rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--text);
	margin: 0 0 14px;
}

.lib-content p,
.lib-content td,
.lib-content th,
.lib-content li,
.lib-content .text {
	color: var(--text-muted);
	font-size: 15px;
	line-height: 1.55;
}

.lib-content p { margin: 0 0 1em; }

.lib-content a,
.lib-content a.article_href,
.lib-content a.rubric_href,
.lib-content a.nav_href,
a.article_href,
a.rubric_href,
a.nav_href,
.nav_href {
	color: var(--ember-hot);
	font-weight: 600;
}
.lib-content a:hover,
a.article_href:hover,
a.rubric_href:hover,
a.nav_href:hover {
	color: #ff7a45;
	text-decoration: underline;
}

.article_anons {
	color: var(--ash);
	font-size: 13px;
	font-weight: 400;
}

.lib-content hr {
	border: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	margin: 16px 0;
}

.lib-content table {
	width: 100%;
	border-collapse: collapse;
}
.lib-content td,
.lib-content th {
	padding: 6px 4px;
	vertical-align: top;
}

.lib-content font[color="red"],
.lib-content font[color="#FF0000"] {
	color: #ff8a70 !important;
}

.lib-content ul.item-description-list {
	margin: 0.4em 0 0.8em 1.2em;
	padding: 0;
	list-style: disc;
}

.table-list {
	width: 100%;
	border-collapse: collapse;
}
.table-list thead th {
	background: rgba(194, 58, 26, 0.18);
	color: var(--text);
	font-family: var(--font-display);
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 10px 8px;
}
.table-list th,
.table-list td {
	padding: 8px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	color: var(--text-muted);
}
.table-list tr.even,
.table-list tr.even td {
	background: rgba(255, 255, 255, 0.03);
}
.table-list tbody tr:hover td {
	background: rgba(194, 58, 26, 0.1);
	color: var(--text);
}

.lib-intro h1 {
	margin: 0 0 14px;
	font-family: var(--font-display);
	font-size: clamp(20px, 2.4vw, 26px);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text);
}
.lib-intro .lead {
	color: var(--text);
	font-size: 17px;
}
.lib-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 8px;
	min-width: 200px;
	height: 44px;
	padding: 0 20px;
	border-radius: 8px;
	font-family: var(--font-display);
	font-size: 13px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #fff !important;
	background: linear-gradient(180deg, var(--ember-hot), #7a2412);
	box-shadow: 0 8px 22px rgba(122, 36, 18, 0.45);
	text-decoration: none !important;
}
.lib-cta:hover {
	filter: brightness(1.08);
	color: #fff !important;
}

.lib-footer {
	margin-top: 28px;
	padding-top: 18px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	text-align: center;
	color: var(--ash);
	font-size: 13px;
}
.lib-footer a {
	color: var(--text-muted);
	font-weight: 500;
}
.lib-footer a:hover { color: var(--ember-hot); }

@keyframes libRise {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
	body.lib-body { background-attachment: scroll; }
	.lib-layout {
		grid-template-columns: 1fr;
	}
	.lib-nav {
		position: static;
	}
	.lib-nav ul {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 4px;
	}
	.lib-content { padding: 20px 16px 24px; }
}

@media (max-width: 480px) {
	.lib-nav ul { grid-template-columns: 1fr; }
}
