:root {
	--bg: #0f0f0f;
	--bg-surface: #1a1a1a;
	--text: #d4d4d4;
	--text-muted: #737373;
	--accent: #7dd3fc;
	--border: #2a2a2a;
}

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

html {
	font-size: 16px;
	background: var(--bg);
	color: var(--text);
	font-family: system-ui, sans-serif;
	line-height: 1.6;
}

body {
	max-width: 860px;
	margin: 0 auto;
	padding: 2rem 1rem;
}

header {
	margin-bottom: 2rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--border);
}

header nav a {
	color: var(--text-muted);
	text-decoration: none;
	font-size: 0.9rem;
}

header nav a:hover {
	color: var(--text);
}

main {
	min-height: 60vh;
}

footer {
	margin-top: 4rem;
	padding-top: 1rem;
	border-top: 1px solid var(--border);
}

h1, h2, h3, h4, h5, h6 {
	color: var(--text);
	line-height: 1.3;
	margin-bottom: 0.75rem;
}

p {
	margin-bottom: 1rem;
}

a, a:visited {
	color: var(--accent);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

ul, ol {
	padding-left: 1.5rem;
	margin-bottom: 1rem;
}

li {
	margin-bottom: 0.4rem;
}

code {
	background: var(--bg-surface);
	padding: 0.1em 0.4em;
	border-radius: 3px;
	font-family: monospace;
	font-size: 0.9em;
}

pre {
	background: var(--bg-surface);
	padding: 1rem;
	border-radius: 4px;
	overflow-x: auto;
	margin-bottom: 1rem;
}

pre code {
	background: none;
	padding: 0;
}

blockquote {
	border-left: 3px solid var(--border);
	padding-left: 1rem;
	color: var(--text-muted);
	margin: 1rem 0;
}

hr {
	border: none;
	border-top: 1px solid var(--border);
	margin: 2rem 0;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1rem;
}

th, td {
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--border);
	text-align: left;
}

th {
	background: var(--bg-surface);
	color: var(--text-muted);
	font-weight: 600;
}

input, textarea, select {
	background: var(--bg-surface);
	color: var(--text);
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 0.4rem 0.6rem;
	width: 100%;
	margin-bottom: 0.75rem;
}

button {
	background: var(--accent);
	color: var(--bg);
	border: none;
	border-radius: 4px;
	padding: 0.4rem 1rem;
	cursor: pointer;
	font-size: 0.95rem;
}

button:hover {
	opacity: 0.85;
}

/* ── Homepage ── */
.home-header {
	margin-bottom: 2rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--border);
}

.home-title {
	font-size: 1.4rem;
	font-weight: 700;
	margin-bottom: 0.2rem;
}

.home-lead {
	color: var(--text-muted);
	font-size: 0.85rem;
	margin-bottom: 0;
}

.home-empty {
	color: var(--text-muted);
}

.page-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.75rem;
}

@media (max-width: 600px) {
	.page-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 380px) {
	.page-grid { grid-template-columns: 1fr; }
}

.page-card {
	display: block;
	padding: 1rem 1rem 0.9rem;
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-top: 3px solid var(--card-color, var(--accent));
	border-radius: 4px;
	text-decoration: none;
	color: var(--text);
	transition: background 0.12s, border-color 0.12s;
}

.page-card:hover {
	background: #1e1e1e;
	text-decoration: none;
}

.card-title {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--text);
	margin-bottom: 0.3rem;
	line-height: 1.3;
}

.card-desc {
	font-size: 0.76rem;
	color: var(--text-muted);
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
