:root {
	--bg-root: #ffffff;
	--text-primary: #1f2023;
	--text-secondary: #5f636a;
	--border-subtle: #e5e5e5;
	--primary-color: #000000;
	--code-bg: #f7f7f7;
	--code-border: #e5e5e5;
}

body {
	font-family:
		"ui-sans-serif", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica,
		"Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
	line-height: 1.6;
	max-width: 780px;
	margin: 0 auto;
	padding: 48px 40px;
	background-color: var(--bg-root);
	color: var(--text-primary);
	-webkit-font-smoothing: antialiased;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	box-sizing: border-box;
}

.content {
	flex: 1;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--text-primary);
	margin-top: 2em;
	margin-bottom: 0.6em;
	line-height: 1.3;
	font-weight: 600;
}

h1:first-child {
	margin-top: 0;
}

h1 {
	font-size: 2.25em;
	letter-spacing: -0.025em;
	border-bottom: 2px solid var(--text-primary);
	padding-bottom: 0.4em;
	margin-bottom: 1em;
}

h2 {
	font-size: 1.5em;
	letter-spacing: -0.015em;
	border-bottom: 1px solid var(--border-subtle);
	padding-bottom: 0.3em;
	margin-top: 2.5em;
}

h3 {
	font-size: 1.15em;
	font-weight: 600;
	margin-bottom: 0.4em;
}

p {
	margin-bottom: 1.25em;
	color: #333333;
}

/* Code */
code {
	background-color: var(--code-bg);
	padding: 2px 4px;
	border-radius: 4px;
	font-family: "SF Mono", "Menlo", "Monaco", "Courier New", monospace;
	font-size: 0.85em;
	color: var(--text-primary);
	border: 1px solid var(--code-border);
}

pre {
	background-color: var(--code-bg);
	border: 1px solid var(--code-border);
	padding: 16px;
	border-radius: 6px;
	overflow-x: auto;
	margin-bottom: 1.5em;
}

pre code {
	background-color: transparent;
	padding: 0;
	color: inherit;
	border: none;
	font-size: 0.85em;
}

/* Lists */
ul,
ol {
	margin-bottom: 1.25em;
	padding-left: 1.25em;
	color: #333333;
}

li {
	margin-bottom: 0.4em;
}

/* Links */
a {
	color: var(--primary-color);
	text-decoration: underline;
	text-decoration-color: rgba(0, 0, 0, 0.3);
	text-underline-offset: 3px;
	transition: all 0.2s;
}

a:hover {
	text-decoration-color: var(--primary-color);
	background-color: rgba(0, 0, 0, 0.05);
}

/* Blockquotes */
blockquote {
	border-left: 3px solid var(--primary-color);
	background: #fafafa;
	margin: 1.5em 0;
	padding: 1em 1.2em;
	color: var(--text-primary);
	font-style: italic;
	border-radius: 0 4px 4px 0;
}

/* Tables */
table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.5em;
	font-size: 0.9em;
}

th,
td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--border-subtle);
	text-align: left;
}

th {
	color: var(--text-primary);
	font-weight: 600;
	background-color: #fafafa;
	border-bottom: 2px solid var(--border-subtle);
}

/* Footer */
footer {
	margin-top: 5rem;
	padding-top: 2rem;
	text-align: center;
	font-size: 0.75rem;
	color: var(--text-secondary);
	border-top: 1px solid var(--border-subtle);
}

footer a {
	color: var(--text-secondary);
	text-decoration: none;
}

footer a:hover {
	color: var(--text-primary);
	text-decoration: underline;
}

@media print {
	body {
		margin: 0;
		padding: 2cm;
		max-width: 100%;
	}
	footer {
		display: none;
	}
	a {
		text-decoration: none;
	}
}
