/* ==========================================================================
   Schools News — design tokens
   Palette: masthead navy, marigold/saffron accent, alert red for breaking,
   warm paper background, ink text, slate for meta/utility text.
   Type: serif display for headlines, sans for UI/body, mono for
   timestamps/data labels (ticker, edition strip, category tags) — the
   mono numerals are the one signature touch tying "results" + "live news"
   together.
   ========================================================================== */
:root {
	--scn-navy: #10193A;
	--scn-navy-2: #1B2750;
	--scn-saffron: #F4811F;
	--scn-paper: #F7F4EC;
	--scn-ink: #181612;
	--scn-slate: #5B6472;
	--scn-alert: #D7263D;
	--scn-line: #E4DECF;
	--scn-white: #FFFFFF;

	--scn-font-display: "Source Serif 4", "Noto Serif Devanagari", Georgia, serif;
	--scn-font-body: "Inter", "Noto Sans Devanagari", -apple-system, sans-serif;
	--scn-font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;

	--scn-radius: 3px;
	--scn-radius-pill: 999px;
}

@font-face {
	font-family: "Source Serif 4";
	src: local("Source Serif 4");
	font-display: swap;
}

/* ---------- Masthead / edition strip ---------- */
.scn-edition-strip {
	background: var(--scn-navy);
	color: var(--scn-paper);
	font-family: var(--scn-font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 6px 16px;
	display: flex;
	justify-content: space-between;
}

/* ---------- Breaking news ticker ---------- */
.scn-ticker-wrap {
	display: flex;
	align-items: center;
	background: var(--scn-ink);
	color: var(--scn-paper);
	overflow: hidden;
	border-bottom: 2px solid var(--scn-saffron);
}
.scn-ticker-tag {
	flex: 0 0 auto;
	background: var(--scn-alert);
	color: #fff;
	font-family: var(--scn-font-mono);
	font-weight: 600;
	font-size: 0.78rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 8px 14px;
	display: flex;
	align-items: center;
	gap: 6px;
}
.scn-live-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #fff;
	display: inline-block;
	animation: scn-pulse 1.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
	.scn-live-dot { animation: none; }
}
@keyframes scn-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.35; }
}
.scn-ticker-track-wrap {
	flex: 1 1 auto;
	overflow: hidden;
	position: relative;
	height: 38px;
}
.scn-ticker-track {
	list-style: none;
	margin: 0;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	display: flex;
	align-items: center;
	height: 100%;
	animation: scn-ticker-scroll 38s linear infinite;
}
.scn-ticker-track li { padding: 0 28px; }
.scn-ticker-track a { color: var(--scn-paper); text-decoration: none; font-size: 0.92rem; }
.scn-ticker-track a:hover { color: var(--scn-saffron); text-decoration: underline; }
.scn-ticker-wrap:hover .scn-ticker-track { animation-play-state: paused; }
@keyframes scn-ticker-scroll {
	0% { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
	.scn-ticker-track { animation: none; overflow-x: auto; }
}

/* ---------- Language switcher ---------- */
.scn-lang-switch {
	display: flex;
	gap: 4px;
	padding: 6px 16px;
	font-family: var(--scn-font-mono);
	font-size: 0.78rem;
}
.scn-lang-link {
	padding: 3px 10px;
	border-radius: var(--scn-radius-pill);
	color: var(--scn-slate);
	text-decoration: none;
	border: 1px solid var(--scn-line);
}
.scn-lang-link.is-active {
	background: var(--scn-saffron);
	color: #fff;
	border-color: var(--scn-saffron);
}

/* ---------- Homepage layout ---------- */
.scn-homepage { background: var(--scn-paper); padding: 24px 0 8px; }
.scn-hero-row {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 28px;
	margin-bottom: 32px;
}
.scn-hero-lead {
	display: block;
	text-decoration: none;
	color: var(--scn-ink);
	border: 1px solid var(--scn-line);
	border-radius: var(--scn-radius);
	overflow: hidden;
	background: var(--scn-white);
}
.scn-hero-lead img { width: 100%; height: auto; display: block; aspect-ratio: 3/2; object-fit: cover; }
.scn-hero-lead-text { padding: 18px 20px 22px; }
.scn-eyebrow {
	display: inline-block;
	font-family: var(--scn-font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--scn-saffron);
	margin-bottom: 8px;
}
.scn-hero-headline {
	font-family: var(--scn-font-display);
	font-size: clamp(1.5rem, 3vw, 2.3rem);
	line-height: 1.2;
	margin: 0 0 10px;
	font-weight: 600;
}
.scn-hero-meta { font-family: var(--scn-font-mono); font-size: 0.78rem; color: var(--scn-slate); }

.scn-trending-rail {
	background: var(--scn-navy);
	color: var(--scn-paper);
	border-radius: var(--scn-radius);
	padding: 18px 18px 8px;
}
.scn-section-title {
	font-family: var(--scn-font-display);
	font-weight: 600;
	font-size: 1.05rem;
	margin: 0 0 14px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.scn-section-title--trending { color: var(--scn-saffron); }
.scn-trend-icon::before { content: "▲"; font-size: 0.7rem; }
.scn-trending-list { list-style: none; margin: 0; padding: 0; }
.scn-trending-list li {
	display: flex;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid rgba(255,255,255,0.12);
}
.scn-trending-list li:last-child { border-bottom: none; }
.scn-trend-rank {
	font-family: var(--scn-font-mono);
	color: var(--scn-saffron);
	font-weight: 700;
	flex: 0 0 auto;
}
.scn-trending-list a { color: var(--scn-paper); text-decoration: none; font-size: 0.92rem; line-height: 1.35; }
.scn-trending-list a:hover { color: var(--scn-saffron); }

/* ---------- Category sections ---------- */
.scn-cat-section { margin-bottom: 36px; }
.scn-cat-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	border-bottom: 2px solid var(--scn-ink);
	padding-bottom: 8px;
	margin-bottom: 16px;
}
.scn-cat-viewall { font-family: var(--scn-font-mono); font-size: 0.8rem; color: var(--scn-saffron); text-decoration: none; }
.scn-cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.scn-cat-card {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: var(--scn-ink);
	background: var(--scn-white);
	border: 1px solid var(--scn-line);
	border-radius: var(--scn-radius);
	overflow: hidden;
}
.scn-cat-card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; }
.scn-cat-card-title { font-size: 0.9rem; line-height: 1.35; padding: 10px 12px 4px; font-weight: 600; }
.scn-cat-card-meta { font-family: var(--scn-font-mono); font-size: 0.7rem; color: var(--scn-slate); padding: 0 12px 12px; }

/* ---------- Breadcrumbs ---------- */
.scn-breadcrumbs { font-family: var(--scn-font-mono); font-size: 0.78rem; color: var(--scn-slate); margin: 14px 0; }
.scn-breadcrumbs ol { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0; flex-wrap: wrap; }
.scn-breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--scn-line); }
.scn-breadcrumbs a { color: var(--scn-slate); text-decoration: none; }
.scn-breadcrumbs a:hover { color: var(--scn-saffron); }

/* ---------- Ad slots (CLS-safe) ---------- */
.scn-ad-slot {
	margin: 22px auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: #FBFAF6;
	border: 1px dashed var(--scn-line);
	border-radius: var(--scn-radius);
	overflow: hidden;
}
.scn-ad-label {
	font-family: var(--scn-font-mono);
	font-size: 0.65rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--scn-slate);
	padding: 4px 0;
}
.scn-ad-inner { width: 100%; display: flex; justify-content: center; }
.scn-sticky-mobile-ad {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 999;
	background: #fff;
	border-top: 1px solid var(--scn-line);
	display: none;
	align-items: center;
	justify-content: center;
	min-height: 56px;
}
@media (max-width: 768px) {
	.scn-sticky-mobile-ad { display: flex; }
}
.scn-sticky-ad-close {
	position: absolute;
	top: -14px; right: 4px;
	width: 24px; height: 24px;
	border-radius: 50%;
	background: var(--scn-ink);
	color: #fff;
	border: none;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

/* ---------- In-content "read also" + related grid ---------- */
.scn-readalso {
	margin: 18px 0;
	padding: 12px 16px;
	background: #FBF1E4;
	border-left: 3px solid var(--scn-saffron);
	font-size: 0.92rem;
}
.scn-readalso-label { font-family: var(--scn-font-mono); font-weight: 700; text-transform: uppercase; font-size: 0.7rem; margin-right: 6px; color: var(--scn-alert); }
.scn-readalso a { color: var(--scn-navy); font-weight: 600; text-decoration: none; }
.scn-readalso a:hover { text-decoration: underline; }

.scn-related-grid { margin-top: 36px; }
.scn-related-grid-items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.scn-related-card { text-decoration: none; color: var(--scn-ink); display: block; }
.scn-related-card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: var(--scn-radius); margin-bottom: 8px; }
.scn-related-card-title { font-size: 0.88rem; line-height: 1.35; font-weight: 600; }

/* ---------- Footer widgets ---------- */
.scn-footer-widget-title { font-family: var(--scn-font-display); }

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible {
	outline: 2px solid var(--scn-saffron);
	outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	.scn-cat-grid { grid-template-columns: repeat(3, 1fr); }
	.scn-related-grid-items { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
	.scn-hero-row { grid-template-columns: 1fr; }
	.scn-cat-grid { grid-template-columns: repeat(2, 1fr); }
	.scn-hero-headline { font-size: 1.5rem; }
}
@media (max-width: 480px) {
	.scn-cat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
	.scn-related-grid-items { grid-template-columns: 1fr; }
}
