/* The palette, type and stepped corners every page shares: the homepage and the blog
   (site.css), the docs and package pages (docs/docs.css), and the API reference, whose
   tool puts this file at the top of the style.css it writes (tools/doc/cairn-doc.ts). */
/* Digits in the pixel font come from the system monospace: Pixelify's are hard to read at label
   sizes. These faces join the Pixelify Sans family (fonts.css, linked before this file) for 0-9
   only; declared later, they win for those. A separate digits-only family first in the stack
   breaks WebKit, which then measures every character of the run too narrow. */
@font-face { font-family: "Pixelify Sans"; font-weight: 100 500; size-adjust: 92%; unicode-range: U+30-39;
	src: local("SF Mono"), local("SFMono-Regular"), local("Menlo"), local("Menlo-Regular"), local("Consolas"), local("DejaVu Sans Mono"); }
@font-face { font-family: "Pixelify Sans"; font-weight: 600 900; size-adjust: 92%; unicode-range: U+30-39;
	src: local("SF Mono Semibold"), local("SFMono-Semibold"), local("Menlo Bold"), local("Menlo-Bold"), local("Consolas Bold"), local("DejaVu Sans Mono Bold"); }

:root {
	--bg: #161937;
	--fg: #e6e2f6;
	--muted: #a29fca;
	--rule: #2d3062;
	--ink: #0c0e26;
	--panel: #1d2047;
	--shadow: #0c0e26;
	--chip: #2a2d5e;
	--accent: #9cc8e8;
	--gold: #f2c46a;
	--px: 4px;
	--pixel: "Pixelify Sans", ui-monospace, monospace;
	--mono: ui-monospace, "SF Mono", Menlo, monospace;
	color-scheme: dark;
}

/* Stepped corners: the shape every panel, stone and frame shares. */
.px {
	--s: var(--px);
	clip-path: polygon(
		0 calc(var(--s) * 2), var(--s) calc(var(--s) * 2), var(--s) var(--s), calc(var(--s) * 2) var(--s), calc(var(--s) * 2) 0,
		calc(100% - var(--s) * 2) 0, calc(100% - var(--s) * 2) var(--s), calc(100% - var(--s)) var(--s), calc(100% - var(--s)) calc(var(--s) * 2), 100% calc(var(--s) * 2),
		100% calc(100% - var(--s) * 2), calc(100% - var(--s)) calc(100% - var(--s) * 2), calc(100% - var(--s)) calc(100% - var(--s)), calc(100% - var(--s) * 2) calc(100% - var(--s)), calc(100% - var(--s) * 2) 100%,
		calc(var(--s) * 2) 100%, calc(var(--s) * 2) calc(100% - var(--s)), var(--s) calc(100% - var(--s)), var(--s) calc(100% - var(--s) * 2), 0 calc(100% - var(--s) * 2)
	);
}
