* {
	box-sizing: border-box;
}

html,
body {
	width: 100%;
	height: 100%;
	margin: 0;
}

body {
	overflow: hidden;
	background: #fff;
	color: #111;
	font-family: "Spectral", Georgia, serif;
}

.article-layout {
	display: grid;
	width: 100%;
	height: 100%;
	grid-template-areas: "nav article extras";
	grid-template-columns: 15% 70% 15%;
}

.article-sidebar {
	grid-area: nav;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow: hidden;
	background: #111;
	color: #fff;
	font-family: "Roboto Mono", monospace;
}

.article-tabs {
	position: sticky;
	top: 0;
	z-index: 1;
	display: grid;
	height: 21px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	border-bottom: 1px solid #333;
	background: #111;
}

.article-tabs button {
	min-width: 0;
	padding: 0 3px;
	border: 1px solid #333;
	border-bottom: 0;
	border-radius: 0;
	background: #111;
	color: #fff;
	font-family: inherit;
	font-size: 0.65vw;
	cursor: pointer;
}

.article-tabs button:hover,
.article-tabs button[aria-selected="true"] {
	background: #444;
}

.article-tabs button:focus-visible,
.contents-panel a:focus-visible {
	outline: 2px solid #aaa;
	outline-offset: -2px;
}

.article-panel {
	height: calc(100vh - 21px);
	overflow-y: auto;
	scrollbar-gutter: stable;
	scrollbar-color: #373737 #282828;
	scrollbar-width: thin;
}

.article-panel::-webkit-scrollbar {
	width: 8px;
}

.article-panel::-webkit-scrollbar-track {
	background: #282828;
}

.article-panel::-webkit-scrollbar-thumb {
	border-radius: 100px;
	background: #373737;
}

.article-panel::-webkit-scrollbar-thumb:hover {
	background: #555;
}

.contents-panel > h2 {
	margin: 2px 0;
	padding: 0 0.5vw;
	color: #fff;
	font-family: "Roboto Mono", monospace;
	font-size: clamp(10px, 1vw, 14px);
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.contents-panel > h2 a {
	color: inherit;
	text-decoration: none;
}

.contents-panel .subchapter {
	display: block;
	margin: 2px 0 2px 1vw;
	color: #ccc;
	font-family: "Roboto Mono", monospace;
	font-size: clamp(9px, 0.8vw, 12px);
	line-height: 1.3;
	overflow-wrap: anywhere;
	text-decoration: none;
}

.contents-number {
	font-weight: 600;
	white-space: nowrap;
}

.contents-panel .subchapter.level-2 {
	margin-left: 1.5vw;
	color: #aaa;
}

.contents-panel .subchapter.level-3 {
	margin-left: 2vw;
	color: #999;
}

.contents-panel .subchapter.level-4 {
	margin-left: 2.5vw;
	color: #888;
}

.contents-panel .subchapter:hover,
.contents-panel .subchapter:hover .contents-number {
	color: #fff;
}

.changelog-panel > h2 {
	margin: 0;
	padding: 5px 2px;
	background: #555;
	color: #fff;
	font-size: 1.3vw;
	text-align: center;
}

.changelog-panel > p {
	margin: 5px;
	padding-bottom: 3px;
	border-bottom: 1px solid #fff;
	color: #fff;
	font-size: 0.65vw;
}

.article-navigation-frame {
	display: block;
	width: 100%;
	height: calc(100vh - 21px);
	border: 0;
}

.article-navigation-frame[hidden] {
	display: none;
}

.article-main {
	grid-area: article;
	height: 100vh;
	overflow-y: auto;
	background: #fff;
	scroll-behavior: smooth;
}

.article-main::-webkit-scrollbar-track {
	background: #282828;
}

.article-main::-webkit-scrollbar-thumb {
	border-radius: 100px;
	background: #373737;
}

.article-main::-webkit-scrollbar {
	width: 8px;
}

.article-main {
	scrollbar-gutter: stable;
	scrollbar-color: #373737 #282828;
	scrollbar-width: thin;
}

.article-main:hover::-webkit-scrollbar-thumb:hover {
	background: #555;
}

body.dark-mode .article-main,
body.dark-mode .article-sidebar,
body.dark-mode .sections-frame,
body.dark-mode .image-viewer {
	filter: invert(1) hue-rotate(180deg);
}

body.dark-mode {
	background: #000;
}

body.dark-mode .article-image-button img,
body.dark-mode .image-viewer img {
	filter: invert(1) hue-rotate(180deg);
}

body.dark-mode .article-main a[href] {
	filter: hue-rotate(180deg);
}

.title-card {
	margin: 0;
}

.breadcrumbs {
	margin: 8px 2% 12px;
	font-size: 0.8vw;
	text-align: center;
}

.breadcrumbs a {
	color: #444;
	font-weight: 600;
	text-decoration: none;
}

.article-title {
	margin: 2px 0;
	padding: 0 2%;
	font-size: 2.4vw;
	font-weight: 800;
	font-variant: small-caps;
	text-align: center;
}

.metadata {
	padding: 0 2%;
	border-bottom: 1px solid #111;
	text-align: center;
}

.metadata p {
	margin: 0;
	color: #333;
	font-size: 0.95vw;
	font-weight: 500;
}

.metadata strong {
	color: #111;
	font-weight: 800;
}

.metadata .tag {
	font-style: italic;
	text-decoration: underline double 1px #111;
}

.metadata a {
	color: inherit;
}

.article-subtitle {
	margin: 0;
	padding: 0 2%;
	font-size: 1.4vw;
	font-style: italic;
	text-align: center;
}

.article-content {
	display: grid;
	grid-template-areas:
		"sample sample"
		"chapters footnotes";
	grid-template-columns: 70% 30%;
	margin: 2px 0 0 2%;
}

.response-article-content {
	grid-template-areas:
		"sample"
		"chapters";
	grid-template-columns: minmax(0, 1fr);
}

.sample-notice {
	grid-area: sample;
	margin: 4px 2% 12px;
	padding: 8px 10px;
	border-left: 2px solid #888;
	color: #555;
	font-size: 0.85vw;
	font-style: italic;
}

.article-notice {
	font-size: 0.9vw;
	font-style: normal;
}

.article-notice p {
	margin: 2px 0;
}

.article-notice p:first-child {
	font-weight: 700;
}

.chapters {
	grid-area: chapters;
	min-width: 0;
	margin: 0 2%;
}

.response-chapters {
	margin: 0 2%;
}

.chapter {
	margin: 0 0 16px;
}

.chapter-flow {
	min-width: 0;
	container-type: inline-size;
}

.article-page {
	position: relative;
	height: 100vh;
	margin-bottom: 16px;
}

.article-page-content {
	height: calc(100% - 24px);
	overflow: hidden;
}

.article-page-marker {
	position: absolute;
	right: 0;
	bottom: 0;
	z-index: 1;
	margin: 0;
	padding: 2px 6px;
	width: 100%;
	background: #fff;
	border-bottom: 1px solid #ddd;
	color: #666;
	font-family: "Roboto Mono", monospace;
	font-size: 0.65vw;
	text-align: right;
}

.article-columns {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 45px;
	min-width: 0;
}

.article-column {
	min-width: 0;
	height: 100%;
	overflow: hidden;
}

.article-columns p {
	margin: 5px 10px 5px 0;
	font-size: 0.9vw;
	letter-spacing: -0.3px;
	line-height: 1.6;
	text-align: justify;
	word-spacing: 2px;
}

.article-columns .article-image-button {
	display: block;
	width: 100%;
	margin: 8px 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	line-height: 0;
	text-align: center;
	cursor: zoom-in;
	break-inside: avoid-column;
}

.article-columns .article-image-button img {
	display: block;
	width: 80%;
	max-width: 100%;
	max-height: 30vh;
	height: auto;
	margin-inline: auto;
	object-fit: contain;
}

.article-columns .article-image-button:hover img {
	outline: 2px solid #a05b00;
	outline-offset: 2px;
}

.article-columns .article-image-button:focus-visible {
	outline: 2px solid #a05b00;
	outline-offset: 3px;
}

.image-viewer {
	position: fixed;
	max-width: 94vw;
	max-height: 94vh;
	padding: 12px;
	border: 1px solid #777;
	background: #fff;
	color: #111;
}

.image-viewer::backdrop {
	background: rgb(0 0 0 / 80%);
}

.image-viewer img {
	display: block;
	max-width: 90vw;
	max-height: 82vh;
	margin: 0 auto;
	object-fit: contain;
}

.image-viewer-close {
	display: block;
	margin: 0 0 8px auto;
	padding: 4px 10px;
	border: 1px solid #777;
	background: #f2f2f2;
	color: #111;
	font: inherit;
	cursor: pointer;
}

.image-viewer-caption {
	margin: 8px 0 0;
	color: #444;
	font-size: 0.8rem;
	text-align: center;
}

.article-columns p > .indented-line {
	display: inline-block;
	width: calc(100% - var(--indent));
	vertical-align: top;
}

.article-columns figure {
	width: 80%;
	max-width: 100%;
	margin-inline: auto;
	break-inside: avoid-column;
}

.article-columns figure .article-image-button img {
	width: 100%;
}

.article-columns .large-visual-block {
	display: block;
	max-width: 100%;
	break-before: column;
}

.chapter h2 {
	display: block;
	margin: 18px 0 16px;
	padding: 8px 12px;
	border: 1px solid #999;
	border-left: 6px solid #333;
	background: linear-gradient(90deg, #e6e6e6, #f8f8f8);
	font-size: clamp(12px, 1.1vw, 16px);
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: 0.035em;
	text-transform: uppercase;
	word-spacing: 2px;
	scroll-margin-top: 8px;
}

.response-chapter h2:not(.chapter-heading) {
	margin: 12px 0 4px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #111;
	font-family: Roboto, Arial, sans-serif;
	font-size: clamp(16px, 1.5vw, 26px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: normal;
	text-transform: none;
	word-spacing: normal;
}

.chapter h2.chapter-heading {
	margin: 10px 0 10px;
	padding: 10px 14px;
	border: 1px solid #999;
	border-left: 6px solid #333;
	background: linear-gradient(90deg, #e6e6e6, #f8f8f8);
	color: #111;
	font-size: clamp(12px, 1.1vw, 16px);
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.2;
	text-transform: uppercase;
	scroll-margin-top: 8px;
	break-inside: avoid-column;
}

.chapter h2.chapter-heading.starts-introduction {
	margin-top: 0;
}

.chapter h3,
.chapter h4 {
	display: block;
	margin: 8px 0 0;
	border: 1px solid #bbb;
	background: #eee;
	font-weight: 600;
	line-height: 1.2;
	word-spacing: 2px;
	scroll-margin-top: 10px;
}

.chapter h3 {
	font-size: clamp(11px, 0.9vw, 14px);
}

.chapter h4 {
	margin-top: 6px;
	font-size: clamp(10px, 0.75vw, 12px);
}

.response-chapter h3 {
	margin: 8px 0 4px;
	padding: 0 2px;
	border: 0;
	background: #e2e1e1;
	color: #111;
	font-family: Roboto, Arial, sans-serif;
	font-size: clamp(14px, 1.25vw, 22px);
	font-weight: 300;
	line-height: 1.2;
	word-spacing: normal;
}

.response-chapter h4 {
	margin: 6px 0 4px;
	padding: 0 2px;
	border: 0;
	background: #eee;
	color: #222;
	font-family: Roboto, Arial, sans-serif;
	font-size: clamp(12px, 1vw, 18px);
	font-weight: 400;
	word-spacing: normal;
	scroll-margin-top: 10px;
}

.article-main .article-content a[href]:not(.image-link):not(.footnote-ref) {
	color: #a05b00;
	text-decoration: underline;
	text-decoration-color: currentColor;
}

div.blockquote {
	margin: 10px 0;
	padding: 0;
	border: 2px solid #808080;
	background-color: #fff;
	background-image: radial-gradient(#aca8a8 1.4px, transparent 0);
	background-position: -19px -19px;
	background-size: 13px 13px;
}

.blockquote p.blockquote {
	margin: 0 12px;
	padding: 4px 8px;
	background: #fff;
	color: #111;
	font-family: Roboto, Arial, sans-serif;
	font-size: clamp(13px, 1.05vw, 17px);
	font-weight: 500;
	line-height: 1.3;
	text-align: left;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

.blockquote .quotation-open,
.blockquote .quotation-close {
	margin: 25px 0 0 10px;
	color: #afafaf;
	font-family: "Times New Roman", serif;
	font-size: clamp(34px, 4vw, 60px);
	line-height: 6px;
}

.blockquote .quotation-close {
	margin: 25px 10px 0 0;
	text-align: right;
}

.figure-placeholder {
	display: block;
	margin: 8px 0;
	padding: 12px;
	border: 1px dashed #888;
	color: #555;
	font-family: "Roboto Mono", monospace;
	font-size: 0.75vw;
	text-align: center;
}

.article-columns .caption {
	margin: 0 0 10px;
	color: #555;
	font-size: 0.8vw;
	font-style: italic;
	text-align: center;
}

.reference-text {
	color: inherit;
}

.footnotes {
	grid-area: footnotes;
	margin: 0 10px;
}

.footnotes h2 {
	margin: 0;
	font-family: "Spectral", Georgia, serif;
	font-size: 1.3vw;
}

.footnotes p {
	border-left: 2px solid #111;
	padding-left: 10px;
	font-size: 0.8vw;
	font-style: italic;
	font-weight: 400;
	line-height: 1.2;
}

.footnote-number {
	font-style: normal;
	font-weight: 700;
}

.footnote-ref {
	color: inherit;
	font-size: 0.75em;
	font-weight: 700;
	text-decoration: none;
	vertical-align: super;
}

.footnote-ref:focus-visible {
	outline: 2px solid #555;
}

.sections-frame {
	grid-area: extras;
	position: sticky;
	top: 0;
	display: block;
	width: 100%;
	height: 100vh;
	border: 0;
}

@media (max-width: 760px) {
	body {
		overflow: auto;
	}

	.article-layout {
		height: auto;
		min-height: 100%;
		grid-template-areas:
			"nav"
			"article"
			"extras";
		grid-template-columns: minmax(0, 1fr);
	}

	.article-sidebar {
		position: static;
		height: 320px;
	}

	.article-tabs button,
	.changelog-panel > p {
		font-size: clamp(9px, 2.2vw, 11px);
	}

	.changelog-panel > h2 {
		font-size: clamp(12px, 3.2vw, 16px);
	}

	.article-panel {
		height: calc(320px - 21px);
	}

	.contents-panel > h2 {
		font-size: clamp(10px, 2.8vw, 14px);
	}

	.contents-panel .subchapter {
		font-size: clamp(9px, 2.2vw, 12px);
	}

	.article-navigation-frame {
		height: calc(320px - 21px);
	}

	.article-main {
		height: auto;
		min-height: 60vh;
		overflow: visible;
	}

	.title-card {
		margin: 0 4%;
	}

	.breadcrumbs {
		margin-left: 0;
		font-size: 12px;
	}

	.article-title {
		font-size: 28px;
	}

	.article-subtitle {
		font-size: 18px;
	}

	.metadata p {
		font-size: 12px;
	}

	.article-content {
		grid-template-areas:
			"sample"
			"chapters"
			"footnotes";
		grid-template-columns: minmax(0, 1fr);
		margin-right: 4%;
	}

	.chapters {
		margin: 0;
	}

	.sample-notice,
	.article-columns p {
		font-size: 14px;
	}

	.article-notice {
		font-size: 13px;
	}

	.response-chapter h2:not(.chapter-heading) {
		font-size: clamp(16px, 5vw, 22px);
	}

	.response-chapter h3 {
		font-size: clamp(14px, 4.2vw, 19px);
	}

	.response-chapter h4 {
		font-size: clamp(12px, 3.4vw, 16px);
	}

	.figure-placeholder {
		font-size: 11px;
	}

	.article-columns .caption {
		font-size: 12px;
	}

	.article-page-marker {
		font-size: 11px;
	}

	.article-columns {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}

	.chapter h2.chapter-heading {
		margin: 16px 0 14px;
		padding: 8px 10px;
		border-left-width: 5px;
		font-size: clamp(12px, 3.2vw, 16px);
	}

	.response-chapter h2:not(.chapter-heading) {
		margin: 10px 0 4px;
		padding: 0;
	}

	.footnotes {
		margin-top: 12px;
	}

	.footnotes h2 {
		font-size: 18px;
	}

	.footnotes p {
		font-size: 13px;
	}

	.sections-frame {
		position: static;
		height: 240px;
	}
}
