html,
body {
	padding: 0;
	margin: 0;
	height: 100%;
	width: 100%;
	font-family: "Avenir Next W00", Arial, sans-serif;
	color: #1f2933;
	background: #f4f6f8;
}

body {
	display: flex;
	flex-direction: column;
}

.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 28px 18px;
	background:
		linear-gradient(90deg, rgba(15, 76, 129, 0.96), rgba(21, 94, 117, 0.92)),
		linear-gradient(135deg, #0f4c81, #155e75);
	border-bottom: 1px solid #0b3b5f;
	color: #ffffff;
	box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
}

#titleText {
	font-family: "Times New Roman", Times, serif;
	font-size: 28pt;
	font-weight: bold;
	line-height: 1.05;
	letter-spacing: 0;
	max-width: 1180px;
}

.tagline {
	margin-top: 8px;
	color: #eaf4fb;
	font-size: 1.18rem;
	font-weight: 500;
	line-height: 1.25;
}

.tab-bar {
	display: flex;
	gap: 4px;
	padding: 0 22px;
	background: #ffffff;
	border-bottom: 1px solid #d9dee5;
}

.tab-button {
	border: 0;
	border-bottom: 3px solid transparent;
	background: transparent;
	padding: 12px 14px 9px;
	color: #374151;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.tab-button:hover {
	background: #f3f4f6;
}

.tab-button.active {
	color: #0f4c81;
	border-bottom-color: #0f4c81;
}

.tab-layout {
	position: relative;
	flex: 1;
	min-height: 0;
}

.tab-panel {
	display: none;
	height: 100%;
	min-height: 0;
}

.tab-panel.active {
	display: block;
}

.content-page {
	box-sizing: border-box;
	max-width: 1040px;
	margin: 0 auto;
	padding: 28px 28px 44px;
	line-height: 1.55;
}

.content-page h1 {
	margin: 0 0 16px;
	font-size: 1.8rem;
}

.content-page h2 {
	margin: 24px 0 8px;
	font-size: 1.18rem;
}

.content-page p {
	margin: 0 0 12px;
}

.content-page ul {
	margin: 8px 0 0 20px;
	padding: 0;
}

.content-page li {
	margin-bottom: 6px;
}

.logo-row {
	display: flex;
	align-items: center;
	gap: 26px;
	margin-top: 34px;
	padding-top: 26px;
	border-top: 1px solid #d9dee5;
}

.logo-card {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 210px;
	height: 95px;
	padding: 8px;
	border: 1px solid #d9dee5;
	background: #ffffff;
}

.logo-card img {
	position: relative;
	z-index: 1;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	background: #ffffff;
}

.logo-card img:not([src]),
.logo-card img[src=""] {
	display: none;
}

.logo-fallback {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 10px;
	color: #4b5563;
	font-weight: 700;
	text-align: center;
}

.logo-card img[src]:not([src=""]) + .logo-fallback {
	display: none;
}

.disclaimer-block {
	max-width: 980px;
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid #d9dee5;
	color: #4b5563;
	font-size: 0.78rem;
	line-height: 1.38;
}

.disclaimer-block p {
	margin: 0 0 7px;
}

.section-heading {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
}

.section-heading label {
	display: block;
	margin-bottom: 5px;
	font-size: 0.82rem;
	font-weight: 700;
	color: #4b5563;
}

.section-heading select {
	width: 220px;
}

.pest-selector {
	padding: 10px 12px;
	border-left: 4px solid #0f4c81;
	background: #ffffff;
	box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.pest-selector label {
	margin-bottom: 7px;
	color: #0f4c81;
	font-size: 0.98rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.pest-selector select {
	min-width: 240px;
	font-size: 1rem;
	font-weight: 600;
}

.pest-profile {
	display: grid;
	grid-template-columns: minmax(260px, 380px) 1fr;
	gap: 24px;
	align-items: start;
}

.pest-image-gallery {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: 10px;
}

.pest-image-card {
	position: relative;
	overflow: hidden;
	min-height: 160px;
	margin: 0;
	border: 1px solid #d9dee5;
	background: #ffffff;
}

.pest-image-card:first-child {
	grid-row: span 2;
	min-height: 330px;
}

.pest-image-card img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #ffffff;
}

.pest-image-card figcaption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 6px 8px;
	background: rgba(17, 24, 39, 0.72);
	color: #ffffff;
	font-size: 0.85rem;
	font-weight: 700;
}

.image-credit {
	margin-top: 7px;
	color: #4b5563;
	font-size: 0.82rem;
}

.image-placeholder {
	display: grid;
	place-items: center;
	min-height: 260px;
	border: 1px solid #d9dee5;
	padding: 20px;
	color: #6b7280;
	text-align: center;
	background: repeating-linear-gradient(
		-45deg,
		#f8fafc,
		#f8fafc 10px,
		#eef2f7 10px,
		#eef2f7 20px
	);
}

.infoTable {
	width: 100%;
	border-collapse: collapse;
	margin-top: 16px;
	background: #ffffff;
}

.infoTable th,
.infoTable td {
	border-bottom: 1px solid #d9dee5;
	padding: 9px 8px;
	text-align: left;
	vertical-align: top;
}

.infoTable th {
	width: 34%;
	background: #f8fafc;
}

.map-panel {
	overflow: hidden;
}

.webgis-layout {
	display: grid;
	grid-template-columns: 300px 1fr;
	height: 100%;
	min-height: 0;
}

.selection-sidebar {
	box-sizing: border-box;
	padding: 12px;
	border-right: 1px solid #d9dee5;
	background: #ffffff;
	overflow-y: auto;
	z-index: 2;
}

.sidebar-title {
	margin-bottom: 8px;
	padding-bottom: 8px;
	border-bottom: 1px solid #d9dee5;
	color: #0f4c81;
	font-size: 1.05rem;
	font-weight: 800;
}

.map-window {
	position: relative;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
}

#viewDiv,
#animationViewDiv {
	position: absolute;
	inset: 0;
	padding: 0;
	margin: 0;
	height: 100%;
	width: 100%;
}

.animation-title-panel {
	position: absolute;
	top: 16px;
	left: 58px;
	z-index: 20;
	line-height: 1.35;
}

.animation-legend-panel {
	position: absolute;
	right: 16px;
	bottom: 16px;
	width: 165px;
	max-height: 42vh;
	overflow-y: auto;
	z-index: 18;
}

.legend-unit {
	margin-top: -4px;
	margin-bottom: 7px;
	color: #4b5563;
	font-size: 0.8rem;
	font-weight: 700;
}

.manual-legend-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 5px 0;
	font-size: 0.88rem;
}

.manual-legend-row img {
	width: 20px;
	height: 20px;
	image-rendering: auto;
}

.action-button {
	margin-top: 8px;
	border: 0;
	background: #0f4c81;
	color: #ffffff;
	padding: 9px 12px;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.action-button:hover {
	background: #0b3b5f;
}

.app-panel {
	box-sizing: border-box;
	padding: 10px;
	width: 340px;
}

.control-panel {
	display: grid;
	grid-template-columns: 1fr;
	gap: 4px;
}

.control-panel label {
	font-size: 0.78rem;
	font-weight: 700;
	color: #333;
	margin-top: 2px;
	margin-bottom: 1px;
}

.control-panel select {
	width: 100%;
	font-family: "Avenir Next W00", Arial, sans-serif;
	font-size: 0.9rem;
	min-height: 30px;
}

.slider-row {
	display: grid;
	grid-template-columns: 1fr 44px;
	align-items: center;
	gap: 6px;
}

.slider-row input[type="range"] {
	width: 100%;
}

.slider-row span {
	font-size: 0.8rem;
	font-weight: 700;
	color: #374151;
	text-align: right;
}

.sidebar-note {
	margin-top: 10px;
	padding-top: 9px;
	border-top: 1px solid #d9dee5;
	color: #4b5563;
	font-size: 0.78rem;
	line-height: 1.32;
}

.sidebar-note div {
	margin-bottom: 4px;
}

.multi-select {
	border: 1px solid #d9dee5;
	background: #ffffff;
}

.multi-select summary {
	padding: 8px 9px;
	color: #1f2933;
	font-size: 0.94rem;
	font-weight: 700;
	cursor: pointer;
	list-style-position: inside;
}

.multi-select[open] summary {
	border-bottom: 1px solid #d9dee5;
}

.animation-state-select {
	margin-bottom: 8px;
}

.playback-panel {
	display: block;
}

.playback-panel label {
	display: block;
	margin: 11px 0 5px;
}

.playback-panel .sidebar-title + label {
	margin-top: 0;
}

.playback-panel select,
.playback-panel .multi-select,
.playback-panel .slider-row {
	margin-top: 0;
	margin-bottom: 10px;
}

.playback-panel .animation-state-select {
	margin-bottom: 14px;
}

#animationViewDiv .esri-ui-top-left {
	top: 82px;
}

.checkbox-group {
	display: grid;
	gap: 6px;
	max-height: 150px;
	overflow-y: auto;
	padding: 7px;
	border: 0;
	background: #f8fafc;
}

.checkbox-option {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 0.92rem;
	font-weight: 600;
	color: #1f2933;
	cursor: pointer;
}

.checkbox-option input {
	margin: 0;
}

.summary-panel {
	width: 380px;
	max-height: 48vh;
	overflow-y: auto;
	line-height: 1.35;
	z-index: 20;
}

.legend-panel {
	position: absolute;
	right: 16px;
	bottom: 16px;
	width: 300px;
	max-height: 42vh;
	overflow-y: auto;
	z-index: 18;
}

.layer-list-panel {
	width: 310px;
	max-height: 36vh;
	overflow-y: auto;
}

.layer-list-title {
	padding: 7px 10px 5px;
	border-bottom: 1px solid #d9dee5;
	color: #0f4c81;
	font-size: 0.86rem;
	font-weight: 800;
}

.layer-list-panel .esri-layer-list {
	max-width: 310px;
	max-height: 32vh;
	overflow-y: auto;
	font-size: 0.86rem;
}

.layer-list-panel .esri-layer-list__item-container {
	padding-top: 4px;
	padding-bottom: 4px;
}

.layer-list-panel .esri-layer-list__item-title {
	line-height: 1.2;
}

.basemap-switcher {
	display: grid;
	gap: 6px;
	width: 160px;
	padding: 8px;
}

.basemap-switcher-title {
	color: #0f4c81;
	font-size: 0.86rem;
	font-weight: 800;
}

.basemap-switcher-button {
	border: 1px solid #d9dee5;
	background: #ffffff;
	padding: 7px 9px;
	color: #1f2933;
	font: inherit;
	font-size: 0.9rem;
	text-align: left;
	cursor: pointer;
}

.basemap-switcher-button:hover {
	background: #eef6fc;
	border-color: #0f4c81;
}

.panelTitle {
	font-weight: 700;
	margin-bottom: 8px;
}

.summaryContent {
	font-size: 0.92rem;
}

.metricGrid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin: 8px 0 10px;
}

.metricBox {
	border: 1px solid #d7d7d7;
	border-radius: 4px;
	padding: 8px;
	background: #fbfbfb;
}

.metricLabel {
	font-size: 0.78rem;
	color: #555;
	margin-bottom: 2px;
}

.metricValue {
	font-size: 1.15rem;
	font-weight: 700;
	color: #1f1f1f;
}

.summaryTable {
	width: 100%;
	border-collapse: collapse;
	margin-top: 8px;
	font-size: 0.86rem;
}

.summaryTable th,
.summaryTable td {
	border-bottom: 1px solid #ddd;
	padding: 5px 4px;
	text-align: left;
	vertical-align: top;
}

.summaryTable th {
	background: #f4f4f4;
	font-weight: 700;
}

.chartWrap {
	margin-top: 12px;
}

.metricChart {
	height: 210px;
	margin-top: 12px;
}

.metricChart:first-child {
	margin-top: 0;
}

.hidden {
	display: none;
}

.statusText {
	color: #555;
	font-size: 0.9rem;
}

.warningText {
	color: #9a3412;
	font-size: 0.9rem;
}

@media (max-width: 760px) {
	.site-header {
		padding: 16px 14px;
	}

	#titleText {
		font-size: 28pt;
	}

	.tagline {
		font-size: 1rem;
	}

	.tab-bar {
		overflow-x: auto;
		padding: 0 10px;
	}

	.content-page {
		padding: 22px 16px 34px;
	}

	.logo-row {
		flex-direction: column;
		align-items: stretch;
	}

	.section-heading,
	.pest-profile {
		display: block;
	}

	.section-heading select {
		width: 100%;
	}

	.pest-image-gallery {
		grid-template-columns: 1fr;
		grid-template-rows: none;
		margin-bottom: 18px;
	}

	.pest-image-card:first-child {
		grid-row: auto;
		min-height: 220px;
	}

	.pest-image-card {
		min-height: 190px;
	}

	.webgis-layout {
		grid-template-columns: 1fr;
		grid-template-rows: auto 1fr;
	}

	.selection-sidebar {
		max-height: 240px;
		border-right: 0;
		border-bottom: 1px solid #d9dee5;
	}
}
