/* Responsive layout — preserves legacy table structure and visual design */

*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	min-width: 0;
}

.site-shell {
	width: 100%;
	max-width: 100%;
	padding: 0 8px;
}

.site-main,
.site-footer-inner {
	width: 100% !important;
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
}

.site-main img:not([src*="spacer.gif"]),
.site-footer img:not([src*="spacer.gif"]) {
	max-width: 100%;
	height: auto;
}

.site-header__logo img,
.site-header__certs img {
	display: block;
}

.site-header__certs img {
	margin-left: auto;
	margin-right: auto;
}

.top-tagline {
	line-height: 1.35;
	padding: 2px 6px;
}

/* Main nav — equal grid on narrow screens; legacy table row on desktop */
.site-nav table {
	width: 100% !important;
}

@media (max-width: 900px) {
	.site-nav tr {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 3px 2px;
		width: 100%;
	}

	.site-nav td {
		width: 100% !important;
		min-width: 0;
		text-align: center;
		padding: 0;
	}

	.site-nav td a {
		display: block;
	}

	.site-nav img {
		width: 100%;
		max-width: 100%;
		height: 41px;
		object-fit: fill;
		display: block;
		margin: 0 auto;
	}
}

/* Footer — stack on narrow viewports only */
@media (max-width: 900px) {
	.site-footer-inner tr {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		gap: 8px 12px;
	}

	.site-footer-inner td {
		width: auto !important;
		flex: 1 1 auto;
	}
}

.site-footer-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	gap: 4px 6px;
}

.site-footer-links .footer-sep {
	color: #108bd9;
}

/* Forms */
.form-field,
.form-field2,
.form-field3,
.form-field4,
.form-field5,
.form-field6 {
	max-width: 100%;
}

/* Scrollable data tables on small screens */
.table-scroll-x {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	max-width: 100%;
}

.table-scroll-x > table {
	min-width: 280px;
}

/* Tablet and below */
@media (max-width: 900px) {
	.head2,
	h1.head2,
	h2.head2 {
		font-size: clamp(18px, 4.5vw, 22px);
	}

	.site-main td[width="33%"],
	.site-main td[width="34%"],
	.site-main td[width="60%"] {
		display: block;
		width: 100% !important;
		max-width: 100%;
	}

	.site-main tr > td[width="60%"] + td {
		display: block;
		width: 100% !important;
	}

	.site-main td[width="33%"] > div,
	.site-main td[width="34%"] > div {
		float: none !important;
		width: 100% !important;
		text-align: center !important;
	}

	.site-main td[width="33%"] table[width="268"],
	.site-main td[width="33%"] table[width="267"],
	.site-main td[width="34%"] table[width="275"],
	.site-main table[width="268"],
	.site-main table[width="267"],
	.site-main table[width="275"],
	.site-main table[width="225"] {
		width: 100% !important;
		max-width: 360px;
		margin-left: auto;
		margin-right: auto;
	}

	.site-main table[width="90%"] {
		width: 100% !important;
	}

	.site-main td[width="50%"] {
		display: block;
		width: 100% !important;
	}

	.site-main tr > td[width="50%"] + td,
	.site-main tr > td + td[width="50%"] {
		display: block;
		width: 100% !important;
	}

	.site-main td[width="50%"] .table-scroll-x,
	.site-main td[width="50%"] > table {
		display: block;
		width: 100% !important;
		max-width: 100%;
	}

	.site-main img[width="602"] {
		width: 100% !important;
		height: auto !important;
	}

	.site-main img[width="900"] {
		width: 100% !important;
		height: auto !important;
	}

	.site-main td[height="300"] {
		height: auto !important;
	}

	.sidebar-decor {
		display: none !important;
		width: 0 !important;
		padding: 0 !important;
		font-size: 0;
		line-height: 0;
	}

	.sidebar-decor img {
		display: none !important;
	}
}

@media (max-width: 768px) {
	.site-header-row td {
		display: block;
		width: 100% !important;
	}

	.site-header-row td div {
		text-align: center !important;
	}

	.site-header__logo img {
		max-width: min(100%, 394px);
		margin: 0 auto;
	}

	.site-header__certs img {
		max-width: min(100%, 506px);
	}

	.site-footer-inner tr {
		flex-direction: column;
		text-align: center;
	}

	.site-footer-inner td,
	.site-footer-inner div {
		text-align: center !important;
		width: 100% !important;
	}

	.site-footer-links {
		justify-content: center;
	}

	.form-field,
	.form-field2,
	.form-field3,
	.form-field4,
	.form-field5,
	.form-field6 {
		width: 100% !important;
	}

	.breadcrumbs {
		font-size: 10px;
		line-height: 1.4;
		word-break: break-word;
	}
}

@media (max-width: 480px) {
	.top-tagline {
		font-size: 10px;
	}

	.txt2,
	.txt {
		font-size: 11px;
		line-height: 1.5;
	}

	.site-footer-links {
		font-size: 10px;
	}

	.site-footer-links .footer-sep {
		display: none;
	}

	.site-footer-links a {
		flex: 0 0 auto;
	}
}

@media (min-width: 901px) {
	.form-field,
	.form-field2,
	.form-field3,
	.form-field4 {
		width: 278px;
	}

	.form-field5,
	.form-field6 {
		width: 324px;
	}

	.site-nav tr {
		display: table-row;
	}

	.site-nav td {
		display: table-cell;
		flex: none;
		padding: 0;
	}

	.site-nav img {
		width: auto;
		max-width: none;
		height: 41px;
	}

	.site-footer-inner tr {
		display: table-row;
	}

	.site-footer-inner td {
		display: table-cell;
	}

	.site-footer-links {
		display: block;
		text-align: right;
	}

	.site-footer-links .footer-sep {
		margin: 0 6px;
	}
}
