@import url("../fonts/misans/fonts.css");

* {
	box-sizing: border-box;
}
html,
body {
	margin: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
}
body {
	font-family: "MiSans", Arial, "Microsoft YaHei", sans-serif;
	color: #11344a;
	background: #e5ece9;
	--ink: #153847;
	--sub: #506970;
	--line: rgba(26, 63, 68, 0.22);
}
button {
	font: inherit;
	cursor: pointer;
	color: inherit;
}
button:focus-visible {
	outline: 3px solid #57b72c;
	outline-offset: 5px;
}
canvas,
#fallback {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
}
canvas {
	touch-action: none;
}
#fallback {
	background: linear-gradient(160deg, #e4edeb, #c7d3cf);
	padding: 18vh 8% 18vh;
}
#fallback[hidden] {
	display: none;
}
#fallback svg {
	width: 100%;
	height: 100%;
	filter: drop-shadow(0 15px 25px #416b6e22);
}
.fallback-road {
	fill: none;
	stroke: #b6c6c4;
	stroke-width: 30;
}
.fallback-flow {
	fill: none;
	stroke: #65cb2e;
	stroke-width: 8;
}
.fallback-block {
	fill: #dde7e7;
	stroke: #8a9ca7;
	stroke-width: 2;
}
.fallback-panel {
	fill: #385f7c;
}
.fallback-battery {
	fill: #dbe8da;
	stroke: #578c67;
	stroke-width: 2;
}
.fallback-text {
	font:
		18px Arial,
		"Microsoft YaHei",
		sans-serif;
	fill: #173d4b;
	text-anchor: middle;
}
.copy {
	position: absolute;
	top: 7%;
	left: 5.5%;
	max-width: 540px;
	pointer-events: none;
}
.eyebrow {
	font-size: 11px;
	letter-spacing: 0.16em;
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 18px;
}
.eyebrow i {
	display: inline-block;
	width: 25px;
	height: 2px;
	background: #60bf36;
}
h1 {
	font-weight: 500;
	font-size: clamp(26px, 3.1vw, 46px);
	line-height: 1.35;
	letter-spacing: -0.035em;
	margin: 0 0 14px;
	max-width: 520px;
}
#description {
	max-width: 440px;
	font-size: 14px;
	line-height: 1.85;
	color: var(--sub);
	margin: 0;
}
.utility {
	position: absolute;
	right: 4%;
	top: 5%;
	display: flex;
	gap: 7px;
}
.utility button {
	font-size: 11px;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid var(--line);
	border-radius: 3px;
	background: rgba(233, 241, 236, 0.45);
	backdrop-filter: blur(8px);
}
.flow-caption {
	position: absolute;
	left: 5.5%;
	bottom: 150px;
	pointer-events: none;
}
#time {
	font-size: 52px;
	font-weight: 400;
	letter-spacing: -0.05em;
	font-variant-numeric: tabular-nums;
}
#flow {
	font-size: 12px;
	letter-spacing: 0.06em;
	margin: 8px 0 0;
}
#times {
	position: absolute;
	bottom: 48px;
	left: 5.5%;
	right: 5.5%;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	border-top: 1px solid var(--line);
	gap: 16px;
}
#times button {
	min-height: 69px;
	border: 0;
	border-top: 2px solid transparent;
	padding: 13px 0 0;
	background: transparent;
	text-align: left;
	display: flex;
	flex-direction: column;
	gap: 7px;
	font-size: 17px;
	font-variant-numeric: tabular-nums;
	color: var(--sub);
}
#times button[aria-current] {
	border-top-color: #65cb2e;
	color: var(--ink);
}
#times small {
	font-size: 10px;
	font-weight: 400;
	letter-spacing: 0.08em;
}
.note {
	position: absolute;
	bottom: 13px;
	left: 5.5%;
	right: 5.5%;
	font-size: 9px;
	line-height: 1.5;
	color: var(--sub);
	margin: 0;
}
#status {
	position: absolute;
	top: 48%;
	left: 0;
	right: 0;
	text-align: center;
	font-size: 13px;
	color: var(--sub);
	pointer-events: none;
}
body[data-status="ready"] #status {
	display: none;
}
body[data-status="fallback"] #status {
	top: 24%;
	bottom: auto;
	left: 5%;
	right: 5%;
	font-size: 13px;
}
#retry-scene {
	position: absolute;
	z-index: 3;
	left: 50%;
	top: calc(24% + 56px);
	transform: translateX(-50%);
	padding: 10px 18px;
	min-height: 44px;
	font-size: 14px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--paper, #f4f7f3);
	color: var(--ink);
	cursor: pointer;
}
body[data-night="true"] {
	--ink: #e5eee6;
	--sub: #b3c4ca;
	--line: rgba(197, 217, 224, 0.26);
	color: var(--ink);
}
body[data-night="true"] .utility button {
	background: #182d3d66;
}
body[data-night="true"] #fallback {
	background: linear-gradient(140deg, #33495a, #172d41);
}
@media (max-width: 700px) {
	.copy {
		top: 9%;
		left: 6%;
		right: 6%;
		max-width: none;
	}
	.eyebrow {
		font-size: 9px;
		margin-bottom: 12px;
	}
	h1 {
		font-size: 27px;
		max-width: 290px;
		line-height: 1.36;
	}
	#description {
		font-size: 11px;
		max-width: 265px;
		line-height: 1.8;
	}
	.utility {
		top: 1.5%;
		right: 5%;
		gap: 4px;
	}
	.utility button {
		font-size: 9px;
		border: none;
		padding: 8px;
	}
	.flow-caption {
		left: 6%;
		bottom: 148px;
	}
	#time {
		font-size: 36px;
	}
	#flow {
		font-size: 10px;
	}
	#times {
		left: 6%;
		right: 6%;
		gap: 8px;
		bottom: 52px;
	}
	#times button {
		font-size: 15px;
	}
	#times small {
		font-size: 9px;
	}
	.note {
		left: 6%;
		right: 6%;
		font-size: 8px;
	}
	#fallback {
		padding: 25vh 0 23vh;
	}
}
@media (max-height: 550px) {
	.copy {
		top: 6%;
		left: 4%;
	}
	.eyebrow {
		margin-bottom: 7px;
	}
	h1 {
		font-size: 25px;
		margin-bottom: 8px;
		max-width: 410px;
	}
	#description {
		display: none;
	}
	.utility {
		top: 4%;
		right: 3%;
	}
	.flow-caption {
		left: 4%;
		bottom: 104px;
	}
	#time {
		font-size: 26px;
	}
	#times {
		bottom: 27px;
		left: 4%;
		right: 4%;
	}
	#times button {
		min-height: 54px;
		padding-top: 9px;
		font-size: 13px;
	}
	#times small {
		font-size: 8px;
	}
	.note {
		bottom: 5px;
		font-size: 7px;
	}
	.flow-caption p {
		font-size: 9px;
	}
	#fallback {
		padding: 15vh 20%;
	}
}

.fallback-flow {
	display: none;
}
body[data-time-index="1"] .fallback-solar,
body[data-time-index="1"] .fallback-load,
body[data-time-index="2"] .fallback-load,
body[data-time-index="3"] .fallback-grid {
	display: block;
}
.flow-caption {
	background: rgba(236, 243, 240, 0.9);
	padding: 10px 14px;
	border-left: 2px solid #65cb2e;
	border-radius: 2px;
}
#times {
	background: rgba(234, 242, 238, 0.91);
	padding: 0 12px;
	border-radius: 2px;
}
body[data-night="true"] .flow-caption,
body[data-night="true"] #times {
	background: rgba(18, 38, 52, 0.91);
}

/* 04 commercial composition: the strategy console and the 3D scene share one timeline. */
body::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(
		90deg,
		rgba(231, 239, 236, 0.72) 0,
		rgba(231, 239, 236, 0.12) 38%,
		transparent 58%
	);
	mix-blend-mode: normal;
}
.copy,
.utility,
.flow-caption,
#times,
.note,
.tariff-console,
#status {
	z-index: 2;
}
.copy {
	top: 5.8%;
	left: 4.5%;
	max-width: min(38vw, 520px);
}
.copy .eyebrow {
	color: #37656e;
}
.copy h1 {
	max-width: 500px;
	margin: 0;
	font-size: clamp(34px, 3.7vw, 58px);
	font-weight: 560;
	line-height: 1.04;
	letter-spacing: -0.055em;
}
.copy #title {
	margin: 18px 0 8px;
	font-size: clamp(17px, 1.45vw, 23px);
	font-weight: 580;
	letter-spacing: -0.025em;
}
#description {
	max-width: 390px;
}
.tariff-console {
	--console-line: rgba(213, 230, 235, 0.16);
	--console-muted: #a9bec5;
	position: absolute;
	top: 11.5%;
	right: 4.5%;
	width: min(40vw, 520px);
	padding: 22px 24px 18px;
	overflow: hidden;
	color: #eef6f7;
	border: 1px solid rgba(229, 243, 246, 0.19);
	border-radius: 20px;
	background: #103746;
	box-shadow:
		0 28px 80px rgba(7, 31, 42, 0.23),
		inset 0 1px rgba(255, 255, 255, 0.08);
	backdrop-filter: none;
}
.tariff-console::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 3px;
	height: 100%;
	background: #69dac4;
	transform: scaleY(var(--tariff-progress, 0));
	transform-origin: top;
	transition: transform 120ms linear;
}
.tariff-console__header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
}
.tariff-console__header p {
	margin: 0 0 6px;
	color: #77d5c4;
	font-size: 9px;
	font-weight: 650;
	letter-spacing: 0.15em;
}
.tariff-console__header h2 {
	margin: 0;
	font-size: clamp(20px, 1.7vw, 27px);
	font-weight: 560;
	letter-spacing: -0.035em;
}
#tariff-tier {
	flex: 0 0 auto;
	padding: 7px 12px;
	color: #082f3a;
	font-size: 11px;
	font-weight: 680;
	border-radius: 999px;
	background: #68d8c2;
}
.tariff-console__rate {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: baseline;
	margin-top: 19px;
	padding: 15px 0 14px;
	border-top: 1px solid var(--console-line);
	border-bottom: 1px solid var(--console-line);
}
.tariff-console__rate span {
	color: var(--console-muted);
	font-size: 10px;
}
.tariff-console__rate strong {
	grid-row: 2;
	font-size: clamp(27px, 2.8vw, 41px);
	font-weight: 440;
	letter-spacing: -0.055em;
	font-variant-numeric: tabular-nums;
}
.tariff-console__rate small {
	grid-row: 2;
	align-self: end;
	padding-bottom: 6px;
	color: var(--console-muted);
	font-size: 9px;
}
[data-tariff-table] {
	width: 100%;
	margin-top: 11px;
	border-collapse: collapse;
	font-size: 10px;
	font-variant-numeric: tabular-nums;
}
[data-tariff-table] caption {
	padding: 0 0 8px;
	color: var(--console-muted);
	font-size: 9px;
	text-align: left;
}
[data-tariff-table] th,
[data-tariff-table] td {
	padding: 8px 7px;
	text-align: left;
	border-bottom: 1px solid var(--console-line);
}
[data-tariff-table] thead th {
	color: #829ca5;
	font-size: 8px;
	font-weight: 520;
	letter-spacing: 0.06em;
}
[data-tariff-table] tbody th {
	font-weight: 570;
}
[data-tariff-row] {
	color: #9db0b7;
	transition:
		color 320ms ease,
		background 320ms ease,
		transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}
[data-tariff-row][aria-current="true"] {
	color: #fff;
	background: rgba(105, 218, 196, 0.12);
	transform: translateX(3px);
}
[data-tariff-row][aria-current="true"] th::before {
	content: "";
	display: inline-block;
	width: 5px;
	height: 5px;
	margin-right: 7px;
	border-radius: 50%;
	background: #69dac4;
	box-shadow: 0 0 12px #69dac4;
	vertical-align: 1px;
}
.tariff-console__metrics {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	margin: 14px 0 0;
}
.tariff-console__metrics div {
	min-width: 0;
	padding-top: 9px;
	border-top: 1px solid var(--console-line);
}
.tariff-console__metrics dt {
	color: var(--console-muted);
	font-size: 8px;
}
.tariff-console__metrics dd {
	margin: 5px 0 0;
	overflow-wrap: anywhere;
	font-size: 11px;
	font-weight: 580;
	line-height: 1.35;
}
.tariff-console__source {
	margin: 13px 0 0;
	color: #b1c8cf;
	font-size: 11px;
	line-height: 1.6;
}
.tariff-console__brief {
	margin: 9px 0 0;
	color: #b9d0d6;
	font-size: 11px;
	line-height: 1.5;
}
#tariff-toggle {
	display: none;
}
#tariff-details[hidden] {
	display: none;
}
#skip-scene {
	font-weight: 600;
}
body[data-night="true"]::after {
	background: linear-gradient(
		90deg,
		rgba(12, 30, 42, 0.72),
		rgba(12, 30, 42, 0.08) 44%,
		transparent 63%
	);
}
body[data-night="true"] .copy .eyebrow {
	color: #9dc7c4;
}

@media (max-width: 700px) {
	body::after {
		background: linear-gradient(
			180deg,
			rgba(228, 237, 234, 0.9) 0,
			rgba(228, 237, 234, 0.06) 34%,
			transparent 54%
		);
	}
	.copy {
		top: 6%;
		left: 5.5%;
		right: 5.5%;
		max-width: none;
	}
	.copy h1 {
		max-width: 310px;
		font-size: clamp(30px, 10.8vw, 42px);
	}
	.copy #title {
		margin-top: 11px;
		font-size: 16px;
	}
	#description {
		max-width: 315px;
		font-size: 10px;
		line-height: 1.65;
	}
	.flow-caption {
		display: none;
	}
	.utility {
		display: flex;
		top: auto;
		bottom: 106px;
		right: 5.5%;
		z-index: 4;
	}
	.utility #quality,
	.utility #motion {
		display: none;
	}
	.utility #skip-scene {
		min-height: 34px;
		font-size: 12px;
		background: #f8faf8;
		color: #163e4b;
	}
	.tariff-console {
		top: auto;
		right: 4.5%;
		bottom: 152px;
		left: 4.5%;
		width: auto;
		max-height: none;
		padding: 12px 16px 10px;
		border-radius: 14px;
	}
	#tariff-toggle {
		display: block;
		width: 100%;
		padding: 10px 0 0;
		border: 0;
		background: transparent;
		color: #8de2ce;
		text-align: left;
		font: inherit;
		font-size: 12px;
		cursor: pointer;
	}
	#tariff-toggle:focus-visible {
		outline: 2px solid #8de2ce;
		outline-offset: 4px;
	}
	#tariff-details {
		max-height: min(37vh, 290px);
		margin-top: 10px;
		padding-right: 4px;
		overflow-y: auto;
		overscroll-behavior: contain;
		touch-action: pan-y;
	}
	.tariff-console__header p {
		display: none;
	}
	.tariff-console__brief {
		font-size: 11px;
	}
	.tariff-console__header h2 {
		font-size: 19px;
	}
	#tariff-tier {
		padding: 5px 9px;
		font-size: 9px;
	}
	.tariff-console__rate {
		margin-top: 11px;
		padding: 10px 0 9px;
	}
	.tariff-console__rate strong {
		font-size: 27px;
	}
	[data-tariff-table] {
		margin-top: 7px;
		font-size: 11px;
	}
	[data-tariff-table] thead th {
		font-size: 10px;
	}
	.tariff-console__metrics dt {
		font-size: 11px;
	}
	[data-tariff-table] caption {
		font-size: 10px;
	}
	[data-tariff-table] th,
	[data-tariff-table] td {
		padding: 6px 5px;
	}
	.tariff-console__metrics {
		grid-template-columns: repeat(2, 1fr);
		gap: 6px 14px;
		margin-top: 9px;
	}
	.tariff-console__metrics div {
		padding-top: 6px;
	}
	.tariff-console__metrics dd {
		font-size: 12px;
	}
	.tariff-console__source {
		margin-top: 12px;
		font-size: 11px;
	}
	#times {
		bottom: 28px;
	}
	.note {
		display: none;
	}
}
@media (max-height: 650px) and (min-width: 701px) {
	.copy {
		top: 4%;
	}
	.copy h1 {
		font-size: 34px;
	}
	#description {
		display: none;
	}
	.tariff-console {
		top: 7%;
		width: min(44vw, 500px);
		padding-block: 14px;
	}
	.tariff-console__rate {
		margin-top: 10px;
		padding-block: 8px;
	}
	[data-tariff-table] th,
	[data-tariff-table] td {
		padding-block: 5px;
	}
	.tariff-console__metrics {
		margin-top: 8px;
	}
	.tariff-console__source {
		display: block;
	}
}
@media (prefers-reduced-motion: reduce) {
	.tariff-console::before,
	[data-tariff-row] {
		transition: none;
	}
}

/* 2026-09-07: reserve the central stage for the active equipment. */
body::after {
	background: linear-gradient(
		180deg,
		rgba(236, 242, 239, 0.64),
		transparent 30%
	);
}
.copy {
	top: 32px;
	left: 4%;
	max-width: 470px;
}
.copy h1 {
	font-size: clamp(28px, 2.8vw, 42px);
	letter-spacing: -0.045em;
}
.copy #title {
	margin: 12px 0 6px;
	font-size: 18px;
}
#description {
	font-size: 12px;
	max-width: 390px;
	line-height: 1.7;
}
.utility {
	top: 28px;
	right: 3%;
}
.tariff-console {
	top: 100px;
	right: 3%;
	left: auto;
	bottom: auto;
	width: 300px;
	max-height: calc(100% - 235px);
	padding: 18px;
	border-radius: 12px;
	box-shadow: 0 14px 40px #12303b20;
	overflow: auto;
	overscroll-behavior: contain;
}
.tariff-console__header {
	gap: 10px;
}
.tariff-console__header h2 {
	font-size: 19px;
}
.tariff-console__header p {
	font-size: 8px;
	letter-spacing: 0.12em;
}
.tariff-console__rate {
	margin-top: 12px;
	padding: 10px 0;
}
.tariff-console__rate strong {
	font-size: 30px;
}
.tariff-console__metrics {
	grid-template-columns: 1fr 1fr;
}
.tariff-console__metrics dt {
	font-size: 10px;
}
.tariff-console__metrics dd {
	font-size: 12px;
}
.dispatch-brief {
	margin: 10px 0 0;
	font-size: 12px;
	color: #e0f0e4;
}
.tariff-console__brief {
	font-size: 10px;
	margin-top: 6px;
}
#tariff-toggle {
	display: block;
	width: 100%;
	min-height: 36px;
	padding: 8px 0 0;
	border: 0;
	background: transparent;
	text-align: left;
	font-size: 11px;
	color: #92debb;
}
#tariff-details {
	max-height: min(40vh, 340px);
	overflow: auto;
	margin-top: 10px;
	padding-right: 3px;
	overscroll-behavior: contain;
	touch-action: pan-y;
}
[data-tariff-table] {
	font-size: 11px;
}
.flow-caption {
	bottom: 130px;
	padding: 10px 16px;
	background: #eff5efa8;
}
#time {
	font-size: 42px;
}
#times {
	bottom: 28px;
	border-radius: 6px;
	background: #eff5efd9;
}
#times button {
	min-height: 64px;
	padding-top: 11px;
}
.note {
	bottom: 8px;
}
body[data-night="true"]::after {
	background: linear-gradient(180deg, rgba(12, 25, 38, 0.45), transparent 32%);
}
body[data-night="true"] .tariff-console {
	background: #102b39eb;
}
@media (min-width: 701px) and (max-width: 1100px) {
	.tariff-console {
		width: 260px;
		right: 2.5%;
		padding: 14px;
	}
	.copy {
		left: 3%;
		max-width: 380px;
	}
	.copy h1 {
		font-size: 30px;
	}
	#description {
		max-width: 290px;
	}
	.utility button {
		padding: 6px;
		font-size: 10px;
	}
}
@media (max-width: 700px) {
	.copy {
		top: 24px;
		left: 5%;
		right: 5%;
		max-width: none;
	}
	.copy .eyebrow {
		font-size: 8px;
		margin-bottom: 10px;
	}
	.copy h1 {
		font-size: 29px;
		max-width: none;
	}
	.copy #title {
		font-size: 14px;
		margin: 10px 0 5px;
	}
	#description {
		font-size: 10px;
		max-width: 320px;
		line-height: 1.7;
	}
	.utility {
		top: 12px;
		bottom: auto;
		right: 4%;
	}
	.utility #quality,
	.utility #skip-scene {
		display: none;
	}
	.utility #motion {
		display: block;
		min-height: 30px;
		padding: 4px 7px;
		font-size: 9px;
		border: 1px solid var(--line);
	}
	.tariff-console {
		top: auto;
		bottom: 96px;
		left: 5%;
		right: 5%;
		width: auto;
		max-height: calc(100% - 190px);
		padding: 11px 13px 6px;
		border-radius: 10px;
	}
	.tariff-console__header {
		position: relative;
	}
	.tariff-console__header h2 {
		font-size: 14px;
	}
	.tariff-console__header p {
		display: none;
	}
	.tariff-console__rate {
		border: 0;
		margin-top: 2px;
		padding: 2px 0;
	}
	.tariff-console__rate span {
		display: none;
	}
	.tariff-console__rate strong {
		font-size: 24px;
	}
	.tariff-console__rate small {
		padding: 0;
		font-size: 9px;
	}
	.dispatch-brief {
		margin: 3px 0 0;
		font-size: 10px;
	}
	.tariff-console__brief {
		font-size: 9px;
		margin: 4px 0 0;
	}
	#tariff-toggle {
		min-height: 28px;
		font-size: 10px;
		padding: 5px 0;
	}
	#tariff-details {
		max-height: 34vh;
		margin-top: 8px;
	}
	#times {
		left: 5%;
		right: 5%;
		bottom: 12px;
		padding: 0 9px;
		gap: 5px;
	}
	#times button {
		font-size: 14px;
		min-height: 68px;
		padding: 10px 0;
	}
	#times small {
		font-size: 9px;
		letter-spacing: 0;
	}
	.flow-caption {
		display: none;
	}
	.note {
		display: none;
	}
}
@media (max-height: 550px) and (min-width: 701px) {
	.copy {
		top: 20px;
	}
	.copy h1 {
		font-size: 27px;
	}
	.copy #title {
		font-size: 15px;
		margin-top: 8px;
	}
	.tariff-console {
		top: 75px;
		width: 250px;
		max-height: calc(100% - 165px);
		padding: 10px 14px;
	}
	.tariff-console__header p,
	.tariff-console__brief {
		display: none;
	}
	.tariff-console__header h2 {
		font-size: 16px;
	}
	.tariff-console__rate {
		margin-top: 5px;
		padding: 5px 0;
	}
	.tariff-console__rate strong {
		font-size: 25px;
	}
	#times {
		bottom: 14px;
	}
	#times button {
		min-height: 52px;
	}
	.flow-caption {
		bottom: 90px;
	}
	#time {
		font-size: 30px;
	}
}

@media (max-width: 700px) {
	.copy {
		top: 47px;
	}
	.utility #skip-scene {
		display: block;
		min-height: 30px;
		padding: 4px 7px;
		font-size: 9px;
		border: 1px solid var(--line);
		background: #edf3efb8;
	}
	body::after {
		background: linear-gradient(
			180deg,
			#eaf1edf2 0,
			#eaf1edd9 125px,
			transparent 245px
		);
	}
	body[data-night="true"]::after {
		background: linear-gradient(
			180deg,
			#112434ed 0,
			#112434cc 125px,
			transparent 245px
		);
	}
	body[data-night="true"] .utility #skip-scene {
		background: #18313ecc;
		color: var(--ink);
	}
}

body[data-time-index="0"] .fallback-morning {
	display: block;
}
