/*
 * NetDecoded - Internet Case Files category archive (Pillar 2).
 * Enqueued only by category-internet-case-files.php. Every rule sits under .nd-icf,
 * so nothing else on the site (including Pillar 1) is affected.
 * Visual idea: a documentary case-file library. Paper-toned index, folder-tab labels,
 * monospaced "filing" details and a ruled index list instead of a card grid.
 */

.nd-icf {
	--nd-navy: #071426;
	--nd-navy-2: #0B1F38;
	--nd-blue: #287BFF;
	--nd-blue-text: #1F66D6; /* AA-contrast blue for small text on light backgrounds */
	--nd-white: #FFFFFF;
	--nd-light: #F7F9FC;
	--nd-text: #142033;
	--nd-muted: #64748B;
	--nd-line: #D5DDE9;
	--nd-paper: #F1F4F9;
	--nd-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
	color: var(--nd-text);
	background: var(--nd-light);
	line-height: 1.65;
	font-size: 17px;
}
.nd-icf *,
.nd-icf *::before,
.nd-icf *::after { box-sizing: border-box; }
.nd-icf a { text-decoration: none; }
.nd-icf img { max-width: 100%; height: auto; display: block; }
.nd-icf .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.nd-icf a:focus-visible { outline: 3px solid var(--nd-blue); outline-offset: 3px; border-radius: 2px; }
.nd-icf .nd-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.nd-icf .nd-eyebrow {
	font: 700 .76rem/1.2 var(--nd-mono);
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--nd-blue-text);
	margin: 0 0 18px;
}
.nd-icf .nd-h2 {
	font: 700 clamp(1.7rem, 3.2vw, 2.5rem)/1.15 Georgia, "Times New Roman", serif;
	margin: 0 0 14px;
	color: var(--nd-text);
	letter-spacing: -.01em;
}

/* Hero: navy dossier with a ruled grid and a folder illustration */
.nd-icf .nd-hero {
	position: relative;
	overflow: hidden;
	background:
		repeating-linear-gradient(0deg, rgba(111, 168, 255, .06) 0 1px, transparent 1px 44px),
		repeating-linear-gradient(90deg, rgba(111, 168, 255, .06) 0 1px, transparent 1px 44px),
		linear-gradient(165deg, var(--nd-navy) 0%, var(--nd-navy-2) 100%);
	color: var(--nd-white);
	padding: clamp(72px, 10vw, 128px) 0 clamp(64px, 9vw, 112px);
	border-bottom: 4px solid var(--nd-blue);
}
.nd-icf .nd-hero__art { position: absolute; inset: 0; opacity: .55; pointer-events: none; }
.nd-icf .nd-hero__art svg { position: absolute; right: -2%; bottom: -8%; width: min(700px, 62%); height: auto; }
.nd-icf .nd-hero .nd-wrap { position: relative; z-index: 1; }
.nd-icf .nd-hero .nd-eyebrow { color: #6FA8FF; }
.nd-icf .nd-hero__h1 {
	font: 700 clamp(2.1rem, 5.2vw, 3.8rem)/1.08 Georgia, "Times New Roman", serif;
	letter-spacing: -.02em;
	margin: 0 0 24px;
	max-width: 16em;
	color: var(--nd-white);
}
.nd-icf .nd-hero__copy { max-width: 40em; font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: #C7D3E6; margin: 0 0 22px; }
.nd-icf .nd-hero__tag {
	display: inline-block;
	font: 600 .9rem/1.4 var(--nd-mono);
	letter-spacing: .04em;
	color: var(--nd-white);
	border: 1px solid rgba(111, 168, 255, .5);
	padding: 8px 14px;
	margin: 0;
}

/* Intro */
.nd-icf .nd-intro { background: var(--nd-white); padding: clamp(48px, 6vw, 80px) 0; border-bottom: 1px solid var(--nd-line); }
.nd-icf .nd-intro p { max-width: 46em; margin: 0; font-size: 1.15rem; color: var(--nd-text); }

/* Section heads */
.nd-icf .nd-sec-head { margin-bottom: 32px; }
.nd-icf .nd-sec-head p { margin: 0; color: var(--nd-muted); max-width: 42em; }
.nd-icf .nd-sec-head .nd-eyebrow { color: var(--nd-blue-text); margin-bottom: 18px; }
.nd-icf .nd-featured { padding: clamp(56px, 7vw, 96px) 0 0; }

/* Case file (shared by featured dossier and index rows) */
.nd-icf .nd-case { display: flex; background: var(--nd-white); border: 1px solid var(--nd-line); position: relative; }
.nd-icf .nd-case__media { display: block; background: var(--nd-navy-2); overflow: hidden; flex: 0 0 280px; }
.nd-icf .nd-case__media img { width: 100%; height: 100%; object-fit: cover; }
.nd-icf .nd-case__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 180px;
	background:
		repeating-linear-gradient(0deg, rgba(111, 168, 255, .1) 0 1px, transparent 1px 22px),
		linear-gradient(135deg, var(--nd-navy), var(--nd-navy-2) 60%, #12356B);
}
.nd-icf .nd-case__body { padding: 22px 26px 24px; display: flex; flex-direction: column; flex: 1; min-width: 0; }
.nd-icf .nd-case__tab { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; font: 700 .72rem/1 var(--nd-mono); letter-spacing: .12em; text-transform: uppercase; }
.nd-icf .nd-case__no { background: var(--nd-navy); color: var(--nd-white); padding: 6px 10px; }
.nd-icf .nd-case__subject { color: var(--nd-blue-text); border: 1px solid var(--nd-line); padding: 5px 9px; background: var(--nd-paper); }
.nd-icf .nd-case__title { font: 700 1.4rem/1.22 Georgia, serif; margin: 0 0 10px; }
.nd-icf .nd-case__title a { color: var(--nd-text); }
.nd-icf .nd-case__title a:hover { color: var(--nd-blue-text); }
.nd-icf .nd-case__excerpt { color: var(--nd-muted); font-size: .98rem; margin: 0 0 16px; }
.nd-icf .nd-case__meta { font: .8rem/1.4 var(--nd-mono); color: var(--nd-muted); margin: auto 0 14px; display: flex; gap: 8px; flex-wrap: wrap; letter-spacing: .02em; }
.nd-icf .nd-case__filed { text-transform: uppercase; letter-spacing: .12em; }
.nd-icf .nd-case__link { font: 600 .92rem/1 system-ui, sans-serif; color: var(--nd-blue-text); }
.nd-icf .nd-case__link:hover { text-decoration: underline; }

/* Featured dossier */
.nd-icf .nd-case--featured { background: var(--nd-navy); border: 1px solid var(--nd-navy); border-top: 6px solid var(--nd-blue); }
.nd-icf .nd-case--featured .nd-case__media { flex: 0 0 50%; min-height: 360px; }
.nd-icf .nd-case--featured .nd-case__body { padding: clamp(28px, 4vw, 52px); justify-content: center; }
.nd-icf .nd-case--featured .nd-case__no { background: var(--nd-blue); }
.nd-icf .nd-case--featured .nd-case__subject { color: #9CC2FF; background: transparent; border-color: rgba(156, 194, 255, .4); }
.nd-icf .nd-case--featured .nd-case__title { font-size: clamp(1.6rem, 2.8vw, 2.35rem); line-height: 1.15; }
.nd-icf .nd-case--featured .nd-case__title a { color: var(--nd-white); }
.nd-icf .nd-case--featured .nd-case__title a:hover { color: #6FA8FF; }
.nd-icf .nd-case--featured .nd-case__excerpt { color: #C7D3E6; font-size: 1.05rem; }
.nd-icf .nd-case--featured .nd-case__meta { color: #93A4BE; }
.nd-icf .nd-case--featured .nd-case__link { color: #6FA8FF; }

/* Topics: lettered index list */
.nd-icf .nd-topics { padding: clamp(56px, 7vw, 96px) 0; }
.nd-icf .nd-topics__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; border-top: 2px solid var(--nd-navy); }
.nd-icf .nd-topic { display: flex; gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--nd-line); }
.nd-icf .nd-topic__idx { flex: 0 0 38px; height: 38px; display: grid; place-items: center; font: 700 .95rem/1 var(--nd-mono); color: var(--nd-blue-text); border: 1px solid var(--nd-blue-text); }
.nd-icf .nd-topic h3 { font: 700 1.25rem/1.25 Georgia, serif; margin: 0 0 8px; color: var(--nd-text); }
.nd-icf .nd-topic p { margin: 0; color: var(--nd-muted); font-size: .98rem; }

/* Archive: ruled index of case files, not a card grid */
.nd-icf .nd-latest { padding: 0 0 clamp(56px, 7vw, 96px); }
.nd-icf .nd-index { display: flex; flex-direction: column; gap: 0; border-top: 2px solid var(--nd-navy); }
.nd-icf .nd-index .nd-case { border: 0; border-bottom: 1px solid var(--nd-line); background: transparent; padding: 26px 0; gap: 28px; }
.nd-icf .nd-index .nd-case__media { flex: 0 0 260px; aspect-ratio: 4 / 3; }
.nd-icf .nd-index .nd-case__body { padding: 0; }
.nd-icf .nd-index .nd-case:hover .nd-case__title a { color: var(--nd-blue-text); }

/* Empty state and notes */
.nd-icf .nd-empty {
	background: var(--nd-white);
	border: 1px dashed #8DA0BC;
	padding: clamp(28px, 4vw, 48px);
	max-width: 760px;
}
.nd-icf .nd-empty h3 { font: 700 1.5rem/1.25 Georgia, serif; margin: 0 0 10px; }
.nd-icf .nd-empty p { margin: 0; color: var(--nd-muted); }
.nd-icf .nd-note { margin: 0; color: var(--nd-muted); }

/* Pagination (core the_posts_pagination markup) */
.nd-icf .pagination { margin-top: 44px; }
.nd-icf .nav-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nd-icf .page-numbers {
	padding: 10px 16px;
	border: 1px solid var(--nd-line);
	background: var(--nd-white);
	color: var(--nd-text);
	font: 600 .88rem/1 var(--nd-mono);
}
.nd-icf a.page-numbers:hover { border-color: var(--nd-blue); color: var(--nd-blue-text); }
.nd-icf .page-numbers.current { background: var(--nd-navy); border-color: var(--nd-navy); color: var(--nd-white); }
.nd-icf .page-numbers.dots { border-color: transparent; background: transparent; }

/* CTA */
.nd-icf .nd-cta {
	background: linear-gradient(165deg, var(--nd-navy), var(--nd-navy-2));
	color: var(--nd-white);
	padding: clamp(56px, 7vw, 92px) 0;
	text-align: center;
	border-top: 4px solid var(--nd-blue);
}
.nd-icf .nd-cta h2 { font: 700 clamp(1.7rem, 3.4vw, 2.6rem)/1.15 Georgia, serif; margin: 0 auto 16px; max-width: 18em; color: var(--nd-white); }
.nd-icf .nd-cta p { color: #C7D3E6; max-width: 36em; margin: 0 auto 28px; }
.nd-icf .nd-btn {
	display: inline-block;
	background: var(--nd-blue-text);
	color: var(--nd-white);
	font: 600 1rem/1 system-ui, sans-serif;
	padding: 16px 30px;
	border-radius: 4px;
	transition: background .2s ease;
}
.nd-icf .nd-btn:hover { background: #1A57BD; color: var(--nd-white); }

/* Explore more investigations */
.nd-icf .nd-explore { background: var(--nd-white); padding: clamp(48px, 6vw, 80px) 0; border-top: 1px solid var(--nd-line); }
.nd-icf .nd-explore__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 28px; }
.nd-icf .nd-explore__item {
	display: block;
	border: 1px solid var(--nd-line);
	border-left: 4px solid var(--nd-navy);
	padding: 26px;
	background: var(--nd-light);
	transition: border-color .2s ease;
}
.nd-icf .nd-explore__item:hover { border-color: var(--nd-blue); }
.nd-icf .nd-explore__item h3 { font: 700 1.3rem/1.25 Georgia, serif; margin: 0 0 8px; color: var(--nd-text); }
.nd-icf .nd-explore__item p { margin: 0 0 14px; color: var(--nd-muted); font-size: .97rem; }
.nd-icf .nd-explore__item span { font: 600 .9rem/1 system-ui, sans-serif; color: var(--nd-blue-text); }

/* Tablet */
@media (max-width: 1024px) {
	.nd-icf .nd-case--featured .nd-case__media { flex-basis: 44%; }
	.nd-icf .nd-index .nd-case__media { flex-basis: 220px; }
	.nd-icf .nd-hero__art { opacity: .4; }
	.nd-icf .nd-hero__art svg { width: min(480px, 58%); }
}

/* Mobile */
@media (max-width: 720px) {
	.nd-icf { font-size: 16px; }
	.nd-icf .nd-wrap { padding: 0 18px; }
	.nd-icf .nd-topics__list,
	.nd-icf .nd-explore__grid { grid-template-columns: 1fr; }
	.nd-icf .nd-case,
	.nd-icf .nd-index .nd-case { flex-direction: column; gap: 0; }
	.nd-icf .nd-case__media,
	.nd-icf .nd-case--featured .nd-case__media,
	.nd-icf .nd-index .nd-case__media { flex: none; width: 100%; aspect-ratio: 16 / 9; min-height: 0; }
	.nd-icf .nd-index .nd-case__body { padding: 18px 0 0; }
	.nd-icf .nd-hero__art svg { width: 120%; right: -30%; opacity: .7; }
}

@media (prefers-reduced-motion: reduce) {
	.nd-icf * { transition: none !important; }
}