/* hortli — base styles. Served from this origin only: the Content-Security-Policy forbids
   inline styles, so nothing in a template may use style="…". */

:root {
	--bg: #f6f5f1;
	--surface: #ffffff;
	--text: #1f2421;
	--muted: #5d655f;
	--border: #d8d6cc;
	--accent: #2f6f4f;
	--accent-text: #ffffff;
	--danger: #a32b2b;
	--danger-bg: #fbeaea;
	--ok-bg: #e7f3ec;
	--radius: 8px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #161a17;
		--surface: #1f2521;
		--text: #eceee9;
		--muted: #a2aaa3;
		--border: #343c36;
		--accent: #5fb487;
		--accent-text: #0c1a12;
		--danger: #f08a8a;
		--danger-bg: #3a1f1f;
		--ok-bg: #1d3327;
	}
}

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.page { max-width: 64rem; margin: 0 auto; padding: 1rem 16px 3rem; }
.page--narrow { max-width: 26rem; }

.topbar {
	display: flex; align-items: center; justify-content: space-between; gap: 1rem;
	padding: 0.75rem 16px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.topbar__brand { font-weight: 700; color: var(--text); text-decoration: none; }
.topbar__user { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); font-size: 0.9rem; }
.topbar__user form { margin: 0; }

h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 1rem; }
a { color: var(--accent); }

.card {
	background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
	padding: 1.25rem; margin-top: 1.5rem;
}

.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.field input {
	width: 100%; min-height: 2.75rem; padding: 0.5rem 0.75rem; font: inherit;
	color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
}
.field input:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.field__help, .helptext { color: var(--muted); font-size: 0.875rem; margin: 0.25rem 0 0; }
.errorlist { list-style: none; margin: 0.25rem 0 0; padding: 0; color: var(--danger); font-size: 0.9rem; }

.btn {
	display: inline-block; min-height: 2.75rem; padding: 0.5rem 1.25rem; font: inherit; font-weight: 600;
	color: var(--accent-text); background: var(--accent); border: 0; border-radius: var(--radius);
	cursor: pointer; text-decoration: none; text-align: center;
}
.btn--block { display: block; width: 100%; }
.btn--quiet { color: var(--text); background: transparent; border: 1px solid var(--border); min-height: 2.25rem; padding: 0.25rem 0.75rem; }

.messages { list-style: none; margin: 1rem 0 0; padding: 0; }
.messages li { padding: 0.75rem 1rem; border-radius: var(--radius); background: var(--ok-bg); }
.messages li.error { background: var(--danger-bg); color: var(--danger); }
.alert { padding: 0.75rem 1rem; border-radius: var(--radius); background: var(--danger-bg); color: var(--danger); margin-bottom: 1rem; }
.muted { color: var(--muted); }
