/* ==========================================================================
   Atlas Truyền Thuyết (urbanlegends.wiki) — Campfire Folklore Atlas Stylesheet
   Bản sắc: Đêm rừng xanh than + giấy bản đồ cổ + ánh lửa cam + con dấu phán quyết.
   0 request ngoài domain · Font tự host OFL (Lora + IBM Plex Sans) + Nhật hệ thống (Noto Sans JP / Meiryo).
   ========================================================================== */

@font-face {
	font-family: 'Lora';
	font-style: normal;
	font-weight: 600 700;
	font-display: swap;
	src: url('../fonts/lora-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Lora';
	font-style: normal;
	font-weight: 600 700;
	font-display: swap;
	src: url('../fonts/lora-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'IBM Plex Sans';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('../fonts/ibm-plex-sans-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'IBM Plex Sans';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('../fonts/ibm-plex-sans-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--night-deep: #0f1a1c;
	--night-forest: #162629;
	--night-border: #2c4548;
	--parchment: #f5efe1;
	--parchment-deep: #eadfc8;
	--parchment-border: #bca986;
	--parchment-border-strong: #6d5a3b;
	--ink: #1b1712;
	--ink-muted: #4d4335;
	--ink-light: #f5efe1;
	--ink-light-muted: #c8d7d6;
	--ember: #f08a3c;
	--ember-dark: #a63d08;
	--verdict-true: #14633a;
	--verdict-false: #a81b1b;
	--verdict-mixed: #8c4800;
	--verdict-unverified: #493e6e;
	--font-serif: 'Lora', 'Noto Serif JP', 'Yu Mincho', Georgia, serif;
	--font-sans: 'IBM Plex Sans', 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', 'Yu Gothic', system-ui, sans-serif;
	--radius: 6px;
	--shadow-card: 0 2px 0 rgba(27, 23, 18, 0.12), 0 8px 22px rgba(15, 26, 28, 0.1);
}

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

html {
	scroll-behavior: smooth;
	overflow-x: clip;
}

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.68;
	color: var(--ink);
	background-color: var(--parchment);
	background-image:
		linear-gradient(rgba(245, 239, 225, 0.72), rgba(245, 239, 225, 0.72)),
		url('../img/bg-parchment-tile.webp');
	background-repeat: repeat;
	background-size: auto, 384px 384px;
	overflow-x: clip;
}

body.att-lang-ja {
	font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', 'Yu Gothic', 'IBM Plex Sans', sans-serif;
}

img, svg {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--ember-dark);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 2px;
}

a:hover, a:focus-visible {
	color: var(--ink);
}

:focus-visible {
	outline: 3px solid var(--ember);
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 1000;
	width: auto;
	height: auto;
	clip: auto;
	padding: 12px 16px;
	background: var(--night-deep);
	color: var(--ink-light);
	font-weight: 700;
	text-decoration: none;
}

.container {
	width: 100%;
	max-width: 1180px;
	margin-inline: auto;
	padding-inline: 16px;
}

.container-narrow {
	max-width: 820px;
}

/* ---------- Header: Đêm rừng lửa trại ---------- */
.site-header {
	background: var(--night-deep);
	color: var(--ink-light);
	border-bottom: 3px solid #30494b;
}

.campfire-strip {
	background: #0a1214;
	border-bottom: 1px solid var(--night-border);
	font-size: 0.8rem;
}

.campfire-strip-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 44px;
	flex-wrap: wrap;
	padding-block: 4px;
}

.strip-coords {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--ink-light-muted);
	font-weight: 600;
	letter-spacing: 0.04em;
}

.ember-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--ember);
	box-shadow: 0 0 8px rgba(240, 138, 60, 0.8);
	flex-shrink: 0;
	animation: att-ember-glow 2.4s ease-in-out infinite;
}

@keyframes att-ember-glow {
	0%, 100% { opacity: 0.98; }
	50% { opacity: 0.62; }
}

.strip-region-tag {
	padding: 2px 7px;
	background: var(--night-forest);
	border: 1px solid #416164;
	border-radius: 3px;
	color: var(--ember);
	font-weight: 700;
}

.strip-tools {
	display: flex;
	align-items: center;
	gap: 10px;
}

.strip-random {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 10px;
	color: var(--ember);
	font-weight: 700;
	text-decoration: none;
}

.strip-random:hover, .strip-random:focus-visible {
	color: #ffffff;
	text-decoration: underline;
}

/* Language Switcher */
.atlas-lang-switcher {
	position: relative;
}

.atlas-lang-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	min-width: 60px;
	padding: 0 12px;
	background: var(--night-forest);
	color: var(--ink-light);
	border: 1px solid #45686b;
	border-radius: var(--radius);
	font-size: 0.82rem;
	font-weight: 700;
	cursor: pointer;
}

.atlas-lang-btn:hover, .atlas-lang-btn:focus-visible {
	border-color: var(--ember);
}

.atlas-lang-menu {
	position: absolute;
	right: 0;
	top: calc(100% + 4px);
	z-index: 60;
	min-width: 200px;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: var(--parchment);
	color: var(--ink);
	border: 2px solid var(--parchment-border-strong);
	border-radius: var(--radius);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
}

.atlas-lang-menu[hidden] {
	display: none;
}

.atlas-lang-menu a {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 8px 10px;
	color: var(--ink);
	text-decoration: none;
	border-radius: 4px;
	font-size: 0.9rem;
}

.atlas-lang-menu a:hover, .atlas-lang-menu a[aria-current="true"] {
	background: var(--parchment-deep);
	font-weight: 700;
}

.atlas-lang-tag {
	padding: 2px 6px;
	background: var(--night-deep);
	color: var(--ember);
	border-radius: 3px;
	font-size: 0.74rem;
	font-weight: 700;
}

.atlas-header-bar {
	padding-block: 14px;
}

.atlas-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.site-brand {
	min-width: 0;
	flex: 1 1 auto;
}

.brand-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--ink-light);
	text-decoration: none;
	min-height: 44px;
	max-width: 100%;
}

.brand-link svg,
.brand-link img,
.brand-compass-svg,
.att-brand-img {
	flex-shrink: 0;
}

.att-brand-img {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	object-fit: cover;
	border: 1.5px solid var(--ember);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.brand-link:hover, .brand-link:focus-visible {
	color: var(--ember);
}

.brand-copy {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.brand-title {
	font-family: var(--font-serif);
	font-size: clamp(1.08rem, 2.5vw, 1.55rem);
	font-weight: 700;
	line-height: 1.15;
}

.brand-sub {
	font-size: 0.72rem;
	letter-spacing: 0.09em;
	color: var(--ink-light-muted);
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.btn-atlas {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 44px;
	padding: 0 14px;
	background: var(--night-forest);
	color: var(--ink-light);
	border: 1px solid #486b6e;
	border-radius: var(--radius);
	font-size: 0.86rem;
	font-weight: 700;
	white-space: nowrap;
	flex-shrink: 0;
	cursor: pointer;
}

.btn-atlas:hover, .btn-atlas:focus-visible {
	border-color: var(--ember);
	color: var(--ember);
}

.atlas-search-drawer {
	background: #0a1214;
	border-top: 1px solid var(--night-border);
	padding-block: 12px;
}

.atlas-search-drawer[hidden] {
	display: none;
}

.atlas-search-form {
	display: flex;
	gap: 8px;
	max-width: 680px;
}

.atlas-search-input {
	flex: 1;
	min-width: 0;
	min-height: 44px;
	padding: 8px 12px;
	background: var(--parchment);
	color: var(--ink);
	border: 2px solid var(--parchment-border-strong);
	border-radius: var(--radius);
	font-size: 0.95rem;
}

.atlas-search-submit {
	min-height: 44px;
	padding: 0 18px;
	background: var(--ember);
	color: #160c04;
	border: 2px solid #c2641e;
	border-radius: var(--radius);
	font-weight: 700;
	cursor: pointer;
}

.atlas-search-submit:hover {
	background: #f7a25c;
}

.atlas-nav {
	background: var(--night-forest);
	border-top: 1px solid var(--night-border);
}

.atlas-nav-list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 6px 0;
}

.atlas-nav-list a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 14px;
	color: var(--ink-light);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.92rem;
	border-radius: var(--radius);
}

.atlas-nav-list a:hover, .atlas-nav-list a:focus-visible {
	background: #233a3e;
	color: var(--ember);
}

/* ---------- Buttons ---------- */
.btn-ember-primary, .btn-ember-ghost {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 44px;
	padding: 10px 18px;
	border-radius: var(--radius);
	font-weight: 700;
	font-size: 0.92rem;
	text-decoration: none;
}

.btn-ember-primary {
	background: var(--ember);
	color: #160c04;
	border: 2px solid #f7a863;
}

.btn-ember-primary:hover, .btn-ember-primary:focus-visible {
	background: #f7a863;
	color: #120802;
}

.btn-ember-ghost {
	background: transparent;
	color: var(--ink-light);
	border: 2px solid #598084;
}

.btn-ember-ghost:hover, .btn-ember-ghost:focus-visible {
	border-color: var(--ember);
	color: var(--ember);
}

/* ---------- Hero: Đêm rừng + Bản đồ thế giới cổ Qwen-Image ---------- */
.hero-atlas-band {
	position: relative;
	overflow: hidden;
	background-color: var(--night-deep);
	color: var(--ink-light);
	padding-block: 34px 38px;
	border-bottom: 4px solid var(--parchment-border-strong);
}

.hero-atlas-backdrop {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.hero-atlas-bg-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	opacity: 0.42;
}

.hero-atlas-scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		96deg,
		rgba(11, 20, 22, 0.90) 0%,
		rgba(15, 26, 28, 0.78) 54%,
		rgba(15, 26, 28, 0.68) 100%
	);
}

.hero-atlas-grid {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: 0.92fr 1.08fr;
	gap: 28px;
	align-items: center;
}

.dept-thumb-wrap {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 4px;
	border: 1px solid var(--parchment-border);
	background: var(--night-deep);
	margin-bottom: 12px;
}

.dept-thumb {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.archive-header-visual {
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
	align-items: center;
}

.archive-dept-photo {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--radius);
	border: 1.5px solid var(--parchment-border-strong);
	background: var(--night-deep);
}

.single-visual-frame {
	margin: 0 0 22px;
	padding: 8px;
	background: var(--parchment);
	border: 1.5px solid var(--parchment-border-strong);
	border-radius: var(--radius);
}

.single-hero-img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	object-fit: cover;
	border-radius: 3px;
}

.single-visual-frame.is-portrait {
	background: var(--night-deep);
	border-color: var(--parchment-border-strong);
}

.single-visual-stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-radius: 3px;
	background: var(--night-deep);
	padding: 16px 12px;
	min-height: 320px;
}

.single-visual-stage::before {
	content: "";
	position: absolute;
	inset: -24px;
	background-image: var(--hero-bg);
	background-size: cover;
	background-position: center;
	filter: blur(22px) brightness(0.42) saturate(0.85);
	transform: scale(1.12);
	z-index: 0;
}

.single-visual-stage::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at center, rgba(15, 26, 28, 0.14) 0%, rgba(10, 18, 20, 0.62) 100%);
	z-index: 0;
}

.single-hero-img.is-portrait {
	position: relative;
	z-index: 1;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 76vh;
	aspect-ratio: auto;
	object-fit: contain;
	margin: 0 auto;
	border: 1.5px solid rgba(244, 232, 209, 0.36);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

.single-visual-frame.is-portrait .single-visual-caption {
	color: #d7cec0;
}

.single-visual-caption {
	margin-top: 8px;
	font-size: 0.82rem;
	color: var(--ink-muted);
}

@media (min-width: 820px) {
	.archive-header-visual {
		grid-template-columns: minmax(0, 1.45fr) minmax(240px, 320px);
	}
}

.hero-ember-kicker, .section-kicker-ember {
	margin: 0 0 8px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	color: #ffb36b;
	text-transform: uppercase;
}

.hero-atlas-title {
	margin: 0 0 12px;
	font-family: var(--font-serif);
	font-size: clamp(1.75rem, 3.4vw, 2.55rem);
	line-height: 1.18;
	color: var(--ink-light);
}

.hero-atlas-lead {
	margin: 0 0 20px;
	color: var(--ink-light-muted);
	font-size: 1rem;
}

.hero-atlas-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 18px;
}

.region-pills-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.region-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 0 12px;
	background: #1a2d30;
	color: var(--ink-light);
	border: 1px solid #3f6063;
	border-radius: 999px;
	font-size: 0.84rem;
	font-weight: 600;
	text-decoration: none;
}

.region-pill:hover, .region-pill.is-active {
	background: #2b4548;
	border-color: var(--ember);
	color: #ffffff;
}

.rp-code {
	color: #ffb36b;
	font-weight: 700;
	font-size: 0.76rem;
}

/* World Map Frame (Bản đồ thế giới giấy da cổ Qwen + lớp ghim tương tác HTML) */
.world-map-frame {
	background: #0c1618;
	border: 2px solid #486366;
	border-radius: var(--radius);
	padding: 10px;
	box-shadow: 0 14px 32px rgba(0, 0, 0, 0.42);
}

.world-map-stage {
	position: relative;
	width: 100%;
	aspect-ratio: 2 / 1;
	overflow: hidden;
	border-radius: 4px;
	background: #0b1416;
}

.world-map-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.world-map-pins {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.map-pin-btn {
	position: absolute;
	transform: translate(-50%, -50%);
	pointer-events: auto;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-height: 28px;
	padding: 3px 8px 3px 6px;
	background: rgba(11, 20, 22, 0.90);
	color: #f5efe1;
	border: 1.5px solid var(--ember);
	border-radius: 999px;
	font-family: var(--font-sans);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.62);
	transition: transform 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.map-pin-btn.pin-above {
	transform: translate(-50%, -68%);
}

.map-pin-btn.pin-below {
	transform: translate(-50%, -26%);
}

.map-pin-btn.pin-left {
	transform: translate(-70%, -50%);
}

.map-pin-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--ember);
	box-shadow: 0 0 0 3px rgba(240, 138, 60, 0.34);
	flex-shrink: 0;
}

.map-pin-btn:hover,
.map-pin-btn:focus-visible,
.map-pin-btn.is-active {
	background: var(--ember);
	color: #160c04;
	border-color: #fff2dc;
	z-index: 4;
}

.map-pin-btn:hover .map-pin-dot,
.map-pin-btn:focus-visible .map-pin-dot,
.map-pin-btn.is-active .map-pin-dot {
	background: #160c04;
	box-shadow: 0 0 0 3px rgba(22, 12, 4, 0.24);
}

.map-attribution {
	margin: 8px 4px 2px;
	font-size: 0.76rem;
	color: var(--ink-light-muted);
	text-align: right;
}

/* ---------- Content Bands (Qwen parchment & nocturnal forest textures) ---------- */
.parchment-band {
	background-color: var(--parchment);
	background-image:
		linear-gradient(rgba(245, 239, 225, 0.74), rgba(245, 239, 225, 0.76)),
		url('../img/bg-parchment-tile.webp');
	background-repeat: repeat;
	background-size: auto, 384px 384px;
	padding-block: 34px;
}

.parchment-page {
	padding-block: 28px 48px;
}

.night-band {
	background-color: var(--night-deep);
	background-image:
		linear-gradient(rgba(11, 20, 22, 0.78), rgba(11, 20, 22, 0.84)),
		url('../img/bg-night-forest.webp');
	background-size: cover;
	background-position: center;
	color: var(--ink-light);
	padding-block: 36px;
	border-top: 3px solid var(--night-border);
	border-bottom: 3px solid var(--night-border);
}

.section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--parchment-border);
}

.section-head-dark {
	border-bottom-color: var(--night-border);
}

.section-kicker, .dossier-kicker {
	margin: 0 0 4px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	color: var(--ember-dark);
	text-transform: uppercase;
}

.night-band .section-kicker,
.section-kicker.section-kicker-ember {
	color: #ffb36b;
}

.section-title {
	margin: 0;
	font-family: var(--font-serif);
	font-size: clamp(1.3rem, 2.6vw, 1.7rem);
	color: var(--ink);
}

.section-title-light {
	color: var(--ink-light);
}

.section-more-link, .section-more-link-light {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 6px;
	font-weight: 700;
	font-size: 0.9rem;
}

.section-more-link-light {
	color: var(--ember);
}

.section-more-link-light:hover {
	color: #ffffff;
}

/* ---------- Legend Cards & Con dấu Phán quyết ---------- */
.legend-grid {
	display: grid;
	gap: 20px;
}

.legend-grid-3 {
	grid-template-columns: repeat(3, 1fr);
}

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

.legend-grid--cols-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.legend-grid--cols-1 {
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 780px) {
	.legend-grid--cols-1 .legend-card {
		display: grid;
		grid-template-columns: minmax(280px, 42%) minmax(0, 1fr);
		column-gap: 24px;
		align-content: start;
	}
	.legend-grid--cols-1 .legend-media-wrap {
		grid-column: 1;
		grid-row: 1 / span 5;
		height: 100%;
		min-height: 240px;
		margin-bottom: 0;
	}
	.legend-grid--cols-1 .legend-card-top,
	.legend-grid--cols-1 .legend-card-title,
	.legend-grid--cols-1 .legend-card-meta,
	.legend-grid--cols-1 .legend-card-excerpt,
	.legend-grid--cols-1 .legend-card-foot {
		grid-column: 2;
	}
	.legend-grid--cols-1 .legend-card-foot {
		align-self: end;
	}
}

.atlas-dept-grid.atlas-dept-grid--cols-1 {
	grid-template-columns: minmax(0, 1fr);
}

.atlas-dept-grid.atlas-dept-grid--cols-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.atlas-dept-grid.atlas-dept-grid--cols-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.legend-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fbf7ed;
	color: var(--ink);
	border: 1.5px solid var(--parchment-border);
	border-top: 4px solid var(--night-forest);
	border-radius: var(--radius);
	padding: 18px;
	box-shadow: var(--shadow-card);
}

.legend-card.verdict-true { border-top-color: var(--verdict-true); }
.legend-card.verdict-false { border-top-color: var(--verdict-false); }
.legend-card.verdict-mixed { border-top-color: var(--verdict-mixed); }
.legend-card.verdict-unverified { border-top-color: var(--verdict-unverified); }

.legend-media-wrap {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: 4px;
	border: 1px solid var(--parchment-border);
	background: var(--night-deep);
	margin-bottom: 12px;
}

.legend-media-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.legend-media-wrap.is-portrait {
	position: relative;
	isolation: isolate;
	background: #0b1416;
}

.legend-media-wrap.is-portrait::before {
	content: "";
	position: absolute;
	inset: -16px;
	background-image: var(--card-bg);
	background-size: cover;
	background-position: 50% 42%;
	filter: blur(18px) brightness(0.42) saturate(0.85);
	transform: scale(1.08);
	z-index: 0;
}

.legend-media-img.is-portrait {
	position: relative;
	z-index: 1;
	object-fit: contain;
	object-position: 50% 25%;
	filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
}

.legend-card:hover .legend-media-img {
	transform: scale(1.03);
}

.legend-card-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 10px;
}

.card-type-pill {
	display: inline-block;
	padding: 3px 9px;
	background: var(--parchment-deep);
	color: var(--ink);
	border: 1px solid var(--parchment-border);
	border-radius: 3px;
	font-size: 0.76rem;
	font-weight: 700;
}

/* Con dấu phán quyết mực đóng nghiêng đặc trưng Fact-Check */
.verdict-stamp {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	padding: 3px 9px;
	border: 2.5px double currentColor;
	border-radius: 4px;
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	transform: rotate(-4deg);
	line-height: 1.15;
	background: rgba(255, 255, 255, 0.72);
}

.verdict-stamp.verdict-true { color: var(--verdict-true); }
.verdict-stamp.verdict-false { color: var(--verdict-false); }
.verdict-stamp.verdict-mixed { color: var(--verdict-mixed); }
.verdict-stamp.verdict-unverified { color: var(--verdict-unverified); }

.verdict-stamp-lg {
	padding: 8px 16px;
	border-width: 3px;
	transform: rotate(-5deg);
}

.stamp-caption {
	font-size: 0.65rem;
	letter-spacing: 0.14em;
}

.stamp-word {
	font-size: 1.05rem;
	font-weight: 700;
}

.legend-card-title {
	margin: 0 0 10px;
	font-family: var(--font-serif);
	font-size: 1.15rem;
	line-height: 1.3;
}

.legend-card-title a {
	color: var(--ink);
	text-decoration: none;
}

.legend-card-title a:hover {
	color: var(--ember-dark);
	text-decoration: underline;
}

.legend-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 10px;
	padding: 8px 10px;
	background: var(--parchment);
	border: 1px solid var(--parchment-border);
	border-radius: 4px;
	font-size: 0.8rem;
}

.legend-card-meta dt {
	font-size: 0.7rem;
	text-transform: uppercase;
	color: var(--ink-muted);
	font-weight: 700;
}

.legend-card-meta dd {
	margin: 0;
	font-weight: 700;
	color: var(--ink);
}

.legend-card-excerpt {
	margin: 0 0 14px;
	font-size: 0.92rem;
	color: var(--ink-muted);
	flex: 1;
}

.legend-card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--parchment-deep);
	font-size: 0.82rem;
}

.card-cat-name {
	color: var(--ink-muted);
	font-weight: 600;
}

.card-open-link {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	font-weight: 700;
	color: var(--ember-dark);
	text-decoration: none;
}

.card-open-link:hover {
	text-decoration: underline;
}

/* ---------- 4 Department Cards ---------- */
.atlas-dept-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

.atlas-dept-card {
	display: flex;
	flex-direction: column;
	padding: 18px;
	background: #fbf7ed;
	color: var(--ink);
	border: 1.5px solid var(--parchment-border);
	border-left: 5px solid var(--ember-dark);
	border-radius: var(--radius);
	text-decoration: none;
	box-shadow: var(--shadow-card);
}

.atlas-dept-card:hover {
	background: #ffffff;
	border-left-color: var(--night-deep);
}

.dept-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
}

.dept-name {
	margin: 0;
	font-family: var(--font-serif);
	font-size: 1.12rem;
}

.dept-count {
	padding: 2px 8px;
	background: var(--night-deep);
	color: var(--ink-light);
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
}

.dept-desc {
	margin: 0;
	font-size: 0.88rem;
	color: var(--ink-muted);
}

/* ---------- Breadcrumbs & Archive Header ---------- */
.att-breadcrumbs {
	margin-bottom: 16px;
	font-size: 0.84rem;
}

.att-breadcrumb-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.att-breadcrumb-list li + li::before {
	content: "›";
	margin-right: 6px;
	color: var(--ink-muted);
}

.archive-header {
	background: #fbf7ed;
	border: 1.5px solid var(--parchment-border);
	border-left: 6px solid var(--night-deep);
	border-radius: var(--radius);
	padding: 24px;
	margin-bottom: 24px;
	box-shadow: var(--shadow-card);
}

.archive-title {
	margin: 0 0 8px;
	font-family: var(--font-serif);
	font-size: clamp(1.5rem, 3vw, 2.2rem);
	line-height: 1.2;
}

.archive-desc {
	color: var(--ink-muted);
	max-width: 72ch;
}

.archive-desc p {
	margin: 0;
}

.sort-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid var(--parchment-deep);
}

.sort-label {
	font-size: 0.84rem;
	font-weight: 700;
	color: var(--ink-muted);
}

.sort-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.sort-pill {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 14px;
	background: var(--parchment);
	color: var(--ink);
	border: 1.5px solid var(--parchment-border-strong);
	border-radius: 999px;
	font-size: 0.86rem;
	font-weight: 700;
	text-decoration: none;
}

.sort-pill.is-active, .sort-pill:hover {
	background: var(--night-deep);
	color: var(--ink-light);
	border-color: var(--night-deep);
}

/* ---------- Single Case Article & Case Profile ---------- */
.single-case-article {
	background: #fbf7ed;
	border: 1.5px solid var(--parchment-border);
	border-radius: var(--radius);
	padding: 28px;
	box-shadow: var(--shadow-card);
}

.single-case-header {
	padding-bottom: 18px;
	margin-bottom: 22px;
	border-bottom: 2px solid var(--parchment-deep);
}

.single-badge-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 10px;
}

.case-cat-badge {
	padding: 3px 10px;
	background: var(--night-deep);
	color: var(--ember);
	border-radius: 3px;
	font-size: 0.78rem;
	font-weight: 700;
}

.case-region-badge, .case-year-badge {
	padding: 3px 10px;
	background: var(--parchment-deep);
	color: var(--ink);
	border: 1px solid var(--parchment-border);
	border-radius: 3px;
	font-size: 0.78rem;
	font-weight: 700;
}

.single-title {
	margin: 0 0 10px;
	font-family: var(--font-serif);
	font-size: clamp(1.55rem, 3.2vw, 2.3rem);
	line-height: 1.2;
}

.single-meta-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	font-size: 0.84rem;
	color: var(--ink-muted);
}

.single-layout-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 280px;
	gap: 28px;
	align-items: start;
}

.single-primary-col,
.single-sidebar-col {
	min-width: 0;
}

/* Sidebar Widgets & Comments Form (Hồ sơ bản đồ cổ) */
.single-sidebar-col .atlas-widget {
	background: var(--parchment);
	border: 1.5px solid var(--parchment-border);
	border-radius: var(--radius);
	padding: 16px;
	margin-bottom: 18px;
}

.single-sidebar-col .atlas-widget h2,
.single-sidebar-col .atlas-widget .wp-block-heading,
.single-sidebar-col .atlas-widget .wp-block-search__label {
	display: block;
	margin: 0 0 10px;
	font-family: var(--font-serif);
	font-size: 0.96rem;
	font-weight: 700;
	color: var(--ink);
}

.single-sidebar-col .atlas-widget ul,
.single-sidebar-col .atlas-widget ol {
	list-style: none;
	margin: 0;
	padding: 0;
}

.single-sidebar-col .atlas-widget li {
	padding: 6px 0;
	border-bottom: 1px solid var(--parchment-deep);
	font-size: 0.88rem;
	overflow-wrap: anywhere;
}

.single-sidebar-col .atlas-widget li:last-child {
	border-bottom: 0;
}

.wp-block-search__inside-wrapper {
	display: flex;
	gap: 6px;
	max-width: 100%;
}

.wp-block-search__input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 44px;
	padding: 6px 10px;
	background: #fbf7ed;
	color: var(--ink);
	border: 1.5px solid var(--parchment-border-strong);
	border-radius: var(--radius);
	font-size: 0.9rem;
}

.wp-block-search__button {
	min-height: 44px;
	padding: 0 12px;
	background: var(--night-deep);
	color: #ffb36b;
	border: 1.5px solid var(--night-deep);
	border-radius: var(--radius);
	font-size: 0.84rem;
	font-weight: 700;
	cursor: pointer;
	flex-shrink: 0;
}

.single-comments-wrap {
	margin-top: 28px;
	padding-top: 22px;
	border-top: 2px solid var(--parchment-deep);
}

.comments-title,
.comment-reply-title {
	margin: 0 0 12px;
	font-family: var(--font-serif);
	font-size: 1.2rem;
	color: var(--ink);
}

.comment-notes,
.logged-in-as {
	margin: 0 0 14px;
	font-size: 0.88rem;
	color: var(--ink-muted);
}

.comment-form p {
	margin: 0 0 14px;
}

.comment-form label {
	display: block;
	margin-bottom: 5px;
	font-size: 0.86rem;
	font-weight: 700;
	color: var(--ink);
}

.comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.comment-form-cookies-consent label {
	display: inline;
	margin: 0;
	font-weight: 400;
	font-size: 0.86rem;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	background: var(--parchment);
	color: var(--ink);
	border: 1.5px solid var(--parchment-border-strong);
	border-radius: var(--radius);
	font-family: var(--font-sans);
	font-size: 0.94rem;
}

.comment-form textarea {
	min-height: 120px;
	resize: vertical;
}

.comment-form .submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 20px;
	background: var(--night-deep);
	color: var(--ink-light);
	border: 2px solid var(--night-deep);
	border-radius: var(--radius);
	font-size: 0.9rem;
	font-weight: 700;
	cursor: pointer;
}

.comment-form .submit:hover,
.comment-form .submit:focus-visible {
	background: var(--ember);
	color: #160c04;
	border-color: var(--ember);
}

.comment-list {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
}

.comment-list .comment-body {
	padding: 14px;
	margin-bottom: 12px;
	background: var(--parchment);
	border: 1px solid var(--parchment-border);
	border-radius: var(--radius);
}

.case-dossier-card {
	background: var(--parchment);
	border: 2px solid var(--parchment-border-strong);
	border-radius: var(--radius);
	padding: 20px;
	margin-bottom: 24px;
}

.case-dossier-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.dossier-title {
	margin: 0;
	font-family: var(--font-serif);
	font-size: 1.25rem;
}

.case-dossier-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin: 0;
}

.case-field {
	background: #fbf7ed;
	border: 1px solid var(--parchment-border);
	border-radius: 4px;
	padding: 10px 12px;
}

.case-field dt {
	font-size: 0.74rem;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--ink-muted);
	margin-bottom: 3px;
}

.case-field dd {
	margin: 0;
	font-weight: 700;
	font-size: 0.94rem;
}

.danger-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	color: #ffffff;
	background: var(--night-deep);
	font-size: 0.8rem;
}

.danger-badge.danger-low { background: #1c6b41; }
.danger-badge.danger-moderate { background: #8c4800; }
.danger-badge.danger-high { background: #a83308; }
.danger-badge.danger-extreme { background: #961414; }
.danger-badge.danger-unknown { background: #474d56; }

/* ToC & Entry Content */
.toc-box {
	background: var(--parchment);
	border: 1.5px solid var(--parchment-border);
	border-radius: var(--radius);
	padding: 16px;
	margin-bottom: 20px;
}

.toc-mobile {
	display: none;
}

.toc-desktop {
	position: sticky;
	top: 16px;
}

.toc-heading, .toc-summary {
	margin: 0 0 10px;
	font-family: var(--font-serif);
	font-size: 0.96rem;
	font-weight: 700;
	cursor: pointer;
}

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

.toc-list a {
	display: flex;
	gap: 8px;
	padding: 6px 4px;
	font-size: 0.9rem;
	color: var(--ink);
	text-decoration: none;
	border-bottom: 1px solid var(--parchment-deep);
}

.toc-list a:hover {
	color: var(--ember-dark);
	text-decoration: underline;
}

.toc-num {
	font-weight: 700;
	color: var(--ember-dark);
}

.entry-content h2 {
	margin: 1.6em 0 0.6em;
	font-family: var(--font-serif);
	font-size: 1.38rem;
	padding-bottom: 6px;
	border-bottom: 1.5px solid var(--parchment-border);
}

.entry-content h3 {
	margin: 1.3em 0 0.5em;
	font-family: var(--font-serif);
	font-size: 1.12rem;
}

.entry-content blockquote {
	margin: 1.25em 0;
	padding: 14px 18px;
	background: var(--parchment);
	border: 1px solid var(--parchment-border);
	border-left: 4px solid var(--ember-dark);
	border-radius: 0 var(--radius) var(--radius) 0;
	font-family: var(--font-serif);
	font-style: italic;
	color: var(--ink);
}

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

.nnd-table-wrap {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 1.25em 0;
	border: 1.5px solid var(--parchment-border);
	border-radius: var(--radius);
	background: #fbf7ed;
}

.nnd-table-wrap:focus-visible {
	outline: 2px solid var(--ember-dark);
	outline-offset: 2px;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92rem;
	line-height: 1.5;
	color: var(--ink);
}

.entry-content > table {
	display: block;
	overflow-x: auto;
	max-width: 100%;
}

.entry-content th,
.entry-content td {
	padding: 10px 12px;
	min-width: 112px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--parchment-border);
	word-break: normal;
	overflow-wrap: break-word;
}

.entry-content thead th {
	background: var(--parchment-deep);
	font-family: var(--font-serif);
	font-weight: 700;
	color: var(--ink);
	border-bottom: 2px solid var(--parchment-border-strong);
	white-space: nowrap;
}

.entry-content tbody tr:nth-child(even) {
	background: rgba(232, 221, 198, 0.35);
}

.entry-content tbody tr:last-child td {
	border-bottom: 0;
}

.entry-content details {
	margin-block: 12px;
	padding: 12px 14px;
	background: var(--parchment);
	border: 1px solid var(--parchment-border);
	border-radius: var(--radius);
}

.entry-content summary {
	font-weight: 700;
	cursor: pointer;
}

.nnd-autolink {
	font-weight: 600;
	text-decoration: underline dotted 1.5px;
}

.cc-attribution-box {
	margin-top: 28px;
	padding: 16px 18px;
	background: var(--parchment);
	border: 1.5px solid var(--parchment-border);
	border-left: 5px solid var(--ember-dark);
	border-radius: var(--radius);
	font-size: 0.9rem;
}

.cc-title {
	margin: 0 0 8px;
	font-family: var(--font-serif);
	font-size: 1rem;
}

.cc-links {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin: 8px 0 0;
	font-weight: 700;
	font-size: 0.86rem;
}

.related-cases-section {
	margin-top: 32px;
}

/* ---------- Pagination & 404 ---------- */
.atlas-pagination {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 28px;
	padding: 14px 16px;
	background: #fbf7ed;
	border: 1.5px solid var(--parchment-border);
	border-radius: var(--radius);
}

.atlas-page-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.atlas-page-list .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 12px;
	background: var(--parchment);
	color: var(--ink);
	border: 1.5px solid var(--parchment-border-strong);
	border-radius: var(--radius);
	font-weight: 700;
	text-decoration: none;
}

.atlas-page-list .page-numbers.current,
.atlas-page-list a.page-numbers:hover {
	background: var(--night-deep);
	color: var(--ink-light);
	border-color: var(--night-deep);
}

.atlas-page-counter {
	font-size: 0.84rem;
	font-weight: 700;
	color: var(--ink-muted);
}

.notfound-main {
	background-color: var(--night-deep);
	background-image:
		linear-gradient(rgba(11, 20, 22, 0.78), rgba(11, 20, 22, 0.86)),
		url('../img/bg-night-forest.webp');
	background-size: cover;
	background-position: center;
	color: var(--ink-light);
	padding-block: 48px;
}

.uncharted-404-card {
	background: rgba(18, 34, 37, 0.90);
	border: 2px solid #3c5b5e;
	border-radius: var(--radius);
	padding: 34px 28px;
}

.uncharted-title {
	margin: 0 0 12px;
	font-family: var(--font-serif);
	font-size: clamp(1.55rem, 3.2vw, 2.2rem);
	color: var(--ink-light);
}

.uncharted-desc {
	color: var(--ink-light-muted);
}

.uncharted-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 20px 0;
}

.empty-state-box {
	background: #fbf7ed;
	border: 1.5px solid var(--parchment-border);
	border-radius: var(--radius);
	padding: 28px;
}

/* ---------- Footer ---------- */
.site-footer {
	background-color: var(--night-deep);
	background-image:
		linear-gradient(rgba(10, 18, 20, 0.86), rgba(9, 16, 18, 0.94)),
		url('../img/bg-night-forest.webp');
	background-size: cover;
	background-position: center bottom;
	color: var(--ink-light);
	border-top: 4px solid #365255;
	padding-top: 34px;
}

.site-footer a {
	color: #ffb36b;
}

.site-footer a:hover, .site-footer a:focus-visible {
	color: #ffffff;
}

.footer-widgets-band {
	border-top: 1px solid #24393c;
	padding-block: 18px 22px;
}

.footer-widgets-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
	gap: 20px 28px;
	align-items: start;
}

.site-footer .footer-widget {
	min-width: 0;
	font-size: 0.88rem;
	color: var(--ink-light-muted);
}

.site-footer .footer-widget h2,
.site-footer .footer-widget h3,
.site-footer .footer-widget .footer-widget-title,
.site-footer .footer-widget .wp-block-heading {
	margin: 0 0 10px;
	font-family: var(--font-serif);
	font-size: 0.98rem;
	line-height: 1.3;
	color: var(--ember);
}

.footer-widgets-grid ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-widgets-grid li {
	margin: 0 0 6px;
}

.footer-widgets-grid li:last-child {
	margin-bottom: 0;
}

.footer-widgets-grid ul a {
	display: inline-block;
	padding-block: 2px;
	color: var(--ink-light);
	text-decoration: none;
}

.footer-widgets-grid ul a:hover,
.footer-widgets-grid ul a:focus-visible {
	color: var(--ember);
	text-decoration: underline;
}

.footer-widgets-grid ul:has(> li:nth-child(7)) {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px 16px;
}

.footer-widgets-grid select {
	display: block;
	width: 100%;
	max-width: 280px;
	min-height: 40px;
	padding: 6px 12px;
	background: var(--night-forest);
	color: var(--ink-light);
	border: 1px solid #4d7074;
	border-radius: var(--radius);
	font-family: inherit;
	font-size: 0.88rem;
}

.footer-widgets-grid .wp-block-tag-cloud,
.footer-widgets-grid .tagcloud {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
}

.footer-widgets-grid .wp-block-tag-cloud a,
.footer-widgets-grid .tagcloud a {
	font-size: 0.82rem !important;
	line-height: 1.3;
	padding: 4px 8px;
	border: 1px solid #365255;
	border-radius: var(--radius);
	color: var(--ink-light);
	text-decoration: none;
}

.footer-widgets-grid .wp-block-search__inside-wrapper {
	display: flex;
	gap: 8px;
	max-width: 100%;
}

.footer-widgets-grid .wp-block-search__input {
	min-width: 0;
	flex: 1;
	min-height: 40px;
	padding: 6px 10px;
	background: var(--night-forest);
	color: var(--ink-light);
	border: 1px solid #4d7074;
	border-radius: var(--radius);
}

.footer-widgets-grid .wp-block-search__button {
	min-height: 40px;
	padding: 6px 12px;
	background: var(--night-forest);
	color: var(--ember);
	border: 1px solid #4d7074;
	border-radius: var(--radius);
	font-weight: 700;
	cursor: pointer;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 0.8fr 0.8fr;
	gap: 28px;
	align-items: start;
	padding-bottom: 28px;
}

.footer-col {
	min-width: 0;
}

.footer-actions {
	margin: 14px 0 0;
}

.footer-brand-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.footer-site-name {
	margin: 0;
	font-family: var(--font-serif);
	font-weight: 700;
	font-size: 1.15rem;
}

.footer-tagline, .footer-note {
	margin: 4px 0 0;
	font-size: 0.88rem;
	color: var(--ink-light-muted);
}

.btn-footer-random {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 14px;
	background: var(--night-forest);
	color: var(--ember);
	border: 1px solid #4d7074;
	border-radius: var(--radius);
	font-weight: 700;
	font-size: 0.86rem;
	text-decoration: none;
}

.footer-heading {
	margin: 0 0 12px;
	font-family: var(--font-serif);
	font-size: 0.98rem;
	color: var(--ember);
}

.footer-links-list, .footer-nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-links-list a, .footer-nav-list a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	min-height: 40px;
	color: var(--ink-light);
	text-decoration: none;
	font-size: 0.9rem;
	border-bottom: 1px solid #24393c;
}

.footer-links-list a:hover, .footer-nav-list a:hover {
	color: var(--ember);
}

.footer-count {
	font-size: 0.8rem;
	color: var(--ink-light-muted);
}

.footer-bottom {
	background: #091012;
	border-top: 1px solid #223538;
	padding-block: 14px;
	font-size: 0.82rem;
	color: var(--ink-light-muted);
}

.footer-bottom-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.footer-bottom p {
	margin: 0;
}

/* ---------- Responsive (0 cuộn ngang ở 360px) ---------- */
@media (max-width: 960px) {
	.hero-atlas-grid,
	.single-layout-grid,
	.footer-grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.legend-grid-3,
	.atlas-dept-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.legend-grid--cols-1,
	.atlas-dept-grid--cols-1 {
		grid-template-columns: minmax(0, 1fr);
	}
	.toc-mobile {
		display: block;
	}
	.toc-desktop {
		display: none;
	}
}

@media (max-width: 680px) {
	.atlas-nav {
		display: none;
	}
	.atlas-nav.is-open {
		display: block;
	}
	.atlas-nav-list {
		flex-direction: column;
	}
	.legend-grid-3,
	.legend-grid-2,
	.legend-grid--cols-2,
	.atlas-dept-grid,
	.atlas-dept-grid--cols-2,
	.atlas-dept-grid--cols-3,
	.case-dossier-grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.single-case-article,
	.archive-header,
	.uncharted-404-card {
		padding: 18px 14px;
	}
	.footer-widgets-grid,
	.footer-widgets-grid ul:has(> li:nth-child(7)) {
		grid-template-columns: minmax(0, 1fr);
	}
	.footer-widgets-grid select {
		max-width: 100%;
	}
}

@media (max-width: 480px) {
	.btn-atlas {
		padding: 0 10px;
		font-size: 0.82rem;
	}
	.brand-title {
		font-size: 1.04rem;
	}
	.brand-sub {
		display: none;
	}
	.atlas-search-form {
		flex-wrap: wrap;
	}
	.atlas-search-submit {
		width: 100%;
	}
	.map-pin-btn {
		min-height: 24px;
		padding: 2px 6px 2px 5px;
		font-size: 0.65rem;
		gap: 4px;
	}
	.map-pin-dot {
		width: 6px;
		height: 6px;
	}
}

@media (min-width: 681px) {
	.btn-menu-toggle {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*, *::before, *::after {
		animation: none !important;
		transition: none !important;
	}
}

/* ---------- Tín hiệu truyền thuyết nháy đỏ trên bản đồ ---------- */
.world-map-signals {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 3;
}
.map-signal {
	position: absolute;
	transform: translate(-6px, -50%);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	opacity: 0;
	transition: opacity 0.5s ease;
}
.map-signal.is-on { opacity: 1; }
.map-signal--left { flex-direction: row-reverse; transform: translate(calc(-100% + 6px), -50%); }
.map-signal-dot {
	position: relative;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #ff3b30;
	box-shadow: 0 0 8px 2px rgba(255, 59, 48, 0.75);
	flex-shrink: 0;
	animation: att-signal-blink 1.6s ease-in-out infinite;
}
.map-signal-dot::after {
	content: "";
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 2px solid rgba(255, 59, 48, 0.8);
	animation: att-signal-ring 1.6s ease-out infinite;
}
.map-signal-label {
	padding: 2px 7px;
	background: rgba(40, 6, 6, 0.86);
	color: #ffd9d4;
	border: 1px solid rgba(255, 59, 48, 0.7);
	border-radius: 999px;
	font-family: var(--font-sans);
	font-size: 0.64rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	line-height: 1.3;
	white-space: nowrap;
}
.map-pin-btn.is-signal {
	border-color: #ff3b30;
	animation: att-pin-alert 1.6s ease-in-out infinite;
}
.map-pin-btn.is-signal .map-pin-dot { background: #ff3b30; }
@keyframes att-signal-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes att-signal-ring { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes att-pin-alert { 0%, 100% { box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.4), 0 0 14px rgba(255, 59, 48, 0.75); } 50% { box-shadow: 0 0 0 1px rgba(255, 59, 48, 0.15), 0 0 4px rgba(255, 59, 48, 0.3); } }
@media (max-width: 600px) {
	.map-signal-label { display: none; }
}
/* ---------- Lô LƯỚI-ĐỦ-Ô: Flex lưới cân đối hàng cuối, header mobile <=160px, sticky sidebar & hộp phụ ---------- */
.legend-grid,
.atlas-dept-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
}

.legend-grid {
	--att-cols: 3;
	--att-gap: 20px;
	gap: var(--att-gap);
}

.legend-grid-2 {
	--att-cols: 2;
}

.legend-grid-3 {
	--att-cols: 3;
}

.legend-grid--cols-2,
.legend-grid-3:has(> :nth-child(2):last-child),
.legend-grid-3:has(> :nth-child(4):last-child) {
	--att-cols: 2;
}

.legend-grid--cols-1,
.legend-grid:has(> :only-child) {
	--att-cols: 1;
}

.atlas-dept-grid {
	--att-cols: 4;
	--att-gap: 18px;
	gap: var(--att-gap);
}

.atlas-dept-grid.atlas-dept-grid--cols-3,
.atlas-dept-grid:has(> :nth-child(3):last-child) {
	--att-cols: 3;
}

.atlas-dept-grid.atlas-dept-grid--cols-2,
.atlas-dept-grid:has(> :nth-child(2):last-child) {
	--att-cols: 2;
}

.atlas-dept-grid.atlas-dept-grid--cols-1,
.atlas-dept-grid:has(> :only-child) {
	--att-cols: 1;
}

.legend-grid > *,
.atlas-dept-grid > * {
	flex: 0 0 calc((100% - (var(--att-cols) - 1) * var(--att-gap) - 0.5px) / var(--att-cols));
	width: calc((100% - (var(--att-cols) - 1) * var(--att-gap) - 0.5px) / var(--att-cols));
	max-width: calc((100% - (var(--att-cols) - 1) * var(--att-gap) - 0.5px) / var(--att-cols));
	min-width: 0;
}

.legend-grid--cols-1 > *,
.legend-grid:has(> :only-child) > *,
.atlas-dept-grid.atlas-dept-grid--cols-1 > *,
.atlas-dept-grid:has(> :only-child) > * {
	flex: 0 0 100%;
	width: 100%;
	max-width: 100%;
}

@media (min-width: 961px) {
	.single-layout-grid--full {
		grid-template-columns: minmax(0, 1fr);
		max-width: 820px;
		margin-inline: auto;
	}
	.single-sidebar-col {
		position: sticky;
		top: 20px;
		align-self: start;
		max-height: calc(100vh - 40px);
		overflow-y: auto;
	}
	.single-sidebar-col .toc-desktop {
		position: static;
	}
}

@media (max-width: 960px) {
	.legend-grid,
	.legend-grid-3,
	.legend-grid-2,
	.atlas-dept-grid,
	.atlas-dept-grid.atlas-dept-grid--cols-3 {
		--att-cols: 2;
	}
	.legend-grid--cols-1,
	.legend-grid:has(> :only-child),
	.atlas-dept-grid.atlas-dept-grid--cols-1,
	.atlas-dept-grid:has(> :only-child) {
		--att-cols: 1;
	}
}

@media (max-width: 680px) {
	.legend-grid,
	.legend-grid-3,
	.legend-grid-2,
	.legend-grid--cols-2,
	.atlas-dept-grid,
	.atlas-dept-grid.atlas-dept-grid--cols-2,
	.atlas-dept-grid.atlas-dept-grid--cols-3 {
		--att-cols: 1;
	}
	.legend-grid > *,
	.atlas-dept-grid > * {
		flex: 0 0 100%;
		width: 100%;
		max-width: 100%;
	}
	.campfire-strip-inner {
		min-height: 36px;
		flex-wrap: nowrap;
		gap: 8px;
		padding-block: 2px;
	}
	.strip-coords > span:not(.ember-dot):not(.strip-region-tag) {
		display: none;
	}
	.strip-random {
		min-height: 36px;
		padding: 0 6px;
		font-size: 0.76rem;
		white-space: nowrap;
	}
	.atlas-lang-btn {
		min-height: 36px;
		padding: 0 10px;
		font-size: 0.76rem;
	}
	.atlas-header-bar {
		padding-block: 8px;
	}
	.atlas-header-inner {
		flex-wrap: nowrap;
		gap: 8px;
	}
	.brand-sub {
		display: none;
	}
	.att-brand-img {
		width: 32px;
		height: 32px;
	}
	.brand-title {
		font-size: 0.98rem;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.btn-atlas {
		min-height: 40px;
		padding: 0 10px;
		font-size: 0.8rem;
	}
}

.asg-topic-cluster-box {
	float: none !important;
	width: 100% !important;
	max-width: 100% !important;
	clear: both;
	margin: 1.5rem 0 !important;
	box-sizing: border-box;
	overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
	.map-signal-dot, .map-signal-dot::after, .map-pin-btn.is-signal { animation: none; }
	.map-signal { transition: none; }
}
