/* Layout hardening: keeps the original 1024px design on desktop,
   adapts it to small screens, and lifts type/tap targets to legible sizes. */

html { -webkit-text-size-adjust: 100%; }

#body {
	font: 16px/1.5 Verdana, Geneva, sans-serif;
	overflow-x: hidden;
	margin: 0;
	padding: 0;
}

a { font-size: inherit; line-height: inherit; }
a:hover { font-size: inherit; line-height: inherit; }

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: #000;
	color: #00FF00;
	padding: 12px 18px;
	z-index: 999;
}
.skip-link:focus { left: 0; }

#wrapper {
	width: 1024px;
	max-width: 100%;
	box-sizing: border-box;
}

#header {
	width: 960px;
	max-width: 100%;
	box-sizing: border-box;
	background-size: contain;
	background-position: left top;
}

#main {
	width: 960px;
	max-width: 100%;
	box-sizing: border-box;
}

#copyright {
	width: 960px;
	max-width: 100%;
	box-sizing: border-box;
	height: auto;
	font-size: 14px;
	line-height: 1.6;
	padding: 8px 6px 16px;
}
#copyright a { font-size: 14px; }
#copyright a:hover { font-size: 14px; }

#navi { box-sizing: border-box; }

#nav_1 li a,
#nav_2 li a,
#nav_3 li a {
	font-size: 16px;
	min-height: 44px;
	line-height: 1.35;
	display: flex;
	align-items: center;
	padding: 6px 8px;
	box-sizing: border-box;
	width: auto;
}
#nav_1 li, #nav_2 li, #nav_3 li { width: auto; }
#nav_2 li a, #nav_3 li a { font-size: 15px; }

#content {
	box-sizing: border-box;
	width: 750px;
	max-width: 100%;
	padding: 0 12px 24px;
	font-size: 16px;
	line-height: 1.55;
	overflow-wrap: break-word;
	word-wrap: break-word;
}

#content h1.page-title {
	font: bold 26px/1.3 Verdana, Geneva, sans-serif;
	color: #333;
	text-align: center;
	margin: 18px 0 14px;
}

#content p, #content div, #content center, #content span, #content font {
	max-width: 100%;
}

#content img {
	max-width: 100% !important;
	height: auto !important;
	box-sizing: border-box;
}

#content table { max-width: 100%; }

/* the theme sets everything in 9-10pt; force a readable floor */
#content span[style*="font-size"],
#content font,
#content p {
	font-size: inherit;
}
#content span[style*="24px"] { font-size: 24px !important; display: inline-block; }

@media (max-width: 1055px) {
	#wrapper { width: 100%; }
	#header { width: 100%; height: 0; padding-bottom: 20.83%; border-bottom: 0; }
	#main { width: 100%; float: none; }
	#navi {
		float: none;
		width: 100%;
		margin: 0;
		padding: 8px 6px;
		box-sizing: border-box;
		border-bottom: 2px solid #000;
	}
	#nav_1 { display: flex; flex-wrap: wrap; }
	#nav_1 > li { width: auto; }
	#nav_1 > li > ul { width: 100%; }
	#nav_2, #nav_3 { display: flex; flex-wrap: wrap; padding-left: 8px; }
	#content { float: none; width: 100%; }
	#copyright { width: 100%; float: none; text-align: center; }
}

@media (max-width: 640px) {
	#nav_1, #nav_2, #nav_3 { display: block; }
	#nav_1 > li > a { border-bottom: 1px solid #d9d9d9; }
}

/* --- legacy inline-style repairs --- */

/* archived pages carry white text that used to sit on a dark press-release
   graphic; that graphic is gone, so force a readable colour */
#content [style*="color: white"],
#content [style*="color:white"],
#content [style*="color: #FFFFFF"],
#content [style*="color:#FFFFFF"] {
	color: #1a1a1a !important;
}

/* fixed-width legacy tables must not push the page sideways */
#content table {
	width: 100% !important;
	max-width: 100% !important;
	table-layout: fixed;
	border-collapse: collapse;
}
#content td, #content th {
	width: auto !important;
	max-width: 100%;
	overflow-wrap: break-word;
	word-wrap: break-word;
}

/* legacy <font size> pinned some text below a readable size */
#content font[size="1"], #content font[size="2"] { font-size: 16px; }
#content h2 { font-size: 22px; line-height: 1.3; margin: 16px 0 10px; }
#content h3 { font-size: 19px; line-height: 1.3; }

/* the theme paints a green border on every image; keep it, but never let it
   add width on small screens */
#content img { border-width: 2px; }
