/*
  site.css — the public website at datasolutions.rw: the landing page (/),
  /product, /engineering, /download, /help, the privacy policy and the account
  deletion page. Plain HTML and CSS served directly by Firebase Hosting,
  readable without JavaScript and without the application bundle. Brand tokens
  follow the static/story/ profile pages; the header and footer carry their own
  copy so they look the same under a profile page's tokens.
*/
:root,
.site-header,
.site-footer {
	--brand: #0056b3;
	--brand-dark: #12314f;
	--accent: #ffcd00;
	--ink: #26313d;
	--muted: #566475;
	--line: #d7dde5;
	--wash: #f4f7fa;
	--paper: #ffffff;
	--field: #0f766e;
	--grid: #4f46e5;
	--solar: #15803d;
	--radius: 10px;
}

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

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, Helvetica, sans-serif;
	font-size: clamp(15.5px, 0.95rem + 0.15vw, 17px);
	line-height: 1.62;
	overflow-x: hidden;
}

img {
	max-width: 100%;
}

a {
	color: var(--brand);
}

h1,
h2,
h3 {
	color: var(--brand-dark);
	line-height: 1.2;
}

.wrap {
	width: min(100%, 1100px);
	margin: 0 auto;
	padding: 0 16px;
}

@media (min-width: 720px) {
	.wrap {
		padding: 0 32px;
	}
}

/* ─────────────────────────────  Header  ───────────────────────────── */
.site-header,
.site-footer {
	font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, Helvetica, sans-serif;
	line-height: 1.62;
}

.site-header {
	border-bottom: 1px solid var(--line);
	background: var(--paper);
}

.site-header .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
	padding-top: 12px;
	padding-bottom: 12px;
}

.site-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--brand-dark);
	font-weight: 700;
	font-size: 1.1rem;
	text-decoration: none;
	margin-right: auto;
}

.site-brand img {
	width: 32px;
	height: 32px;
}

.site-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 16px;
}

.site-nav a {
	color: var(--ink);
	text-decoration: none;
	font-weight: 500;
	padding: 6px 0;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
	color: var(--brand);
}

.site-nav a[aria-current="page"] {
	box-shadow: inset 0 -2px 0 var(--brand);
}

.button {
	display: inline-block;
	padding: 10px 18px;
	border: 1px solid var(--brand);
	border-radius: 8px;
	background: var(--paper);
	color: var(--brand);
	font-weight: 600;
	text-decoration: none;
	line-height: 1.3;
}

.button:hover {
	background: var(--wash);
}

.button.primary {
	background: var(--brand);
	color: #ffffff;
}

.button.primary:hover {
	background: var(--brand-dark);
	border-color: var(--brand-dark);
}

.site-nav .button {
	padding: 8px 14px;
	color: #ffffff;
}

/* ─────────────────────────────  Landing  ───────────────────────────── */
.hero {
	background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 100%);
	color: #ffffff;
	padding: clamp(48px, 9vw, 104px) 0;
}

.hero h1 {
	color: #ffffff;
	font-size: clamp(30px, 5.4vw, 50px);
	max-width: 18em;
	margin: 0 0 0.4em;
}

.hero p {
	max-width: 40em;
	font-size: clamp(16.5px, 1rem + 0.4vw, 20px);
	color: #e2e8f0;
	margin: 0 0 1.6em;
}

.hero .rule {
	width: 72px;
	height: 4px;
	background: var(--accent);
	border-radius: 2px;
	margin: 0 0 1.2em;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.hero .button {
	border-color: #ffffff;
	background: transparent;
	color: #ffffff;
}

.hero .button.primary {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--brand-dark);
}

.section {
	padding: clamp(40px, 7vw, 80px) 0;
}

.section.wash {
	background: var(--wash);
}

.section h2 {
	font-size: clamp(24px, 3.4vw, 32px);
	margin: 0 0 0.4em;
}

.section .lead {
	color: var(--muted);
	max-width: 46em;
	margin: 0 0 2em;
}

.cards {
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.cards .card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 24px;
	background: var(--paper);
	border: 1px solid var(--line);
	border-top: 4px solid var(--brand);
	border-radius: var(--radius);
}

.cards .card h3 {
	margin: 0;
	font-size: 1.25rem;
}

.cards .card p {
	margin: 0;
	color: var(--muted);
}

.cards .card .actions {
	margin-top: auto;
	padding-top: 8px;
}

.cards .card.field { border-top-color: var(--field); }
.cards .card.grid { border-top-color: var(--grid); }
.cards .card.solar { border-top-color: var(--solar); }

.cards a.card {
	color: inherit;
	text-decoration: none;
}

.cards a.card:hover {
	border-color: var(--brand);
}

.cards .card .more {
	color: var(--brand);
	font-weight: 600;
}

.steps {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	padding: 0;
	margin: 0;
	list-style: none;
	counter-reset: step;
}

.steps li {
	counter-increment: step;
	padding: 20px;
	border-left: 4px solid var(--accent);
	background: var(--paper);
	border-radius: 0 var(--radius) var(--radius) 0;
}

.steps li::before {
	content: counter(step);
	display: block;
	font-size: 1.6rem;
	font-weight: 700;
	color: var(--brand);
}

.steps strong {
	display: block;
	color: var(--brand-dark);
	margin-bottom: 4px;
}

.audience {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 0;
	margin: 0 0 1.5em;
	list-style: none;
}

.audience li {
	padding: 6px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--paper);
	font-weight: 500;
}

.stats {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stat {
	padding: 20px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	text-align: center;
}

.stat strong {
	display: block;
	font-size: 1.9rem;
	color: var(--brand);
}

.stat span {
	color: var(--muted);
}

/* ─────────────────────────────  Documents  ───────────────────────────── */
.doc {
	width: min(100%, 860px);
	margin: 0 auto;
	padding: clamp(28px, 5vw, 56px) 16px clamp(40px, 6vw, 72px);
}

.doc h1 {
	color: var(--brand);
	font-size: clamp(28px, 4.6vw, 40px);
	border-bottom: 2px solid var(--brand);
	padding-bottom: 10px;
	margin-top: 0;
}

.doc h2 {
	color: var(--brand);
	margin-top: 32px;
}

.doc h3 {
	color: var(--muted);
}

.doc li {
	margin-bottom: 8px;
}

.doc .contact {
	background: var(--wash);
	padding: 16px;
	border-radius: 6px;
}

/* ─────────────────────────────  Download  ───────────────────────────── */
button.button {
	font: inherit;
	cursor: pointer;
}

.download .lead,
.help .lead {
	color: var(--muted);
	font-size: 1.08rem;
}

.channel-switch {
	display: flex;
	gap: 8px;
	margin: 20px 0 8px;
}

.channel-switch a {
	padding: 6px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--ink);
	text-decoration: none;
	font-weight: 600;
}

.channel-switch a[aria-current] {
	border-color: var(--brand);
	background: var(--brand);
	color: #ffffff;
}

.manager-status,
.note {
	color: var(--muted);
}

.platforms {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 20px 0;
}

.platform {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 4px 20px 16px;
	min-width: 0;
}

.platform.selected {
	order: -1;
	border-color: var(--brand);
	box-shadow: 0 0 0 1px var(--brand);
}

.platform h2 {
	margin-top: 16px;
}

.platform pre {
	margin: 8px 0;
	padding: 12px 14px;
	background: var(--wash);
	border-radius: 6px;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	font-size: 0.85rem;
}

.platform summary {
	cursor: pointer;
	font-weight: 600;
}

.platform .digest {
	color: var(--muted);
	font-size: 0.8rem;
	overflow-wrap: anywhere;
}

/* ─────────────────────────────  Help  ───────────────────────────── */
.help {
	--help-bg: var(--wash);
	--help-surface: var(--paper);
	--help-text: var(--ink);
	--help-text-secondary: var(--muted);
	--help-muted: #94a3b8;
	--help-border: var(--line);
	--help-border-light: #edf1f5;
}

.help-language {
	font-weight: 600;
}

.help-category h2,
.help-more h2 {
	font-size: 1.2rem;
}

.help-list {
	list-style: none;
	padding: 0;
}

.help-list li {
	display: grid;
	gap: 2px;
	padding: 10px 0;
	border-bottom: 1px solid var(--line);
}

.help-list a {
	font-weight: 600;
}

.help-list span {
	color: var(--muted);
	font-size: 0.95rem;
}

.help-breadcrumb {
	color: var(--muted);
	font-size: 0.95rem;
}

.help-article {
	overflow-wrap: anywhere;
}

.help-article img {
	height: auto;
}

.help-article table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
	border-collapse: collapse;
}

.help-article th,
.help-article td {
	border: 1px solid var(--line);
	padding: 6px 10px;
	text-align: left;
}

.help-pager {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	margin: 32px 0;
	padding-top: 16px;
	border-top: 1px solid var(--line);
}

.help-pager a[rel="next"] {
	margin-left: auto;
}

.help-more {
	margin-top: 24px;
}

/* ─────────────────────────────  Footer  ───────────────────────────── */
.site-footer {
	background: var(--brand-dark);
	color: #cbd5e1;
	padding: 40px 0 28px;
	font-size: 0.95rem;
}

.site-footer .wrap {
	display: grid;
	gap: 24px;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.site-footer strong {
	display: block;
	color: #ffffff;
	margin-bottom: 6px;
}

.site-footer p {
	margin: 0 0 4px;
}

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

.site-footer li {
	margin: 0 0 4px;
}

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

.site-footer .copy {
	grid-column: 1 / -1;
	border-top: 1px solid rgba(203, 213, 225, 0.25);
	padding-top: 16px;
	color: #94a3b8;
}

@media print {
	.site-header,
	.site-footer {
		display: none;
	}
}
