.header .nav { display: flex; gap: clamp(12px, 3vw, 34px); min-height: 72px; height: auto; padding-block: 12px; }
.header .brand, .footer .brand { display: inline-flex; align-items: center; gap: 6px; line-height: 1; }
.header .brand { flex: none; }
.header .brand img, .footer .brand img { display: block; flex: none; object-fit: contain; }
.header .nav .site-primary-nav { order: 0; width: auto; display: flex; gap: 4px; align-items: center; }
.header .site-primary-nav a, .header .locale-menu summary, .header .home-account-menu summary {
	display: flex; align-items: center; gap: 7px; border-radius: 8px; font-size: 14px; font-weight: 650;
	transition: background-color .18s ease, color .18s ease, transform .12s ease;
}
.header .site-primary-nav a { position: relative; min-height: 38px; padding: 0 12px; color: var(--muted); }
.header .site-primary-nav a::after {
	content: "";
	position: absolute;
	inset-inline: 12px;
	bottom: 5px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .18s ease-out;
}
.header .site-primary-nav a:hover, .header .site-primary-nav a:focus-visible { background: #d2e3c5; color: #192f2a; }
.header .site-primary-nav a:hover::after, .header .site-primary-nav a:focus-visible::after { transform: scaleX(1); }
.header .home-account-menu summary:hover, .header .locale-menu summary:hover { background: #d2e3c5; color: var(--deep); }
.header .site-primary-nav a:is([aria-current="page"], [aria-current="location"]) { background: #234039; color: #fff; }
.header .site-primary-nav a:is([aria-current="page"], [aria-current="location"]):is(:hover, :focus-visible) { background: #192f2a; color: #fff; }
.header .site-primary-nav a:active, .header summary:active { transform: translateY(1px); }
.header :is(a, button, summary):focus-visible { outline: 2px solid #55765e; outline-offset: 3px; }
.header .nav .locale-nav { display: flex; margin-inline-start: auto; width: auto; min-width: 0; max-width: 100%; justify-content: flex-end; align-items: center; gap: 12px; }
.header .locale-menu, .header .home-account-menu { position: relative; }
.header .locale-menu { flex: none; }
.header .locale-menu summary { padding: 8px 10px; border: 1px solid var(--line); background: white; }
.header .home-account-menu summary { padding: 3px 6px 3px 3px; cursor: pointer; }
.header summary { list-style: none; }
.header summary::-webkit-details-marker { display: none; }
.header :is(.locale-menu, .home-account-menu) summary::after { content: ""; flex: none; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); transition: transform .18s ease; }
.header :is(.locale-menu, .home-account-menu)[open] summary::after { transform: rotate(225deg); }
.header .home-account-menu[open] summary { background: #edf2e7; }
.header .locale-menu > div, .header .home-account-menu > div {
	position: absolute; z-index: 12; inset-inline-end: 0; top: calc(100% + 6px); min-width: 155px; width: max-content;
	margin: 0; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 8px 24px #202b2920;
}
.header .locale-menu > div { max-height: min(65vh, 24rem); overflow-y: auto; }
.header .locale-menu :is(a, button), .header .home-account-menu > div :is(a, button) {
	display: block; width: 100%; border: 0; padding: 7px 9px; text-align: start; border-radius: 5px; background: transparent; color: var(--deep);
}
.header .locale-menu :is(a, button):hover, .header .locale-menu [aria-current], .header .home-account-menu > div :is(a, button):hover { background: #e7f0db; }
.header .home-login-avatar { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: #dfeccd; color: var(--deep); }
.header .home-account-email { overflow-wrap: anywhere; }
@media (max-width: 650px) {
	.header .nav { flex-wrap: wrap; gap: 8px 12px; }
	.header .nav .locale-nav { flex: 1 0 100%; order: 3; }
	.header .nav .site-primary-nav { margin-inline-start: auto; }
	.header .nav .locale-nav { position: relative; }
	.header .nav .home-account-menu { position: static; }
}
@media (prefers-reduced-motion: no-preference) {
	.header .site-primary-nav a:is([aria-current="page"], [aria-current="location"]) { animation: voxel-nav-selected .2s ease-out; }
	@keyframes voxel-nav-selected { from { transform: translateY(2px); } }
}
@media (prefers-reduced-motion: reduce) {
	.header :is(a, summary), .header .site-primary-nav a::after, .header summary::after { transition: none; }
}

.header .home-account-menu > div {
	width: min(18rem, calc(100vw - 32px));
	padding: 12px;
	border-radius: 16px;
	box-shadow: 0 14px 32px #202b292b;
}
.header .account-profile {
	display: grid;
	gap: 12px;
	padding-bottom: 10px;
	margin-bottom: 4px;
	border-bottom: 1px solid var(--line);
}
.header .account-profile-identity { display: flex; align-items: center; gap: 10px; padding: 3px 2px; }
.header .account-profile-identity > div { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.header .account-profile-identity > div > span { font-size: 13px; color: var(--muted); }
.header .account-profile-identity > div > span:empty { display: none; }
.header .account-credit-balance {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 12px;
	border-radius: 10px;
	background: #234039;
	color: #fff;
	font-size: 13px;
}
.header .account-credit-balance[hidden] { display: none; }
.header .account-credit-balance strong { color: #d7efa9; font-size: 24px; font-variant-numeric: tabular-nums; }
.header .home-account-menu > div > button { cursor: pointer; font-size: 14px; font-weight: 650; }
@media (prefers-reduced-motion: no-preference) {
	.header .home-account-menu[open] > div { animation: voxel-profile-in .15s ease-out; }
	@keyframes voxel-profile-in { from { opacity: 0; transform: translateY(-4px); } }
}

.header .home-login-avatar {
	background: #fff url("/voxel-google-g.svg") center / 19px 19px no-repeat;
	border: 1px solid var(--line);
}
.header .account-credit-balance > span { display: flex; align-items: center; gap: 8px; }
.header .account-credit-balance > span::before {
	content: "";
	flex: none;
	width: 20px;
	height: 20px;
	background: #d7efa9;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linejoin='round'%3E%3Cpath d='m12 2.8 8 4.6v9.2l-8 4.6-8-4.6V7.4l8-4.6Z'/%3E%3Cpath d='m4 7.4 8 4.6 8-4.6M12 12v9.2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.header .nav.wrap {
	width: auto;
	margin-inline: max(28px, calc((100% - 1200px) / 2)) 14px;
}
@media (max-width: 800px) {
	.header .nav.wrap { margin-inline: 18px 14px; }
}
.credit-pricing { max-width: 1056px; padding-block: 32px 64px; scroll-margin-top: 20px; }
.credit-pricing-intro { max-width: 650px; margin: 24px auto 36px; text-align: center; }
.credit-pricing-intro h2 { margin: 10px 0; font-size: clamp(34px, 6vw, 62px); line-height: 1.04; text-wrap: balance; }
.credit-pricing-intro > p:last-child { color: var(--muted); font-size: 16px; line-height: 1.55; }
.credit-pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.credit-tier { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: white; min-width: 0; }
.credit-tier[data-featured="true"] { background: #27433c; color: #f8f9f5; border-color: #27433c; box-shadow: 0 12px 28px #27433c28; }
.credit-tier-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; font-weight: 750; letter-spacing: .09em; }
.credit-tier-symbol { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; background: #e9f1df; color: #27433c; }
.credit-tier h3 { margin: 22px 0 4px; font-size: 20px; }
.credit-tier h3 small { font-size: inherit; }
.credit-tier-price { margin: 0; font-size: clamp(36px, 5vw, 53px); line-height: 1.1; font-weight: 750; letter-spacing: -.05em; }
.credit-tier-billing { margin: 8px 0 0; font-size: 13px; opacity: .8; }
.credit-tier-details { border-top: 1px solid #83928a66; margin-top: 20px; padding: 12px 0; flex: 1; }
.credit-tier-details p { margin: 5px 0; line-height: 1.4; }
.credit-tier .button { width: 100%; justify-content: center; }
.credit-tier[data-featured="true"] .button { background: #cbed80; color: #1d302a; }
.credit-tier .button:disabled { background: #eef1eb; color: #53625a; cursor: default; }
.credit-pricing-note { text-align: center; color: var(--muted); margin-top: 24px; line-height: 1.5; }
@media(max-width: 840px) { .credit-pricing-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width: 560px) { .credit-pricing-grid { grid-template-columns: 1fr; } .credit-pricing-intro { margin-top: 28px; } }
@media(prefers-reduced-motion:no-preference) {
	html:has(#pricing:target) { scroll-behavior: smooth; }
	.credit-tier { transition: transform .2s ease, box-shadow .2s ease; }
	.credit-tier:hover { transform: translateY(-3px); box-shadow: 0 12px 28px #27433c20; }
}
.model-dropzone {
	display: grid;
	gap: 6px;
	place-items: center;
	width: 100%;
	min-height: 132px;
	margin-top: 20px;
	padding: 18px;
	border: 2px dashed #92aa9e;
	border-radius: 14px;
	background: #fff;
	color: var(--deep);
	text-align: center;
}
.model-dropzone strong { font-size: 17px; }
.model-dropzone span { color: #375d4b; text-decoration: underline; }
.model-dropzone small { color: var(--muted); }
.model-dropzone:not([aria-disabled="true"]):hover,
.model-dropzone[data-dragging="true"] {
	border-color: var(--deep);
	background: #f0f6e6;
}
.model-dropzone:focus-visible { outline: 2px solid var(--deep); outline-offset: 3px; }
.model-dropzone[aria-disabled="true"] { cursor: progress; }

.model-selection {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 230px) auto minmax(0, 1fr);
	align-items: end;
	gap: 14px;
	margin-top: 12px;
	text-align: start;
}
.model-stage {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	margin-top: 12px;
	height: clamp(240px, 42vw, 420px);
	border-radius: 12px;
	background: #eef2e9 radial-gradient(ellipse at center, #f9fbf7, transparent 75%);
}
.model-selection-preview, .model-stage-viewer {
	position: absolute;
	inset: 0;
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
}
.model-selection-preview {
	padding: clamp(12px, 2vw, 22px);
	object-fit: contain;
}
.model-selection-quality { grid-column: 2; display: grid; gap: 6px; min-width: 0; }
.model-selection-quality > span { font-size: 13px; font-weight: 700; color: #38554c; }
.model-selection-quality select {
	width: 100%;
	min-height: 44px;
	padding: 8px 10px;
	border: 1px solid #a8b9a8;
	border-radius: 9px;
	background: #f8faf6;
	color: #203d35;
	font: inherit;
	cursor: pointer;
}
.model-selection-quality select:enabled:hover { border-color: #496c59; background: #eff5eb; }
.model-selection :is(select, .button):focus-visible { outline: 2px solid #496c59; outline-offset: 3px; }
.model-selection .button { grid-column: 3; min-height: 44px; justify-content: center; }
@media (max-width: 540px) {
	.model-selection { grid-template-columns: minmax(0, 1fr); gap: 10px; }
	.model-selection-quality, .model-selection .button { grid-column: 1; }
}

.model-steps {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin: 22px 0 0;
	padding: 0;
	list-style: none;
}
.model-steps li { display: flex; align-items: center; gap: 6px; color: #566961; font-size: 13px; }
.model-steps li > span {
	display: grid;
	place-items: center;
	width: 23px;
	height: 23px;
	border-radius: 50%;
	background: #e8ede4;
	font-weight: 700;
}
.model-steps li[aria-current="step"] { color: #234039; font-weight: 750; }
.model-steps li[aria-current="step"] > span { background: #234039; color: #fff; }
.model-review { margin: 14px 0; padding: 16px; border: 1px solid #dce5d7; border-radius: 16px; background: #fff; }
.model-review-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; text-align: start; }
.model-review .model-review-header h2 { margin: 0; font-size: 18px; line-height: 1.3; }
.model-review-header button { border: 0; border-radius: 7px; background: transparent; color: #234039; padding: 7px 9px; font-size: 13px; font-weight: 650; }
.model-review-header button:enabled:hover { background: #e8f0e2; }

.model-stage-viewer { opacity: 0; pointer-events: none; }
.model-stage[data-model-visible="true"] .model-stage-viewer { opacity: 1; pointer-events: auto; }
.model-stage[data-model-visible="true"] .model-selection-preview { opacity: 0; }
.model-stage[data-processing="true"]::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	border: 2px solid #7e9d68;
	box-shadow: inset 0 0 28px #83a96b65;

	border-radius: inherit;
}
.model-stage[data-processing="true"]::before {
	content: "";
	position: absolute;
	z-index: 1;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(transparent 15%, #cdebb04d 47%, #ebffca96 50%, transparent 55%) center / 100% 32% no-repeat;
	opacity: .36;
}
.model-stage-status {
	position: absolute;
	z-index: 2;
	inset-inline: 12px;
	bottom: 14px;
	width: fit-content;
	max-width: calc(100% - 24px);
	margin-inline: auto;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 13px;
	border-radius: 999px;
	background: #234039;
	color: #fff;
	font-size: 13px;
}
.model-stage-status > span { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #d7efa9; }
.model-result-actions { margin-top: 12px; }
@media (prefers-reduced-motion: no-preference) {
	.model-selection-preview, .model-stage-viewer { transition: opacity .35s ease; }
	.model-stage[data-processing="true"]::after { animation: model-processing-pulse 2s ease-in-out infinite alternate; }
	.model-stage[data-processing="true"]::before { animation: model-light-sweep 2.8s ease-in-out infinite; }
	.model-stage-status > span { animation: model-processing-pulse 1s ease-in-out infinite alternate; }
	@keyframes model-processing-pulse { from { opacity: .38; } to { opacity: 1; } }
	@keyframes model-light-sweep {
		0% { background-position: center -55%; opacity: 0; }
		24%, 76% { opacity: .75; }
		100% { background-position: center 155%; opacity: 0; }
	}
}

.model-workspace {
	--model-stage-height: clamp(240px, 42vw, 420px);
	margin-top: 14px;
}
.model-workspace .model-review {
	box-sizing: border-box;
	min-height: calc(var(--model-stage-height) + 174px);
	margin: 0;
}
.model-workspace .model-review-header { min-height: 42px; }
.model-workspace .model-stage,
.model-workspace .model-dropzone,
.upload-hero .model-workspace .model-dropzone {
	box-sizing: border-box;
	width: 100%;
	height: var(--model-stage-height);
	min-height: 0;
	margin-top: 12px;
}
.model-download { position: relative; }
.model-download summary { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.model-download summary::-webkit-details-marker { display: none; }
.model-download summary::after {
	content: "";
	width: 6px;
	height: 6px;
	border: solid currentColor;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg) translateY(-2px);
}
.model-download[open] summary::after { transform: rotate(225deg); }
.model-download ul {
	position: absolute;
	z-index: 3;
	inset-inline-start: 0;
	top: calc(100% + 6px);
	width: max-content;
	margin: 0;
	padding: 5px;
	list-style: none;
	text-align: start;
	border: 1px solid #dce5d7;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 8px 20px #23403926;
}
.model-download a { display: block; padding: 8px 12px; border-radius: 6px; color: #234039; }
.model-download a:is(:hover, :focus-visible) { background: #e8f0e2; }
@media (max-width: 540px) {
	.model-workspace .model-review { min-height: calc(var(--model-stage-height) + 200px); }
}
