/* Responsive layer for the older fixed-width, table-based pages.
   Desktop rendering is left untouched; rules only apply on narrow screens. */

@media (max-width: 1020px) {
	html {
		-webkit-text-size-adjust: 100%;
		text-size-adjust: 100%;
	}
	body {
		margin: 0 !important;
		overflow-x: hidden;
		overflow-wrap: break-word;
	}
	table {
		width: 100% !important;
		max-width: 100% !important;
		height: auto !important;
	}
	td, th {
		height: auto !important;
	}
	img {
		max-width: 100% !important;
		height: auto !important;
	}
	iframe, embed, object, video {
		max-width: 100% !important;
	}
	div, p, center, font {
		max-width: 100% !important;
	}
	/* Rows of sliced header images: keep them on one line and let them shrink. */
	table.keep-row {
		table-layout: fixed;
	}
	table.keep-row td {
		width: auto !important;
	}
	table.keep-row img {
		display: block;
		width: 100% !important;
	}
}

/* Phones: stack table cells so multi-column layouts read top to bottom. */
@media (max-width: 600px) {
	table:not(.keep-row), table:not(.keep-row) > tbody, table:not(.keep-row) > thead,
	table:not(.keep-row) > tfoot, table:not(.keep-row) > * > tr,
	table:not(.keep-row) > * > tr > td, table:not(.keep-row) > * > tr > th {
		display: block !important;
		width: auto !important;
		box-sizing: border-box;
	}
	td, th {
		text-align: left;
		background-image: none !important;
	}
	table:not(.keep-row) > * > tr > td {
		padding-left: 5px !important;
		padding-right: 5px !important;
	}
	/* Large fixed inline margins push content off-screen. */
	[style*="margin-left"], [style*="margin-right"] {
		margin-left: 8px !important;
		margin-right: 8px !important;
	}
	td[align="center"], td > div[align="center"], center {
		text-align: center;
	}
	/* Empty spacer cells only add gaps once stacked. */
	td:empty {
		display: none !important;
	}
	body, td, p, font {
		font-size: 15px;
		line-height: 1.5;
	}
	td a {
		display: inline-block;
		padding: 4px 0;
	}
	embed, object {
		display: none !important;
	}
}
