/*
 * NetDecoded - The Changing Internet category archive (Pillar 3).
 * Enqueued only by category-changing-internet.php. Every rule sits under .nd-ci,
 * so nothing else on the site (including Pillars 1 and 2 and Astra) is affected.
 * Visual idea: a technology documentary and trends publication. Signal-arc hero,
 * a wide "lead report", numbered "shift" panels and a dated timeline feed.
 */

.nd-ci {
	--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: #DDE4EE;
	--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;
	overflow-x: clip;
}
.nd-ci *,
.nd-ci *::before,
.nd-ci *::after { box-sizing: border-box; }
.nd-ci a { text-decoration: none; }
.nd-ci img { max-width: 100%; height: auto; display: block; }
.nd-ci .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.nd-ci a:focus-visible { outline: 3px solid var(--nd-blue); outline-offset: 3px; border-radius: 2px; }
.nd-ci .nd-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.nd-ci .nd-eyebrow {
	font: 700 .76rem/1.2 system-ui, -apple-system, "Segoe UI", sans-serif;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--nd-blue-text);
	margin: 0 0 18px;
}
.nd-ci .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 with signal arcs and a rising trend line */
.nd-ci .nd-hero {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(70% 90% at 82% 100%, rgba(40, 123, 255, .28), transparent 65%),
		linear-gradient(150deg, var(--nd-navy) 0%, var(--nd-navy-2) 100%);
	color: var(--nd-white);
	padding: clamp(72px, 10vw, 128px) 0 clamp(64px, 9vw, 112px);
}
.nd-ci .nd-hero__art { position: absolute; inset: 0; opacity: .6; pointer-events: none; }
.nd-ci .nd-hero__art svg { position: absolute; right: -3%; bottom: -10%; width: min(720px, 64%); height: auto; }
.nd-ci .nd-hero .nd-wrap { position: relative; z-index: 1; }
.nd-ci .nd-hero .nd-eyebrow { color: #6FA8FF; }
.nd-ci .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: 15em;
	color: var(--nd-white);
}
.nd-ci .nd-hero__copy { max-width: 40em; font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: #C7D3E6; margin: 0 0 22px; }
.nd-ci .nd-hero__tag {
	display: inline-block;
	font: 600 1rem/1.4 system-ui, sans-serif;
	color: var(--nd-white);
	border-left: 3px solid var(--nd-blue);
	padding-left: 14px;
	margin: 0;
}

/* Section heads */
.nd-ci .nd-sec-head { margin-bottom: 32px; }
.nd-ci .nd-sec-head p { margin: 0; color: var(--nd-muted); max-width: 42em; }
.nd-ci .nd-sec-head .nd-eyebrow { color: var(--nd-blue-text); margin-bottom: 18px; }
.nd-ci .nd-featured { padding: clamp(56px, 7vw, 96px) 0 0; }

/* Story (shared by the lead report and timeline entries) */
.nd-ci .nd-story { background: var(--nd-white); border: 1px solid var(--nd-line); display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .2s ease, border-color .2s ease; }
.nd-ci .nd-story:hover { border-color: var(--nd-blue); box-shadow: 0 10px 30px rgba(7, 20, 38, .08); }
.nd-ci .nd-story__media { display: block; aspect-ratio: 16 / 9; background: var(--nd-navy-2); overflow: hidden; }
.nd-ci .nd-story__media img { width: 100%; height: 100%; object-fit: cover; }
.nd-ci .nd-story__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background:
		radial-gradient(circle at 80% 110%, rgba(111, 168, 255, .35), transparent 55%),
		linear-gradient(135deg, var(--nd-navy), var(--nd-navy-2) 60%, #12356B);
}
.nd-ci .nd-story__body { padding: 24px 28px 28px; display: flex; flex-direction: column; flex: 1; }
.nd-ci .nd-story__cat { font: 700 .72rem/1 var(--nd-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--nd-blue-text); margin: 0 0 12px; }
.nd-ci .nd-story__title { font: 700 1.45rem/1.22 Georgia, serif; margin: 0 0 12px; }
.nd-ci .nd-story__title a { color: var(--nd-text); }
.nd-ci .nd-story__title a:hover { color: var(--nd-blue-text); }
.nd-ci .nd-story__excerpt { color: var(--nd-muted); font-size: .98rem; margin: 0 0 16px; }
.nd-ci .nd-story__meta { font: .8rem/1.4 var(--nd-mono); color: var(--nd-muted); margin: auto 0 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.nd-ci .nd-story__link { font: 600 .92rem/1 system-ui, sans-serif; color: var(--nd-blue-text); }
.nd-ci .nd-story__link:hover { text-decoration: underline; }

/* Lead report: wide image beside a navy panel */
.nd-ci .nd-story--featured { flex-direction: row; background: var(--nd-navy); border-color: var(--nd-navy); border-bottom: 5px solid var(--nd-blue); }
.nd-ci .nd-story--featured .nd-story__media { flex: 0 0 56%; aspect-ratio: auto; min-height: 380px; }
.nd-ci .nd-story--featured .nd-story__body { padding: clamp(28px, 4vw, 52px); justify-content: center; }
.nd-ci .nd-story--featured .nd-story__cat { color: #6FA8FF; }
.nd-ci .nd-story--featured .nd-story__title { font-size: clamp(1.6rem, 2.8vw, 2.35rem); line-height: 1.15; }
.nd-ci .nd-story--featured .nd-story__title a { color: var(--nd-white); }
.nd-ci .nd-story--featured .nd-story__title a:hover { color: #6FA8FF; }
.nd-ci .nd-story--featured .nd-story__excerpt { color: #C7D3E6; font-size: 1.05rem; }
.nd-ci .nd-story--featured .nd-story__meta { color: #93A4BE; }
.nd-ci .nd-story--featured .nd-story__link { color: #6FA8FF; }

/* Topics: numbered "shift" panels */
.nd-ci .nd-topics { padding: clamp(56px, 7vw, 96px) 0; }
.nd-ci .nd-topics__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.nd-ci .nd-topic { background: var(--nd-white); border: 1px solid var(--nd-line); border-top: 3px solid var(--nd-blue); padding: 26px 24px 28px; }
.nd-ci .nd-topic p.nd-topic__tag { font: 700 .72rem/1 var(--nd-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--nd-blue-text); margin: 0 0 14px; }
.nd-ci .nd-topic h3 { font: 700 1.2rem/1.25 Georgia, serif; margin: 0 0 10px; color: var(--nd-text); }
.nd-ci .nd-topic p { margin: 0; color: var(--nd-muted); font-size: .96rem; }

/* Timeline feed */
.nd-ci .nd-latest { padding: 0 0 clamp(56px, 7vw, 96px); }
.nd-ci .nd-timeline { position: relative; display: flex; flex-direction: column; gap: 32px; }
.nd-ci .nd-timeline::before { content: ""; position: absolute; left: 83px; top: 8px; bottom: 8px; width: 2px; background: var(--nd-line); }
.nd-ci .nd-timeline__item { position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 36px; align-items: start; }
.nd-ci .nd-timeline__item::before {
	content: "";
	position: absolute;
	left: 77px;
	top: 14px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--nd-white);
	border: 3px solid var(--nd-blue);
}
.nd-ci .nd-timeline__date { margin: 0; padding-top: 6px; text-align: right; padding-right: 22px; font-family: var(--nd-mono); line-height: 1.15; }
.nd-ci .nd-timeline__month { display: block; font-weight: 700; font-size: 1rem; letter-spacing: .1em; text-transform: uppercase; color: var(--nd-text); }
.nd-ci .nd-timeline__year { display: block; font-size: .8rem; color: var(--nd-muted); margin-top: 4px; }
.nd-ci .nd-timeline__item .nd-story { max-width: 900px; flex-direction: row; }
.nd-ci .nd-timeline__item .nd-story__media { flex: 0 0 40%; aspect-ratio: auto; min-height: 230px; }
.nd-ci .nd-timeline__item .nd-story__body { justify-content: center; }

/* Empty state and notes */
.nd-ci .nd-empty {
	background: var(--nd-white);
	border: 1px solid var(--nd-line);
	border-left: 4px solid var(--nd-blue);
	padding: clamp(28px, 4vw, 48px);
	max-width: 760px;
}
.nd-ci .nd-empty h3 { font: 700 1.5rem/1.25 Georgia, serif; margin: 0 0 10px; }
.nd-ci .nd-empty p { margin: 0; color: var(--nd-muted); }
.nd-ci .nd-note { margin: 0; color: var(--nd-muted); }

/* Pagination (core the_posts_pagination markup) */
.nd-ci .pagination { margin-top: 44px; }
.nd-ci .nav-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nd-ci .page-numbers {
	padding: 10px 16px;
	border: 1px solid var(--nd-line);
	background: var(--nd-white);
	color: var(--nd-text);
	font: 600 .92rem/1 system-ui, sans-serif;
}
.nd-ci a.page-numbers:hover { border-color: var(--nd-blue); color: var(--nd-blue-text); }
.nd-ci .page-numbers.current { background: var(--nd-navy); border-color: var(--nd-navy); color: var(--nd-white); }
.nd-ci .page-numbers.dots { border-color: transparent; background: transparent; }

/* Explore more investigations */
.nd-ci .nd-explore { background: var(--nd-white); padding: clamp(48px, 6vw, 80px) 0; border-top: 1px solid var(--nd-line); }
.nd-ci .nd-explore__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 28px; }
.nd-ci .nd-explore__item {
	display: block;
	border: 1px solid var(--nd-line);
	border-radius: 6px;
	padding: 26px;
	background: var(--nd-light);
	transition: border-color .2s ease;
}
.nd-ci .nd-explore__item:hover { border-color: var(--nd-blue); }
.nd-ci .nd-explore__item h3 { font: 700 1.3rem/1.25 Georgia, serif; margin: 0 0 8px; color: var(--nd-text); }
.nd-ci .nd-explore__item p { margin: 0 0 14px; color: var(--nd-muted); font-size: .97rem; }
.nd-ci .nd-explore__item span { font: 600 .9rem/1 system-ui, sans-serif; color: var(--nd-blue-text); }

/* Tablet */
@media (max-width: 1024px) {
	.nd-ci .nd-topics__grid { grid-template-columns: repeat(2, 1fr); }
	.nd-ci .nd-story--featured .nd-story__media { flex-basis: 48%; }
	.nd-ci .nd-hero__art { opacity: .45; }
	.nd-ci .nd-hero__art svg { width: min(520px, 62%); }
}

/* Mobile */
@media (max-width: 720px) {
	.nd-ci { font-size: 16px; }
	.nd-ci .nd-wrap { padding: 0 18px; }
	.nd-ci .nd-topics__grid,
	.nd-ci .nd-explore__grid { grid-template-columns: 1fr; }
	.nd-ci .nd-story--featured { flex-direction: column; }
	.nd-ci .nd-story--featured .nd-story__media { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
	.nd-ci .nd-story__body { padding: 20px 20px 24px; }
	.nd-ci .nd-timeline__item .nd-story { flex-direction: column; }
	.nd-ci .nd-timeline__item .nd-story__media { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
	.nd-ci .nd-timeline { gap: 28px; }
	.nd-ci .nd-timeline::before { left: 6px; }
	.nd-ci .nd-timeline__item { grid-template-columns: 1fr; gap: 10px; padding-left: 28px; }
	.nd-ci .nd-timeline__item::before { left: 0; top: 6px; }
	.nd-ci .nd-timeline__date { text-align: left; padding: 0; display: flex; gap: 8px; align-items: baseline; }
	.nd-ci .nd-timeline__year { margin: 0; }
	.nd-ci .nd-hero__art svg { width: 125%; right: -35%; opacity: .7; }
}

@media (prefers-reduced-motion: reduce) {
	.nd-ci * { transition: none !important; }
}