:root {
	color-scheme: light;
	--color-background: #f6f8fa;
	--color-surface: #ffffff;
	--color-text: #172a3a;
	--color-text-secondary: #5f6f7a;
	--color-border: #d7e0e5;
	--color-border-strong: #c4d0d7;
	--color-primary: #245f91;
	--color-primary-hover: #1d4f79;
	--color-success: #287a62;
	--color-success-background: #edf7f3;
	--color-warning: #8a5b08;
	--color-warning-background: #fff7e6;
	--color-error: #b42318;
	--color-error-background: #fff1f0;
	--shadow-surface: 0 2px 8px rgb(23 42 58 / 5%);
}

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

html {
	min-width: 320px;
	background: var(--color-background);
}

body {
	margin: 0;
	background: var(--color-background);
	color: var(--color-text);
	font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 1rem;
	line-height: 1.6;
}

button,
input,
select {
	font: inherit;
}

#page-header,
main {
	width: min(calc(100% - 2rem), 1100px);
	margin-inline: auto;
}

#page-header {
	padding-block: 1.25rem 1.5rem;
}

.header-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.header-controls {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
}

.language-control,
.currency-control {
	display: flex;
	align-items: center;
	gap: 0.65rem;
}

.language-control label,
.currency-control label {
	color: var(--color-text-secondary);
	font-size: 0.8125rem;
}

.language-control select,
.currency-control select {
	width: auto;
	min-width: 7.5rem;
	max-width: 9rem;
	min-height: 44px;
	padding: 0.5rem 0.65rem;
	border-color: var(--color-border-strong);
	background: var(--color-surface);
	font-size: 0.9375rem;
}

.primary-navigation {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	gap: 0.4rem;
}

.primary-nav-link {
	display: inline-flex;
	min-height: 2.625rem;
	align-items: center;
	justify-content: center;
	padding: 0.4rem 0.85rem;
	border: 1px solid var(--color-border);
	border-radius: 6px;
	background: var(--color-surface);
	color: var(--color-text-secondary);
	cursor: pointer;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.primary-nav-link:hover,
.primary-nav-link:focus-visible {
	border-color: var(--color-border-strong);
	background: #f7fafc;
	color: var(--color-primary-hover);
}

.primary-nav-link[aria-current="page"] {
	border-color: var(--color-primary);
	background: #eaf2f8;
	color: var(--color-primary-hover);
}

.primary-nav-link:focus-visible {
	outline: 3px solid rgb(36 95 145 / 32%);
	outline-offset: 2px;
}

.brand-heading {
	max-width: 66ch;
	margin: 1.1rem auto 0;
	text-align: center;
}

.brand-heading h1 {
	margin: 0;
	font-size: clamp(2.25rem, 4vw, 2.65rem);
	font-weight: 700;
	line-height: 1.2;
}

.brand-heading p {
	margin-inline: auto;
}

.brand-heading p:first-of-type {
	margin-block: 0.3rem 0.45rem;
	font-size: 1.1875rem;
	font-weight: 600;
}

.brand-heading p:last-of-type {
	max-width: 66ch;
	margin-block: 0;
	color: var(--color-text-secondary);
}

main {
	padding-bottom: 3rem;
}

#optimizer-form,
#results-section {
	border: 1px solid var(--color-border);
	border-radius: 10px;
	background: var(--color-surface);
	box-shadow: var(--shadow-surface);
}

#optimizer-form {
	padding: clamp(1.125rem, 3vw, 2rem);
}

#product-section,
#shipping-route {
	display: grid;
	gap: 1rem;
	padding-bottom: 1.75rem;
	border-bottom: 1px solid var(--color-border);
}

#product-section {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

#product-section > h2,
#shipping-route > h2,
#boxes-heading {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 650;
	line-height: 1.3;
}

#product-section > h2,
#product-section > div:first-of-type,
#shipping-route > h2 {
	grid-column: 1 / -1;
}

#product-section > div,
#shipping-route > div,
#box-inputs fieldset > div {
	display: grid;
	min-width: 0;
	align-content: start;
	gap: 0.4rem;
}

.country-code-select {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.country-picker {
	position: relative;
	width: 100%;
	min-width: 0;
}

.country-picker-trigger {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	min-height: 44px;
	padding: 0.625rem 0.75rem;
	border: 1px solid var(--color-border-strong);
	border-radius: 6px;
	background: var(--color-surface);
	color: var(--color-text);
	font-size: 0.9375rem;
	font-weight: 400;
	text-align: left;
}

.country-picker-selected {
	min-width: 0;
	overflow-wrap: anywhere;
}

.country-picker-trigger:hover {
	border-color: #91a2ae;
	background: var(--color-surface);
}

.country-picker-chevron {
	width: 0.5rem;
	height: 0.5rem;
	flex: 0 0 auto;
	margin: -0.2rem 0.1rem 0 0.5rem;
	transform: rotate(45deg);
	border-right: 1.5px solid var(--color-text-secondary);
	border-bottom: 1.5px solid var(--color-text-secondary);
}

.country-picker-trigger[aria-expanded="true"] .country-picker-chevron {
	margin-top: 0.2rem;
	transform: rotate(225deg);
}

.country-search {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.country-picker-panel[hidden] {
	display: none;
}

.country-picker-panel {
	position: absolute;
	z-index: 30;
	top: calc(100% + 0.35rem);
	left: 0;
	right: 0;
	width: 100%;
	max-width: 100%;
	max-height: 320px;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	gap: 0.4rem;
	padding: 0.5rem;
	overflow: hidden;
	box-sizing: border-box;
	border: 1px solid var(--color-border-strong);
	border-radius: 6px;
	background: var(--color-surface);
	box-shadow: 0 8px 20px rgb(23 42 58 / 12%);
}

.country-option-list {
	width: 100%;
	max-width: 100%;
	min-height: 0;
	max-height: 220px;
	margin: 0;
	padding: 0.15rem 0;
	overflow-x: hidden;
	overflow-y: auto;
	box-sizing: border-box;
	overscroll-behavior: contain;
	border-top: 1px solid var(--color-border);
	list-style: none;
}

.country-option-list [role="option"] {
	max-width: 100%;
	padding: 0.55rem 0.65rem;
	border-radius: 4px;
	cursor: pointer;
	overflow-wrap: anywhere;
	touch-action: pan-y;
}

.country-option-list [role="option"]:hover,
.country-option-list [role="option"].is-active {
	background: #eaf2f8;
	color: var(--color-primary-hover);
}

.country-empty-state {
	padding: 0.65rem;
	color: var(--color-text-secondary);
	font-size: 0.875rem;
}

.route-summary:not([hidden]) {
	margin: 0 0 1rem;
	padding: 0.625rem 0.75rem;
	border: 1px solid var(--color-border);
	border-radius: 6px;
	background: var(--color-background);
	color: var(--color-text-secondary);
	font-size: 0.8125rem;
}

#product-section > div:first-of-type {
	max-width: 20rem;
}

label {
	color: var(--color-text);
	font-size: 0.875rem;
	font-weight: 600;
}

#unit-help {
	margin: 0;
	color: var(--color-text-secondary);
	font-size: 0.8125rem;
}

input,
select {
	width: 100%;
	min-width: 0;
	min-height: 44px;
	padding: 0.625rem 0.75rem;
	border: 1px solid var(--color-border-strong);
	border-radius: 6px;
	background: var(--color-surface);
	color: var(--color-text);
	font-size: 0.9375rem;
}

input:hover,
select:hover {
	border-color: #91a2ae;
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
	outline: 3px solid rgb(36 95 145 / 32%);
	outline-offset: 2px;
}

input:user-invalid,
select:user-invalid {
	border-color: var(--color-error);
	background-color: var(--color-error-background);
}

#shipping-route {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	padding-block: 1.75rem;
}

#boxes-section {
	padding-top: 1.75rem;
}

#boxes-heading {
	margin-bottom: 1rem;
}

#box-inputs {
	display: grid;
	gap: 0.875rem;
}

#box-inputs fieldset {
	position: relative;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.875rem;
	min-width: 0;
	margin: 0;
	padding: 1.125rem 1rem 1rem;
	border: 1px solid var(--color-border);
	border-radius: 8px;
	background: #fbfcfd;
}

#box-inputs legend {
	grid-column: 1 / -1;
	padding-inline: 0.35rem;
	font-size: 0.9375rem;
	font-weight: 650;
}

#box-inputs fieldset > div:first-of-type {
	grid-column: 1 / -1;
}

#box-inputs fieldset > button {
	position: absolute;
	top: 0.75rem;
	right: 1rem;
}

button {
	min-height: 42px;
	padding: 0.6rem 0.9rem;
	border: 1px solid transparent;
	border-radius: 6px;
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 600;
	transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

button:disabled {
	border-color: var(--color-border);
	background: #f0f3f5;
	color: #8a979f;
	cursor: not-allowed;
}

#add-box-button {
	margin-top: 0.875rem;
	border-color: var(--color-border-strong);
	background: var(--color-surface);
	color: var(--color-primary);
}

#add-box-button:hover:not(:disabled) {
	border-color: var(--color-primary);
	background: #f3f8fc;
}

#box-inputs fieldset > button {
	min-height: 34px;
	padding: 0.35rem 0.55rem;
	border-color: transparent;
	background: transparent;
	color: var(--color-text-secondary);
	font-size: 0.8125rem;
}

#box-inputs fieldset > button:hover:not(:disabled) {
	border-color: var(--color-border);
	background: var(--color-surface);
	color: var(--color-error);
}

#optimize-button {
	width: 100%;
	min-height: 50px;
	margin-top: 1.5rem;
	background: var(--color-primary);
	color: #ffffff;
	font-size: 1rem;
}

#optimize-button:hover:not(:disabled) {
	background: var(--color-primary-hover);
}

#optimize-button:active:not(:disabled) {
	background: #173f61;
}

#validation-status:empty {
	display: none;
}

#validation-status:not(:empty) {
	margin: 0.75rem 0 0;
	padding: 0.625rem 0.75rem;
	border-radius: 6px;
	background: var(--color-success-background);
	color: var(--color-success);
	font-size: 0.875rem;
}

#results-section {
	margin-top: 1.25rem;
	padding: clamp(1.125rem, 3vw, 2rem);
}

#results-heading {
	margin: 0 0 1.125rem;
	font-size: 1.25rem;
	font-weight: 700;
}

.recommended-box {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.625rem;
	margin-bottom: 1.75rem;
	padding: 1.25rem;
	border: 1px solid #b9d8cc;
	border-inline-start: 4px solid var(--color-success);
	border-radius: 8px;
	background: var(--color-surface);
	box-shadow: 0 2px 8px rgb(23 42 58 / 6%);
}

.recommended-box h3,
.recommended-box-name,
.recommendation-note,
.recommended-box .shipping-rate-note {
	grid-column: 1 / -1;
}

.recommended-box h3 {
	margin: 0;
	color: var(--color-success);
	font-size: 0.8125rem;
	font-weight: 700;
}

.recommended-box-name {
	margin: -0.35rem 0 0;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.recommendation-note {
	max-width: 70ch;
	margin: 0 0 0.35rem;
	color: var(--color-text-secondary);
	font-size: 0.875rem;
}

.recommended-box > p:not(.recommended-box-name):not(.recommendation-note),
.box-comparison-item > p {
	display: flex;
	min-width: 0;
	flex-direction: column;
	justify-content: space-between;
	gap: 0.3rem;
	margin: 0;
	padding: 0.65rem 0.75rem;
	border: 1px solid #e5ebee;
	border-radius: 6px;
	background: var(--color-background);
	color: var(--color-text-secondary);
	font-size: 0.8125rem;
	overflow-wrap: anywhere;
}

.recommended-box > p:not(.recommended-box-name):not(.recommendation-note) strong,
.box-comparison-item > p strong {
	color: var(--color-text);
	font-size: 1rem;
	font-variant-numeric: tabular-nums;
}

.recommended-box > p:nth-of-type(5),
.recommended-box > p:nth-of-type(11),
.recommended-box > p:nth-of-type(13),
.recommended-box > p:nth-of-type(14) {
	border-color: #d6e8e1;
	background: var(--color-success-background);
}

.box-comparison-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
	gap: 0.875rem;
}

#results-container > h3 {
	margin: 0 0 0.875rem;
	font-size: 1rem;
	font-weight: 650;
}

.box-comparison-item {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-content: start;
	gap: 0.5rem;
	min-width: 0;
	padding: 0.875rem;
	border: 1px solid var(--color-border);
	border-inline-start: 3px solid var(--color-success);
	border-radius: 8px;
	background: var(--color-surface);
}

.box-comparison-item[data-usability="unusable"] {
	border-inline-start-color: var(--color-warning);
}

.box-comparison-item h4 {
	grid-column: 1 / -1;
	margin: 0 0 0.25rem;
	font-size: 0.9375rem;
	overflow-wrap: anywhere;
}

.shipping-rate-note {
	display: block;
	max-width: 75ch;
	margin-top: 0.35rem;
	color: var(--color-text-secondary);
	font-size: 0.8125rem;
	line-height: 1.5;
	white-space: normal;
	grid-column: 1 / -1;
}

.shipping-rate-note a {
	color: var(--color-primary);
	text-underline-offset: 2px;
}

.shipping-rate-note a:hover {
	color: var(--color-primary-hover);
}

.results-message {
	margin: 0 0 1.25rem;
	padding: 0.875rem 1rem;
	border: 1px solid #efd9a8;
	border-radius: 6px;
	background: var(--color-warning-background);
	color: var(--color-warning);
	font-weight: 600;
}

#site-information {
	width: 100%;
	margin: 2rem auto 0;
	padding: 0 clamp(1rem, 3vw, 2rem);
	border: 1px solid var(--color-border);
	border-radius: 10px;
	background: var(--color-surface);
}

#site-information .detail-panel > section:last-child {
	border-bottom: 0;
}

#site-information .detail-panel > section {
	padding-block: 1.6rem;
	border-bottom: 1px solid var(--color-border);
}

#site-information .detail-view-heading {
	margin: 0;
	padding-block: 1.25rem 0.75rem;
	border-bottom: 1px solid var(--color-border);
	color: var(--color-primary-hover);
	font-size: 1.5rem;
}

.category-intro {
	padding-block: 0.85rem 0.25rem;
}

.guide-card-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	padding-block: 0.75rem 1.25rem;
}

.guide-card {
	display: flex;
	min-width: 0;
	min-height: 6rem;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.3rem;
	padding: 0.9rem 1rem;
	border: 1px solid var(--color-border);
	border-radius: 8px;
	background: #fbfcfd;
	color: var(--color-text);
	text-align: start;
	cursor: pointer;
	transition: border-color 140ms ease, background-color 140ms ease;
}

.guide-card:hover,
.guide-card:focus-visible,
.guide-card[aria-current="page"] {
	border-color: var(--color-primary);
	background: #f3f8fb;
}

.guide-card:focus-visible,
.secondary-nav-button:focus-visible,
.back-to-calculator:focus-visible {
	outline: 3px solid rgb(36 95 145 / 32%);
	outline-offset: 2px;
}

.guide-card-title {
	font-size: 1rem;
	font-weight: 650;
	line-height: 1.35;
}

.guide-card-subtitle {
	color: var(--color-text-secondary);
	font-size: 0.875rem;
	line-height: 1.45;
}

.guide-detail-view {
	padding-block: 1.25rem 1.75rem;
}

.guide-detail-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--color-border);
}

.secondary-nav-button {
	min-height: 2.625rem;
	padding: 0.45rem 0.85rem;
	border: 1px solid var(--color-border);
	border-radius: 6px;
	background: var(--color-surface);
	color: var(--color-primary);
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
}

.secondary-nav-button:hover {
	border-color: var(--color-border-strong);
	background: #f7fafc;
	color: var(--color-primary-hover);
}

.guide-article {
	max-width: 82ch;
	padding-block: 1.5rem 0.5rem;
}

.guide-article h2 {
	margin: 0;
	color: var(--color-primary-hover);
	font-size: clamp(1.4rem, 3vw, 1.8rem);
	line-height: 1.3;
}

.guide-article .guide-subtitle {
	margin: 0.4rem 0 1.1rem;
	color: var(--color-text-secondary);
	font-size: 1rem;
	font-weight: 550;
}

.guide-article p {
	margin: 0;
	color: var(--color-text-secondary);
}

#site-information h2 {
	margin: 0 0 0.8rem;
	font-size: 1.25rem;
	font-weight: 650;
}

#site-information h3 {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 600;
}

#site-information p,
#site-information li,
#site-information dd {
	max-width: 78ch;
	color: var(--color-text-secondary);
	font-size: 0.9375rem;
}

#site-information p {
	margin: 0;
}

#site-information ol,
#site-information ul {
	max-width: 82ch;
	margin: 0;
	padding-inline-start: 1.25rem;
}

#how-it-works ol {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	padding: 0;
	list-style: none;
	counter-reset: how-step;
}

#how-it-works li {
	position: relative;
	min-width: 0;
	padding: 0.8rem 0.9rem;
	padding-inline-start: 2.8rem;
	border: 1px solid var(--color-border);
	border-radius: 6px;
	background: #fbfcfd;
	counter-increment: how-step;
}

#how-it-works li::before {
	position: absolute;
	top: 0.8rem;
	inset-inline-start: 0.8rem;
	display: grid;
	width: 1.5rem;
	 aspect-ratio: 1;
	place-items: center;
	border-radius: 50%;
	background: #eaf2f8;
	color: var(--color-primary-hover);
	content: counter(how-step);
	font-size: 0.8125rem;
	font-weight: 700;
}

.method-notes {
	display: grid;
	gap: 0.8rem;
	margin: 0;
}

.method-notes > div {
	display: grid;
	grid-template-columns: minmax(10rem, 0.32fr) minmax(0, 1fr);
	gap: 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid #e8edef;
}

.method-notes dt {
	font-size: 0.9375rem;
	font-weight: 650;
}

.method-notes dd {
	margin: 0;
}

#shipping-rate-information {
	padding-inline: 1rem;
	border-inline-start: 3px solid var(--color-primary);
	background: #f7fafc;
}

.result-definitions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.65rem 1.5rem;
	margin: 0;
}

.result-definitions > div {
	min-width: 0;
	padding-bottom: 0.6rem;
	border-bottom: 1px solid #e8edef;
}

.result-definitions dt {
	font-size: 0.8125rem;
	font-weight: 650;
}

.result-definitions dd {
	margin: 0.15rem 0 0;
}

#site-information a {
	color: var(--color-primary);
	text-underline-offset: 2px;
	overflow-wrap: anywhere;
}

#site-information details {
	border-top: 1px solid var(--color-border);
}

#site-information details:last-child {
	border-bottom: 1px solid var(--color-border);
}

#site-information summary {
	min-height: 44px;
	padding-block: 0.75rem;
	cursor: pointer;
	font-size: 0.9375rem;
	font-weight: 600;
}

#site-information summary:hover {
	color: var(--color-primary-hover);
}

#site-information summary:focus-visible {
	outline: 3px solid rgb(36 95 145 / 32%);
	outline-offset: 2px;
}

#site-information details p {
	max-width: 76ch;
	padding: 0 0 0.9rem;
	padding-inline-start: 1.25rem;
}

#secondary-view {
	padding-bottom: 3rem;
}

.back-to-calculator {
	display: inline-flex;
	min-height: 2.625rem;
	align-items: center;
	margin-bottom: 0.85rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--color-primary);
	cursor: pointer;
	font-weight: 600;
}

.back-to-calculator:hover,
.back-to-calculator:focus-visible {
	color: var(--color-primary-hover);
}

html[dir="rtl"] #optimizer-form,
html[dir="rtl"] #results-section {
	text-align: right;
}

html[dir="rtl"] .country-option-list [role="option"],
html[dir="rtl"] .country-empty-state {
	text-align: right;
}

html[dir="rtl"] #box-inputs fieldset > button {
	right: auto;
	left: 1rem;
}

@media (max-width: 767px) {
	#page-header {
		padding-block: 1.5rem 1.5rem;
	}

	.header-topbar {
		flex-direction: column;
		align-items: stretch;
		gap: 0.75rem;
	}

	.language-control select,
	.currency-control select {
		min-width: 0;
		max-width: 9rem;
	}

	.header-controls {
		justify-content: flex-end;
	}

	.primary-navigation {
		justify-content: flex-start;
	}

	.primary-nav-link {
		flex: 1 1 5rem;
		padding-inline: 0.5rem;
	}

	.brand-heading {
		margin-top: 0.85rem;
	}

	.brand-heading h1 {
		font-size: clamp(2.15rem, 9vw, 2.5rem);
	}

	.brand-heading p:first-of-type {
		font-size: 1.125rem;
	}

	#product-section {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	#shipping-route {
		grid-template-columns: minmax(0, 1fr);
	}

	#how-it-works ol {
		grid-template-columns: minmax(0, 1fr);
	}

	.guide-card-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.method-notes > div {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.2rem;
	}

	.country-picker-panel {
		max-height: min(320px, calc(100vh - 2rem));
		max-height: min(320px, calc(100dvh - 2rem));
	}

	.country-option-list {
		max-height: min(220px, calc(100vh - 6rem));
		max-height: min(220px, calc(100dvh - 6rem));
	}

	.result-definitions {
		grid-template-columns: minmax(0, 1fr);
	}

	#box-inputs fieldset {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.75rem;
	}

	.recommended-box-name {
		font-size: 1.375rem;
	}

	#box-inputs fieldset > div:first-of-type {
		grid-column: 1 / -1;
	}

	#box-inputs fieldset > button {
		right: 0.625rem;
	}

	html[dir="rtl"] #box-inputs fieldset > button {
		right: auto;
		left: 0.625rem;
	}

	.recommended-box {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		padding: 1rem;
	}

	.box-comparison-list {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 420px) {
	#page-header,
	main {
		width: min(calc(100% - 1.25rem), 1100px);
	}

	.header-controls {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.5rem;
	}

	.language-control,
	.currency-control {
		min-width: 0;
		flex-wrap: wrap;
		gap: 0.2rem 0.45rem;
	}

	.language-control select,
	.currency-control select {
		min-width: 0;
		width: 100%;
		max-width: 100%;
	}

	.primary-navigation {
		gap: 0.35rem;
	}

	.primary-nav-link {
		font-size: 0.8125rem;
	}

	#product-section {
		grid-template-columns: minmax(0, 1fr);
	}

	#product-section > h2,
	#product-section > div:first-of-type {
		grid-column: 1;
	}

	#box-inputs fieldset {
		padding-inline: 0.75rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
