/*
Theme Name: Astra Child
Template: astra
Version: 1.0.2
*/


/* =========================================================
   FONT
   ========================================================= */

@font-face {
	font-family: "Titillium Web";
	src: url("./fonts/titillium-web-regular.woff2") format("woff2");
	font-style: normal;
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "Titillium Web";
	src: url("./fonts/titillium-web-semibold.woff2") format("woff2");
	font-style: normal;
	font-weight: 600;
	font-display: swap;
}

@font-face {
	font-family: "Titillium Web";
	src: url("./fonts/titillium-web-bold.woff2") format("woff2");
	font-style: normal;
	font-weight: 700;
	font-display: swap;
}

@font-face {
	font-family: "Titillium Web";
	src: url("./fonts/titillium-web-italic.woff2") format("woff2");
	font-style: italic;
	font-weight: 400;
	font-display: swap;
}

html,
body,
button,
input,
select,
textarea,
h1,
h2,
h3,
h4,
h5,
h6,
.site-title,
.entry-title {
	font-family: "Titillium Web", sans-serif;
}

body {
	font-weight: 400;
}

h1,
h2,
h3,
.cb-regola__title {
	font-weight: 700;
}


/* =========================================================
   KNOWLEDGE BASE — GEOMETRIA
   ========================================================= */

/*
 * #primary è soltanto il contenitore esterno.
 * Il vero "foglio" è l'article.
 */

.cb-kb-primary,
.cb-regola-page {
	float: none !important;

	width: 100% !important;
	max-width: 960px !important;

	margin-left: auto !important;
	margin-right: auto !important;

	box-sizing: border-box;
}


/*
 * Box usato da Archivio e pagine piattaforma.
 * Usa il colore globale Astra: niente colore proprietario.
 */

.cb-kb-box {
	width: 100%;
	margin: 0;

	padding: 56px 46px 80px;

	box-sizing: border-box;

	background-color: var(--ast-global-color-5);
}


/*
 * Il single possiede già il suo article generato
 * tramite post_class(). Gli diamo la stessa geometria.
 */

.cb-regola-page > .cb-regola {
	width: 100%;
	margin: 0;

	padding: 56px 46px 80px;

	box-sizing: border-box;
}


/*
 * Dentro il box non servono altri padding esterni.
 */

.cb-regole-index,
.cb-platform-index {
	width: 100%;
	max-width: none;

	margin: 0;
	padding: 0;

	box-sizing: border-box;
}


/* =========================================================
   ELEMENTI COMUNI
   ========================================================= */

.cb-section-label {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: #56606d;
}

.cb-back-to-rules {
	display: inline-flex;
	align-items: center;

	margin-bottom: 20px;

	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;

	color: #596273;
	text-decoration: none;
}

.cb-back-to-rules:hover {
	color: #14213a;

	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}


/* =========================================================
   TAG
   ========================================================= */

.cb-tag {
	display: inline-flex;
	align-items: center;

	padding: 6px 10px;

	border: 1px solid #d7dde7;
	border-radius: 6px;

	background: #f6f8fb;

	font-size: 13px;
	font-weight: 600;
	line-height: 1;

	color: #17233a;
}


/* =========================================================
   ESITI
   ========================================================= */

.cb-outcome {
	display: inline-flex;
	align-items: center;

	padding: 7px 11px;

	border: 1px solid transparent;
	border-radius: 6px;

	font-size: 13px;
	font-weight: 700;
	line-height: 1;

	text-transform: uppercase;
	letter-spacing: .04em;
}

.cb-outcome--allowed {
	background: #ecfdf3;
	color: #166534;
	border-color: #bbf7d0;
}

.cb-outcome--restricted {
	background: #fff7e6;
	color: #925400;
	border-color: #f2c66d;
}

.cb-outcome--prohibited {
	background: #fef2f2;
	color: #b42318;
	border-color: #fecaca;
}

.cb-outcome--verify {
	background: #f3f0ff;
	color: #6d28d9;
	border-color: #d8ccff;
}

.cb-outcome--na {
	background: #f3f4f6;
	color: #6b7280;
	border-color: #d1d5db;
}


/* =========================================================
   SINGOLA REGOLA
   ========================================================= */

.cb-regola {
	color: #17233a;
}

.cb-regola__taxonomy {
	display: flex;
	flex-wrap: wrap;

	gap: 8px;

	margin-bottom: 22px;
}

.cb-regola__title {
	max-width: 760px;

	margin: 0 0 22px;

	font-size: clamp(36px, 3.5vw, 42px);
	font-weight: 700;
	line-height: 1.08;

	letter-spacing: -.03em;

	color: #14213a;
}

.cb-regola__status {
	display: flex;
	flex-wrap: wrap;
	align-items: center;

	gap: 14px;

	margin-bottom: 12px;
}

.cb-regola__secondary-status {
	display: flex;
	flex-wrap: wrap;

	gap: 6px 14px;

	font-size: 13px;

	color: #5f6874;
}

.cb-regola__secondary-status span + span::before {
	content: "·";

	margin-right: 14px;

	color: #a0a7b0;
}

.cb-regola__dates {
	display: flex;
	flex-wrap: wrap;

	gap: 8px 20px;

	margin-top: 12px;

	font-size: 13px;

	color: #6b7280;
}

.cb-regola__dates strong {
	color: #3f4650;
}


/* =========================================================
   RISPOSTA BREVE
   ========================================================= */

.cb-short-answer {
	margin: 42px 0 48px;
	padding: 28px 30px;

	border-left: 4px solid #1d3557;

	background: #f7f8fa;
}

.cb-short-answer .cb-section-label {
	margin-bottom: 9px;
	color: #5b6470;
}

.cb-short-answer p {
	margin: 0;

	font-size: 19px;
	font-weight: 500;
	line-height: 1.6;

	color: #17233a;
}


/* =========================================================
   SEZIONI
   ========================================================= */

.cb-section {
	padding: 40px 0;

	border-top: 1px solid #e1e5ea;
}

.cb-section h2 {
	margin: 0 0 16px;

	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;

	color: #14213a;
}

.cb-section__content {
	font-size: 17px;
	line-height: 1.75;

	color: #263247;
}

.cb-section__content p:first-child {
	margin-top: 0;
}

.cb-section__content p:last-child {
	margin-bottom: 0;
}


/* =========================================================
   TRADUZIONE BRUTALE
   ========================================================= */

.cb-section--brutal {
	margin: 8px 0;
	padding: 28px 30px;

	border-left: 4px solid #111827;

	background: #f8f8f6;
}

.cb-section--brutal h2 {
	font-size: 26px;
}


/* =========================================================
   COSA FARE
   ========================================================= */

.cb-section--action {
	margin: 8px 0 24px;
	padding: 30px;

	border: 1px solid #d8e6dc;
	border-radius: 8px;

	background: #f4f8f5;
}

.cb-section--action h2 {
	margin-bottom: 14px;
}

.cb-section--action strong:first-child {
	color: #1f5132;
}


/* =========================================================
   ALTRI LIVELLI
   ========================================================= */

.cb-other-levels {
	margin-top: 16px;
}

.cb-subsection {
	font-size: 16px;
	line-height: 1.7;

	color: #263247;
}

.cb-subsection + .cb-subsection {
	margin-top: 30px;
}

.cb-subsection h3 {
	margin: 0 0 10px;

	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;

	color: #17233a;
}


/* =========================================================
   ZONE GRIGIE
   ========================================================= */

.cb-grey-area {
	margin: 50px 0;
	padding: 32px;

	border: 1px solid #d9dee7;
	border-radius: 10px;

	background: #fafafa;
}

.cb-grey-area > h2 {
	margin: 9px 0 26px;

	font-size: 27px;
	font-weight: 700;
	line-height: 1.25;

	color: #17233a;
}

.cb-grey-area .cb-subsection + .cb-subsection {
	margin-top: 34px;
}


/* =========================================================
   AGGIORNAMENTO / FONTI
   ========================================================= */

.cb-regola__footer-meta {
	display: grid;

	grid-template-columns: 1fr 2fr;

	gap: 16px;

	margin-top: 32px;
}

.cb-regola__update,
.cb-regola__sources {
	margin: 0;
	padding: 14px 16px;

	border: 1px solid #e2e6ec;
	border-radius: 8px;

	background: #f8f9fb;

	font-size: 13px;
	line-height: 1.5;

	color: #687180;
}

.cb-regola__update h2,
.cb-regola__sources h2 {
	margin: 0 0 6px;

	font-size: 13px;
	font-weight: 700;

	text-transform: uppercase;
	letter-spacing: .05em;

	color: #5f6874;
}

.cb-regola__update p,
.cb-regola__sources ul {
	margin: 0;
}

.cb-regola__sources ul {
	padding-left: 18px;
}

.cb-regola__sources a {
	font-weight: 600;

	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}


/* =========================================================
   CONTENUTO EDITORIALE
   ========================================================= */

.cb-regola__editorial-content {
	margin-top: 40px;
	padding-top: 40px;

	border-top: 1px solid #e1e5ea;

	font-size: 17px;
	line-height: 1.75;
}


/* =========================================================
   HEADER ARCHIVIO / PIATTAFORMA
   ========================================================= */

.cb-regole-index__header,
.cb-platform-index__header {
	max-width: 760px;

	margin-bottom: 48px;
}

.cb-regole-index__header h1,
.cb-platform-index__header h1 {
	margin: 8px 0 14px;

	font-size: clamp(42px, 5vw, 58px);
	font-weight: 700;
	line-height: 1;

	letter-spacing: -.035em;

	color: #14213a;
}

.cb-regole-index__header p,
.cb-platform-index__header p {
	max-width: 680px;

	margin: 0;

	font-size: 18px;
	line-height: 1.6;

	color: #596273;
}


/* =========================================================
   ARCHIVIO — ALBERO
   ========================================================= */

.cb-rules-tree {
	display: flex;
	flex-direction: column;

	gap: 46px;
}

.cb-rules-platform {
	padding-top: 26px;

	border-top: 2px solid #17233a;
}

.cb-rules-platform__title {
	margin: 0 0 22px;

	font-size: 30px;
	font-weight: 700;
	line-height: 1.15;

	color: #14213a;
}

.cb-rules-platform__content {
	display: flex;
	flex-direction: column;

	gap: 28px;

	padding-left: 24px;
}

.cb-rules-scope {
	position: relative;
}

.cb-rules-scope::before {
	content: "";

	position: absolute;

	left: -24px;
	top: 6px;
	bottom: -14px;

	width: 1px;

	background: #dce1e7;
}

.cb-rules-scope__title {
	position: relative;

	margin: 0 0 12px;

	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;

	color: #25324a;
}

.cb-rules-scope__title::before {
	content: "";

	position: absolute;

	left: -24px;
	top: 50%;

	width: 16px;
	height: 1px;

	background: #dce1e7;
}


/* =========================================================
   LISTA REGOLE
   ========================================================= */

.cb-rules-list {
	margin: 0;

	padding: 0 0 0 24px;

	list-style: none;
}

.cb-rules-list__item {
	position: relative;

	padding: 10px 0;
}

.cb-rules-list__item::before {
	content: "";

	position: absolute;

	left: -24px;
	top: 24px;

	width: 16px;
	height: 1px;

	background: #dce1e7;
}

.cb-rules-list__item::after {
	content: "";

	position: absolute;

	left: -24px;
	top: 0;
	bottom: 0;

	width: 1px;

	background: #dce1e7;
}

.cb-rules-list__item:last-child::after {
	bottom: calc(100% - 24px);
}

.cb-rules-list__main {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;

	gap: 20px;

	padding: 14px 16px;

	border: 1px solid #e2e6ec;
	border-radius: 8px;

	background: var(--ast-global-color-5);
}

.cb-rules-list__link {
	flex: 1;

	min-width: 0;

	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;

	color: #14213a;

	text-decoration: none;
}

.cb-rules-list__link:hover {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

.cb-rules-list__meta {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;

	gap: 8px;

	flex-shrink: 0;
}

.cb-rules-list__meta .cb-outcome {
	padding: 5px 8px;

	font-size: 11px;

	white-space: nowrap;
}

.cb-rules-market {
	display: inline-flex;
	align-items: center;

	padding: 5px 8px;

	border: 1px solid #d7dde7;
	border-radius: 6px;

	background: #f6f8fb;

	font-size: 11px;
	font-weight: 600;
	line-height: 1;

	color: #687180;

	white-space: nowrap;
}


/* =========================================================
   PAGINA TIKTOK
   ========================================================= */

.cb-platform-tree {
	display: flex;
	flex-direction: column;

	gap: 34px;

	padding-top: 26px;

	border-top: 2px solid #17233a;
}

.cb-platform-scope {
	position: relative;

	padding-left: 24px;
}

.cb-platform-scope::before {
	content: "";

	position: absolute;

	left: 0;
	top: 7px;
	bottom: -18px;

	width: 1px;

	background: #dce1e7;
}

.cb-platform-scope:last-child::before {
	bottom: 24px;
}

.cb-platform-scope__title {
	position: relative;

	margin: 0 0 12px;

	font-size: 30px;
	font-weight: 700;
	line-height: 1.25;

	color: #25324a;
}

.cb-platform-scope__title::before {
	content: "";

	position: absolute;

	left: -24px;
	top: 50%;

	width: 16px;
	height: 1px;

	background: #dce1e7;
}


/* =========================================================
   FOOTER PIATTAFORMA
   ========================================================= */

.cb-platform-index__footer {
	margin-top: 32px;
	padding-top: 18px;

	border-top: 1px solid #dfe5eb;
}

.cb-platform-index__all {
	font-size: 14px;
	font-weight: 700;

	color: #596273;

	text-decoration: none;
}

.cb-platform-index__all:hover {
	color: #14213a;

	text-decoration: underline;
	text-underline-offset: 4px;
}

.cb-platform-empty {
	padding: 24px;

	border: 1px solid #e2e6ec;
	border-radius: 8px;

	background: #f8f9fb;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

	.cb-kb-primary,
	.cb-regola-page {
		width: calc(100% - 24px) !important;
		max-width: none !important;
	}

	.cb-kb-box,
	.cb-regola-page > .cb-regola {
		padding: 36px 18px 64px;
	}


	.cb-back-to-rules {
		margin-bottom: 18px;
		font-size: 13px;
	}

	.cb-regola__taxonomy {
		margin-bottom: 18px;
	}

	.cb-regola__title {
		font-size: 36px;
		line-height: 1.1;
	}

	.cb-regola__status {
		align-items: flex-start;
	}

	.cb-regola__secondary-status {
		width: 100%;
	}

	.cb-regola__dates {
		flex-direction: column;
		gap: 4px;
	}

	.cb-short-answer {
		margin: 34px 0 42px;
		padding: 21px;
	}

	.cb-short-answer p {
		font-size: 18px;
	}

	.cb-section {
		padding: 32px 0;
	}

	.cb-section h2 {
		font-size: 25px;
	}

	.cb-section--brutal,
	.cb-section--action {
		padding: 22px;
	}

	.cb-grey-area {
		margin: 40px 0;
		padding: 22px;
	}

	.cb-grey-area > h2 {
		font-size: 24px;
	}

	.cb-regola__footer-meta {
		grid-template-columns: 1fr;
	}


	.cb-regole-index__header,
	.cb-platform-index__header {
		margin-bottom: 40px;
	}

	.cb-regole-index__header h1,
	.cb-platform-index__header h1 {
		font-size: 42px;
	}

	.cb-regole-index__header p,
	.cb-platform-index__header p {
		font-size: 17px;
	}


	.cb-rules-tree {
		gap: 38px;
	}

	.cb-rules-platform {
		padding-top: 22px;
	}

	.cb-rules-platform__title {
		margin-bottom: 18px;
		font-size: 27px;
	}

	.cb-rules-platform__content {
		gap: 24px;
		padding-left: 18px;
	}

	.cb-rules-scope::before {
		left: -18px;
	}

	.cb-rules-scope__title {
		font-size: 19px;
	}

	.cb-rules-scope__title::before {
		left: -18px;
		width: 12px;
	}


	.cb-platform-tree {
		gap: 28px;
		padding-top: 22px;
	}

	.cb-platform-scope {
		padding-left: 18px;
	}

	.cb-platform-scope__title {
		font-size: 24px;
	}

	.cb-platform-scope__title::before {
		left: -18px;
		width: 12px;
	}


	.cb-rules-list {
		padding-left: 18px;
	}

	.cb-rules-list__item {
		padding: 8px 0;
	}

	.cb-rules-list__item::before,
	.cb-rules-list__item::after {
		left: -18px;
	}

	.cb-rules-list__item::before {
		width: 12px;
	}

	.cb-rules-list__main {
		gap: 10px;
		padding: 12px 13px;
	}

	.cb-rules-list__link {
		flex: 1;
		min-width: 0;

		font-size: 15px;
		line-height: 1.25;
	}

	.cb-rules-list__meta {
		gap: 5px;
		flex-shrink: 0;
	}

	.cb-rules-list__meta .cb-outcome,
	.cb-rules-market {
		padding: 4px 6px;

		font-size: 9px;
		line-height: 1;

		white-space: nowrap;
	}
}

/* =========================================================
   ARCHIVI REGOLE — GERARCHIA VISIVA E CARD CLICCABILI
   ========================================================= */

/* Ambito policy: livello gerarchico sotto la piattaforma */
.cb-platform-scope__title,
.cb-rules-scope__title {
	margin: 0 0 26px;

	font-size: 25px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;

	color: #17233a;
}

/* La gerarchia è affidata a tipografia e spaziatura */
.cb-platform-scope,
.cb-rules-scope {
	padding-left: 0;
}

.cb-platform-scope::before,
.cb-rules-scope::before,
.cb-platform-scope__title::before,
.cb-rules-scope__title::before {
	display: none;
}


/* Regole generali / Regole per prodotti e attività */
.cb-rules-groups {
	display: flex;
	flex-direction: column;
	gap: 34px;
}

.cb-rules-group {
	min-width: 0;
}

.cb-rules-group__title {
	margin: 0 0 14px;
	padding-bottom: 10px;

	border-bottom: 1px solid #dce1e7;

	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;

	color: #17233a;
}


/* Lista Regole */
.cb-rules-list {
	margin: 0;
	padding: 0;

	list-style: none;
}

.cb-rules-list__item {
	position: relative;

	padding: 7px 0;
}

.cb-rules-list__item::before,
.cb-rules-list__item::after {
	display: none;
}


/* L'intera card è cliccabile */
.cb-rules-list__card {
	display: flex;
	align-items: center;
	justify-content: space-between;

	width: 100%;
	min-width: 0;

	gap: 16px;

	padding: 15px 16px;

	border: 1px solid #e2e6ec;
	border-radius: 8px;

	background: var(--ast-global-color-5);

	color: inherit;
	text-decoration: none;

	cursor: pointer;

	transition:
		border-color 160ms ease,
		background-color 160ms ease;
}

.cb-rules-list__card:visited {
	color: inherit;
}

.cb-rules-list__card:hover {
	border-color: #b8c4d4;
	background: #f8fbff;

	text-decoration: none;
}

.cb-rules-list__card:focus-visible {
	outline: 2px solid #0b63f6;
	outline-offset: 3px;
}

.cb-rules-list__link {
	flex: 1;
	min-width: 0;

	font-size: 17px;
	font-weight: 650;
	line-height: 1.35;

	color: #14213a;
	text-decoration: none;

	transition: color 160ms ease;
}

.cb-rules-list__card:hover .cb-rules-list__link {
	color: #0b63f6;

	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

.cb-rules-list__meta {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;

	gap: 8px;

	flex-shrink: 0;
}

.cb-rules-list__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	flex: 0 0 auto;

	min-width: 22px;

	font-size: 20px;
	font-weight: 700;
	line-height: 1;

	color: #526176;

	transition:
		color 160ms ease,
		transform 160ms ease;
}

.cb-rules-list__card:hover .cb-rules-list__arrow {
	color: #0b63f6;
	transform: translateX(3px);
}


/* Più respiro tra piattaforma, ambito e gruppi */
.cb-rules-platform__content {
	gap: 34px;
}

.cb-platform-tree {
	gap: 42px;
}


/* =========================================================
   ARCHIVI REGOLE — MOBILE
   ========================================================= */

@media (max-width: 767px) {

	.cb-platform-scope,
	.cb-rules-scope {
		padding-left: 0;
	}

	.cb-platform-scope__title,
	.cb-rules-scope__title {
		margin-bottom: 18px;

		font-size: 22px;
	}

	.cb-rules-groups {
		gap: 28px;
	}

	.cb-rules-group__title {
		margin-bottom: 10px;

		font-size: 19px;
	}

	.cb-rules-list {
		padding-left: 0;
	}

	.cb-rules-list__item {
		padding: 6px 0;
	}

	.cb-rules-list__card {
		flex-wrap: wrap;

		gap: 10px 12px;

		padding: 13px 14px;
	}

	.cb-rules-list__link {
		flex: 1 1 calc(100% - 40px);

		font-size: 15px;
		line-height: 1.3;
	}

	.cb-rules-list__meta {
		order: 3;

		flex: 1 1 auto;
		flex-wrap: wrap;

		gap: 5px;
	}

	.cb-rules-list__arrow {
		order: 2;

		margin-left: auto;

		font-size: 18px;
	}

	.cb-rules-list__meta .cb-outcome,
	.cb-rules-market {
		font-size: 9px;
	}

}

@media (prefers-reduced-motion: reduce) {

	.cb-rules-list__card,
	.cb-rules-list__link,
	.cb-rules-list__arrow {
		transition: none;
	}

	.cb-rules-list__card:hover .cb-rules-list__arrow {
		transform: none;
	}

}

