/* The Building Coder mirror base styles */
html, body { margin:0; padding:0; }
body {
	font-family:-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
	font-size:16px;
	line-height:1.6;
	color:#111827;
	background:#ffffff;
	/* Global page gutters */
	padding-left: 24px;
	padding-right: 24px;
}

/* Center top-level content; horizontal padding handled on body */
body > :not(#tbc-mirror-banner) {
	max-width: 1100px;
	margin-left: auto;
	margin-right: auto;
}

main, .container { max-width: 1100px; margin: 0 auto; padding: 16px; }

h1, h2, h3, h4, h5, h6 { color:#0f172a; line-height:1.25; margin:1.5em 0 0.6em; }

p { margin: 0.75em 0; }

a { color:#0b5cab; text-decoration:underline; }
a:hover { text-decoration:none; }

/* Prevent long strings/URLs from causing horizontal overflow */
p, li, td, th, a, code, pre {
	overflow-wrap: anywhere;
	word-break: break-word;
}

ul, ol { padding-left: 1.4em; }
li { margin: 0.25em 0; }

pre, code, .code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
pre { background:#f8fafc; border:1px solid #e5e7eb; padding:12px; border-radius:6px; overflow:auto; margin-left: 24px; margin-right: 24px; }
code { background:#f1f5f9; border:1px solid #e5e7eb; padding:0 3px; border-radius:4px; }

/* Tables in index */
table { border-collapse: collapse; width: 100%; margin: 12px 0; table-layout: fixed; display:block; overflow-x:auto; }
th, td { border:1px solid #e5e7eb; padding:8px 10px; vertical-align: top; }
th { background:#f1f5f9; text-align:left; }

/* Banner spacing companion */
#tbc-mirror-banner + * { display:block; }

/* Keep banner full-width despite body padding */
#tbc-mirror-banner { margin-left: -24px; margin-right: -24px; }

/* Images */
img { max-width: 100%; height: auto; }

/* Media embeds */
iframe, video { max-width: 100%; width: 100%; height: auto; }

/* Footer */
#archilabs-legal-footer { font-size:12px; color:#4b5563; background:#fff; }

/* Wrap code blocks on small screens to avoid horizontal scrolling */
@media (max-width: 640px) {
	pre, pre code, .code { white-space: pre-wrap; }
}

/* Add horizontal margins for code blocks on all screens (set on base rule) */
