/* /risorse/linguaggio-del-gatto/: chapter links, «Leggi il gatto», author box. */

/* ── Leggi il gatto ── */
.rete-lg-tool {
	padding: 4.5rem 1.5rem;
	background: var(--rete-primary-light);
}
.rete-lg-tool__inner {
	max-width: 1140px;
	margin: 0 auto;
}
.rete-lg-tool__head {
	max-width: 640px;
	margin: 0 auto 2.5rem;
	text-align: center;
}
.rete-lg-tool__head h2 {
	margin: 0 0 .75rem;
}
.rete-lg-tool__head p:last-child {
	margin: 0;
}
.rete-lg-tool__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: 1.5rem;
	align-items: start;
}
.rete-lg-stage,
.rete-lg-controls {
	padding: 1.5rem;
	border-radius: var(--rete-radius);
	background: var(--rete-card);
	box-shadow: var(--rete-shadow-card);
}
.rete-lg-cat {
	display: block;
	width: 100%;
	height: auto;
}
.rete-lg-cat [data-g] {
	opacity: 0;
	transition: opacity .18s ease;
}
.rete-lg-cat [data-g].is-on {
	opacity: 1;
}
.rete-lg-hiss {
	display: none;
}
[data-level="3"] .rete-lg-hiss {
	display: block;
}
[data-level="3"] .rete-lg-mouth {
	display: none;
}

.rete-lg-result {
	--mood: #00767A;
	margin-top: 1rem;
	padding: 1rem 1.25rem;
	border-left: 5px solid var(--mood);
	border-radius: .5rem;
	background: var(--rete-surface);
}
[data-level="1"] .rete-lg-result { --mood: var(--rete-primary-dark); }
[data-level="2"] .rete-lg-result { --mood: #92400E; }
[data-level="3"] .rete-lg-result { --mood: #B91C1C; }
.rete-lg-result p {
	margin: 0 0 .5rem;
}
.rete-lg-result__mood {
	color: var(--mood);
	font-family: var(--wp--preset--font-family--lora, Georgia, serif);
	font-size: 1.4rem;
	font-weight: 700;
	line-height: 1.25;
}
.rete-lg-result__mixed {
	font-weight: 700;
}
.rete-lg-result__list {
	margin: .75rem 0 0;
	padding-left: 1.1rem;
	color: var(--rete-text-muted);
	font-size: .95rem;
}
.rete-lg-result__list li + li {
	margin-top: .3rem;
}

.rete-lg-presets {
	margin-bottom: 1.25rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--rete-border);
}
.rete-lg-presets p,
.rete-lg-controls legend {
	margin: 0 0 .5rem;
	padding: 0;
	color: var(--rete-text);
	font-weight: 800;
}
.rete-lg-presets div {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
}
.rete-lg-presets button {
	padding: .4rem .85rem;
	border: 0;
	border-radius: 999px;
	background: var(--rete-primary-dark);
	color: #fff;
	font: inherit;
	font-size: .9rem;
	font-weight: 700;
	cursor: pointer;
}
.rete-lg-presets button:hover {
	background: var(--rete-primary-darker);
}
.rete-lg-presets button:active,
.rete-lg-controls label:active span {
	transform: translateY(1px);
}
.rete-lg-controls fieldset {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	min-width: 0;
	margin: 0 0 1.1rem;
	padding: 0;
	border: 0;
}
.rete-lg-controls fieldset:last-child {
	margin-bottom: 0;
}
.rete-lg-controls legend {
	float: left;
	width: 100%;
}
.rete-lg-controls label {
	position: relative;
	cursor: pointer;
}
.rete-lg-controls input {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}
.rete-lg-controls label span {
	display: block;
	padding: .4rem .8rem;
	border: 1.5px solid var(--rete-border);
	border-radius: 999px;
	background: var(--rete-card);
	font-size: .92rem;
}
.rete-lg-controls label:hover span {
	border-color: var(--rete-primary);
}
.rete-lg-controls input:checked + span {
	border-color: var(--rete-accent-text);
	background: var(--rete-accent-light);
	color: var(--rete-text);
	font-weight: 700;
}
.rete-lg-controls input:focus-visible + span,
.rete-lg-presets button:focus-visible {
	outline: 3px solid var(--rete-accent-text);
	outline-offset: 2px;
}
.rete-lg-tool__note {
	max-width: 760px;
	margin: 1.5rem auto 0;
	color: var(--rete-text-muted);
	font-size: .92rem;
	text-align: center;
}

@media (max-width: 900px) {
	.rete-lg-tool {
		padding: 3rem 1rem;
	}
	.rete-lg-tool__grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.rete-lg-stage,
	.rete-lg-controls {
		padding: 1rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rete-lg-cat [data-g],
	.rete-lg-books img {
		transition: none;
	}
	.rete-lg-books a:hover img {
		transform: none;
	}
}

/* image-text colours its heading with the accent: match the other chapter titles. */
#vibrisse h2 {
	color: var(--rete-text);
}

/* Signal cards: the block gives images a 200px box with padding, which leaves
   the illustrations tiny. Here they fill the top of the card as a square. */
.rete-lg-signals .cs-tool-img {
	height: auto;
	aspect-ratio: 1;
	background: #F8F7F5;
}
.rete-lg-signals .cs-tool-img img {
	width: 100%;
	height: 100%;
	padding: 0;
	object-fit: cover;
}
/* Two-column grid (the pupils): a square would be 560px tall. */
.rete-lg-signals:not(.rete-lg-signals--row) .cs-tools-grid--cols-2 .cs-tool-img {
	aspect-ratio: 16 / 10;
}
/* Tail cards are rows: a fixed square on the left. */
.rete-lg-signals--row .cs-tool-card {
	align-items: stretch;
}
.rete-lg-signals--row .cs-tool-img {
	flex: 0 0 190px;
	width: 190px;
	aspect-ratio: auto;
	border-radius: 18px 0 0 18px;
}
@media (max-width: 600px) {
	.rete-lg-signals--row .cs-tool-img {
		flex-basis: 120px;
		width: 120px;
	}
}

/* ── Author box ── */
.rete-page-content > .rete-lg-author {
	margin-top: 4rem;
	margin-bottom: 4.5rem;
}
.rete-lg-author__card {
	padding: 2.25rem;
	border-radius: var(--rete-radius);
	background: var(--rete-surface);
	border: 1px solid var(--rete-border);
}
.rete-lg-author__bio {
	display: grid;
	grid-template-columns: 160px minmax(0, 1fr);
	gap: 2rem;
	align-items: center;
}
.rete-lg-author__bio img {
	width: 160px;
	height: 160px;
	border-radius: 50%;
	object-fit: cover;
	border: 5px solid var(--rete-accent);
}
.rete-lg-author__label {
	margin: 0 0 .25rem;
	color: var(--rete-primary-dark);
	font-size: .85rem;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.rete-lg-author h2 {
	margin: 0;
}
.rete-lg-author__role {
	margin: .15rem 0 .75rem;
	color: var(--rete-text-muted);
	font-weight: 700;
}
.rete-lg-author__bio p:last-child {
	margin-bottom: 0;
}
.rete-lg-author blockquote {
	margin: .9rem 0;
	padding: 0;
	border: 0;
	color: var(--rete-primary-dark);
	font-family: var(--wp--preset--font-family--lora, Georgia, serif);
	font-size: 1.15rem;
	font-style: italic;
}
.rete-lg-author h3 {
	margin: 2.25rem 0 1rem;
	font-size: 1.2rem;
}
.rete-lg-books {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.rete-lg-books a {
	display: block;
	color: var(--rete-text);
	font-size: .92rem;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
}
.rete-lg-books img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 2 / 3;
	margin-bottom: .55rem;
	border-radius: .35rem;
	object-fit: cover;
	box-shadow: var(--rete-shadow-card);
	transition: transform .18s ease;
}
.rete-lg-books a:hover img {
	transform: translateY(-3px);
}
.rete-lg-books small {
	display: block;
	margin-top: .15rem;
	color: var(--rete-link-ext);
	font-size: .82rem;
}
.rete-lg-author__note {
	margin: 1.5rem 0 0;
	color: var(--rete-text-muted);
	font-size: .9rem;
}

@media (max-width: 640px) {
	.rete-lg-author__card {
		padding: 1.25rem;
	}
	.rete-lg-author__bio {
		grid-template-columns: minmax(0, 1fr);
		gap: 1rem;
		justify-items: center;
		text-align: center;
	}
}

/* Seven covers: one row on desktop, a swipeable strip below that. */
@media (max-width: 900px) {
	.rete-lg-books {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: 38%;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		padding-bottom: .5rem;
	}
	.rete-lg-books li {
		scroll-snap-align: start;
	}
	.rete-lg-books-dots {
		display: flex;
		justify-content: center;
		gap: 0;
		margin-top: .5rem;
	}
}
@media (min-width: 901px) {
	.rete-lg-books-dots {
		display: none;
	}
}
.rete-lg-books-dots button {
	box-sizing: content-box;
	width: 8px;
	height: 8px;
	padding: 6px; /* a bigger tap target around the 8px dot */
	border: 0;
	border-radius: 50%;
	background: var(--rete-border);
	background-clip: content-box; /* after the shorthand, which resets it */
	cursor: pointer;
}
.rete-lg-books-dots button.is-active {
	background-color: var(--rete-primary-dark);
}
.rete-lg-books-dots button:focus-visible {
	outline: 3px solid var(--rete-accent-text);
	outline-offset: 2px;
}
