/*
 * Automatic dark mode for StructuralDrafter.com.
 * Applies only when the visitor's device is set to dark mode
 * (prefers-color-scheme). Light mode is pixel-identical to the original.
 *
 * Dark palette:
 *   page background  #1b1e21   borders #3a3f44
 *   body text        #d6d9dc   muted   #a9afb5
 *   brand blue stays #0d85cc for fills; links/accents brightened to
 *   #58b2ee so they stay readable on the dark background.
 */
@media (prefers-color-scheme: dark) {

	:root {
		color-scheme: dark; /* dark scrollbars + form controls */
	}

	body {
		background-color: #1b1e21;
		color: #d6d9dc;
	}

	/* ---------- header / navigation ---------- */
	.logo p {
		color: #a9afb5;
	}
	nav ul>li,
	nav ul>li>a {
		color: #d6d9dc;
	}
	nav ul>li.active>a,
	li>a:hover {
		color: #58b2ee;
	}

	/* ---------- headings & body copy ---------- */
	h2 {
		color: #58b2ee;
	}
	.central-title h2,
	section p,
	.page_right_side h1,
	.page_content_block p,
	.share_block h3,
	.page_right_side ul li,
	.page_right_side,
	td {
		color: #d6d9dc;
	}

	/* The home-page slider keeps its light photo background,
	   so its caption text stays dark in both modes. */
	.title-slide h2 {
		color: #0980cc;
	}
	.title-slide h3 {
		color: #333333;
	}

	/* The blue panel band keeps its white text in both modes. */
	.panel-band h4,
	.panel-band h6,
	.panel-band .block a {
		color: #ffffff;
	}

	/* ---------- links & accents ---------- */
	.dl_link,
	.page_right_side span,
	.page_content_block h3,
	h3 {
		color: #58b2ee;
	}

	/* ---------- slider dots ---------- */
	.slick-dots li {
		background-color: #4a5056;
	}
	.slick-dots li.slick-active {
		background-color: #58b2ee;
	}

	/* ---------- tables (charts, numbering system pages) ---------- */
	tr {
		border-color: #3a3f44;
	}

	/* ---------- CAD preview images ----------
	   The drawing previews are black linework on white; back them with
	   white and a soft frame so they read as cards on the dark page. */
	.page_right_side img {
		background-color: #ffffff;
	}
	.img_link {
		border-color: #3a3f44;
		background-color: #ffffff;
		-moz-box-shadow: 2px 2px 2px #000000;
		-webkit-box-shadow: 2px 2px 2px #000000;
		box-shadow: inset 0px 0px 7px #9aa0a6;
	}

	/* Header/footer strips are already dark (#333) in the base styles
	   and are left as-is, as are the blue panel band and buttons. */
}
