/* =========================================================================
 * Mamy (www.mamyadv.com) - Controllo Matematico della Scrittura (Step 1)
 * Regola tipografica vincolante: SOLO font nativi (65Md, 55Rg, 45Lt),
 * nessun peso sintetico, nessun corsivo sintetico.
 * ========================================================================= */

.cs-hero {
	padding-top: 130px;
	padding-bottom: 50px;
	text-align: center;
}

.cs-hero-title {
	font-family: 'NHaasGroteskDSPro-65Md', sans-serif;
	font-weight: normal;
	font-size: 420%;
	line-height: 1.05;
	color: #1a171b;
	margin: 0 auto 22px auto;
	max-width: 960px;
}

.cs-hero-subtitle {
	font-family: 'NHaasGroteskDSPro-45Lt', sans-serif;
	font-weight: normal;
	font-size: 165%;
	line-height: 1.45;
	color: #28282A;
	margin: 0 auto;
	max-width: 780px;
}

/* Sezione Input */
.cs-workspace {
	padding-top: 10px;
	padding-bottom: 70px;
}

.cs-card-input {
	max-width: 920px;
	margin: 0 auto;
}

.cs-label {
	display: block;
	font-family: 'NHaasGroteskDSPro-65Md', sans-serif;
	font-weight: normal;
	font-size: 115%;
	color: #1a171b;
	margin-bottom: 12px;
	letter-spacing: 0.01em;
}

.cs-textarea {
	display: block;
	width: 100%;
	min-height: 240px;
	padding: 20px 22px;
	font-family: 'NHaasGroteskDSPro-55Rg', sans-serif;
	font-weight: normal;
	font-size: 120%;
	line-height: 1.6;
	color: #1a171b;
	background-color: #ffffff;
	border: 2px solid #28282A;
	border-radius: 0;
	resize: vertical;
	box-sizing: border-box;
	transition: border-color 0.2s ease;
}

.cs-textarea:focus {
	outline: none;
	border-color: #D32E5E;
}

.cs-textarea::placeholder {
	color: #7a7e82;
	font-family: 'NHaasGroteskDSPro-45Lt', sans-serif;
}

.cs-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin-top: 24px;
}

.cs-btn-primary {
	background-color: #1a171b;
	color: #ffffff;
	border-color: #1a171b !important;
	cursor: pointer;
	margin: 0 !important;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cs-btn-primary:hover,
.cs-btn-primary:focus {
	background-color: #D32E5E;
	border-color: #D32E5E !important;
	color: #ffffff;
}

.cs-btn-primary:disabled {
	opacity: 0.55;
	cursor: wait;
}

.cs-btn-secondary {
	background-color: transparent;
	color: #1a171b;
	border-color: #1a171b !important;
	cursor: pointer;
	margin: 0 !important;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.cs-btn-secondary:hover,
.cs-btn-secondary:focus {
	background-color: #e4e6e8;
	color: #1a171b;
}

.cs-status-msg {
	font-family: 'NHaasGroteskDSPro-55Rg', sans-serif;
	font-weight: normal;
	font-size: 100%;
	color: #D32E5E;
	margin-left: auto;
}

.cs-privacy-note {
	margin-top: 20px;
	padding: 14px 18px;
	background-color: #eceeef;
	border-left: 3px solid #28282A;
	font-family: 'NHaasGroteskDSPro-45Lt', sans-serif;
	font-weight: normal;
	font-size: 98%;
	line-height: 1.5;
	color: #28282A;
}

.cs-privacy-title {
	font-family: 'NHaasGroteskDSPro-65Md', sans-serif;
	font-weight: normal;
	color: #1a171b;
}

/* Sezione Risultati */
.cs-results {
	display: none;
	max-width: 1060px;
	margin: 0 auto 80px auto;
}

.cs-results.is-visible {
	display: block;
}

/* KPI sintetici sopra il grafico */
.cs-kpi-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-bottom: 28px;
}

.cs-kpi-box {
	background-color: #1A1A1A;
	color: #ffffff;
	padding: 20px 22px;
	border-top: 4px solid #A0A5A9;
}

.cs-kpi-box--vive {
	border-top-color: #10B981;
}

.cs-kpi-box--morte {
	border-top-color: #D32E5E;
}

.cs-kpi-box--neutre {
	border-top-color: #A0A5A9;
}

.cs-kpi-box--totale {
	border-top-color: #ffffff;
}

.cs-kpi-label {
	font-family: 'NHaasGroteskDSPro-55Rg', sans-serif;
	font-weight: normal;
	font-size: 85%;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #A0A5A9;
	margin-bottom: 8px;
}

.cs-kpi-value {
	font-family: 'NHaasGroteskDSPro-65Md', sans-serif;
	font-weight: normal;
	font-size: 220%;
	line-height: 1.1;
	color: #ffffff;
}

.cs-kpi-sub {
	font-family: 'NHaasGroteskDSPro-45Lt', sans-serif;
	font-weight: normal;
	font-size: 100%;
	color: #d4d7da;
	margin-top: 6px;
}

/* Contenitore Grafico Ciambella SVG ad alto contrasto */
.cs-chart-panel {
	background-color: #1A1A1A;
	padding: 36px 24px 32px 24px;
	margin-bottom: 36px;
	color: #ffffff;
}

.cs-chart-header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 0 12px 20px 12px;
	border-bottom: 1px solid #2e2e2e;
	margin-bottom: 20px;
}

.cs-chart-title {
	font-family: 'NHaasGroteskDSPro-65Md', sans-serif;
	font-weight: normal;
	font-size: 145%;
	color: #ffffff;
	margin: 0;
}

.cs-chart-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	font-family: 'NHaasGroteskDSPro-55Rg', sans-serif;
	font-weight: normal;
	font-size: 92%;
	color: #d4d7da;
}

.cs-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.cs-legend-dot {
	display: inline-block;
	width: 11px;
	height: 11px;
}

.cs-svg-wrap {
	width: 100%;
	overflow-x: auto;
}

.cs-donut-svg {
	display: block;
	width: 100%;
	max-width: 980px;
	height: auto;
	margin: 0 auto;
}

/* Report completo 2 colonne */
.cs-report-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}

.cs-report-card {
	background-color: #ffffff;
	border: 1px solid #d5d8db;
	border-top: 4px solid #28282A;
	padding: 26px 24px;
}

.cs-report-card--vive {
	border-top-color: #10B981;
}

.cs-report-card--morte {
	border-top-color: #D32E5E;
}

.cs-report-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding-bottom: 14px;
	margin-bottom: 16px;
	border-bottom: 1px solid #e4e6e8;
}

.cs-report-title {
	font-family: 'NHaasGroteskDSPro-65Md', sans-serif;
	font-weight: normal;
	font-size: 150%;
	color: #1a171b;
	margin: 0;
}

.cs-report-badge {
	font-family: 'NHaasGroteskDSPro-65Md', sans-serif;
	font-weight: normal;
	font-size: 95%;
	padding: 4px 10px;
	color: #ffffff;
}

.cs-report-badge--vive {
	background-color: #10B981;
}

.cs-report-badge--morte {
	background-color: #D32E5E;
}

.cs-table {
	width: 100%;
	border-collapse: collapse;
	font-family: 'NHaasGroteskDSPro-55Rg', sans-serif;
	font-weight: normal;
	font-size: 102%;
}

.cs-table th {
	font-family: 'NHaasGroteskDSPro-65Md', sans-serif;
	font-weight: normal;
	font-size: 85%;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #5c6064;
	text-align: left;
	padding: 8px 6px;
	border-bottom: 2px solid #e4e6e8;
}

.cs-table th.is-num,
.cs-table td.is-num {
	text-align: right;
	white-space: nowrap;
}

.cs-table td {
	padding: 9px 6px;
	border-bottom: 1px solid #eef0f2;
	color: #1a171b;
	vertical-align: baseline;
}

.cs-table tr:last-child td {
	border-bottom: none;
}

.cs-word-form {
	font-family: 'NHaasGroteskDSPro-65Md', sans-serif;
	font-weight: normal;
	color: #1a171b;
}

.cs-word-lemma {
	font-family: 'NHaasGroteskDSPro-45Lt', sans-serif;
	font-weight: normal;
	color: #63676b;
	font-size: 92%;
	margin-left: 6px;
}

.cs-empty {
	font-family: 'NHaasGroteskDSPro-45Lt', sans-serif;
	font-weight: normal;
	font-size: 105%;
	color: #63676b;
	padding: 16px 0;
	margin: 0;
}

/* Responsive */
@media (max-width: 900px) {
	.cs-hero-title {
		font-size: 290%;
	}
	.cs-kpi-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.cs-report-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 600px) {
	.cs-hero {
		padding-top: 96px;
		padding-bottom: 32px;
	}
	.cs-hero-title {
		font-size: 220%;
	}
	.cs-hero-subtitle {
		font-size: 125%;
	}
	.cs-textarea {
		min-height: 190px;
		font-size: 105%;
	}
	.cs-chart-panel {
		padding: 24px 12px 20px 12px;
	}
	.cs-status-msg {
		margin-left: 0;
		width: 100%;
	}
}
