/* Apps Panel — authored by satuapps (satuapps.com) */

/* The public pages: the list of apps, a page per app, and their legal texts. */
:root {
	--bg: #fbfbfc;
	--surface: #ffffff;
	--text: #14171c;
	--muted: #5b6370;
	--border: #e3e6eb;
	--accent: #3554d1;
	--on-accent: #ffffff;
	--shadow: 0 1px 2px rgb(16 24 40 / 5%), 0 8px 24px rgb(16 24 40 / 6%);
	--font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0e1014;
		--surface: #161920;
		--text: #e8eaef;
		--muted: #9aa2b1;
		--border: #262b36;
		--shadow: 0 1px 2px rgb(0 0 0 / 40%);
	}
}

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

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

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 16px/1.6 var(--font);
}

h1,
h2,
h3,
h4,
p,
ul,
ol {
	margin: 0;
	padding: 0;
}

h1 {
	font-size: clamp(1.7rem, 4.5vw, 2.4rem);
	line-height: 1.15;
	letter-spacing: -0.02em;
}

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

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.top,
.page,
.foot {
	width: 100%;
	max-width: 880px;
	margin: 0 auto;
	padding-left: 20px;
	padding-right: 20px;
}

.top {
	padding-top: 22px;
	padding-bottom: 6px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	color: var(--text);
	font-weight: 650;
	text-decoration: none;
}

.brand-mark {
	width: 22px;
	height: 22px;
	border-radius: 6px;
	background:
		radial-gradient(circle at 30% 30%, #fff 0 2.5px, transparent 3px), radial-gradient(circle at 70% 30%, #fff 0 2.5px, transparent 3px), radial-gradient(circle at 30% 70%, #fff 0 2.5px, transparent 3px),
		radial-gradient(circle at 70% 70%, #fff 0 2.5px, transparent 3px), #3554d1;
}

.page {
	flex: 1;
	padding-top: 36px;
	padding-bottom: 56px;
}

.foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	padding-top: 20px;
	padding-bottom: 28px;
	border-top: 1px solid var(--border);
	color: var(--muted);
	font-size: 0.9rem;
}

.foot a {
	color: inherit;
}

.hero {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 32px;
}

.lead {
	max-width: 60ch;
	color: var(--muted);
	font-size: 1.1rem;
}

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

.crumbs {
	margin-bottom: 10px;
	font-size: 0.95rem;
}

/* The list of apps --------------------------------------------------------------------- */

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
	list-style: none;
}

.tile {
	display: flex;
	align-items: center;
	gap: 14px;
	height: 100%;
	padding: 16px;
	border: 1px solid var(--border);
	border-radius: 16px;
	background: var(--surface);
	box-shadow: var(--shadow);
	color: var(--text);
	text-decoration: none;
	transition:
		transform 0.15s,
		border-color 0.15s;
}

.tile:hover {
	border-color: var(--accent);
	transform: translateY(-2px);
}

.tile-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.tile-name {
	font-weight: 650;
	font-size: 1.05rem;
}

.tile-tagline {
	color: var(--muted);
	font-size: 0.92rem;
	line-height: 1.35;
}

.icon {
	flex: none;
	border-radius: 22%;
	object-fit: cover;
}

.icon-letter {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 700;
}

.icon-72 {
	width: 72px;
	height: 72px;
	font-size: 2rem;
}

.icon-128 {
	width: 128px;
	height: 128px;
	font-size: 3.6rem;
}

/* One app ------------------------------------------------------------------------------ */

.app {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.app-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 24px;
}

.app-head > div {
	display: flex;
	flex: 1 1 260px;
	flex-direction: column;
	gap: 8px;
}

.app-head .icon {
	box-shadow: var(--shadow);
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	margin-top: 6px;
	padding: 10px 22px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface);
	color: var(--text);
	font-weight: 600;
	text-decoration: none;
}

.button-accent {
	border-color: var(--accent);
	background: var(--accent);
	color: var(--on-accent);
}

.button:hover {
	filter: brightness(1.08);
}

.legal-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	padding-top: 20px;
	border-top: 1px solid var(--border);
	font-size: 0.95rem;
}

/* Running text ------------------------------------------------------------------------- */

.legal {
	max-width: 72ch;
}

.legal > .quiet {
	margin-top: 6px;
}

.legal .prose {
	margin-top: 28px;
}

.prose {
	max-width: 72ch;
	overflow-wrap: break-word;
}

.prose > * + * {
	margin-top: 0.9em;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
	margin-top: 1.7em;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.prose h1 {
	font-size: 1.5rem;
}

.prose h2 {
	font-size: 1.25rem;
}

.prose h3 {
	font-size: 1.08rem;
}

.prose h4 {
	font-size: 1rem;
}

.prose ul,
.prose ol {
	padding-left: 1.4em;
}

.prose li + li {
	margin-top: 0.3em;
}

.prose code {
	padding: 0.1em 0.35em;
	border-radius: 5px;
	background: var(--border);
	font-size: 0.9em;
}

.prose hr {
	margin: 1.8em 0;
	border: 0;
	border-top: 1px solid var(--border);
}

@media (prefers-reduced-motion: reduce) {
	.tile {
		transition: none;
	}

	.tile:hover {
		transform: none;
	}
}
