/* Typography & components for article content loaded into #content.
   Fragments only use these classes/tags — no inline styling needed. */

.content h1 {
	display: none; /* the fragment's own <h1>, if present, is redundant with .page-head h1 */
}

.content h2 {
	font-size: 20px;
	margin: 36px 0 12px;
	padding-top: 4px;
	letter-spacing: -0.01em;
}

.content h3 {
	font-size: 16px;
	margin: 28px 0 10px;
}

.content p {
	margin: 0 0 14px;
	color: var(--text);
}

.content > *:first-child {
	margin-top: 0;
}

.content ul,
.content ol {
	margin: 0 0 14px;
	padding-left: 22px;
}

.content li {
	margin-bottom: 6px;
}

.content a {
	color: var(--accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.content strong {
	font-weight: 600;
}

.content code {
	font-family: var(--font-mono);
	font-size: 0.88em;
	background: var(--bg-sunken);
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 1px 5px;
}

.content pre {
	background: var(--bg-sunken);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: 14px 16px;
	overflow-x: auto;
	margin: 0 0 18px;
}

.content pre code {
	background: none;
	border: none;
	padding: 0;
	font-size: 13px;
	line-height: 1.6;
}

.content blockquote {
	margin: 0 0 18px;
	padding: 2px 16px;
	border-left: 3px solid var(--border-strong);
	color: var(--text-muted);
}

.content hr {
	border: none;
	border-top: 1px solid var(--border);
	margin: 32px 0;
}

.content img,
.content video {
	max-width: 100%;
	border-radius: var(--radius-md);
	border: 1px solid var(--border);
}

.content figure {
	margin: 0 0 18px;
}

.content figcaption {
	font-size: 12.5px;
	color: var(--text-muted);
	margin-top: 8px;
	text-align: center;
}

.content table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 20px;
	font-size: 13.5px;
}

.content th,
.content td {
	border: 1px solid var(--border);
	padding: 8px 10px;
	text-align: left;
}

.content th {
	background: var(--bg-sunken);
	font-weight: 600;
}

/* Callouts: <div class="callout note|tip|warning"> */
.content .callout {
	display: flex;
	gap: 10px;
	padding: 14px 16px;
	border: 1px solid var(--border);
	border-left-width: 3px;
	border-radius: var(--radius-md);
	margin: 0 0 18px;
	font-size: 13.5px;
}

.content .callout p:last-child {
	margin-bottom: 0;
}

.content .callout.note {
	border-left-color: var(--accent);
	background: var(--accent-soft);
}

.content .callout.tip {
	border-left-color: #16a34a;
	background: rgba(22, 163, 74, 0.08);
}

.content .callout.warning {
	border-left-color: #d97706;
	background: rgba(217, 119, 6, 0.08);
}

/* KaTeX loaded lazily; ensure block math doesn't overflow */
.content .katex-display {
	overflow-x: auto;
	overflow-y: hidden;
}

/* Collapsible blocks: <details class="paper"><summary>…</summary>…</details> */
.content details {
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	margin: 0 0 8px;
	padding: 0 14px;
}

.content details > summary {
	cursor: pointer;
	padding: 10px 0;
	font-weight: 600;
	font-size: 14px;
}

.content details[open] > summary {
	border-bottom: 1px solid var(--border);
	margin-bottom: 12px;
}

.content details .meta {
	font-size: 12.5px;
	color: var(--text-muted);
	font-weight: 400;
}

.content details > summary .meta {
	display: block;
	margin-top: 2px;
}

.content details table {
	font-size: 12.5px;
}

.content h4 {
	font-size: 14px;
	margin: 22px 0 8px;
}

/* Figure thumbnails in tables: <a><img class="thumb"></a> */
.content img.thumb {
	display: block;
	width: 96px;
	height: auto;
	margin-bottom: 2px;
}

.content .thumb-cell {
	display: inline-block;
	vertical-align: top;
	margin: 0 6px 6px 0;
}

/* Wide tables scroll horizontally: <div class="table-wrap"><table>…</table></div> */
.content .table-wrap {
	overflow-x: auto;
	margin: 0 0 20px;
}

.content .table-wrap table {
	margin: 0;
	font-size: 12.5px;
}

.content th.num,
.content td.num {
	text-align: right;
	white-space: nowrap;
}

/* Gold figures on the Queries page: a thumbnail over its id. */
.content figure.gold {
	display: inline-block;
	margin: 0 6px 6px 0;
	vertical-align: top;
}

.content figure.gold img {
	display: block;
	width: 90px;
	height: auto;
}

.content figure.gold figcaption {
	margin-top: 4px;
	font-size: 11px;
	text-align: left;
}

/* Theoretical framework page: each framework's levels, one coloured row per kind of
   information, and the framework × kind tables. */
.content table.levels td:first-child {
	width: 34%;
	font-weight: 600;
	border-left: 3px solid var(--lvl, var(--border));
	color: var(--lvl, var(--text));
}

.content table.levels td.off {
	color: var(--text-faint);
	font-style: italic;
}

.content table.levels tr.form { --lvl: var(--lvl-form); }
.content table.levels tr.generic { --lvl: var(--lvl-generic); }
.content table.levels tr.specific { --lvl: var(--lvl-specific); }
.content table.levels tr.abstract { --lvl: var(--lvl-abstract); }
.content table.levels tr.catalogue { --lvl: var(--lvl-catalogue); }

.content table.levels.defs td:first-child { width: 24%; }
.content table.levels td.def { width: 36%; color: var(--text-muted); }

.content table.levelmap th[colspan] {
	text-align: center;
	border-bottom: 1px solid var(--border);
}

.content table.levelmap tbody th { text-align: left; white-space: nowrap; }
.content table.levelmap.share td { font-variant-numeric: tabular-nums; }
.content table.levelmap td.off { color: var(--text-faint); }

/* An embedded slide deck, kept at 16:9. */
.content .slides-frame {
	aspect-ratio: 16 / 9;
	margin: 0 0 20px;
	border: 1px solid var(--border);
}

.content .slides-frame iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

/* Frameworks applied to the queries: the class beside the query words it labels. */
.content table.levelmap.queries {
	font-size: 12.5px;
	table-layout: fixed;
	width: 100%;
	min-width: 640px;
}
.content table.levelmap.queries td,
.content table.levelmap.queries th { overflow-wrap: anywhere; }
.content table.levelmap.queries col.fw { width: 15%; }
.content table.levelmap.queries td { vertical-align: top; }
.content table.levelmap .cls { display: block; color: var(--text-faint); font-size: 0.92em; }
.content details.query > summary { font-weight: 400; }

/* The pyramid applied: a gold figure's per-level table (models as columns) beside the image. */
.content .pyramid-figure {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 260px;
	gap: 20px;
	align-items: start;
	margin-bottom: 28px;
}
.content .pyramid-figure figure { margin: 0; position: sticky; top: 16px; }
.content .pyramid-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--border); }
.content .pyramid-figure figcaption { margin-top: 6px; font-size: 11.5px; color: var(--text-muted); }
.content table.levels.pyramid { font-size: 12.5px; table-layout: fixed; width: 100%; }
.content table.levels.pyramid td { vertical-align: top; }
.content table.levels.pyramid col.lvl { width: 130px; }
.content table.levels.pyramid td:first-child { width: auto; font-size: 0.95em; }
.content table.levels.pyramid .basis,
.content table.levelmap.pyramid .alt { color: var(--text-faint); font-size: 0.9em; }
.content table.levels.pyramid .basis { display: block; margin-top: 2px; font-style: italic; }
@media (max-width: 760px) {
	.content .pyramid-figure { grid-template-columns: 1fr; }
	.content .pyramid-figure figure { position: static; order: -1; max-width: 320px; }
}
