MediaWiki:Common.css

From LinuxizeNet
Revision as of 05:06, 8 August 2026 by Datanasov (talk | contribs) (Cap content measure on wide screens; fix nav/title collision under 850px)

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/* ============================================================================
 * MediaWiki:Common.css  —  wiki.linuxize.net
 * Target: MediaWiki 1.41.5, skin Vector legacy (vector-2010)
 *
 * Loads via the `site.styles` module, AFTER skins.vector.styles.legacy,
 * so equal-specificity selectors win without !important. !important is used
 * only where it overrides an inline style attribute in page wikitext.
 *
 * Sections:
 *   1. Tokens
 *   2. Vector legacy chrome overrides
 *   3. Responsive layout          <- inert until the viewport meta is fixed
 *   4. Content typography
 *   5. Code blocks (SyntaxHighlight / Pygments)
 *   6. TOC
 *   7. Tables
 *   8. Card grids (index pages)
 *   9. Legacy inline-style box neutraliser
 *  10. Print
 * ========================================================================= */

/* ---------------------------------------------------------------------------
 * 1. TOKENS
 * Light is the base; dark redefines tokens only. Code panels stay dark in
 * both themes, so the Pygments palette below is theme-independent.
 * ------------------------------------------------------------------------ */
:root {
	--lz-ground:      #faf7f1;
	--lz-surface:     #ffffff;
	--lz-surface-2:   #f2ebdf;
	--lz-ink:         #201b14;
	--lz-ink-2:       #574d40;
	--lz-ink-3:       #8b7f6d;
	--lz-line:        #e4dbc9;
	--lz-line-strong: #cfc2aa;
	--lz-accent:      #8a5b12;
	--lz-accent-hov:  #6d4709;
	--lz-accent-tint: #f3e7ce;
	--lz-visited:     #6b4a7a;
	--lz-red:         #a12f2f;

	--lz-code-bg:   #1a1610;
	--lz-code-bg-2: #241f16;
	--lz-code-ink:  #e9e1d2;
	--lz-code-line: #3a3226;

	--lz-shadow: 0 1px 2px rgba( 32, 27, 20, 0.05 ), 0 8px 24px -12px rgba( 32, 27, 20, 0.18 );

	--lz-mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
	--lz-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media ( prefers-color-scheme: dark ) {
	:root:not( [ data-theme="light" ] ) {
		--lz-ground:      #14110c;
		--lz-surface:     #1b1711;
		--lz-surface-2:   #231e16;
		--lz-ink:         #ece5d8;
		--lz-ink-2:       #b3a894;
		--lz-ink-3:       #877c6a;
		--lz-line:        #322b21;
		--lz-line-strong: #4a4133;
		--lz-accent:      #dda94d;
		--lz-accent-hov:  #f0c273;
		--lz-accent-tint: #2c2417;
		--lz-visited:     #c3a0d4;
		--lz-red:         #e08585;
		--lz-shadow: 0 1px 2px rgba( 0, 0, 0, 0.4 ), 0 8px 24px -12px rgba( 0, 0, 0, 0.7 );
	}
}

/* Explicit choice, set by the toggle in Common.js. Wins over the OS in both
 * directions because it is stamped on <html> and matches on attribute. */
:root[ data-theme="dark" ] {
	--lz-ground:      #14110c;
	--lz-surface:     #1b1711;
	--lz-surface-2:   #231e16;
	--lz-ink:         #ece5d8;
	--lz-ink-2:       #b3a894;
	--lz-ink-3:       #877c6a;
	--lz-line:        #322b21;
	--lz-line-strong: #4a4133;
	--lz-accent:      #dda94d;
	--lz-accent-hov:  #f0c273;
	--lz-accent-tint: #2c2417;
	--lz-visited:     #c3a0d4;
	--lz-red:         #e08585;
	--lz-shadow: 0 1px 2px rgba( 0, 0, 0, 0.4 ), 0 8px 24px -12px rgba( 0, 0, 0, 0.7 );
}

/* ---------------------------------------------------------------------------
 * 2. VECTOR LEGACY CHROME
 * Vector 2010 hardcodes a blue/grey palette and positions #mw-panel
 * absolutely at 10em. Re-ground it, then unpick the fixed widths in §3.
 * ------------------------------------------------------------------------ */
body {
	background-color: var( --lz-ground );
	color: var( --lz-ink );
	font-family: var( --lz-sans );
	font-size: 0.9375rem;
	line-height: 1.65;
}

/* The gradient strip behind the tab row. */
#mw-page-base {
	background-color: var( --lz-ground );
	background-image: none;
	height: 3.5em;
}

#mw-head-base {
	background: transparent;
}

/* Main content column.
 * Vector legacy pins this at margin-left:10em and lets it run to the viewport
 * edge, so code blocks stretch to 1400px+ on a wide monitor. Cap the measure
 * and centre it once there is room, while never encroaching on the 10em
 * sidebar rail. max() falls back to 10em when the viewport is narrow. */
#content.mw-body {
	background: var( --lz-surface );
	color: var( --lz-ink );
	border: 1px solid var( --lz-line );
	border-radius: 0.5rem;
	padding: 1.75em 2em 2em;
	margin-top: 0;
	margin-left: max( 10em, calc( ( 100% - 64rem ) / 2 ) );
	margin-right: 1em;
	max-width: 64rem;
	font-size: 1rem;
}

#footer {
	margin-left: max( 10em, calc( ( 100% - 64rem ) / 2 ) );
	margin-right: 1em;
	max-width: 64rem;
}

a,
.mw-body a {
	color: var( --lz-accent );
	text-decoration-color: rgba( 138, 91, 18, 0.35 );
	text-underline-offset: 0.15em;
}

a:hover,
.mw-body a:hover {
	color: var( --lz-accent-hov );
	text-decoration-color: currentColor;
}

.mw-body a:visited {
	color: var( --lz-visited );
}

.mw-body a.new,
a.new {
	color: var( --lz-red );
}

a.external,
.mw-body a.external {
	background-image: none;
	padding-right: 0;
}

/* External links get a typographic marker instead of the sprite, which does
 * not exist in a dark palette. */
.mw-parser-output a.external::after {
	content: " \2197";
	font-size: 0.85em;
	color: var( --lz-ink-3 );
}

:focus-visible {
	outline: 2px solid var( --lz-accent );
	outline-offset: 2px;
	border-radius: 2px;
}

/* --- left sidebar --- */
#mw-panel.vector-legacy-sidebar {
	padding-top: 1em;
}

#mw-panel .vector-menu-portal .vector-menu-heading {
	font-family: var( --lz-mono );
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var( --lz-ink-3 );
	background: none;
	border-bottom: 0;
	padding-bottom: 0.4em;
}

#mw-panel .vector-menu-portal .vector-menu-content-list li a {
	display: block;
	padding: 0.25em 0.6em;
	border-left: 2px solid transparent;
	border-radius: 0.3rem;
	color: var( --lz-ink-2 );
	font-size: 0.8125rem;
}

#mw-panel .vector-menu-portal .vector-menu-content-list li a:hover {
	background: var( --lz-surface-2 );
	color: var( --lz-ink );
	text-decoration: none;
}

#mw-panel .vector-menu-portal .vector-menu-content-list li a:visited {
	color: var( --lz-ink-2 );
}

/* --- top tabs (Page / Discussion / Read / Edit / History) --- */
/* Vector legacy draws these with a sprite; replace with flat shapes so they
 * survive a dark ground. */
#mw-head .vector-menu-tabs,
#mw-head .vector-menu-tabs ul,
#mw-head .vector-menu-tabs li,
#mw-head .vector-menu-tabs li.selected {
	background-image: none;
}

#mw-head .vector-menu-tabs li {
	background: transparent;
}

#mw-head .vector-menu-tabs li a,
#mw-head .vector-menu-tabs li.selected a {
	font-family: var( --lz-mono );
	font-size: 0.75rem;
	letter-spacing: 0.02em;
	color: var( --lz-ink-3 );
	background: transparent;
	padding: 0 0.9em;
}

#mw-head .vector-menu-tabs li a:hover {
	color: var( --lz-accent );
}

#mw-head .vector-menu-tabs li.selected a,
#mw-head .vector-menu-tabs li.selected a:visited {
	color: var( --lz-ink );
	font-weight: 600;
	box-shadow: inset 0 -2px 0 var( --lz-accent );
}

#p-personal .vector-menu-content-list li a {
	font-family: var( --lz-mono );
	font-size: 0.72rem;
	color: var( --lz-ink-3 );
}

#p-personal .vector-menu-content-list li a:hover {
	color: var( --lz-accent );
}

/* --- search --- */
#p-search .vector-search-box-inner input,
#simpleSearch #searchInput {
	background: var( --lz-surface-2 );
	border: 1px solid var( --lz-line );
	border-radius: 0.35rem;
	color: var( --lz-ink );
	font-family: var( --lz-mono );
	font-size: 0.8rem;
	padding: 0.35em 0.6em;
}

#simpleSearch #searchInput::placeholder {
	color: var( --lz-ink-3 );
}

/* --- theme toggle, injected by Common.js --- */
.lz-theme-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	padding: 0.15em 0.55em;
	background: transparent;
	border: 1px solid var( --lz-line );
	border-radius: 0.3rem;
	color: var( --lz-ink-2 );
	font-family: var( --lz-mono );
	font-size: 0.72rem;
	cursor: pointer;
}

.lz-theme-toggle:hover {
	color: var( --lz-accent );
	border-color: var( --lz-line-strong );
}

/* --- footer --- */
#footer {
	border-top: 1px solid var( --lz-line );
	margin-top: 2rem;
	padding-top: 1rem;
}

#footer li,
#footer a {
	font-family: var( --lz-mono );
	font-size: 0.72rem;
	color: var( --lz-ink-3 );
}

#footer #footer-icons {
	filter: grayscale( 1 ) opacity( 0.6 );
}

/* --- category links --- */
.catlinks {
	background: var( --lz-surface-2 );
	border: 1px solid var( --lz-line );
	border-radius: 0.4rem;
	padding: 0.6em 0.9em;
	font-size: 0.85rem;
}

.catlinks a {
	font-family: var( --lz-mono );
	font-size: 0.8rem;
}

/* ---------------------------------------------------------------------------
 * 3. RESPONSIVE LAYOUT
 *
 * NOTE: these queries do nothing on phones until the skin stops emitting
 * <meta name="viewport" content="width=1000">. Fix that with either
 *   $wgVectorResponsive = true;   in LocalSettings.php   (preferred), or
 *   the viewport patch at the top of Common.js            (no server access).
 * ------------------------------------------------------------------------ */
@media screen and ( max-width: 850px ) {
	/* Vector legacy's source order is #content, then #mw-navigation, then
	 * #footer, and it positions the nav absolutely on top. Unpinning alone
	 * drops the whole navigation below the article and leaves #p-personal
	 * overlapping the page title. Make <body> a flex column instead and
	 * reorder, which is the only way to get nav above content without
	 * touching the skin's HTML. */
	body {
		display: flex;
		flex-direction: column;
	}

	body > * {
		order: 5;
	}

	#mw-navigation {
		order: 1;
	}

	#content.mw-body {
		order: 2;
	}

	#footer {
		order: 3;
	}

	/* Decorative strips that only exist to sit behind the absolute header. */
	#mw-page-base,
	#mw-head-base {
		display: none;
	}

	/* Unpin the header and the personal bar. */
	#mw-head {
		position: static;
		width: auto;
		float: none;
		margin: 0.5em 0 0;
	}

	#p-personal {
		position: static;
		width: auto;
	}

	#p-personal .vector-menu-content-list {
		display: flex;
		flex-wrap: wrap;
		gap: 0 0.9em;
		padding: 0;
		margin: 0;
	}

	#p-personal .vector-menu-content-list li {
		margin: 0;
	}

	#left-navigation,
	#right-navigation {
		float: none;
		margin-left: 0;
	}

	#p-search {
		float: none;
		margin: 0.5em 0;
	}

	#simpleSearch,
	#p-search .vector-search-box-inner input {
		width: 100%;
	}

	/* Sidebar links become a wrapping row of columns under the header. */
	#mw-panel.vector-legacy-sidebar {
		position: static;
		width: auto;
		padding: 0.75em 0 0.5em;
		display: flex;
		flex-wrap: wrap;
		gap: 0 1.75em;
		border-top: 1px solid var( --lz-line );
		margin-top: 0.5em;
	}

	#mw-panel .vector-menu-portal {
		margin: 0;
		flex: 1 1 9rem;
	}

	/* The 160px Tux is a desktop luxury. */
	#mw-panel #p-logo {
		width: 100%;
		height: 2.5em;
		margin: 0 0 0.5em;
		background-size: contain;
		background-position: left center;
	}

	#mw-panel #p-logo a {
		height: 2.5em;
		background-size: contain;
		background-position: left center;
	}

	#content.mw-body,
	#footer {
		margin-left: 0.75em;
		margin-right: 0.75em;
		max-width: none;
		border-radius: 0.5rem;
		padding: 1.25em 1.1em 1.75em;
	}

	/* Long unbreakable paths and commands must not widen the page. */
	.mw-parser-output {
		overflow-wrap: break-word;
	}
}

@media screen and ( max-width: 550px ) {
	#content.mw-body {
		padding: 1em 0.85em 1.5em;
	}

	.mw-parser-output .mw-highlight pre {
		font-size: 0.75rem;
	}
}

/* ---------------------------------------------------------------------------
 * 4. CONTENT TYPOGRAPHY
 * Monospace for headings — this wiki's subject matter is commands, and the
 * mono display voice ties the page to the code blocks it is wrapped around.
 * ------------------------------------------------------------------------ */
#firstHeading,
.mw-body h1,
.mw-body h2,
.mw-body h3,
.mw-body h4 {
	font-family: var( --lz-mono );
	font-weight: 600;
	letter-spacing: -0.015em;
	line-height: 1.25;
	text-wrap: balance;
	color: var( --lz-ink );
}

#firstHeading {
	font-size: clamp( 1.6rem, 1.2rem + 1.6vw, 2.2rem );
	border-bottom: 0;
	padding-bottom: 0;
	margin-bottom: 0.15em;
}

/* Vector legacy puts the tagline directly under the title. */
#siteSub {
	display: block;
	font-family: var( --lz-mono );
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var( --lz-ink-3 );
	margin-bottom: 1.5em;
	padding-bottom: 1em;
	border-bottom: 1px solid var( --lz-line );
}

.mw-body h2 {
	font-size: 1.3rem;
	margin-top: 2.2em;
	padding-bottom: 0.3em;
	border-bottom: 1px solid var( --lz-line );
}

.mw-body h3 {
	font-size: 1.06rem;
	margin-top: 1.9em;
}

.mw-body h4 {
	font-size: 0.95rem;
	margin-top: 1.6em;
	color: var( --lz-ink-2 );
}

/* Headings need to clear the sticky-ish header when jumped to from the TOC. */
.mw-parser-output :is( h2, h3, h4 )[ id ],
.mw-parser-output .mw-headline {
	scroll-margin-top: 1.5rem;
}

.mw-editsection {
	font-family: var( --lz-mono );
	font-size: 0.7rem;
	font-weight: 400;
	color: var( --lz-ink-3 );
}

.mw-editsection a {
	color: var( --lz-ink-3 );
}

.mw-editsection a:hover {
	color: var( --lz-accent );
}

/* Hold running prose near a 68ch measure. Code, tables and card grids opt
 * out below so they can use the full column. */
.mw-parser-output > p,
.mw-parser-output > ul,
.mw-parser-output > ol,
.mw-parser-output > dl {
	max-width: 68ch;
}

.mw-parser-output p {
	margin: 0.85em 0;
}

.mw-parser-output li {
	margin-bottom: 0.3em;
}

.mw-parser-output li::marker {
	color: var( --lz-ink-3 );
}

.mw-parser-output hr {
	border: 0;
	border-top: 1px solid var( --lz-line );
	margin: 2em 0;
}

.mw-parser-output blockquote {
	margin: 1.2em 0;
	padding: 0.1em 0 0.1em 1em;
	border-left: 3px solid var( --lz-line-strong );
	color: var( --lz-ink-2 );
}

/* Inline code — distinct from the dark block panels. */
.mw-parser-output code,
.mw-parser-output tt,
.mw-parser-output kbd,
.mw-parser-output samp {
	font-family: var( --lz-mono );
	font-size: 0.875em;
	padding: 0.12em 0.35em;
	background: var( --lz-surface-2 );
	border: 1px solid var( --lz-line );
	border-radius: 0.25rem;
	color: var( --lz-ink );
	overflow-wrap: break-word;
}

/* ---------------------------------------------------------------------------
 * 5. CODE BLOCKS — SyntaxHighlight (Pygments) is already installed, so the
 * token spans below already exist in the rendered HTML.
 * Panels are dark in both themes; commands are the most scannable thing on
 * the page and the palette does not have to be maintained twice.
 * ------------------------------------------------------------------------ */
.mw-parser-output .mw-highlight {
	position: relative;
	margin: 1.2em 0;
	background: var( --lz-code-bg );
	border: 1px solid var( --lz-code-line );
	border-radius: 0.45rem;
	overflow: hidden;
}

.mw-parser-output .mw-highlight pre {
	margin: 0;
	padding: 0.85em 1em;
	overflow-x: auto;
	background: transparent;
	border: 0;
	color: var( --lz-code-ink );
	font-family: var( --lz-mono );
	font-size: 0.82rem;
	line-height: 1.65;
	tab-size: 4;
}

/* Language chip + copy button are injected by Common.js. */
.mw-parser-output .mw-highlight .lz-chead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.35em 0.4em 0.35em 0.8em;
	background: var( --lz-code-bg-2 );
	border-bottom: 1px solid var( --lz-code-line );
}

.lz-lang {
	font-family: var( --lz-mono );
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #9c8f79;
}

.lz-copy {
	padding: 0.2em 0.6em;
	background: transparent;
	border: 1px solid var( --lz-code-line );
	border-radius: 0.25rem;
	color: #9c8f79;
	font-family: var( --lz-mono );
	font-size: 0.68rem;
	letter-spacing: 0.04em;
	cursor: pointer;
}

.lz-copy:hover {
	background: #2e281d;
	border-color: #5c503d;
	color: var( --lz-code-ink );
}

.lz-copy.lz-done {
	color: #b8c98a;
	border-color: #4d5a35;
}

/* Pygments token palette — warm-dominant, one cool hue for variables.
 * Theme-independent, because the panel ground is dark in both themes. */
.mw-highlight .c,
.mw-highlight .c1,
.mw-highlight .cm,
.mw-highlight .cp {
	color: #7d7263;
	font-style: italic;
}

.mw-highlight .k,
.mw-highlight .kd,
.mw-highlight .kn,
.mw-highlight .kt {
	color: #dda94d;
}

.mw-highlight .nb,
.mw-highlight .nf,
.mw-highlight .nc {
	color: #e6bd6d;
}

.mw-highlight .nv,
.mw-highlight .vi,
.mw-highlight .na {
	color: #8fc0d6;
}

.mw-highlight .s,
.mw-highlight .s1,
.mw-highlight .s2,
.mw-highlight .sb,
.mw-highlight .se {
	color: #b8c98a;
}

.mw-highlight .o,
.mw-highlight .ow {
	color: #d98e5a;
}

.mw-highlight .p {
	color: #a2947e;
}

.mw-highlight .m,
.mw-highlight .mi,
.mw-highlight .mf {
	color: #d98e5a;
}

.mw-highlight .w {
	color: inherit;
}

.mw-highlight .err {
	color: #e08585;
	background: transparent;
}

/* Unhighlighted <pre> (no lang= given) gets the same panel treatment. */
.mw-parser-output > pre,
.mw-parser-output dd > pre {
	background: var( --lz-code-bg );
	border: 1px solid var( --lz-code-line );
	border-radius: 0.45rem;
	color: var( --lz-code-ink );
	font-family: var( --lz-mono );
	font-size: 0.82rem;
	line-height: 1.65;
	padding: 0.85em 1em;
	overflow-x: auto;
}

/* ---------------------------------------------------------------------------
 * 6. TOC
 * The floating bordered box becomes a quiet block with mono numbering.
 * ------------------------------------------------------------------------ */
.mw-parser-output #toc,
.mw-parser-output .toc {
	display: block;
	max-width: 68ch;
	background: var( --lz-surface-2 );
	border: 1px solid var( --lz-line );
	border-radius: 0.45rem;
	padding: 0.9em 1.1em;
	font-size: 0.9rem;
}

.mw-parser-output .toctitle h2,
.mw-parser-output #toc h2 {
	font-family: var( --lz-mono );
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var( --lz-ink-3 );
	border-bottom: 0;
	margin: 0 0 0.5em;
	padding: 0;
}

.mw-parser-output #toc ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mw-parser-output #toc ul ul {
	margin-left: 1em;
}

.mw-parser-output #toc li {
	margin-bottom: 0.15em;
}

.mw-parser-output #toc a {
	text-decoration: none;
	color: var( --lz-ink-2 );
}

.mw-parser-output #toc a:hover {
	color: var( --lz-accent );
	text-decoration: underline;
}

.mw-parser-output #toc .tocnumber {
	font-family: var( --lz-mono );
	font-size: 0.78rem;
	color: var( --lz-ink-3 );
	margin-right: 0.3em;
}

/* ---------------------------------------------------------------------------
 * 7. TABLES
 * ------------------------------------------------------------------------ */
.mw-parser-output table.wikitable {
	background: var( --lz-surface );
	color: var( --lz-ink );
	border: 1px solid var( --lz-line );
	border-collapse: collapse;
	border-radius: 0.45rem;
	margin: 1.2em 0;
	font-size: 0.9rem;
	font-variant-numeric: tabular-nums;
	overflow: hidden;
}

.mw-parser-output table.wikitable > * > tr > th,
.mw-parser-output table.wikitable > * > tr > td {
	border: 0;
	border-bottom: 1px solid var( --lz-line );
	padding: 0.5em 0.85em;
	text-align: left;
}

.mw-parser-output table.wikitable > * > tr > th {
	background: var( --lz-surface-2 );
	font-family: var( --lz-mono );
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var( --lz-ink-2 );
	white-space: nowrap;
}

.mw-parser-output table.wikitable > * > tr:last-child > td {
	border-bottom: 0;
}

/* Wide tables scroll inside their own container, never the page body.
 * Wrap the table in <div class="lz-scroll"> ... </div> in wikitext. */
.lz-scroll {
	overflow-x: auto;
	max-width: 100%;
}

/* ---------------------------------------------------------------------------
 * 8. CARD GRIDS — index pages
 *
 * Two levels of adoption:
 *   (a) Template:Card  ->  .lz-card with a description and a command chip.
 *   (b) Zero content edits: add  class="lz-cards"  to an existing bullet list
 *       and each <li> becomes a title-only card.
 * ------------------------------------------------------------------------ */
.mw-parser-output .lz-cardgrid,
.mw-parser-output ul.lz-cards {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 15rem, 1fr ) );
	gap: 0.7rem;
	max-width: none;
	margin: 1em 0 2em;
	padding: 0;
	list-style: none;
}

.mw-parser-output ul.lz-cards li {
	margin: 0;
	list-style: none;
}

.mw-parser-output .lz-card,
.mw-parser-output ul.lz-cards > li {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	padding: 0.8rem 0.95rem;
	background: var( --lz-surface );
	border: 1px solid var( --lz-line );
	border-radius: 0.45rem;
}

.mw-parser-output .lz-card:hover,
.mw-parser-output ul.lz-cards > li:hover {
	border-color: var( --lz-accent );
	box-shadow: var( --lz-shadow );
}

.mw-parser-output .lz-card a,
.mw-parser-output ul.lz-cards > li > a {
	font-weight: 600;
	font-size: 0.93rem;
	line-height: 1.3;
	color: var( --lz-ink );
	text-decoration: none;
}

.mw-parser-output .lz-card:hover a,
.mw-parser-output ul.lz-cards > li:hover > a {
	color: var( --lz-accent );
}

.mw-parser-output .lz-card-desc {
	font-size: 0.8rem;
	line-height: 1.45;
	color: var( --lz-ink-3 );
}

.mw-parser-output .lz-card-cmd {
	font-family: var( --lz-mono );
	font-size: 0.74rem;
	color: var( --lz-accent );
	overflow-wrap: break-word;
}

/* Template:Card always emits both slots; collapse the unused ones so the
 * flex gap does not leave a hole. Avoids needing ParserFunctions #if. */
.mw-parser-output .lz-card-desc:empty,
.mw-parser-output .lz-card-cmd:empty {
	display: none;
}

/* Section rules above each card group. */
.mw-parser-output h2.lz-section {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	font-size: 0.78rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var( --lz-ink-3 );
	border-bottom: 0;
	padding-bottom: 0;
}

.mw-parser-output h2.lz-section::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var( --lz-line );
}

/* ---------------------------------------------------------------------------
 * 9. LEGACY INLINE-STYLE BOX
 *
 * Every article's wikitext currently hardcodes:
 *   <div style="margin-top:1.5em; border:3px solid #ae8c55; border-radius:.5em;
 *               padding:1em 1.5em; font-size:1.2em">
 * Inline styles outrank the cascade, so !important is required here. This is
 * a bridge — the real fix is migrating those pages to Template:Box, after
 * which this block can be deleted.
 * ------------------------------------------------------------------------ */
.mw-parser-output div[ style*="#ae8c55" ] {
	margin-top: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	font-size: 1em !important;
}

/* The Copperplate banner on Main Page. */
.mw-parser-output div[ style*="#936c29" ] {
	color: var( --lz-ink ) !important;
	font-family: var( --lz-mono ) !important;
	font-size: 1.75rem !important;
	letter-spacing: -0.02em;
}

.mw-parser-output div[ style*="Copperplate" ] span,
.mw-parser-output span[ style*="Copperplate" ] {
	font-family: var( --lz-mono ) !important;
}

/* Intended replacement, once Template:Box exists. */
.mw-parser-output .lz-note {
	display: flex;
	gap: 0.75rem;
	max-width: 68ch;
	margin: 1.3em 0;
	padding: 0.85em 1em;
	background: var( --lz-accent-tint );
	border-left: 3px solid var( --lz-accent );
	border-radius: 0 0.35rem 0.35rem 0;
	font-size: 0.94rem;
	color: var( --lz-ink-2 );
}

.mw-parser-output .lz-note p {
	margin: 0;
	max-width: none;
}

.mw-parser-output .lz-note::before {
	content: "!";
	flex: none;
	font-family: var( --lz-mono );
	font-weight: 700;
	color: var( --lz-accent );
}

.mw-parser-output .lz-note.lz-warn {
	background: rgba( 161, 47, 47, 0.08 );
	border-left-color: var( --lz-red );
}

.mw-parser-output .lz-note.lz-warn::before {
	content: "\26A0";
	color: var( --lz-red );
}

/* ---------------------------------------------------------------------------
 * 10. PRINT & MOTION
 * ------------------------------------------------------------------------ */
@media print {
	.mw-parser-output .mw-highlight,
	.mw-parser-output > pre {
		background: #fff;
		border: 1px solid #999;
		color: #000;
	}

	.mw-parser-output .mw-highlight pre {
		color: #000;
	}

	.lz-chead,
	.lz-theme-toggle {
		display: none;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	* {
		transition: none !important;
		animation: none !important;
		scroll-behavior: auto !important;
	}
}