.tn-aff {
	--ink: #241c16;
	--muted: #6d6258;
	--line: #e5d8c8;
	--card: #fffdf8;
	--paper: #f4ecdf;
	--accent: #8d3b22;
	--good: #1f6b4a;
	max-width: 920px;
	color: var(--ink);
	font-family: "Segoe UI", "Helvetica Neue", sans-serif;
	line-height: 1.5;
}

.tn-aff h2,
.tn-aff h3 {
	font-family: Georgia, "Iowan Old Style", Palatino, serif;
	font-weight: 500;
	letter-spacing: -0.02em;
	margin: 0 0 0.6rem;
}

.tn-aff h3 { font-size: 1.25rem; }

.tn-lead { color: var(--muted); margin-top: 0; }

.tn-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 12px;
	margin: 16px 0;
}

.tn-stat,
.tn-card,
.tn-tier {
	border: 1px solid var(--line);
	border-radius: 16px;
	background: var(--card);
	padding: 16px 18px;
}

.tn-stat span {
	display: block;
	color: var(--muted);
	font-size: 0.78rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.tn-stat b {
	display: block;
	margin-top: 4px;
	font-size: 1.45rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.03em;
}

.tn-tier {
	background: #241c16;
	color: #f6efe4;
	border-color: #241c16;
	margin-bottom: 16px;
}

.tn-tier strong { color: #f0c7a2; }

.tn-quiet { color: var(--muted); font-size: 0.92rem; }
.tn-tier .tn-quiet { color: #cbbba8; }

.tn-card { margin: 0 0 14px; }

.tn-aff table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tn-aff th {
	text-align: left;
	font-size: 0.72rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--muted);
	font-weight: 600;
}
.tn-aff td,
.tn-aff th { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }

.tn-pill {
	display: inline-block;
	border-radius: 999px;
	padding: 2px 8px;
	background: var(--paper);
	font-size: 12px;
}
.tn-pill.is-paid { background: #e5f4ec; color: var(--good); }
.tn-pill.is-unpaid { background: #fff1cc; color: #7a5600; }
.tn-pill.is-rejected { background: #fde8e2; color: var(--accent); }

.tn-linkrow,
.tn-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.tn-linkrow input,
.tn-aff input[type="text"],
.tn-aff input[type="email"],
.tn-aff input[type="password"],
.tn-aff input[type="url"],
.tn-aff input[type="tel"],
.tn-aff input[type="number"],
.tn-aff textarea,
.tn-aff select {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 10px 12px;
	background: #fff;
	color: var(--ink);
}
.tn-form input,
.tn-form select,
.tn-form textarea { font: inherit; font-size: 0.95rem; }
.tn-linkrow input { flex: 1; }

.tn-form label,
.tn-inline label { display: block; margin: 0 0 12px; font-size: 0.92rem; }
.tn-form-tight { margin-top: 12px; }
.tn-check { display: flex !important; gap: 8px; align-items: flex-start; }
.tn-check input { margin-top: 4px; }

.tn-btn {
	appearance: none;
	border: 0;
	background: var(--accent);
	color: #fff;
	border-radius: 999px;
	padding: 10px 16px;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	font: inherit;
}
.tn-btn:hover { filter: brightness(1.05); }
.tn-btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }

.tn-note {
	background: #fff7e8;
	border: 1px solid #efd7a4;
	border-radius: 12px;
	padding: 10px 12px;
}

.tn-meter {
	height: 8px;
	background: #3a312a;
	border-radius: 999px;
	overflow: hidden;
	margin: 8px 0;
}
.tn-meter span { display: block; height: 100%; background: #e0b07a; }

.tn-hp {
	position: absolute !important;
	left: -9999px !important;
	height: 0 !important;
	overflow: hidden !important;
}

/* 1.8.0: modulo di iscrizione */
.tn-section { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.tn-section legend {
	font-family: Georgia, "Iowan Old Style", Palatino, serif;
	font-size: 1.2rem;
	font-weight: 500;
	letter-spacing: -0.02em;
	padding: 0 0 6px;
	margin: 0 0 10px;
	border-bottom: 1px solid var(--line);
	width: 100%;
}
.tn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.tn-form label input,
.tn-form label select,
.tn-form label textarea { margin-top: 4px; }
.tn-req { color: var(--accent); font-weight: 600; }
.tn-hint { color: var(--muted); font-size: 0.82rem; }
.tn-field-error { display: block; color: #a3271a; font-size: 0.85rem; margin-top: 4px; }
.tn-aff [aria-invalid="true"] { border-color: #a3271a !important; }
.tn-errors {
	background: #fde8e2;
	border: 1px solid #f0b8a8;
	border-radius: 12px;
	padding: 10px 14px;
	margin: 0 0 14px;
	color: #6e1d12;
}
.tn-errors p { margin: 0 0 4px; }
.tn-errors ul { margin: 0; padding-left: 18px; }
.tn-channel { margin: 0 0 6px; }
.tn-channel .tn-check { margin-bottom: 6px; }
.tn-ch-field { margin-left: 26px !important; }
.tn-ch-field[hidden] { display: none !important; }
.tn-terms { margin-top: 6px !important; }

@media (max-width: 640px) {
	.tn-aff table { display: block; overflow-x: auto; }
	.tn-row { grid-template-columns: 1fr; }
	.tn-ch-field { margin-left: 0 !important; }
}

/* 1.10.2: pulsante Elimina dei coupon */
.tn-aff .tn-coupon-del { margin: 0; }
.tn-aff .tn-btn-small { padding: 4px 12px; font-size: 0.85rem; }
.tn-aff .tn-coupon-confirm .tn-inline { align-items: center; margin-top: 8px; }
