:root {
	--muted: #6b7280;
	--border: #d1d5db;
	--breadcrumb-bg: #f3f4f6;
	--link: #1a3e8c;
	--brand: #b31b1b;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #1f2937;
	line-height: 1.6;
}

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

.wrap {
	max-width: 62rem;
	margin: 0 auto;
	padding: 0 1.25rem;
}

.site-header {
	border-bottom: 1px solid var(--border);
}

.site-header .wrap {
	max-width: 80rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding-top: 1rem;
	padding-bottom: 1rem;
}

.site-brand {
	font-weight: 700;
	font-size: 1.15rem;
	letter-spacing: 0.03em;
	color: var(--brand);
	text-decoration: none;
}

.site-navigation {
	display: flex;
	flex: 1;
	min-width: 0;
	overflow-x: auto;
	gap: 0.75rem;
	padding: 0.25rem;
	scroll-padding-inline: 0.25rem;
}

.site-navigation a {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	min-height: 2.75rem;
	white-space: nowrap;
}

.site-navigation a:focus-visible {
	outline: 2px solid var(--link);
	outline-offset: 2px;
}

.breadcrumb {
	background: var(--breadcrumb-bg);
	border-bottom: 1px solid var(--border);
	font-size: 0.85rem;
}

.breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0.6rem 0;
}

.breadcrumb li:not(:last-child)::after {
	content: "/";
	margin-left: 0.5rem;
	color: var(--muted);
}

.breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.breadcrumb a:hover {
	text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
	color: var(--muted);
}

main {
	padding: 1.5rem 0 3rem;
}

.page-layout {
	display: grid;
	grid-template-columns: 1fr 16rem;
	gap: 2rem;
	align-items: start;
}

article h1 {
	font-size: 1.6rem;
	line-height: 1.3;
	margin: 0 0 0.5rem;
}

article p:not(.submitted) {
	text-align: justify;
	hyphens: auto;
}

.submitted {
	color: var(--muted);
	font-size: 0.9rem;
	font-style: italic;
	margin: 0 0 1.5rem;
}

.article-list {
	list-style: none;
	margin: 1.5rem 0 0;
	padding: 0;
}

.article-list li {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--border);
}

.article-list li:first-child {
	border-top: 1px solid var(--border);
}

.article-list time {
	flex: 0 0 6.5rem;
	color: var(--muted);
	font-size: 0.85rem;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

@media (max-width: 480px) {
	.article-list li {
		flex-direction: column;
		gap: 0.15rem;
	}
}

.sidebar {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.sidebar-box {
	border: 1px solid var(--border);
	border-radius: 0.35rem;
	padding: 0.85rem 1rem;
	background: #fafafa;
}

.sidebar-box h2 {
	margin: 0 0 0.6rem;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--muted);
}

.sidebar-box p {
	margin: 0.25rem 0;
	font-size: 0.9rem;
}

.sidebar-box__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.sidebar-box__list a {
	display: block;
	padding: 0.35rem 0.6rem;
	border: 1px solid var(--border);
	border-radius: 0.25rem;
	text-decoration: none;
	font-size: 0.9rem;
	background: #fff;
}

.sidebar-box__list a:hover {
	background: var(--breadcrumb-bg);
}

.site-footer {
	border-top: 1px solid var(--border);
	padding: 1rem 0;
}

@media (max-width: 48rem) {
	.site-navigation {
		flex-basis: 100%;
	}

	.page-layout {
		grid-template-columns: 1fr;
	}

	.sidebar {
		flex-direction: row;
		flex-wrap: wrap;
	}

	.sidebar-box {
		flex: 1 1 12rem;
	}
}

.muted {
	color: var(--muted, #6b7280);
}

.code-example {
	margin: 1.5rem 0;
	border: 1px solid #d1d5db;
	border-radius: 0.35rem;
	overflow: hidden;
	background: #111827;
	color: #f9fafb;
}

.code-example__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.5rem 0.75rem;
	background: #1f2937;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.code-example__toolbar button {
	padding: 0.3rem 0.6rem;
	border: 1px solid #9ca3af;
	border-radius: 0.25rem;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.code-example pre {
	margin: 0;
	padding: 1rem;
	overflow-x: auto;
}

.code-example code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	white-space: pre;
}