/* Evaself front-end — shared styles.
   Colours follow Telegram's theme variables when the page runs inside a
   Mini App, and fall back to a calm neutral palette on the open web. */

:root {
	--bg: #ffffff;
	--surface: #f6f7f9;
	--text: #12141a;
	--muted: #6b7280;
	--accent: #6b5cf0;
	--accent-soft: #eceafe;
	--border: #e5e7eb;
	--danger: #d64545;
	--ok: #2f9e63;
	--radius: 14px;
	--space: 16px;
	font-synthesis-weight: none;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #14161c;
		--surface: #1c1f27;
		--text: #eef0f5;
		--muted: #9aa1ae;
		--accent: #8f83f5;
		--accent-soft: #262238;
		--border: #2a2e39;
	}
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
}

body {
	background: var(--bg);
	color: var(--text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu,
		"Helvetica Neue", sans-serif;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

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

.wrap {
	max-width: 720px;
	margin: 0 auto;
	padding: calc(var(--space) * 2) var(--space);
}

.eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 12px;
	font-weight: 600;
	color: var(--accent);
	margin: 0 0 8px;
}

h1 {
	font-size: clamp(28px, 6vw, 40px);
	line-height: 1.15;
	margin: 0 0 12px;
	letter-spacing: -0.02em;
}

h2 {
	font-size: 20px;
	margin: 32px 0 12px;
	letter-spacing: -0.01em;
}

p.lead {
	font-size: 18px;
	color: var(--muted);
	margin: 0 0 24px;
}

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: var(--space);
	margin-bottom: 12px;
}

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

.row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

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

.small {
	font-size: 13px;
}

.button {
	display: inline-block;
	background: var(--accent);
	color: #fff;
	text-decoration: none;
	border: 0;
	border-radius: 10px;
	padding: 12px 20px;
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
}

.badge {
	display: inline-block;
	background: var(--accent-soft);
	color: var(--accent);
	border-radius: 999px;
	padding: 2px 10px;
	font-size: 12px;
	font-weight: 600;
}

/* quota meters */
.meter {
	height: 6px;
	background: var(--border);
	border-radius: 999px;
	overflow: hidden;
	margin-top: 8px;
}

.meter > span {
	display: block;
	height: 100%;
	background: var(--accent);
	border-radius: 999px;
}

.meter.is-full > span {
	background: var(--danger);
}

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

ul.plain li {
	padding: 10px 0;
	border-bottom: 1px solid var(--border);
}

ul.plain li:last-child {
	border-bottom: 0;
}

.status {
	padding: 12px var(--space);
	border-radius: 10px;
	font-size: 14px;
}

.status.error {
	background: color-mix(in srgb, var(--danger) 12%, transparent);
	color: var(--danger);
}

footer {
	margin-top: 40px;
	padding-top: 20px;
	border-top: 1px solid var(--border);
	font-size: 13px;
	color: var(--muted);
}
