/* High-Speed Class-D Amplifier report.
   Plain, document-style layout in the spirit of the Midenios writeup:
   black on white, Arial, bordered boxes, tables and flexbox for structure.
   The only "active" pieces are KaTeX (math) and highlight.js (code), both of
   which render mechanically and inherit the page's monochrome look. */

body {
	font-family: Arial, sans-serif;
	line-height: 1.5;
	color: #000;
	background: #fff;
}

article {
	max-width: 64em;
	margin: 0 auto;
	padding: 0 1.25em 3em;
	counter-reset: figc;
}

article > h1 {
	margin-bottom: 0.1em;
}

p { font-size: 16px; }

.byline {
	margin-top: 0;
	color: #333;
	font-style: italic;
}

.lead { font-size: 17px; }

h2 {
	margin-top: 1.6em;
	padding-bottom: 0.15em;
	border-bottom: 1px solid #000;
	font-size: 1.4em;
}

h3 {
	margin: 1.4em 0 0.3em;
	font-size: 1.12em;
}

hr {
	border: none;
	border-top: 1px solid #000;
	margin: 2.2em 0;
}

a { color: #00e; }
a:visited { color: #551a8b; }

/* ---- key/value spec block + table of contents -------------------------- */
.boxed {
	border: 1px solid #000;
	padding: 0.4em 1em;
	margin: 1.2em 0;
	display: inline-block;
	max-width: 100%;
	box-sizing: border-box;
}

table.kv { border-collapse: collapse; }
table.kv th, table.kv td {
	vertical-align: top;
	text-align: left;
	padding: 0.2em 1.5em 0.2em 0;
}
table.kv th { font-weight: bold; white-space: nowrap; }

nav.toc ol { margin: 0.2em 0; padding-left: 1.6em; }
nav.toc ol ol { list-style-type: lower-latin; }
nav.toc a { text-decoration: none; }
nav.toc a:hover { text-decoration: underline; }

/* ---- figures ----------------------------------------------------------- */
figure {
	margin: 1.5em 0;
	text-align: center;
}
figure img {
	max-width: 100%;
	height: auto;
	border: 1px solid #888;
	background: #fff;
}
/* click any figure to open the full-resolution image (web-1.0 thumbnail link) */
figure a { border: none; }
figure a:hover img { border-color: #000; outline: 1px solid #000; }

figcaption {
	font-style: italic;
	font-size: 0.95em;
	margin-top: 0.5em;
}
figcaption::before {
	counter-increment: figc;
	content: "Figure " counter(figc) ". ";
	font-style: normal;
	font-weight: bold;
}

/* ---- side-by-side columns (à la the Midenios bug/diff blocks) ---------- */
.cols {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5em;
	align-items: flex-start;
}
.cols > * { flex: 1 1 18em; min-width: min(100%, 18em); margin-block: 0; }
.cols figure { margin: 0; }

/* ---- code -------------------------------------------------------------- */
pre { overflow-x: auto; }
code.hljs, pre.plain {
	background: transparent;
	border: 1px solid #000;
	padding: 0.6em 0.8em;
	font-size: 13px;
	line-height: 1.45;
}
pre > code.hljs { display: block; }
p code, li code {
	font-family: monospace;
	background: #f0f0f0;
	padding: 0 0.2em;
}

/* ---- data tables ------------------------------------------------------- */
table.data {
	border-collapse: collapse;
	margin: 1em 0;
	font-size: 0.97em;
}
table.data th, table.data td {
	border: 1px solid #000;
	padding: 0.35em 0.8em;
	text-align: left;
	vertical-align: top;
}
table.data thead th { background: #f0f0f0; }
table.data caption {
	caption-side: bottom;
	font-style: italic;
	padding-top: 0.5em;
	text-align: left;
}
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- equations --------------------------------------------------------- */
.katex-display {
	overflow-x: auto;
	overflow-y: hidden;
	padding: 0.2em 0;
}

footer {
	max-width: 64em;
	margin: 0 auto;
	padding: 1em 1.25em 3em;
	border-top: 1px solid #000;
	font-size: 0.9em;
	color: #333;
}
