/*
 * Layout and components for USSS apps. Colors come only from tokens.css (as hsl(var(--token))):
 * never write a color value here. System fonts, no web fonts.
 */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	color-scheme: light dark;
}

body {
	margin: 0;
	background: hsl(var(--background));
	color: hsl(var(--foreground));
	font-family:
		system-ui,
		-apple-system,
		'Segoe UI',
		Roboto,
		sans-serif;
	font-size: 16px;
	line-height: 1.5;
}

a {
	color: hsl(var(--link));
}

h1 {
	font-size: 1.5rem;
	line-height: 1.25;
	margin: 0 0 0.75rem;
}

h2 {
	font-size: 1.125rem;
	margin: 1.5rem 0 0.5rem;
}

.bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.75rem 1rem;
	border-bottom: 1px solid hsl(var(--border));
	background: hsl(var(--card));
}

.brand {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	color: hsl(var(--foreground));
	font-weight: 600;
	text-decoration: none;
}

.who {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0;
	color: hsl(var(--muted-foreground));
	font-size: 0.875rem;
}

main {
	max-width: 72rem;
	margin: 0 auto;
	padding: 1.5rem 1rem 3rem;
}

.card {
	background: hsl(var(--card));
	color: hsl(var(--card-foreground));
	border: 1px solid hsl(var(--border));
	border-radius: var(--radius);
	padding: 1.25rem;
}

.narrow {
	max-width: 28rem;
	margin: 3rem auto 0;
}

.button,
button {
	display: inline-block;
	padding: 0.5rem 1rem;
	border: 1px solid transparent;
	border-radius: var(--radius);
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

button.quiet {
	background: transparent;
	color: hsl(var(--foreground));
	border-color: hsl(var(--border));
	font-weight: 400;
	padding: 0.25rem 0.75rem;
}

.button:focus-visible,
button:focus-visible,
a:focus-visible {
	outline: 2px solid hsl(var(--ring));
	outline-offset: 2px;
}

.notice {
	padding: 0.5rem 0.75rem;
	border-radius: var(--radius);
	background: hsl(var(--muted));
	color: hsl(var(--foreground));
}

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

table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	text-align: left;
	padding: 0.5rem;
	border-bottom: 1px solid hsl(var(--border));
	vertical-align: top;
}

th {
	color: hsl(var(--muted-foreground));
	font-weight: 600;
	font-size: 0.875rem;
}

/* --- The OKR page (src/web/okr-pages.ts) --- */

.page-head {
	margin-bottom: 1rem;
}

.goal {
	margin-top: 1.5rem;
}

.goal > h2 {
	margin: 0 0 0.75rem;
}

.objective {
	margin-bottom: 1rem;
}

.objective h3 {
	font-size: 1.0625rem;
	margin: 0 0 0.25rem;
}

.objective header p {
	margin: 0 0 0.75rem;
	font-size: 0.875rem;
}

td.progress {
	white-space: nowrap;
}

progress {
	width: 6rem;
	height: 0.5rem;
	vertical-align: middle;
	accent-color: hsl(var(--primary));
}

.badge {
	display: inline-block;
	margin-left: 0.375rem;
	padding: 0 0.375rem;
	border-radius: var(--radius);
	background: hsl(var(--muted));
	color: hsl(var(--muted-foreground));
	font-size: 0.75rem;
}

.editor {
	margin-bottom: 1rem;
}

.editor h2 {
	margin-top: 0;
}

.editor form {
	margin: 0.5rem 0;
}

.ask label {
	display: block;
	margin-bottom: 0.375rem;
}

textarea {
	display: block;
	width: 100%;
	margin-bottom: 0.5rem;
	padding: 0.5rem;
	border: 1px solid hsl(var(--input));
	border-radius: var(--radius);
	background: hsl(var(--background));
	color: hsl(var(--foreground));
	font: inherit;
}

.banner {
	margin-bottom: 1rem;
	padding: 0.75rem 1rem;
	border-radius: var(--radius);
	background: hsl(var(--accent));
	color: hsl(var(--accent-foreground));
}

.banner p {
	margin: 0 0 0.5rem;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.actions form {
	margin: 0;
}

.history {
	margin: 0.5rem 0 0;
	padding-left: 1.25rem;
	font-size: 0.875rem;
}
