:root {
	--bg: #ffffff;
	--surface: #f5f5f2;
	--card: #ffffff;
	--text: #18181a;
	--muted: #5a5a60;
	--line: #e3e3de;
	--accent: #dd3333;
	--accent-ink: #c22a2a;
	--accent-soft: #fbeaea;
	--radius: 8px;
	--font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #111113;
		--surface: #18181b;
		--card: #1f1f23;
		--text: #ececee;
		--muted: #a6a6ad;
		--line: #2d2d33;
		--accent: #ff5c5c;
		--accent-ink: #ff7a7a;
		--accent-soft: #2a1a1a;
	}
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.6;
}

a {
	color: var(--accent-ink);
	text-underline-offset: 2px;
}

a:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.wrap {
	max-width: 1080px;
	margin: 0 auto;
	padding: 0 16px;
}

.skip {
	position: absolute;
	left: -9999px;
}

.skip:focus {
	left: 16px;
	top: 16px;
	z-index: 10;
	background: var(--bg);
	padding: 8px 12px;
}

.topbar {
	border-bottom: 1px solid var(--line);
	font-size: 14px;
}

.topbar__inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	min-height: 56px;
}

.topbar__name {
	color: var(--text);
	font-weight: 700;
	text-decoration: none;
}

.topbar__meta {
	color: var(--muted);
}

.hero {
	padding: 56px 0 40px;
}

.eyebrow {
	margin: 0 0 12px;
	color: var(--accent-ink);
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

h1 {
	max-width: 820px;
	margin: 0 0 20px;
	font-size: clamp(34px, 6vw, 56px);
	line-height: 1.08;
	letter-spacing: -0.02em;
}

h2 {
	max-width: 760px;
	margin: 0 0 16px;
	font-size: clamp(26px, 3.6vw, 36px);
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.h2--small {
	font-size: 22px;
}

h3 {
	margin: 0 0 10px;
	font-size: 20px;
	line-height: 1.25;
}

.lede {
	max-width: 720px;
	margin: 0 0 16px;
	font-size: 20px;
	line-height: 1.5;
}

.byline {
	margin: 0 0 20px;
	color: var(--muted);
	font-size: 15px;
}

.notice {
	max-width: 720px;
	margin: 0 0 40px;
	padding: 12px 14px;
	border-left: 3px solid var(--accent);
	background: var(--surface);
	color: var(--muted);
	font-size: 14px;
	line-height: 1.5;
}

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

.stat {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--card);
}

.stat__value {
	color: var(--accent-ink);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.15;
}

.stat__label {
	color: var(--muted);
	font-size: 14px;
	line-height: 1.45;
}

.toc ol {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: toc;
}

.toc li {
	counter-increment: toc;
}

.toc a {
	display: inline-block;
	padding: 6px 12px;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--text);
	font-size: 14px;
	text-decoration: none;
}

.toc a::before {
	content: counter(toc, decimal-leading-zero) " ";
	color: var(--accent-ink);
	font-weight: 700;
}

.toc a:hover {
	border-color: var(--accent);
}

.section {
	padding: 64px 0;
	scroll-margin-top: 16px;
}

.section--alt {
	background: var(--surface);
}

.section__num {
	margin: 0 0 8px;
	color: var(--accent-ink);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.08em;
}

.intro,
.prose p {
	max-width: 720px;
	margin: 0 0 16px;
}

.prose {
	margin-bottom: 24px;
}

.note {
	max-width: 720px;
	margin: 20px 0 0;
	color: var(--muted);
	font-size: 14px;
}

.table-scroll {
	margin-top: 24px;
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--card);
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.5;
}

th,
td {
	padding: 12px 16px;
	border-bottom: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}

thead th {
	background: var(--surface);
	color: var(--muted);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

tbody tr:last-child th,
tbody tr:last-child td {
	border-bottom: 0;
}

.battle {
	min-width: 860px;
}

.battle tbody th {
	width: 15%;
	font-weight: 700;
}

.battle td:nth-child(3) {
	font-style: italic;
}

.cards {
	display: grid;
	gap: 16px;
	margin-top: 24px;
}

.cards--3 {
	grid-template-columns: repeat(3, 1fr);
}

.card {
	padding: 22px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--card);
}

.card p {
	margin: 0;
}

.card dl {
	margin: 0;
}

.card dt {
	margin-top: 14px;
	color: var(--muted);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.card dt:first-child {
	margin-top: 0;
}

.card dd {
	margin: 4px 0 0;
	font-size: 15px;
	line-height: 1.5;
}

.card__start {
	margin-top: 18px !important;
	padding-top: 14px;
	border-top: 1px solid var(--line);
	font-size: 15px;
	line-height: 1.5;
}

.card__kicker {
	margin: 0 0 6px !important;
	color: var(--accent-ink);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.card--move p:last-child {
	font-size: 15px;
	line-height: 1.55;
}

.phases {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
}

.phase {
	display: flex;
	flex-direction: column;
	padding: 22px;
	border: 1px solid var(--line);
	border-top: 4px solid var(--accent);
	border-radius: var(--radius);
	background: var(--card);
}

.phase__days {
	margin: 0 0 6px;
	color: var(--accent-ink);
	font-size: 14px;
	font-weight: 700;
}

.phase ul {
	margin: 0 0 16px;
	padding-left: 18px;
	font-size: 15px;
	line-height: 1.5;
}

.phase li + li {
	margin-top: 8px;
}

.phase__out {
	margin: auto 0 0;
	padding: 12px 14px;
	border-radius: var(--radius);
	background: var(--accent-soft);
	font-size: 14px;
	line-height: 1.5;
}

.callout {
	max-width: 820px;
	margin-top: 24px;
	padding: 22px;
	border: 1px solid var(--line);
	border-left: 4px solid var(--accent);
	border-radius: var(--radius);
	background: var(--card);
}

.callout p {
	margin: 0 0 14px;
	font-size: 15px;
}

.callout ul {
	margin: 0;
	padding-left: 18px;
	font-size: 15px;
}

.callout li + li {
	margin-top: 8px;
}

.kpis {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	max-width: 900px;
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
}

.kpis li {
	padding: 14px 16px 14px 44px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--card);
	font-size: 15px;
	line-height: 1.5;
	position: relative;
}

.kpis li::before {
	content: "";
	position: absolute;
	left: 18px;
	top: 21px;
	width: 10px;
	height: 10px;
	border-radius: 2px;
	background: var(--accent);
}

.questions {
	max-width: 760px;
	margin: 8px 0 0;
	padding-left: 22px;
}

.questions li {
	padding-left: 6px;
}

.questions li + li {
	margin-top: 10px;
}

.questions li::marker {
	color: var(--accent-ink);
	font-weight: 700;
}

.links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 8px 0 0;
}

.button {
	display: inline-block;
	padding: 10px 18px;
	border: 1px solid var(--accent);
	border-radius: var(--radius);
	background: var(--accent);
	color: #ffffff;
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
}

.button--ghost {
	background: transparent;
	color: var(--text);
	border-color: var(--line);
}

.button:hover {
	opacity: 0.9;
}

.sources {
	max-width: 860px;
	margin: 12px 0 0;
	padding-left: 24px;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.5;
}

.sources li + li {
	margin-top: 6px;
}

.sources li:target {
	color: var(--text);
	font-weight: 500;
}

.footer {
	padding: 32px 0 48px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 13px;
	line-height: 1.5;
}

.footer p {
	max-width: 820px;
	margin: 0;
}

@media (max-width: 900px) {
	.stats {
		grid-template-columns: repeat(2, 1fr);
	}

	.cards--3,
	.phases {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 560px) {
	body {
		font-size: 16px;
	}

	.hero {
		padding: 36px 0 28px;
	}

	.lede {
		font-size: 18px;
	}

	.stats,
	.kpis {
		grid-template-columns: 1fr;
	}

	.section {
		padding: 44px 0;
	}

	.topbar__meta {
		font-size: 13px;
	}
}

@media print {
	:root {
		--bg: #ffffff;
		--surface: #ffffff;
		--card: #ffffff;
		--text: #000000;
		--muted: #333333;
		--line: #cccccc;
	}

	body {
		font-size: 11pt;
	}

	.toc,
	.links,
	.skip {
		display: none;
	}

	.section {
		padding: 20px 0;
		break-inside: avoid-page;
	}

	.card,
	.phase,
	.stat {
		break-inside: avoid;
	}

	.cards--3,
	.phases {
		grid-template-columns: repeat(3, 1fr);
	}

	.battle {
		min-width: 0;
	}

	a {
		color: inherit;
	}
}

/* Reading aids: progress bar, side index, summary, timeline, icons, highlights, reveal. */

.progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 20;
	height: 3px;
	pointer-events: none;
}

.progress span {
	display: block;
	height: 100%;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: 0 50%;
}

.sideindex {
	display: none;
}

@media (min-width: 1200px) {
	.sideindex {
		position: fixed;
		top: 50%;
		left: 12px;
		z-index: 15;
		display: flex;
		flex-direction: column;
		gap: 2px;
		transform: translateY(-50%);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.3s ease, visibility 0.3s;
	}

	.sideindex.is-shown {
		opacity: 1;
		visibility: visible;
	}

	.sideindex a {
		display: flex;
		align-items: baseline;
		gap: 8px;
		padding: 4px 8px;
		border-radius: 6px;
		color: var(--muted);
		font-size: 12.5px;
		line-height: 1.3;
		text-decoration: none;
	}

	.sideindex .n {
		font-weight: 700;
		font-variant-numeric: tabular-nums;
	}

	.sideindex .t {
		display: none;
	}

	.sideindex a:hover,
	.sideindex a.is-active {
		color: var(--accent-ink);
	}

	.sideindex a.is-active {
		background: var(--accent-soft);
	}
}

@media (min-width: 1440px) {
	.sideindex {
		left: 20px;
		max-width: calc((100vw - 1080px) / 2 - 28px);
	}

	.sideindex .t {
		display: inline;
	}
}

.brief {
	max-width: 760px;
	margin: 0 0 24px;
	padding: 18px 20px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--card);
}

.brief__title {
	margin: 0 0 8px;
	color: var(--accent-ink);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.brief ul {
	margin: 0;
	padding-left: 18px;
}

.brief li + li {
	margin-top: 6px;
}

.timeline {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
}

.timeline li {
	position: relative;
	padding: 28px 14px 0 0;
}

.timeline li::before {
	content: "";
	position: absolute;
	top: 8px;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--line);
}

.timeline li::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 0;
	width: 12px;
	height: 12px;
	border: 2px solid var(--muted);
	border-radius: 50%;
	background: var(--bg);
}

.timeline li.is-key::after {
	border-color: var(--accent);
	background: var(--accent);
}

.timeline li.is-next::before {
	background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 10px);
}

.timeline li.is-next::after {
	border-style: dashed;
	border-color: var(--accent);
}

.timeline__date {
	display: block;
	font-size: 14px;
	font-weight: 700;
}

.timeline li.is-key .timeline__date {
	color: var(--accent-ink);
}

.timeline__what {
	display: block;
	margin-top: 4px;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.4;
}

.timeline-src {
	margin: 10px 0 0;
	color: var(--muted);
	font-size: 13px;
}

@media (max-width: 900px) {
	.timeline {
		grid-template-columns: 1fr;
	}

	.timeline li {
		padding: 0 0 18px 28px;
	}

	.timeline li::before {
		top: 0;
		bottom: 0;
		left: 5px;
		right: auto;
		width: 2px;
		height: auto;
	}

	.timeline li.is-next::before {
		background: repeating-linear-gradient(180deg, var(--line) 0 6px, transparent 6px 10px);
	}
}

.icon {
	width: 18px;
	height: 18px;
	margin-right: 8px;
	vertical-align: -3px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.card h3 .icon,
.callout h3 .icon {
	width: 20px;
	height: 20px;
	vertical-align: -4px;
	color: var(--accent-ink);
}

.card__kicker .icon,
.phase__days .icon {
	width: 16px;
	height: 16px;
	margin-right: 6px;
}

.hl {
	font-weight: 700;
	background: linear-gradient(transparent 60%, var(--accent-soft) 60%);
}

a[target="_blank"]::after {
	content: "\2197";
	content: "\2197" / "";
	display: inline-block;
	margin-left: 3px;
	font-size: 0.85em;
}

.reveal {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 0.55s ease, transform 0.55s ease;
	transition-delay: var(--d, 0ms);
}

.reveal.is-in {
	opacity: 1;
	transform: none;
}

@media print {
	.progress,
	.sideindex {
		display: none !important;
	}

	.reveal {
		opacity: 1 !important;
		transform: none !important;
	}

	a[target="_blank"]::after {
		content: none;
	}
}

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