.cpc-page {
	max-width: 1180px;
}

.cpc-page,
.cpc-page * {
	box-sizing: border-box;
}

.cpc-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
	gap: 22px;
	align-items: stretch;
	margin-bottom: 22px;
	padding: 30px;
	background: linear-gradient(135deg, #ffffff 0%, #f4faf7 55%, #f5f7fb 100%);
	border: 1px solid var(--line);
	border-radius: 8px;
	box-shadow: var(--shadow-soft);
}

.cpc-hero h1 {
	font-size: 44px;
}

.cpc-hero p {
	max-width: 790px;
	margin: 12px 0 0;
	color: var(--muted);
	font-size: 17px;
}

.cpc-note {
	padding: 12px 14px;
	background: #ffffff;
	border: 1px solid var(--line);
	border-radius: 8px;
	font-weight: 700;
}

.cpc-hero-result {
	display: grid;
	align-content: center;
	padding: 24px;
	color: #ffffff;
	background: #172033;
	border-radius: 8px;
}

.cpc-hero-result span,
.cpc-summary-card h3,
.cpc-detail-item span:first-child {
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
}

.cpc-hero-result span {
	color: #9fe8d4;
}

.cpc-hero-result strong {
	margin-top: 8px;
	font-size: 44px;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.cpc-hero-result p {
	margin-top: 12px;
	color: #e7edf6;
	font-size: 15px;
}

.cpc-card,
.cpc-results-section,
.content-section {
	margin-top: 20px;
	padding: 26px;
	background: #ffffff;
	border: 1px solid var(--line);
	border-radius: 8px;
	box-shadow: var(--shadow-soft);
}

.cpc-section-heading p {
	margin: 8px 0 0;
	color: var(--muted);
}

.cpc-mode-switch,
.cpc-asset-switch {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 18px 0 0;
	padding: 14px;
	background: #f8fafc;
	border: 1px solid var(--line);
	border-radius: 8px;
}

.cpc-mode-switch legend,
.cpc-asset-switch legend {
	width: 100%;
	margin-bottom: 4px;
	color: #263349;
	font-size: 13px;
	font-weight: 900;
	text-transform: uppercase;
}

.cpc-mode-switch label,
.cpc-asset-switch label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
	padding: 8px 12px;
	background: #ffffff;
	border: 1px solid #cfdbe8;
	border-radius: 7px;
	color: var(--text);
	font-weight: 900;
}

.cpc-asset-switch {
	margin-top: 12px;
	background: #ffffff;
}

.cpc-field-note {
	flex-basis: 100%;
	margin: 0;
	color: var(--muted);
	font-size: 13px;
	font-weight: 700;
}

.cpc-form-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
	margin-top: 18px;
}

.cpc-form-group {
	display: grid;
	min-width: 0;
	gap: 7px;
	color: #263349;
	font-size: 14px;
	font-weight: 800;
}

.cpc-form-group input {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	color: var(--text);
	background: #f8fafc;
	border: 1px solid #cfdbe8;
	border-radius: 7px;
	font: inherit;
	font-weight: 700;
}

.cpc-form-group input:focus {
	border-color: var(--green);
	outline: none;
	box-shadow: 0 0 0 3px rgba(23, 107, 91, 0.14);
}

.cpc-form-group small {
	color: var(--muted);
	font-weight: 600;
}

.cpc-hidden {
	display: none !important;
}

.cpc-warning {
	display: none;
	margin-top: 16px;
	padding: 12px;
	color: #744210;
	background: #fff7e6;
	border: 1px solid #f2d49b;
	border-radius: 8px;
	font-weight: 700;
}

.cpc-warning:not(:empty) {
	display: block;
}

.cpc-button-group,
.cpc-action-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 18px;
}

.cpc-btn {
	min-height: 44px;
	padding: 10px 16px;
	cursor: pointer;
	color: var(--green);
	background: #ffffff;
	border: 1px solid #bfddd4;
	border-radius: 7px;
	font: inherit;
	font-weight: 900;
}

.cpc-btn:hover,
.cpc-btn:focus {
	border-color: var(--green);
	outline: none;
	box-shadow: 0 0 0 3px rgba(23, 107, 91, 0.12);
}

.cpc-summary-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	margin-top: 18px;
}

.cpc-summary-card,
.cpc-module {
	min-width: 0;
	padding: 18px;
	background: #f8fafc;
	border: 1px solid var(--line);
	border-radius: 8px;
}

.cpc-summary-card h3 {
	margin-bottom: 10px;
	color: var(--muted);
}

.cpc-result-value {
	margin: 0;
	font-size: 26px;
	font-weight: 900;
	font-variant-numeric: tabular-nums;
}

.profit-value {
	color: #167247 !important;
}

.loss-value {
	color: #b23b3b !important;
}

.cpc-module-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-top: 20px;
}

.cpc-module h3 {
	margin-bottom: 12px;
}

.cpc-wide {
	grid-column: 1 / -1;
}

.cpc-details-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.cpc-summary-details {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cpc-detail-item {
	display: grid;
	gap: 6px;
	padding: 14px;
	background: #ffffff;
	border: 1px solid var(--line);
	border-radius: 8px;
}

.cpc-detail-item span:first-child {
	color: var(--muted);
}

.cpc-detail-item span:last-child {
	font-weight: 900;
	font-variant-numeric: tabular-nums;
}

.cpc-plain-answer {
	margin: 12px 0 0;
	color: var(--muted);
	font-weight: 700;
}

.cpc-table-container {
	overflow: auto;
	border: 1px solid var(--line);
	border-radius: 8px;
}

.cpc-scenario-table {
	width: 100%;
	min-width: 860px;
	border-collapse: collapse;
	background: #ffffff;
}

.cpc-scenario-table th,
.cpc-scenario-table td {
	padding: 12px;
	border-bottom: 1px solid var(--line);
	text-align: left;
	white-space: nowrap;
}

.cpc-scenario-table th {
	background: #eef5f8;
	color: #263349;
	font-size: 12px;
	text-transform: uppercase;
}

.split-content {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

.content-section p,
.check-list,
.cpc-steps {
	color: var(--muted);
}

.cpc-steps,
.check-list {
	display: grid;
	gap: 8px;
	padding-left: 22px;
}

.faq-section details {
	padding: 16px 0;
	border-top: 1px solid var(--line);
}

.faq-section summary {
	cursor: pointer;
	color: #111827;
	font-weight: 900;
}

.eeat-grid,
.related-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
	margin-top: 14px;
}

.eeat-grid > div,
.related-grid a {
	min-width: 0;
	padding: 16px;
	background: #f8fafc;
	border: 1px solid var(--line);
	border-radius: 8px;
}

.eeat-grid h3 {
	margin-bottom: 8px;
	font-size: 16px;
}

.eeat-grid p {
	margin: 0;
}

.related-grid a {
	color: var(--green);
	font-weight: 900;
	text-decoration: none;
}

.related-grid a:hover,
.related-grid a:focus {
	text-decoration: underline;
}

@media (max-width: 960px) {
	.cpc-hero,
	.split-content,
	.cpc-module-grid {
		grid-template-columns: 1fr;
	}

	.cpc-form-grid,
	.cpc-details-grid,
	.cpc-summary-details,
	.eeat-grid,
	.related-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

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

@media (max-width: 640px) {
	.cpc-hero,
	.cpc-card,
	.cpc-results-section,
	.content-section {
		padding: 20px;
	}

	.cpc-hero h1 {
		font-size: 34px;
	}

	.cpc-form-grid,
	.cpc-summary-grid,
	.cpc-details-grid,
	.cpc-summary-details,
	.eeat-grid,
	.related-grid {
		grid-template-columns: 1fr;
	}

	.cpc-result-value {
		font-size: 24px;
	}

	.cpc-mode-switch label,
	.cpc-asset-switch label,
	.cpc-btn {
		width: 100%;
		justify-content: center;
	}
}
