/* SHARED across kapps — edit anywhere; on push it propagates to the others. Watch list: _kshared/manifest.json */
/* Shared base: element resets, theme-scheme forcing, and small utilities.
   The per-app theme tokens (:root { --bg, --surface, --text, --accent, --border,
   ... } declared with light-dark()) live in each app's app.css; this file only
   consumes them via var(). */

/* Forced theme: pin color-scheme so every light-dark() resolves to that half. */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }

* { box-sizing: border-box; }

html, body {
	margin: 0;
	padding: 0;
	height: 100%;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-family, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
	-webkit-font-smoothing: antialiased;
	overscroll-behavior-y: none;
}

body {
	background:
		radial-gradient(1200px 480px at 50% -10%, var(--bg-grad-top), transparent 70%),
		var(--bg);
	min-height: 100dvh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { display: block; }

/* Scrollbars: touch devices get no custom styling → native auto-hiding overlay
   bars. Desktop (mouse) gets themed, always-visible bars. */
@media (hover: hover) and (pointer: fine) {
	::-webkit-scrollbar { width: 10px; height: 10px; }
	::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; }
	::-webkit-scrollbar-track { background: transparent; }
}

.muted { color: var(--text-dim); }
.truncate {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
