/* =============================================================================
   Rich Dad's News — Base (reset + typography + layout primitives)
   Depends on tokens.css
   ============================================================================= */

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--rdn-bg);
	color: var(--rdn-body);
	font-family: var(--rdn-font-body);
	font-size: var(--rdn-fs-body);
	line-height: var(--rdn-lh-body);
	font-weight: var(--rdn-fw-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--rdn-link); text-decoration: none; transition: color var(--rdn-transition); }
a:hover { color: var(--rdn-link-hover); }

/* Headings */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--rdn-font-heading);
	color: var(--rdn-heading);
	margin: 0 0 var(--rdn-space-s);
}
h1 { font-size: var(--rdn-fs-h1); line-height: var(--rdn-lh-h1); font-weight: var(--rdn-fw-h1); }
h2 { font-size: var(--rdn-fs-h2); line-height: var(--rdn-lh-h2); font-weight: var(--rdn-fw-h2); }
h3 {
	font-family: var(--rdn-font-body);
	font-size: var(--rdn-fs-h3);
	line-height: var(--rdn-lh-h3);
	font-weight: var(--rdn-fw-h3);
	letter-spacing: var(--rdn-ls-h3);
	text-transform: uppercase;
}

p { margin: 0 0 var(--rdn-space-s); }

ul, ol { margin: 0 0 var(--rdn-space-s); padding-left: 1.25em; }

/* Layout primitives */
.rdn-container { width: 100%; max-width: var(--rdn-container); margin-inline: auto; padding-inline: var(--rdn-space-s); }
.rdn-content   { width: 100%; max-width: var(--rdn-content);  margin-inline: auto; }

/* Section title with the red underline rule (TOP STORIES, EDITOR'S PICK, ...) */
.rdn-section-title {
	position: relative;
	display: inline-block;
	padding-bottom: var(--rdn-space-xs);
	margin-bottom: var(--rdn-space-m);
}
.rdn-section-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 64px;
	height: 3px;
	background: var(--rdn-section-rule);
}
.rdn-heading-accent { color: var(--rdn-heading-accent); }

/* Meta (dates & categories) */
.rdn-meta {
	font-size: var(--rdn-fs-meta);
	line-height: var(--rdn-lh-meta);
	color: var(--rdn-muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Accessibility helpers */
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; left: -9999px; top: 0;
	background: var(--rdn-red); color: var(--rdn-white);
	padding: var(--rdn-space-xs) var(--rdn-space-s); z-index: 1000;
}
.skip-link:focus { left: 0; color: var(--rdn-white); }

:where(a, button, input, select, textarea):focus-visible {
	outline: none;
	box-shadow: var(--rdn-focus-ring);
}

@media (prefers-reduced-motion: reduce) {
	* { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
