.training-page {
	background: #eceeea;
}

.training-page .site-header nav {
	gap: clamp(14px, 2vw, 28px);
}

.training-hero {
	padding: clamp(72px, 9vw, 126px) 0;
	color: #f7f7f3;
	background:
		linear-gradient(120deg, rgba(12, 14, 16, 0.97), rgba(20, 27, 29, 0.89)),
		url("/assets/screenshot-map.png") center / cover no-repeat;
}

.training-hero-grid,
.training-shell {
	width: min(1180px, calc(100% - 40px));
	margin: 0 auto;
}

.training-hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
	gap: clamp(36px, 7vw, 92px);
	align-items: end;
}

.training-hero h1 {
	max-width: 12ch;
	margin: 0;
	font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
	font-size: clamp(3.5rem, 7vw, 7.4rem);
	font-weight: 800;
	line-height: 0.9;
	text-transform: uppercase;
	text-wrap: balance;
}

.training-intro {
	max-width: 760px;
	margin: 28px 0 0;
	color: #d8dcda;
	font-size: clamp(1.04rem, 1.8vw, 1.28rem);
}

.live-panel {
	padding: 26px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: rgba(5, 7, 8, 0.7);
	box-shadow: 12px 12px 0 rgba(229, 168, 47, 0.9);
}

.live-heading {
	display: flex;
	align-items: center;
	gap: 12px;
}

.live-dot {
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: #e5a82f;
	box-shadow: 0 0 0 6px rgba(229, 168, 47, 0.14);
}

.live-panel.healthy .live-dot {
	background: #65d29d;
	box-shadow: 0 0 0 6px rgba(101, 210, 157, 0.15);
}

.live-panel.attention .live-dot,
.live-panel.offline .live-dot {
	background: #f05a4f;
	box-shadow: 0 0 0 6px rgba(240, 90, 79, 0.15);
}

.live-panel p {
	margin: 18px 0 4px;
	color: #f4d989;
}

.live-panel small {
	color: #aeb4b2;
}

.training-summary,
.history-band {
	padding: clamp(64px, 8vw, 110px) 0;
}

.metric-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	border-top: 1px solid #c7cbc6;
	border-left: 1px solid #c7cbc6;
}

.training-metric {
	min-width: 0;
	padding: 24px;
	border-right: 1px solid #c7cbc6;
	border-bottom: 1px solid #c7cbc6;
	background: #f7f8f5;
}

.training-metric span,
.progress-facts span,
.weight-footnotes span,
.run-stat span {
	display: block;
	color: #686e6c;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.training-metric strong {
	display: block;
	margin: 8px 0 2px;
	font-size: clamp(2rem, 4vw, 3.6rem);
	line-height: 1;
}

.training-metric small {
	color: #757b78;
}

.progress-grid {
	display: grid;
	grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1.15fr);
	gap: 24px;
	margin-top: 24px;
}

.progress-note-card,
.loop-card {
	padding: clamp(28px, 4vw, 48px);
	background: #fff;
}

.progress-note-card {
	display: flex;
	flex-direction: column;
	border-top: 8px solid #d53f35;
}

.progress-note-card h2,
.loop-card h2 {
	max-width: 12ch;
	font-size: clamp(2rem, 4vw, 3.7rem);
}

#progress-note {
	color: #5f6562;
}

#agent-note {
	margin: 24px 0 18px;
	font-size: 1.08rem;
	line-height: 1.65;
}

.agent-observations,
.agent-balance ul {
	display: grid;
	gap: 9px;
	margin: 0 0 22px;
	padding-left: 20px;
}

.agent-next,
.agent-balance {
	padding: 16px 0;
	border-top: 1px solid #d9dcd8;
}

.agent-next > span,
.agent-balance > span {
	color: #a72b25;
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
}

.agent-next p {
	margin: 7px 0 0;
}

.agent-note-meta {
	margin: 6px 0 20px;
	color: #757b78;
	font-size: 0.78rem;
}

.automated-read {
	margin: auto 0 24px;
	padding: 14px;
	background: #eef0ec;
	font-size: 0.82rem;
}

.progress-facts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin-top: auto;
}

.progress-facts div {
	min-width: 0;
	padding-top: 14px;
	border-top: 1px solid #d9dcd8;
}

.progress-facts strong {
	display: block;
	overflow: hidden;
	margin-top: 6px;
	font-size: 0.94rem;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.loop-card {
	color: #f5f6f3;
	background: #171a1c;
}

.loop-track {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin: 32px 0 0;
	padding: 0;
	list-style: none;
}

.loop-track li {
	display: flex;
	min-width: 0;
	min-height: 106px;
	padding: 14px;
	border: 1px solid #414649;
	background: #202427;
}

.loop-track li > span {
	display: grid;
	flex: 0 0 auto;
	place-items: center;
	width: 28px;
	height: 28px;
	margin-right: 10px;
	border: 1px solid #646a6d;
	border-radius: 50%;
	color: #c9cdca;
	font-size: 0.78rem;
	font-weight: 800;
}

.loop-track li div {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 6px;
}

.loop-track strong {
	line-height: 1.2;
}

.loop-track small {
	color: #9ca3a0;
	font-size: 0.74rem;
}

.loop-track li.complete {
	border-color: #4aa77c;
	background: #17382b;
}

.loop-track li.complete > span {
	border-color: #65d29d;
	color: #0f2018;
	background: #65d29d;
}

.loop-track li.complete small {
	color: #aee7c9;
}

.loop-track .telemetry-stage {
	border-style: dashed;
	background: #1c2022;
}

.loop-track .repeat-stage {
	border-color: #8d6b20;
}

.telemetry-note {
	margin: 22px 0 0;
	color: #aab0ad;
	font-size: 0.82rem;
}

.weights-band {
	padding: clamp(76px, 10vw, 126px) 0;
	background: #fff;
}

.training-heading > p {
	color: #62676d;
}

.weights-grid {
	display: grid;
	grid-template-columns: minmax(0, 0.82fr) minmax(440px, 1.18fr);
	gap: 24px;
}

.weight-panel {
	min-width: 0;
	border: 1px solid #d6d9d5;
	background: #f7f8f5;
}

.panel-heading {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 18px;
	padding: 20px 22px;
	border-bottom: 1px solid #d6d9d5;
}

.panel-heading h3,
.action-bank h3 {
	margin: 0;
	font-size: 1.05rem;
}

.panel-heading span {
	color: #6e7471;
	font-size: 0.76rem;
}

.weight-bars {
	display: grid;
	gap: 14px;
	padding: 22px;
}

.weight-bar-label {
	display: flex;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 5px;
	font-size: 0.82rem;
}

.weight-bar-label strong {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.weight-bar-track {
	height: 9px;
	background: #dee1dc;
}

.weight-bar-track span {
	display: block;
	height: 100%;
	min-width: 2px;
	background: #d53f35;
}

.loading-copy {
	color: #777d7a;
}

.weight-table-wrap,
.history-table-wrap {
	overflow-x: auto;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.86rem;
}

th,
td {
	padding: 13px 14px;
	border-bottom: 1px solid #dfe2de;
	text-align: right;
	white-space: nowrap;
}

th:first-child,
td:first-child {
	text-align: left;
}

th {
	color: #656b68;
	font-size: 0.7rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.weight-footnotes {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-top: 24px;
	border: 1px solid #d6d9d5;
}

.weight-footnotes div {
	padding: 18px 20px;
	border-right: 1px solid #d6d9d5;
}

.weight-footnotes div:last-child {
	border-right: 0;
}

.weight-footnotes strong {
	display: block;
	margin-top: 7px;
	font: 700 0.92rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.top-values-panel {
	margin-top: 24px;
}

.top-values-panel table {
	table-layout: fixed;
}

.run-band {
	padding: clamp(76px, 10vw, 126px) 0;
	color: #f4f5f2;
	background: #15181a;
}

.dark-heading > p {
	color: #b8bdbb;
}

.run-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	border-top: 1px solid #3b4043;
	border-left: 1px solid #3b4043;
}

.run-stat {
	min-width: 0;
	padding: 22px;
	border-right: 1px solid #3b4043;
	border-bottom: 1px solid #3b4043;
}

.run-stat span {
	color: #8f9793;
}

.run-stat strong {
	display: block;
	overflow: hidden;
	margin-top: 8px;
	font-size: clamp(1.15rem, 2vw, 1.8rem);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.action-bank {
	display: grid;
	grid-template-columns: 180px minmax(0, 1fr);
	gap: 24px;
	align-items: start;
	margin-top: 28px;
}

#action-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.action-chip {
	padding: 8px 11px;
	border: 1px solid #484e51;
	color: #d8ddda;
	background: #202426;
	font-size: 0.78rem;
}

.history-band {
	background: #eceeea;
}

.history-table-wrap {
	border: 1px solid #ccd0cb;
	background: #f9faf7;
}

.history-table-wrap tbody tr:nth-child(even) {
	background: #f0f2ee;
}

.process-ok {
	color: #217653;
	font-weight: 800;
}

.process-error {
	color: #b8322a;
	font-weight: 800;
}

.method-note {
	max-width: 850px;
	margin: 22px 0 0;
	color: #69706c;
	font-size: 0.82rem;
}

.training-page footer a {
	color: inherit;
}

@media (max-width: 980px) {
	.training-page .site-header nav a:not(.steam-link) {
		display: none;
	}

	.training-hero-grid,
	.progress-grid,
	.weights-grid {
		grid-template-columns: 1fr;
	}

	.metric-grid,
	.run-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.progress-grid {
		gap: 18px;
	}

	.loop-card {
		order: -1;
	}
}

@media (max-width: 680px) {
	.training-hero-grid,
	.training-shell {
		width: min(100% - 28px, 1180px);
	}

	.training-hero {
		padding: 58px 0 70px;
	}

	.training-hero h1 {
		font-size: clamp(3.2rem, 17vw, 5.2rem);
	}

	.live-panel {
		box-shadow: 7px 7px 0 rgba(229, 168, 47, 0.9);
	}

	.metric-grid,
	.progress-facts,
	.weight-footnotes,
	.run-grid {
		grid-template-columns: 1fr 1fr;
	}

	.loop-track {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.weight-footnotes div:nth-child(2) {
		border-right: 0;
	}

	.weight-footnotes div:last-child {
		grid-column: 1 / -1;
		border-top: 1px solid #d6d9d5;
	}

	.section-heading.training-heading {
		display: block;
	}

	.section-heading.training-heading > p {
		margin-top: 18px;
	}

	.action-bank {
		grid-template-columns: 1fr;
		gap: 14px;
	}
}

@media (max-width: 440px) {
	.training-page .site-header .steam-link {
		padding: 9px 10px;
		font-size: 0.78rem;
	}

	.training-page .brand span {
		display: none;
	}

	.metric-grid,
	.run-grid {
		grid-template-columns: 1fr;
	}

	.progress-facts,
	.weight-footnotes {
		grid-template-columns: 1fr;
	}

	.weight-footnotes div {
		border-right: 0;
		border-bottom: 1px solid #d6d9d5;
	}

	.weight-footnotes div:last-child {
		grid-column: auto;
		border-bottom: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
