:root {
	color-scheme: light;
	--fx-page-bg: #f4f7fb;
	--fx-surface: #ffffff;
	--fx-text: #172033;
	--fx-muted: #5d687d;
	--fx-border: #dfe5ee;
	--fx-primary: #2457d6;
	--fx-primary-soft: #eef4ff;
	--fx-success: #15803d;
	--fx-success-soft: #effaf3;
	--fx-warning: #c2410c;
	--fx-warning-soft: #fff7ed;
	--fx-danger: #b42318;
	--fx-danger-soft: #fff1f0;
	--fx-radius: 14px;
	--fx-shadow: 0 10px 30px rgba(25, 40, 72, 0.08);
}

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

html {
	scroll-behavior: smooth;
}

body.fx-insights-raw-html-template {
	background: var(--fx-page-bg);
	color: var(--fx-text);
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 17px;
	line-height: 1.72;
	-webkit-font-smoothing: antialiased;
}

.fx-insights-raw-html-template .container {
	width: min(1120px, calc(100% - 40px));
	margin: 48px auto;
	padding: clamp(24px, 5vw, 64px);
	background: var(--fx-surface);
	border: 1px solid var(--fx-border);
	border-radius: 20px;
	box-shadow: var(--fx-shadow);
}

/* When the fragment is rendered inside Revision's article shell, the theme
 * already provides the page width, surface and spacing. Keep only the article
 * component styles and avoid creating a second page container. */
.fx-insights-raw-html-template.fx-insights-embedded .container {
	width: 100%;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.fx-insights-raw-html-template .market-article-cover {
	margin: 0 0 34px;
	overflow: hidden;
	border: 1px solid var(--fx-border);
	border-radius: var(--fx-radius);
	background: #102a56;
}

.fx-insights-raw-html-template .market-article-cover img {
	display: block;
	width: 100%;
	height: auto;
}

.fx-insights-raw-html-template section {
	margin-top: 0;
	padding: 44px 0;
	border-bottom: 1px solid var(--fx-border);
}

.fx-insights-raw-html-template section:first-child {
	padding-top: 0;
}

.fx-insights-raw-html-template section:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.fx-insights-raw-html-template h1,
.fx-insights-raw-html-template h2,
.fx-insights-raw-html-template h3,
.fx-insights-raw-html-template h4 {
	margin: 0 0 18px;
	color: #101828;
	font-weight: 750;
	line-height: 1.25;
	letter-spacing: -0.02em;
}

.fx-insights-raw-html-template h1 {
	font-size: clamp(2rem, 4vw, 3.25rem);
}

.fx-insights-raw-html-template h2 {
	font-size: clamp(1.55rem, 3vw, 2.1rem);
}

.fx-insights-raw-html-template h3 {
	margin-top: 30px;
	font-size: 1.28rem;
}

.fx-insights-raw-html-template h4 {
	font-size: 1.05rem;
	letter-spacing: 0;
}

.fx-insights-raw-html-template p,
.fx-insights-raw-html-template ul,
.fx-insights-raw-html-template ol {
	margin: 0 0 20px;
}

.fx-insights-raw-html-template ul,
.fx-insights-raw-html-template ol {
	padding-left: 1.4em;
}

.fx-insights-raw-html-template li + li {
	margin-top: 9px;
}

.fx-insights-raw-html-template a {
	color: var(--fx-primary);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.fx-insights-raw-html-template strong {
	color: #16213a;
}

.fx-insights-raw-html-template .emoji-icon {
	display: inline-block;
	margin-right: 0.22em;
	font-style: normal;
}

.fx-insights-raw-html-template .grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	margin: 26px 0;
}

.fx-insights-raw-html-template .card,
.fx-insights-raw-html-template .scenario,
.fx-insights-raw-html-template .mistakes,
.fx-insights-raw-html-template .risk-warning,
.fx-insights-raw-html-template .callout {
	margin: 24px 0;
	padding: 22px 24px;
	border: 1px solid var(--fx-border);
	border-radius: var(--fx-radius);
	background: #f9fbfe;
}

.fx-insights-raw-html-template .grid-2 > .card {
	margin: 0;
}

.fx-insights-raw-html-template .card > :last-child,
.fx-insights-raw-html-template .scenario > :last-child,
.fx-insights-raw-html-template .mistakes > :last-child,
.fx-insights-raw-html-template .risk-warning > :last-child,
.fx-insights-raw-html-template .callout > :last-child {
	margin-bottom: 0;
}

.fx-insights-raw-html-template .card > h3:first-child,
.fx-insights-raw-html-template .scenario > h3:first-child,
.fx-insights-raw-html-template .mistakes > h3:first-child,
.fx-insights-raw-html-template .risk-warning > h3:first-child,
.fx-insights-raw-html-template .callout > h3:first-child {
	margin-top: 0;
}

.fx-insights-raw-html-template .callout-blue {
	border-left: 5px solid var(--fx-primary);
	background: var(--fx-primary-soft);
}

.fx-insights-raw-html-template .callout-green {
	border-left: 5px solid var(--fx-success);
	background: var(--fx-success-soft);
}

.fx-insights-raw-html-template .callout-orange,
.fx-insights-raw-html-template .scenario {
	border-left: 5px solid var(--fx-warning);
	background: var(--fx-warning-soft);
}

.fx-insights-raw-html-template .risk-warning,
.fx-insights-raw-html-template .mistakes {
	border-left: 5px solid var(--fx-danger);
	background: var(--fx-danger-soft);
}

.fx-insights-raw-html-template .table-wrap {
	margin: 26px 0;
	overflow-x: auto;
	border: 1px solid var(--fx-border);
	border-radius: var(--fx-radius);
}

.fx-insights-raw-html-template table {
	width: 100%;
	min-width: 760px;
	border-collapse: collapse;
	background: var(--fx-surface);
	font-size: 0.94rem;
}

.fx-insights-raw-html-template th,
.fx-insights-raw-html-template td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--fx-border);
	text-align: left;
	vertical-align: top;
}

.fx-insights-raw-html-template th {
	background: #eef2f8;
	color: #27334d;
	font-weight: 700;
}

.fx-insights-raw-html-template tbody tr:last-child td {
	border-bottom: 0;
}

.fx-insights-raw-html-template tbody tr:nth-child(even) {
	background: #fafbfd;
}

.fx-insights-raw-html-template .checklist {
	padding: 0;
	list-style: none;
}

.fx-insights-raw-html-template .checklist li {
	position: relative;
	padding: 13px 16px 13px 44px;
	border-bottom: 1px solid var(--fx-border);
}

.fx-insights-raw-html-template .checklist li::before {
	position: absolute;
	top: 13px;
	left: 14px;
	color: var(--fx-success);
	font-weight: 800;
	content: "\2713";
}

.fx-insights-raw-html-template .faq-list {
	display: grid;
	gap: 14px;
}

.fx-insights-raw-html-template .faq-item {
	overflow: hidden;
	border: 1px solid var(--fx-border);
	border-radius: var(--fx-radius);
	background: var(--fx-surface);
}

.fx-insights-raw-html-template .faq-question {
	padding: 17px 20px;
	background: #f2f5fa;
	color: #17233e;
	font-weight: 700;
}

.fx-insights-raw-html-template .faq-answer {
	padding: 18px 20px;
	color: var(--fx-muted);
}

.fx-insights-raw-html-template .qmark {
	margin-right: 6px;
	color: var(--fx-primary);
}

@media (max-width: 760px) {
	body.fx-insights-raw-html-template {
		font-size: 16px;
	}

	.fx-insights-raw-html-template .container {
		width: min(100% - 20px, 1120px);
		margin: 10px auto;
		padding: 24px 18px;
		border-radius: 14px;
	}

	.fx-insights-raw-html-template section {
		padding: 34px 0;
	}

	.fx-insights-raw-html-template .grid-2 {
		grid-template-columns: 1fr;
	}

	.fx-insights-raw-html-template .card,
	.fx-insights-raw-html-template .scenario,
	.fx-insights-raw-html-template .mistakes,
	.fx-insights-raw-html-template .risk-warning,
	.fx-insights-raw-html-template .callout {
		padding: 18px;
	}
}

@media print {
	body.fx-insights-raw-html-template {
		background: #fff;
	}

	.fx-insights-raw-html-template .container {
		width: 100%;
		margin: 0;
		padding: 0;
		border: 0;
		box-shadow: none;
	}
}
