@media screen {
	.lab-main {
		padding-bottom: 4rem;
	}

	.lab-panel {
		margin-bottom: 1rem;
		border: 1px solid rgba(15, 37, 56, .16);
		border-radius: 10px;
		background: #fff;
		box-shadow: 0 18px 42px rgba(15, 37, 56, .08);
	}

	.lab-panel-head {
		display: flex;
		align-items: flex-start;
		justify-content: space-between;
		gap: 1rem;
		padding: 1.15rem 1.25rem;
		border-bottom: 1px solid rgba(15, 37, 56, .12);
	}

	.lab-panel-head h2,
	.lab-panel-head p {
		margin: 0;
	}

	.lab-panel-head h2 {
		color: #0F2538;
		font-size: 1.35rem;
		line-height: 1.25;
	}

	.lab-panel-head p {
		max-width: 620px;
		color: #526273;
		font-size: .95rem;
	}

	.lab-search-body {
		padding: 1.25rem;
	}

	.lab-search-row {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: end;
		gap: .75rem;
	}

	.lab-field label,
	.lab-filter label {
		display: block;
		margin-bottom: .35rem;
		color: #23394C;
		font-size: .84rem;
		font-weight: 800;
	}

	.lab-field input,
	.lab-filter select {
		width: 100%;
		min-height: 3rem;
		margin: 0;
		border: 1px solid #8294A3;
		border-radius: 8px;
		background: #fff;
		color: #0B1B28;
		font: inherit;
	}

	.lab-field input {
		padding: .65rem .85rem;
	}

	.lab-filter select {
		padding: .55rem 2rem .55rem .7rem;
	}

	.lab-field input::placeholder {
		color: #667786;
		opacity: 1;
	}

	.lab-clear,
	.detail-close {
		border: 1px solid #577187;
		border-radius: 8px;
		background: #fff;
		color: #0F2538;
		font: inherit;
		font-weight: 800;
		cursor: pointer;
	}

	.lab-clear {
		min-height: 3rem;
		padding: .65rem 1rem;
	}

	.lab-clear:hover,
	.lab-clear:focus-visible,
	.detail-close:hover,
	.detail-close:focus-visible {
		background: #EAF0F6;
	}

	.lab-privacy-note {
		display: flex;
		align-items: flex-start;
		gap: .55rem;
		margin: .75rem 0 0;
		color: #3E5264;
		font-size: .9rem;
	}

	.lab-privacy-note .icon {
		margin-top: .3rem;
		color: #2F7D52;
	}

	.lab-filter-grid {
		display: grid;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		gap: .75rem;
		margin-top: 1rem;
	}

	.lab-load-status {
		margin: 1rem 0 0;
		padding: .7rem .85rem;
		border-left: 4px solid #2F6F9F;
		border-radius: 6px;
		background: #EAF2F8;
		color: #193A52;
		font-size: .9rem;
	}

	.lab-load-status.is-error {
		border-left-color: #9D3C3C;
		background: #FBECEC;
		color: #6C2222;
	}

	.lab-content-grid {
		display: grid;
		grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr);
		gap: 1rem;
		align-items: start;
	}

	.lab-results-panel,
	.lab-detail-panel {
		min-width: 0;
	}

	.lab-result-count {
		flex: 0 0 auto;
		padding: .22rem .55rem;
		border-radius: 999px;
		background: #E7EEF5;
		color: #29465B;
		font-size: .8rem;
		font-weight: 800;
	}

	.lab-results {
		max-height: 52rem;
		margin: 0;
		padding: .65rem;
		list-style: none;
		overflow: auto;
	}

	.lab-results li + li {
		margin-top: .55rem;
	}

	.lab-result-card {
		display: block;
		width: 100%;
		padding: .9rem;
		border: 1px solid rgba(15, 37, 56, .16);
		border-left: 4px solid #2F6F9F;
		border-radius: 8px;
		background: #fff;
		color: #0B1B28;
		font: inherit;
		text-align: left;
		cursor: pointer;
	}

	.lab-result-card:hover,
	.lab-result-card:focus-visible {
		border-color: #2F6F9F;
		box-shadow: 0 10px 24px rgba(15, 37, 56, .10);
		transform: translateY(-1px);
	}

	.lab-result-card.is-historical {
		border-left-color: #6C7780;
		background: #F4F5F6;
	}

	.lab-result-heading,
	.lab-result-code,
	.lab-result-name,
	.lab-result-meta {
		display: block;
	}

	.lab-result-heading {
		line-height: 1.3;
	}

	.lab-result-code {
		color: #0F2538;
		font-size: 1.05rem;
	}

	.lab-result-name {
		margin-top: .15rem;
		font-weight: 700;
	}

	.lab-result-meta {
		margin-top: .45rem;
		color: #526273;
		font-size: .84rem;
	}

	.lab-status {
		display: inline-flex;
		max-width: 100%;
		margin-top: .6rem;
		padding: .28rem .5rem;
		border: 1px solid #8093A2;
		border-radius: 999px;
		background: #EDF1F4;
		color: #263E50;
		font-size: .75rem;
		font-weight: 800;
		line-height: 1.3;
	}

	.status-current_verified {
		border-color: #5B9773;
		background: #E4F3EA;
		color: #1F603C;
	}

	.status-change_pending,
	.status-not_seen_once,
	.status-withdrawal_pending,
	.status-review_overdue {
		border-color: #B38325;
		background: #FFF3D8;
		color: #704B00;
	}

	.status-withdrawn,
	.status-source_unavailable,
	.status-historical-version {
		border-color: #8A969F;
		background: #ECEFF1;
		color: #394B57;
	}

	.lab-empty-result {
		display: grid;
		gap: .35rem;
		padding: 1rem;
		border: 1px dashed #8999A6;
		border-radius: 8px;
		background: #F7F9FA;
		color: #425565;
	}

	.lab-detail {
		min-height: 23rem;
		padding: 1.25rem;
		outline: none;
	}

	.lab-detail.has-error {
		border-left: 4px solid #9D3C3C;
	}

	.detail-head {
		display: flex;
		align-items: flex-start;
		justify-content: space-between;
		gap: 1rem;
	}

	.detail-head h2 {
		margin: 0;
		color: #0F2538;
		font-size: clamp(1.25rem, 3vw, 1.8rem);
		line-height: 1.2;
	}

	.detail-close {
		flex: 0 0 2.35rem;
		width: 2.35rem;
		height: 2.35rem;
		font-size: 1.45rem;
		line-height: 1;
	}

	.detail-facts,
	.detail-times,
	.change-list {
		margin: 1rem 0 0;
	}

	.detail-fact,
	.detail-time,
	.change-list > div {
		display: grid;
		grid-template-columns: minmax(8rem, .34fr) minmax(0, 1fr);
		gap: .4rem 1rem;
		padding: .65rem 0;
		border-top: 1px solid rgba(15, 37, 56, .11);
	}

	.detail-fact dt,
	.detail-time dt,
	.change-list dt {
		color: #3C5263;
		font-size: .82rem;
		font-weight: 800;
	}

	.detail-fact dd,
	.detail-time dd,
	.change-list dd {
		margin: 0;
		min-width: 0;
	}

	.detail-source {
		margin: 1rem 0 0;
		padding: .75rem;
		border-radius: 7px;
		background: #EAF2F8;
		overflow-wrap: anywhere;
	}

	.detail-history {
		margin-top: 1.5rem;
		padding-top: 1rem;
		border-top: 2px solid rgba(15, 37, 56, .12);
	}

	.detail-history h3,
	.detail-history h4 {
		margin: 0;
		color: #0F2538;
	}

	.detail-history .detail-history-subtitle {
		margin-top: 1.25rem;
	}

	.history-list {
		margin: .75rem 0 0;
		padding-left: 1.4rem;
	}

	.history-list > li {
		padding: 0 0 1rem .25rem;
	}

	.history-status {
		margin: .3rem 0;
		color: #526273;
		font-size: .86rem;
	}

	.change-list > div {
		grid-template-columns: minmax(7rem, .26fr) minmax(0, 1fr);
	}

	.change-list dd + dd {
		grid-column: 2;
	}

	.coverage-panel {
		padding: 1.25rem;
	}

	.coverage-panel > h2 {
		margin: 0;
		color: #0F2538;
		font-size: 1.35rem;
	}

	.coverage-intro {
		margin: .35rem 0 0;
		color: #526273;
	}

	.lab-coverage {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: .75rem;
		margin-top: 1rem;
	}

	.coverage-card {
		padding: .85rem;
		border: 1px solid rgba(15, 37, 56, .15);
		border-radius: 8px;
		background: #F8FAFC;
	}

	.coverage-card h3,
	.coverage-card p {
		margin: 0;
	}

	.coverage-card h3 {
		color: #0F2538;
		font-size: .98rem;
	}

	.coverage-status {
		margin-top: .4rem !important;
		color: #704B00;
		font-size: .82rem;
		font-weight: 800;
	}

	.coverage-date {
		margin-top: .3rem !important;
		color: #526273;
		font-size: .78rem;
	}

	.lab-boundaries {
		padding: 1.25rem;
	}

	.lab-boundaries h2,
	.lab-boundaries h3,
	.lab-boundaries p {
		margin-top: 0;
	}

	.lab-boundaries h2,
	.lab-boundaries h3 {
		color: #0F2538;
	}

	.lab-warning {
		padding: .85rem 1rem;
		border-left: 4px solid #A86600;
		border-radius: 7px;
		background: #FFF3D8;
		color: #604100;
	}

	.lab-cta-grid {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: .75rem;
		margin-top: 1rem;
	}

	.lab-cta {
		display: block;
		padding: 1rem;
		border: 1px solid #315A76;
		border-radius: 8px;
		background: #0F2538;
		color: #fff !important;
		font-weight: 800;
		text-decoration: none;
	}

	.lab-cta.secondary {
		background: #fff;
		color: #0F2538 !important;
	}

	.lab-cta small {
		display: block;
		margin-top: .25rem;
		color: inherit;
		font-weight: 500;
		opacity: .82;
	}

	.lab-cta:hover,
	.lab-cta:focus-visible {
		border-color: #E0A100;
		box-shadow: 0 10px 28px rgba(15, 37, 56, .14);
		transform: translateY(-1px);
	}

	.lab-skip-link {
		position: fixed;
		top: .5rem;
		left: .5rem;
		z-index: 100;
		padding: .65rem .85rem;
		border-radius: 6px;
		background: #fff;
		color: #071827;
		font-weight: 800;
		transform: translateY(-150%);
	}

	.lab-skip-link:focus {
		transform: translateY(0);
	}

	.lab-tool-shell :focus-visible {
		outline: 3px solid #E0A100;
		outline-offset: 3px;
	}

	html[data-itss-theme] .lab-panel,
	html[data-itss-theme] .lab-result-card,
	html[data-itss-theme] .lab-field input,
	html[data-itss-theme] .lab-filter select,
	html[data-itss-theme] .lab-clear,
	html[data-itss-theme] .detail-close,
	html[data-itss-theme] .lab-cta.secondary {
		background: var(--itss-theme-bg-card) !important;
		border-color: var(--itss-theme-line) !important;
		color: var(--itss-theme-text) !important;
	}

	html[data-itss-theme] .lab-panel-head h2,
	html[data-itss-theme] .lab-result-code,
	html[data-itss-theme] .detail-head h2,
	html[data-itss-theme] .detail-history h3,
	html[data-itss-theme] .detail-history h4,
	html[data-itss-theme] .coverage-panel > h2,
	html[data-itss-theme] .coverage-card h3,
	html[data-itss-theme] .lab-boundaries h2,
	html[data-itss-theme] .lab-boundaries h3 {
		color: var(--itss-theme-text) !important;
	}

	html[data-itss-theme] .lab-panel-head p,
	html[data-itss-theme] .lab-result-meta,
	html[data-itss-theme] .coverage-intro,
	html[data-itss-theme] .coverage-date,
	html[data-itss-theme] .detail-fact dt,
	html[data-itss-theme] .detail-time dt,
	html[data-itss-theme] .change-list dt {
		color: var(--itss-theme-muted) !important;
	}

	html[data-itss-theme] .coverage-card,
	html[data-itss-theme] .lab-empty-result,
	html[data-itss-theme] .lab-result-card.is-historical {
		background: var(--itss-theme-bg-soft) !important;
		color: var(--itss-theme-text) !important;
	}
}

@media (max-width: 980px) {
	.lab-filter-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.lab-coverage {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 720px) {
	.lab-tool-shell .privacy-hero {
		background:
			linear-gradient(180deg, rgba(7, 24, 39, .98), rgba(15, 37, 56, .96)),
			linear-gradient(135deg, rgba(224, 161, 0, .16), rgba(47, 111, 159, .12));
	}

	.lab-content-grid,
	.lab-search-row,
	.lab-cta-grid {
		grid-template-columns: 1fr;
	}

	.lab-filter-grid,
	.lab-coverage {
		grid-template-columns: 1fr;
	}

	.lab-panel-head,
	.detail-head {
		align-items: stretch;
		flex-direction: column;
	}

	.detail-close {
		align-self: flex-end;
	}

	.detail-fact,
	.detail-time,
	.change-list > div {
		grid-template-columns: 1fr;
	}

	.change-list dd + dd {
		grid-column: 1;
	}

	.lab-results {
		max-height: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lab-tool-shell *,
	.lab-tool-shell *::before,
	.lab-tool-shell *::after {
		scroll-behavior: auto !important;
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
}
