/* =========================================================================
   calcolatoritalia.it - style.css
   Design system + componenti + responsive + slot pubblicitari
   Concept: "calcolatrice + scontrino" - LCD, tasti, cifre monospace.
   ========================================================================= */

/* ---------------------------------------------------------------- Tokens */
:root {
	/* superfici */
	--paper: #f6f5f0;
	--surface: #ffffff;
	--surface-2: #fbfaf6;
	--ink: #12211c;
	--muted: #5a6b63;
	--line: #e4e6df;
	--line-strong: #d3d7cd;

	/* brand */
	--green: #0c5c4b;
	--green-700: #094436;
	--green-600: #0c5c4b;
	--green-500: #14735d;
	--green-100: #e2efe9;
	--green-050: #eff6f2;

	--amber: #e9a23b;
	--amber-700: #c9821c;
	--amber-100: #fbeed6;

	--red: #c4362f;
	--red-100: #f7e0de;

	/* display LCD */
	--lcd-bg: #0f3a30;
	--lcd-ink: #d8f5e9;
	--lcd-dim: #6fae9c;

	/* raggi / ombre */
	--r-sm: 8px;
	--r-md: 12px;
	--r-lg: 16px;
	--r-xl: 22px;
	--shadow-1: 0 1px 2px rgba(18, 33, 28, .06), 0 1px 3px rgba(18, 33, 28, .05);
	--shadow-2: 0 6px 18px rgba(18, 33, 28, .08);
	--shadow-3: 0 16px 40px rgba(18, 33, 28, .12);
	--key-shadow: 0 2px 0 var(--line-strong), 0 4px 10px rgba(18, 33, 28, .06);

	/* tipografia */
	--font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
	--font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

	/* misure */
	--wrap: 1200px;
	--wrap-narrow: 940px;
	--gutter: clamp(1rem, 3vw, 2rem);
	--header-h: 68px;
}

/* ---------------------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
	font-family: var(--font-body);
	color: var(--ink);
	background: var(--paper);
	line-height: 1.6;
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

img, svg { display: block;  }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, button { font-family: inherit; }

:focus-visible {
	outline: 3px solid var(--amber);
	outline-offset: 2px;
	border-radius: 4px;
}

/* ---------------------------------------------------------------- Layout */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: var(--wrap-narrow); }
.main { flex: 1 0 auto; }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.stack > * + * { margin-top: 1rem; }
.visually-hidden {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* eyebrow / titoli sezione */
.eyebrow {
	display: inline-flex; align-items: center; gap: .5rem;
	font-family: var(--font-mono);
	font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
	color: var(--green-500); font-weight: 600;
}
.eyebrow::before {
	content: ""; width: 26px; height: 2px; background: var(--amber); border-radius: 2px;
}
.section-head { margin-bottom: 1.75rem; }
.section-head h2 {
	font-family: var(--font-display);
	font-weight: 700; letter-spacing: -.02em; line-height: 1.05;
	font-size: clamp(1.6rem, 3.4vw, 2.35rem);
	margin-top: .55rem;
}
.section-head p { color: var(--muted); max-width: 60ch; margin-top: .5rem; }

/* =============================================================== HEADER */
.site-header {
	position: sticky; top: 0; z-index: 60;
	background: rgba(246, 245, 240, .88);
	backdrop-filter: saturate(140%) blur(10px);
	border-bottom: 1px solid var(--line);
}
.header-bar {
	height: var(--header-h);
	display: flex; align-items: center; gap: 1.25rem;
}

/* logo: wordmark con "display" a scomparsa */
.brand { display: inline-flex; align-items: center; gap: .6rem; flex: 0 0 auto; }
.brand__mark {
	width: 34px; height: 34px; border-radius: 9px;
	background: var(--green); color: #fff;
	display: grid; place-items: center;
	font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem;
	box-shadow: var(--shadow-1);
	position: relative;
}
.brand__mark::after {
	content: ""; position: absolute; right: 5px; bottom: 5px;
	width: 6px; height: 6px; border-radius: 50%; background: var(--amber);
}
.brand__name {
	font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em;
	font-size: 1.22rem; color: var(--ink); line-height: 1;
}
.brand__name b { color: var(--green); font-weight: 700; }

.header-nav { display: flex; align-items: center; gap: .35rem; margin-left: auto; flex-wrap: nowrap; overflow: hidden; }
.nav-link {
	padding: .5rem .8rem; border-radius: var(--r-sm);
	color: var(--ink); font-weight: 500; font-size: .95rem;
	transition: background .15s ease, color .15s ease;
}
.nav-link:hover { background: var(--green-050); color: var(--green-700); }
/* mobile-only: ricerca e categorie complete, nascoste su desktop */
.mobile-search { display: none; }
.nav-link--mobile { display: none; }
.nav-link--desk-only { display: inline-flex; }

.header-search {
	position: relative; flex: 1 1 320px; margin-left: .5rem; max-width: 420px;
}
.header-search input {
	width: 100%; height: 44px; padding: 0 .9rem 0 2.5rem;
	border: 2px solid var(--green); border-radius: 999px;
	background: var(--surface); color: var(--ink); font-size: .95rem;
	transition: border-color .15s, box-shadow .15s;
}
.header-search input::placeholder { color: var(--muted); font-size: .92rem; }
.header-search input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px var(--green-050); }
.header-search svg { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); }

.nav-toggle {
	display: none; margin-left: auto;
	width: 42px; height: 42px; border: 1px solid var(--line-strong);
	border-radius: var(--r-sm); background: var(--surface);
	align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
	content: ""; display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px;
	transition: transform .2s ease;
}
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after { transform: translateY(4px); }

/* =============================================================== HERO */
.hero { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 2.5vw, 2rem); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero__title {
	font-family: var(--font-display); font-weight: 700;
	font-size: clamp(2.1rem, 5.2vw, 3.5rem); line-height: 1.02; letter-spacing: -.03em;
}
.hero__title em { font-style: normal; color: var(--green); position: relative; white-space: nowrap; }
.hero__title em::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: .04em; height: .34em;
	background: var(--amber-100); z-index: -1; border-radius: 3px;
}
.hero__sub { color: var(--muted); font-size: clamp(1.02rem, 1.4vw, 1.18rem); max-width: 44ch; margin-top: 1.1rem; }

.hero__stats { display: flex; gap: 1.75rem; margin-top: 1.75rem; flex-wrap: wrap; }
.hero__stat b { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 600; color: var(--ink); display: block; letter-spacing: -.02em; }
.hero__stat span { font-size: .85rem; color: var(--muted); }

/* display LCD di ricerca - l'elemento firma */
.lcd {
	background:
		linear-gradient(180deg, rgba(255,255,255,.05), transparent 40%),
		var(--lcd-bg);
	border-radius: var(--r-xl);
	padding: 1.4rem 1.4rem 1.6rem;
	box-shadow: var(--shadow-3), inset 0 0 0 1px rgba(255,255,255,.06), inset 0 2px 20px rgba(0,0,0,.35);
	position: relative;
	overflow: hidden;
}
.lcd::before { /* scanline sottilissima */
	content: ""; position: absolute; inset: 0;
	background: repeating-linear-gradient(180deg, rgba(255,255,255,.03) 0 2px, transparent 2px 4px);
	pointer-events: none; opacity: .5;
}
.lcd__label {
	font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em;
	text-transform: uppercase; color: var(--lcd-dim); margin-bottom: .6rem;
	display: flex; align-items: center; justify-content: space-between;
}
.lcd__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.lcd__field { position: relative; }
.lcd__field input {
	width: 100%; height: 60px; padding: 0 1rem 0 3rem;
	background: rgba(0,0,0,.25); border: 1px solid rgba(216,245,233,.14);
	border-radius: var(--r-md); color: var(--lcd-ink);
	font-family: var(--font-mono); font-size: 1.15rem; letter-spacing: .01em;
}
.lcd__field input::placeholder { color: var(--lcd-dim); }
.lcd__field input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(233,162,59,.25); }
.lcd__field svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--lcd-dim); }

.lcd__hint { margin-top: .85rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.lcd__chip {
	font-family: var(--font-mono); font-size: .8rem;
	color: var(--lcd-ink); background: rgba(216,245,233,.08);
	border: 1px solid rgba(216,245,233,.16); border-radius: 999px;
	padding: .3rem .7rem; transition: background .15s, border-color .15s;
}
.lcd__chip:hover { background: rgba(216,245,233,.16); border-color: var(--amber); }

/* live suggestions */
.lcd__results {
	margin-top: .75rem; background: var(--surface); border-radius: var(--r-md);
	box-shadow: var(--shadow-2); overflow: hidden; display: none;
}
.lcd__results.is-open { display: block; }
.lcd__result {
	display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem;
	border-bottom: 1px solid var(--line); color: var(--ink);
}
.lcd__result:last-child { border-bottom: 0; }
.lcd__result:hover, .lcd__result:focus { background: var(--green-050); }
.lcd__result mark { background: var(--amber-100); color: inherit; padding: 0 1px; border-radius: 2px; }
.lcd__result .cat { margin-left: auto; font-size: .72rem; color: var(--muted); font-family: var(--font-mono); }

/* =============================================================== FILTRI */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.filter-chip {
	border: 1px solid var(--line-strong); background: var(--surface);
	color: var(--ink); border-radius: 999px; padding: .45rem .95rem;
	font-size: .9rem; font-weight: 500; transition: all .15s ease;
}
.filter-chip:hover { border-color: var(--green); color: var(--green-700); }
.filter-chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }

/* =============================================================== GRIGLIA CALCOLATORI */
.cat-block { margin-top: 2.5rem; }
.cat-block__head { display: flex; align-items: baseline; gap: .75rem; margin-bottom: 1rem; }
.cat-block__head h3 {
	font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.01em;
}
.cat-block__count { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }

/* card = tasto della calcolatrice */
.calc-card {
	display: flex; flex-direction: column; gap: .5rem;
	background: var(--surface); border: 1px solid var(--line);
	border-radius: var(--r-lg); padding: 1.15rem;
	box-shadow: var(--key-shadow);
	transition: transform .16s ease, box-shadow .16s ease, border-color .16s;
	position: relative; height: 100%;
}
.calc-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 0 var(--line-strong), 0 12px 24px rgba(18,33,28,.10);
	border-color: var(--green-100);
}
.calc-card:active { transform: translateY(0); box-shadow: var(--shadow-1); }
.calc-card__icon {
	width: 42px; height: 42px; border-radius: 11px;
	background: var(--green-050); color: var(--green);
	display: grid; place-items: center; flex: 0 0 auto;
}
.calc-card__title { font-weight: 600; font-size: 1.05rem; letter-spacing: -.01em; }
.calc-card__desc { color: var(--muted); font-size: .88rem; line-height: 1.45; flex: 1 0 auto; }
.calc-card__foot { display: flex; align-items: center; gap: .5rem; margin-top: .3rem; }
.calc-card__cta { font-family: var(--font-mono); font-size: .82rem; color: var(--green-700); font-weight: 600; }
.calc-card__cta::after { content: "  ->"; }

.badge {
	font-family: var(--font-mono); font-size: .68rem; letter-spacing: .04em;
	padding: .18rem .5rem; border-radius: 999px; font-weight: 600; text-transform: uppercase;
}
.badge--hot { background: var(--red-100); color: var(--red); }
.badge--soon { background: var(--amber-100); color: var(--amber-700); }
.badge--new { background: var(--green-100); color: var(--green-700); }
.calc-card__badge { position: absolute; top: 1rem; right: 1rem; }

.no-results {
	display: none; text-align: center; padding: 3rem 1rem; color: var(--muted);
	font-family: var(--font-mono);
}
.no-results.is-shown { display: block; }

/* =============================================================== PAGINA CALCOLATORE */
.breadcrumb { font-size: .85rem; color: var(--muted); padding-block: 1.25rem .25rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--green-700); }
.breadcrumb span { color: var(--line-strong); }

.calc-hero h1 {
	font-family: var(--font-display); font-weight: 700; letter-spacing: -.025em; line-height: 1.05;
	font-size: clamp(1.8rem, 4vw, 2.7rem); margin-top: .35rem;
}
.calc-hero p { color: var(--muted); max-width: 62ch; margin-top: .6rem; }

.calc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; align-items: start; margin-top: 2rem; }

/* pannello calcolo */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-2); overflow: hidden; }
.panel__head { padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .6rem; }
.panel__head h2 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; }
.panel__body { padding: 1.4rem; }

.calc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .88rem; font-weight: 600; color: var(--ink); }
.field .hint { font-size: .78rem; color: var(--muted); }
.control { position: relative; display: flex; align-items: center; }
.control__prefix, .control__suffix {
	position: absolute; font-family: var(--font-mono); color: var(--muted); font-size: .95rem; pointer-events: none;
}
.control__prefix { left: .9rem; }
.control__suffix { right: .9rem; }
.input, .select {
	width: 100%; height: 50px; padding: 0 .95rem;
	border: 1px solid var(--line-strong); border-radius: var(--r-md);
	background: var(--surface); color: var(--ink);
	font-family: var(--font-mono); font-size: 1rem;
	transition: border-color .15s, box-shadow .15s;
}
.control--money .input { padding-left: 2.1rem; }
.control--pct .input { padding-right: 2.2rem; }
.input:focus, .select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px var(--green-050); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235a6b63' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.4rem; }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 3px; gap: 3px; }
.seg button {
	border: 0; background: transparent; padding: .5rem .9rem; border-radius: 9px;
	font-family: var(--font-mono); font-size: .9rem; color: var(--muted); font-weight: 600;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--green-700); box-shadow: var(--shadow-1); border: 1px solid rgba(34, 197, 94, 0.25); border-radius: 8px;  }

.calc-actions { grid-column: 1 / -1; display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .25rem; }
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	height: 52px; padding: 0 1.5rem; border: 0; border-radius: var(--r-md);
	font-weight: 600; font-size: 1rem; transition: background .15s, transform .1s, box-shadow .15s;
}
.btn--primary { background: var(--green); color: #fff; box-shadow: var(--shadow-2); flex: 1 1 auto; }
.btn--primary:hover { background: var(--green-700); }
.btn--primary:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn--ghost:hover { border-color: var(--green); color: var(--green-700); }

/* scontrino risultato */
.receipt {
	margin-top: 1.4rem; background: var(--lcd-bg); color: var(--lcd-ink);
	border-radius: var(--r-xl); padding: 1.5rem; box-shadow: var(--shadow-3);
	position: relative; overflow: hidden;
}
.receipt::before {
	content: ""; position: absolute; inset: 0;
	background: repeating-linear-gradient(180deg, rgba(255,255,255,.03) 0 2px, transparent 2px 4px);
	pointer-events: none; opacity: .5;
}
.receipt__label { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--lcd-dim); }
.receipt__big { font-family: var(--font-mono); font-size: clamp(2.2rem, 7vw, 3.2rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin: .3rem 0 .1rem; }
.receipt__big small { font-size: .95rem; color: var(--lcd-dim); font-weight: 500; }
.receipt__note { color: var(--lcd-dim); font-size: .85rem; }
.receipt__rows { margin-top: 1.2rem; border-top: 1px dashed rgba(216,245,233,.25); padding-top: 1rem; display: grid; gap: .55rem; }
.receipt__row { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-mono); font-size: .92rem; }
.receipt__row span:first-child { color: var(--lcd-dim); }
.receipt__row.total { border-top: 1px dashed rgba(216,245,233,.25); margin-top: .4rem; padding-top: .7rem; font-size: 1.05rem; }
.receipt__row.total span:last-child { color: #fff; font-weight: 700; }

.disclaimer {
	margin-top: 1rem; font-size: .82rem; color: var(--muted);
	background: var(--amber-100); border: 1px solid #f0dcb2; border-radius: var(--r-md);
	padding: .8rem 1rem; display: flex; gap: .6rem;
}
.disclaimer svg { flex: 0 0 auto; color: var(--amber-700); margin-top: 1px; }

/* contenuto SEO / FAQ */
.prose { margin-top: 2.5rem; max-width: 68ch; }
.prose h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; margin: 2rem 0 .75rem; }
.prose h3 { font-size: 1.1rem; font-weight: 700; margin: 1.5rem 0 .5rem; }
.prose p { color: #33413b; margin-bottom: 1rem; }
.prose ul { margin: 0 0 1rem 1.2rem; color: #33413b; }
.prose li { margin-bottom: .4rem; }

.faq details { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); margin-bottom: .75rem; overflow: hidden; }
.faq summary { padding: 1rem 1.2rem; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); font-size: 1.4rem; color: var(--green); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > p { padding: 0 1.2rem 1.1rem; color: #33413b; margin: 0; }

/* sidebar */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: calc(var(--header-h) + 1rem); }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.2rem; box-shadow: var(--shadow-1); }
.side-card h4 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; margin-bottom: .8rem; }
.side-list { list-style: none; display: grid; gap: .2rem; }
.side-list a { display: flex; align-items: center; gap: .6rem; padding: .55rem .5rem; border-radius: var(--r-sm); font-size: .92rem; transition: background .15s; }
.side-list a:hover { background: var(--green-050); color: var(--green-700); }
.side-list .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); flex: 0 0 auto; }

/* =============================================================== SLOT PUBBLICITARI */
/* Spazio SEMPRE riservato per non generare layout shift (CLS) - requisito
   di fatto per Core Web Vitals e per una buona esperienza AdSense.
   Incollare lo <ins class="adsbygoogle"> dentro .ad__inner. */
.ad { margin-inline: auto; }
.ad__label {
	font-family: var(--font-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
	color: var(--muted); text-align: center; margin-bottom: .35rem; opacity: .8;
}
.ad__inner {
	display: grid; place-items: center;
	background: var(--surface-2);
	border: 1px dashed var(--line-strong); border-radius: var(--r-md);
	color: var(--line-strong); overflow: hidden;
}
.ad__inner::after { content: "SPAZIO PUBBLICITARIO"; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; color: #b9bdb2; }
.ad__inner:not(:empty)::after { content: none; } /* sparisce quando c'e' l'annuncio */

/* formati IAB, con altezza riservata responsive */
.ad--leaderboard .ad__inner { width: 100%; max-width: 728px; height: 90px; }
.ad--billboard   .ad__inner { width: 100%; max-width: 970px; height: 250px; }
.ad--rectangle   .ad__inner { width: 100%; max-width: 336px; height: 280px; }
.ad--sky         .ad__inner { width: 300px; height: 600px; }
.ad--infeed      { grid-column: 1 / -1; }
.ad--infeed .ad__inner { width: 100%; min-height: 110px; }

.ad--block { margin-block: clamp(1.5rem, 4vw, 2.5rem); }

@media (max-width: 767px) {
	.ad--leaderboard .ad__inner,
	.ad--billboard .ad__inner { max-width: 320px; height: 100px; }
	.ad--sky { display: none; } /* niente skyscraper su mobile */
}

/* =============================================================== FOOTER */
.site-footer { background: var(--ink); color: #cfd8d3; margin-top: clamp(3rem, 6vw, 5rem); }
.footer-tricolor { height: 4px; background: linear-gradient(90deg, #0c5c4b 0 33.3%, #f6f5f0 33.3% 66.6%, #c4362f 66.6% 100%); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; padding-block: 3rem 2rem; }
.footer-brand .brand__name { color: #fff; }
.footer-brand p { color: #96a39c; font-size: .9rem; margin-top: .8rem; max-width: 34ch; }
.footer-col h5 { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: #7f8e87; margin-bottom: .9rem; }
.footer-col ul { list-style: none; display: grid; gap: .5rem; }
.footer-col a { color: #cfd8d3; font-size: .92rem; transition: color .15s; }
.footer-col a:hover { color: var(--amber); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-block: 1.25rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: #7f8e87; }
.footer-bottom a { color: #96a39c; }
.footer-bottom a:hover { color: var(--amber); }

/* =============================================================== COOKIE */
.cookie {
	position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 90;
	max-width: 560px; margin-inline: auto;
	background: var(--surface); border: 1px solid var(--line-strong);
	border-radius: var(--r-lg); box-shadow: var(--shadow-3);
	padding: 1.1rem 1.25rem; display: none;
}
.cookie.is-shown { display: block; }
.cookie p { font-size: .88rem; color: var(--muted); }
.cookie p a { color: var(--green-700); text-decoration: underline; }
.cookie__actions { display: flex; gap: .6rem; margin-top: .9rem; flex-wrap: wrap; }
.cookie .btn { height: 42px; font-size: .9rem; flex: 0 0 auto; }

/* =============================================================== SEARCH-TOGGLE (lente mobile) */
.search-toggle {
	display: none; /* nascosto su desktop dove c'e' .header-search */
	align-items: center; justify-content: center;
	width: 42px; height: 42px; flex: 0 0 auto;
	background: none; border: none; border-radius: var(--r-md);
	color: var(--ink); cursor: pointer; padding: 0;
	transition: color .15s, background .15s;
}
.search-toggle:hover { background: var(--green-050); color: var(--green-700); }

/* =============================================================== SEARCH OVERLAY (mobile) */
.search-overlay-backdrop {
	position: fixed; inset: 0; z-index: 998;
	background: rgba(0,0,0,.25);
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
	opacity: 0; visibility: hidden;
	transition: opacity .3s ease, visibility .3s ease;
}
.search-overlay-backdrop.is-open { opacity: 1; visibility: visible; }

.search-overlay {
	position: fixed; top: var(--header-h, 68px); left: 0; right: 0;
	z-index: 999;
	background: var(--surface);
	box-shadow: 0 12px 40px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
	transform: translateY(-110%);
	opacity: 0; visibility: hidden;
	transition: transform .35s cubic-bezier(.22,1,.36,1), opacity .25s ease, visibility .25s ease;
}
.search-overlay.is-open {
	transform: translateY(0);
	opacity: 1; visibility: visible;
}
.search-overlay__inner {
	max-width: 640px; margin: 0 auto;
	padding: 1.1rem var(--gutter, 16px) 1rem;
}
.search-overlay__field {
	position: relative; display: flex; align-items: center;
}
.search-overlay__field svg {
	position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
	color: var(--green); pointer-events: none; z-index: 1;
}
.search-overlay__field input {
	width: 100%; height: 52px;
	padding: 0 3rem 0 3rem;
	border: 2px solid var(--green); border-radius: 999px;
	background: var(--surface); color: var(--ink);
	font-size: 1.05rem; font-family: var(--font-body);
	transition: border-color .2s, box-shadow .2s;
}
.search-overlay__field input:focus {
	outline: none; border-color: var(--green-700);
	box-shadow: 0 0 0 4px var(--green-050), 0 4px 16px rgba(0,0,0,.06);
}
.search-overlay__field input::placeholder { color: var(--muted); }
.search-overlay__close {
	position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
	width: 36px; height: 36px;
	display: flex; align-items: center; justify-content: center;
	background: none; border: none; border-radius: 50%;
	color: var(--muted); font-size: 1.3rem; cursor: pointer;
	transition: color .15s, background .15s;
}
.search-overlay__close:hover { background: var(--green-050); color: var(--green-700); }
.search-overlay__results {
	margin-top: .5rem; max-height: 50vh; overflow-y: auto;
	border-radius: var(--r-md);
}
.search-overlay__results:empty { display: none; }
.search-overlay__result {
	display: flex; align-items: center; justify-content: space-between;
	padding: .75rem 1rem; gap: .6rem;
	text-decoration: none; color: var(--ink);
	border-bottom: 1px solid var(--line);
	transition: background .12s;
}
.search-overlay__result:last-child { border-bottom: 0; }
.search-overlay__result:hover,
.search-overlay__result.is-active { background: var(--green-050); }
.search-overlay__result .title { font-weight: 600; font-size: .95rem; }
.search-overlay__result .title mark { background: var(--green-100); color: var(--green-900); border-radius: 2px; padding: 0 1px; }
.search-overlay__result .cat { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.search-overlay__hint {
	padding: .6rem 0 0;
	font-size: .82rem; color: var(--muted); text-align: center;
}
.search-overlay__hint kbd {
	display: inline-block; padding: .1em .4em; border: 1px solid var(--line);
	border-radius: 4px; font-family: var(--font-mono); font-size: .78rem;
	background: var(--bg); color: var(--ink);
}

/* =============================================================== RESPONSIVE */
/* laptop grande: nascondi ultima categoria */
@media (max-width: 1400px) {
	.header-nav .nav-link--cat:nth-child(n+4) { display: none; } /* mostra solo 3 categorie */
}
/* laptop: solo 2 categorie + ricerca prominente */
@media (max-width: 1200px) {
	.header-nav .nav-link--cat:nth-child(n+3) { display: none; } /* mostra solo 2 categorie */
	.header-search { flex: 1 1 280px; }
}
/* tablet: solo 1 categoria */
@media (max-width: 1024px) {
	.header-nav .nav-link--cat:nth-child(n+2) { display: none; } /* mostra solo 1 categoria */
	.cat-block { margin-top: 1.5rem; }
}
@media (max-width: 900px) {
	.hero__grid { grid-template-columns: 1fr; }
	.calc-layout { grid-template-columns: 1fr; }
	.sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
	.sidebar .side-card { flex: 1 1 260px; }
	.sidebar .ad { flex: 1 1 100%; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
	.header-search { display: none; }
	.header-nav { display: none; }
	.header-nav.is-open {
		display: flex; position: absolute; top: var(--header-h); left: 0; right: 0;
		flex-direction: column; align-items: stretch; gap: 0;
		background: var(--surface); border-bottom: 1px solid var(--line);
		padding: 0 var(--gutter) 1rem; box-shadow: var(--shadow-2);
		z-index: 70; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
	}
	/* nel menu aperto: nascondo le cat desktop, mostro quelle mobile + ricerca */
	.header-nav.is-open .nav-link--cat { display: none; }
	.header-nav.is-open .nav-link--desk-only { display: none; }
	.header-nav.is-open .nav-link--mobile { display: flex; padding: .85rem .6rem; font-size: 1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
	.header-nav.is-open .nav-link--mobile:last-child { border-bottom: 0; }
	.header-nav.is-open .mobile-search { display: block; padding: .8rem 0; border-bottom: 1px solid var(--line); margin-bottom: .25rem; }
	.mobile-search__field {
		position: relative;
	}
	.mobile-search__field svg { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
	.mobile-search__field input {
		width: 100%; height: 48px; padding: 0 1rem 0 2.6rem;
		border: 2px solid var(--green); border-radius: 999px;
		background: var(--surface); color: var(--ink); font-size: 1rem;
		font-family: var(--font-body);
	}
	.mobile-search__field input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px var(--green-050); }
	.mobile-search__field input::placeholder { color: var(--muted); }
	.nav-toggle { display: inline-flex; }
	.search-toggle { display: inline-flex; }
	.calc-form { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
	.footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
	.footer-bottom { flex-direction: column; }
	.hero__stats { gap: 1.1rem; }
}


/* =======================================================================
   HOMEPAGE - override responsive + nuove funzionalita'
   ======================================================================= */

/* offset per header sticky quando si clicca un'ancora di categoria */
.section, .cat-block, #preferiti { scroll-margin-top: calc(var(--header-h) + 16px); }

/* header: nasconde la ricerca gia' dal tablet (c'e' quella grande nell'hero) */
@media (max-width: 1024px) { .header-search { display: none; } }
/* menu a panino gia' dal tablet stretto, non solo su telefono */
@media (max-width: 860px) {
	.header-nav { display: none; }
	.nav-toggle { display: inline-flex; }
	.search-toggle { display: inline-flex; }
	.header-nav.is-open {
		display: flex; position: absolute; top: var(--header-h); left: 0; right: 0;
		flex-direction: column; align-items: stretch; gap: 0;
		background: var(--surface); border-bottom: 1px solid var(--line);
		padding: 0 var(--gutter) 1rem; box-shadow: var(--shadow-2);
		z-index: 70; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
	}
	.header-nav.is-open .nav-link--cat { display: none; }
	.header-nav.is-open .nav-link--desk-only { display: none; }
	.header-nav.is-open .nav-link--mobile { display: flex; padding: .85rem .6rem; font-size: 1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
	.header-nav.is-open .nav-link--mobile:last-child { border-bottom: 0; }
	.header-nav.is-open .mobile-search { display: block; padding: .8rem 0; border-bottom: 1px solid var(--line); margin-bottom: .25rem; }
}
/* su mobile la ricerca LCD sta SOTTO il titolo, con un po' d'aria */
@media (max-width: 900px) { .lcd { margin-top: 1.5rem; } }

/* --- card: ora e' <article> con link "stretched" (stella cliccabile sopra) --- */
.calc-card { position: relative; }
.calc-card__title a.stretch { color: inherit; }
.calc-card__title a.stretch::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); }
.calc-card:focus-within { border-color: var(--green-100); }
.calc-card__foot { justify-content: space-between; }

/* stella preferiti */
.fav {
	position: absolute; top: .7rem; right: .7rem; z-index: 2;
	width: 40px; height: 40px; display: grid; place-items: center;
	border: 1px solid var(--line); border-radius: 11px;
	background: var(--surface); color: var(--line-strong);
	transition: color .15s, border-color .15s, background .15s, transform .1s;
}
.fav:hover { color: var(--amber); border-color: var(--amber); }
.fav:active { transform: scale(.92); }
.fav[aria-pressed="true"] { color: var(--amber); border-color: var(--amber); background: var(--amber-100); }
.fav svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.fav[aria-pressed="true"] svg { fill: currentColor; }

/* blocco "I tuoi preferiti" */
#preferiti { display: none; }
#preferiti.is-shown { display: block; }
#preferiti .cat-block__head h3 { display: inline-flex; align-items: center; gap: .5rem; }
#preferiti .cat-block__head h3 svg { width: 20px; height: 20px; fill: var(--amber); stroke: var(--amber); }

/* barra strumenti: filtri + contatore */
.catalog-toolbar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.catalog-toolbar .filters { margin-bottom: 0; }
.result-count { margin-left: auto; font-family: var(--font-mono); font-size: .82rem; color: var(--muted); white-space: nowrap; }

/* pulisci ricerca + hint tastiera nel display */
.search-clear {
	position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
	border: 0; background: rgba(216,245,233,.1); color: var(--lcd-ink);
	width: 26px; height: 26px; border-radius: 50%; display: none; place-items: center; line-height: 1;
}
.search-clear.is-shown { display: grid; }
.kbd-hint { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); pointer-events: none; }
.lcd__field.has-text .kbd-hint { display: none; }
kbd {
	font-family: var(--font-mono); font-size: .72rem;
	background: rgba(216,245,233,.1); border: 1px solid rgba(216,245,233,.22);
	color: var(--lcd-dim); border-radius: 6px; padding: .12rem .42rem;
}
@media (max-width: 560px) { .kbd-hint { display: none; } }

/* suggerimento attivo da tastiera */
.lcd__result.is-active { background: var(--green-050); }

/* torna su */
.to-top {
	position: fixed; right: 1rem; bottom: 1rem; z-index: 50;
	width: 46px; height: 46px; border-radius: 50%;
	border: 1px solid var(--line-strong); background: var(--surface);
	color: var(--green-700); box-shadow: var(--shadow-2);
	display: grid; place-items: center;
	opacity: 0; transform: translateY(10px); pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
}
.to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.has-cookie .to-top { bottom: 8rem; }

/* comparsa in scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* filtri a scorrimento su mobile (niente a-capo goffo) */
@media (max-width: 640px) {
	.catalog-toolbar { flex-direction: column; align-items: stretch; gap: .75rem; }
	.filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .35rem; scrollbar-width: none; }
	.filters::-webkit-scrollbar { display: none; }
	.filter-chip { flex: 0 0 auto; }
	.result-count { margin-left: 0; }
}

/* ===============================================================
   HEADER ACTIONS LOGIN + PREFERITI
   =============================================================== */

.header-actions {
	display:flex;
	align-items:center;
	gap:.5rem;
	margin-left:.5rem;
}


.header-action {
	display:flex;
	align-items:center;
	gap:.35rem;
	padding:.45rem .65rem;
	border-radius:var(--r-sm);
	color:var(--ink);
	font-size:.9rem;
	font-weight:600;
	transition:background .15s ease, transform .15s ease;
}


.header-action:hover {
	background:var(--green-050);
	color:var(--green-700);
	transform:translateY(-1px);
}


.action-icon {
	font-size:1.25rem;
	line-height:1;
}


.action-label {
	font-size:.85rem;
}


@media(max-width:900px){

	.header-actions {
		margin-left:auto;
	}

	.action-label {
		display:none;
	}

	.header-action {
		padding:.45rem;
	}

	.action-icon {
		font-size:1.4rem;
	}

}

/* =======================================================================
   V2 - sfondo "carta millimetrata", home piu' viva, catalogo dinamico,
   pagina calcolatore completa, rifinitura responsive (320px -> desktop)
   ======================================================================= */

:root {
	--blue: #285a86;   --blue-100: #e3edf6;
	--plum: #6c4585;   --plum-100: #efe6f3;
	--olive: #5b6b1e;  --olive-100: #e9efd9;
	--terra: #b3452f;  --terra-100: #f8e4de;
	--tone-bg: var(--green-100);
	--tone-fg: var(--green);
}

/* niente scroll orizzontale accidentale su telefoni stretti */
body { overflow-x: hidden; overflow-x: clip; }
img, svg, video { max-width: 100%; }

/* --- sfondo: griglia leggera che sfuma verso il basso (solo CSS, zero immagini) --- */
body::before {
	content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
	background-image:
		linear-gradient(rgba(12, 92, 75, .055) 1px, transparent 1px),
		linear-gradient(90deg, rgba(12, 92, 75, .055) 1px, transparent 1px);
	background-size: 30px 30px;
	-webkit-mask-image: linear-gradient(180deg, #000 0, rgba(0, 0, 0, .55) 45%, rgba(0, 0, 0, .18) 100%);
	        mask-image: linear-gradient(180deg, #000 0, rgba(0, 0, 0, .55) 45%, rgba(0, 0, 0, .18) 100%);
}

/* --- toni per categoria (assegnati a rotazione dalla JSP: tone-1 ... tone-6) --- */
.tone-1 { --tone-bg: var(--green-100); --tone-fg: var(--green); }
.tone-2 { --tone-bg: var(--amber-100); --tone-fg: #a8690f; }
.tone-3 { --tone-bg: var(--blue-100);  --tone-fg: var(--blue); }
.tone-4 { --tone-bg: var(--terra-100); --tone-fg: var(--terra); }
.tone-5 { --tone-bg: var(--plum-100);  --tone-fg: var(--plum); }
.tone-6 { --tone-bg: var(--olive-100); --tone-fg: var(--olive); }

/* =============================================================== HEADER v2 */
.brand__logo { height: 38px; width: auto; max-width: none; }
.header-bar { gap: 1rem; }
.header-nav { min-width: 0; }
.nav-link { white-space: nowrap; }
/* (search-toggle base styles are in the SEARCH-TOGGLE section above) */
.nav-toggle { margin-left: .15rem; flex: 0 0 auto; }
.header-actions { flex: 0 0 auto; }
.header-action { position: relative; min-height: 42px; }

/* pallino verde "online" sull'icona profilo quando loggato */
.header-action--user::after {
	content: '';
	position: absolute;
	top: 4px; right: 4px;
	width: 9px; height: 9px;
	background: #22c55e;
	border: 2px solid var(--paper, #f6f5f0);
	border-radius: 50%;
	pointer-events: none;
}
.fav-count {
	min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
	background: var(--amber); color: #3b2500; font-family: var(--font-mono);
	font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center;
}
.fav-count[hidden] { display: none; }

@media (max-width: 1100px) { .nav-link { padding: .5rem .55rem; font-size: .9rem; } }
@media (max-width: 900px) {
	.header-actions { margin-left: auto; gap: .15rem; }
	.fav-count { position: absolute; top: 2px; right: 0;
		min-width: 15px; height: 15px; padding: 0 4px; font-size: .58rem; line-height: 15px; }
}
@media (max-width: 860px) {
	.nav-toggle[aria-expanded="true"] span { background: transparent; }
	.nav-toggle[aria-expanded="true"] span::before { transform: translateY(1px) rotate(45deg); }
	.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-1px) rotate(-45deg); }
}
@media (max-width: 480px) {
	:root { --header-h: 60px; }
	.brand__logo { height: 28px; }
	.header-bar { gap: .25rem; padding-left: 12px; padding-right: 10px; }
	.search-toggle { width: 36px; height: 36px; }
	.search-toggle svg { width: 19px; height: 19px; }
	.header-action { padding: .3rem; min-height: 36px; }
	.header-action svg { width: 20px; height: 20px; }
	.nav-toggle { width: 36px; height: 36px; margin-left: 0; }
}
@media (max-width: 360px) {
	.brand__logo { height: 24px; }
	.header-bar { gap: .15rem; padding-left: 10px; padding-right: 8px; }
	.search-toggle { width: 32px; height: 32px; }
	.search-toggle svg { width: 17px; height: 17px; }
	.header-action { padding: .2rem; min-height: 32px; }
	.header-action svg { width: 18px; height: 18px; }
	.nav-toggle { width: 32px; height: 32px; }
}

/* =============================================================== HERO v2 */
.hero { position: relative; overflow: hidden; }
.hero::before {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background:
		radial-gradient(520px 340px at 88% 12%, rgba(20, 115, 93, .16), transparent 70%),
		radial-gradient(420px 300px at 6% 96%, rgba(233, 162, 59, .17), transparent 70%);
}
.hero__grid > * { min-width: 0; }
.hero__deco { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.hero__deco span {
	position: absolute; font-family: var(--font-mono); font-weight: 700; line-height: 1;
	color: var(--green); opacity: .09; animation: ci-float 9s ease-in-out infinite;
}
.hero__deco span:nth-child(1) { left: 3%;  top: 9%;  font-size: 3.2rem; }
.hero__deco span:nth-child(2) { left: 44%; top: 5%;  font-size: 2.2rem; color: var(--amber-700); opacity: .16; animation-delay: -2s; }
.hero__deco span:nth-child(3) { left: 39%; top: 74%; font-size: 3.6rem; animation-delay: -4s; }
.hero__deco span:nth-child(4) { right: 3%; top: 76%; font-size: 2.6rem; color: var(--amber-700); opacity: .16; animation-delay: -1s; }
.hero__deco span:nth-child(5) { right: 46%; top: 44%; font-size: 1.8rem; animation-delay: -6s; }
.hero__deco span:nth-child(6) { left: 12%; top: 86%; font-size: 2rem; animation-delay: -3s; }
@keyframes ci-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(4deg); } }

.hero__stats { gap: 0; margin-top: 1.9rem; }
.hero__stat { padding-right: 1.4rem; margin-right: 1.4rem; border-right: 1px solid var(--line-strong); }
.hero__stat:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.lcd__field input { font-size: 1.05rem; }
.lcd__chip { min-height: 34px; }

@media (max-width: 900px) {
	.hero__deco span:nth-child(3), .hero__deco span:nth-child(5), .hero__deco span:nth-child(6) { display: none; }
	.hero__sub { max-width: 60ch; }
}
@media (max-width: 560px) {
	.hero { padding-block: 1.6rem 1.5rem; }
	.hero__title { font-size: clamp(1.8rem, 8.6vw, 2.3rem); line-height: 1.06; }
	.hero__title em { white-space: normal; }
	.hero__sub { font-size: 1rem; margin-top: .8rem; }
	.hero__stats { margin-top: 1.2rem; }
	.hero__stat { padding-right: .9rem; margin-right: .9rem; }
	.hero__stat b { font-size: 1.2rem; }
	.hero__stat span { font-size: .78rem; }
	.lcd { padding: 1rem 1rem 1.1rem; border-radius: var(--r-lg); margin-top: 1.2rem; }
	.lcd__field input { height: 54px; padding-left: 2.7rem; font-size: 1rem; }
	.lcd__field svg { left: .85rem; }
	.hero__deco span { opacity: .07; }
}
@media (max-width: 360px) {
	.hero__stat { padding-right: .6rem; margin-right: .6rem; }
	.hero__stat b { font-size: 1.05rem; }
}

/* striscia "perche' fidarsi" sotto l'hero */
.trust {
	list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem;
	margin-top: .25rem;
}
.trust li {
	display: flex; align-items: center; gap: .7rem; min-width: 0;
	background: rgba(255, 255, 255, .78); border: 1px solid var(--line); border-radius: var(--r-md);
	padding: .75rem .9rem;
}
.trust svg { flex: 0 0 auto; width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--tone-bg); color: var(--tone-fg); }
.trust b { display: block; font-size: .92rem; line-height: 1.2; }
.trust span { display: block; font-size: .78rem; color: var(--muted); line-height: 1.3; }
@media (max-width: 900px) { .trust { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) {
	.trust { gap: .5rem; }
	.trust li { padding: .6rem; gap: .5rem; }
	.trust svg { width: 28px; height: 28px; padding: 6px; }
	.trust b { font-size: .84rem; }
	.trust span { font-size: .72rem; }
}

/* =============================================================== CATALOGO v2 */
.section--catalog { padding-top: clamp(1.5rem, 4vw, 2.5rem); }
.catalog-toolbar {
	position: sticky; top: var(--header-h); z-index: 40;
	background: rgba(246, 245, 240, .92); backdrop-filter: blur(8px);
	padding-block: .6rem; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
	border-bottom: 1px solid transparent;
}
.filter-chip { min-height: 38px; white-space: nowrap; }
.filter-chip small { font-family: var(--font-mono); font-size: .72rem; opacity: .65; margin-left: .3rem; }

.cat-block__head {
	align-items: center; padding-bottom: .7rem; margin-bottom: 1.1rem;
	border-bottom: 1px solid var(--line-strong);
}
.cat-block__num {
	font-family: var(--font-mono); font-size: .8rem; font-weight: 700;
	background: var(--tone-bg); color: var(--tone-fg);
	padding: .22rem .55rem; border-radius: 8px; flex: 0 0 auto;
}
.cat-block__head h3 { min-width: 0; }
.cat-block__count { margin-left: auto; white-space: nowrap; }
.cat-block__desc { color: var(--muted); font-size: .9rem; margin: -.5rem 0 1rem; max-width: 70ch; }

.grid { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
.grid > * { min-width: 0; }

.calc-card { padding-right: 1.15rem; overflow: hidden; }
.calc-card::before { /* filo colorato in alto, colore della categoria */
	content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
	background: var(--tone-fg); opacity: 0; transition: opacity .16s;
}
.calc-card:hover::before, .calc-card:focus-within::before { opacity: 1; }
.calc-card__icon { background: var(--tone-bg); color: var(--tone-fg); }
.calc-card__icon svg { width: 22px; height: 22px; }
.calc-card__title { padding-right: 2.6rem; line-height: 1.25; }
.calc-card__cta { color: var(--tone-fg); }
.calc-card__cta::after { content: " \2192"; }

/* calcolatore non ancora pubblicato: visibile ma non cliccabile */
.calc-card--soon {
	background: transparent; border-style: dashed; border-color: var(--line-strong); box-shadow: none;
}
.calc-card--soon:hover { transform: none; box-shadow: none; border-color: var(--line-strong); }
.calc-card--soon::before { display: none; }
.calc-card--soon .calc-card__icon { background: var(--line); color: var(--muted); }
.calc-card--soon .calc-card__title { color: #44534c; padding-right: 0; }
.calc-card--soon .calc-card__cta { display: none; }

#preferiti .cat-block__empty { color: var(--muted); font-size: .92rem; padding: .25rem 0 .5rem; display: none; }
#preferiti.is-empty .cat-block__empty { display: block; }
#preferiti.is-empty .grid { display: none; }

.catalog-empty {
	text-align: center; padding: 3rem 1rem; color: var(--muted);
	border: 1px dashed var(--line-strong); border-radius: var(--r-lg); background: rgba(255, 255, 255, .6);
}

/* testo di chiusura (SEO) in home */
.about { border-top: 1px solid var(--line-strong); padding-top: clamp(2rem, 5vw, 3rem); }
.about__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 1.25rem; }
.about__grid > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.15rem; }
.about__grid h3 { font-family: var(--font-display); font-size: 1.08rem; margin-bottom: .4rem; }
.about__grid p { color: var(--muted); font-size: .92rem; }
@media (max-width: 860px) { .about__grid { grid-template-columns: 1fr; gap: .75rem; } }

/* telefono: card compatte "a riga" -> tanti calcolatori senza pagina infinita */
@media (max-width: 640px) {
	.catalog-toolbar { gap: .4rem; padding-block: .5rem; }
	.result-count { display: none; }
	.cat-block { margin-top: 1.9rem; }
	.cat-block__head h3 { font-size: 1.15rem; }
	.grid { grid-template-columns: 1fr; gap: .6rem; }
	.calc-card {
		display: grid; grid-template-columns: 42px minmax(0, 1fr); column-gap: .8rem; row-gap: .1rem;
		align-items: start; padding: .85rem 3.5rem .85rem .85rem; border-radius: var(--r-md);
	}
	.calc-card:hover { transform: none; }
	.calc-card__icon { grid-row: 1 / span 3; }
	.calc-card__title, .calc-card__desc, .calc-card__foot { grid-column: 2; }
	.calc-card__title { padding-right: 0; font-size: 1rem; }
	.calc-card__desc {
		font-size: .84rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
	}
	.calc-card__foot { margin-top: .25rem; }
	.calc-card__cta { font-size: .78rem; }
	.fav { top: 50%; right: .55rem; transform: translateY(-50%); width: 44px; height: 44px; }
	.fav:active { transform: translateY(-50%) scale(.92); }
	.calc-card--soon { padding-right: .85rem; }
	.ad--infeed .ad__inner { min-height: 100px; }
}

/* =============================================================== PAGINA CALCOLATORE v2 */
.breadcrumb { align-items: center; }
.breadcrumb a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.breadcrumb [aria-current] { color: var(--ink); }

.calc-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1rem; }
.chip {
	display: inline-flex; align-items: center; gap: .4rem; min-height: 34px;
	font-family: var(--font-mono); font-size: .76rem; font-weight: 600;
	background: var(--green-100); color: var(--green-700);
	border: 1px solid transparent; border-radius: 999px; padding: .25rem .75rem;
}
.chip svg { width: 15px; height: 15px; }
button.chip, a.chip { background: var(--surface); border-color: var(--line-strong); color: var(--ink); min-height: 40px; }
button.chip:hover, a.chip:hover { border-color: var(--green); color: var(--green-700); }
.btn-fav[aria-pressed="true"] { background: var(--amber-100); border-color: var(--amber); color: #7a4c06; }
.btn-fav svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.btn-fav[aria-pressed="true"] svg { fill: var(--amber); stroke: var(--amber-700); }

.calc-layout > * { min-width: 0; }
.panel__head h2 { margin-right: auto; }
.field label, .field .label { font-size: .88rem; font-weight: 600; color: var(--ink); }
.field .hint a { text-decoration: underline; }
.input { min-width: 0; }
.input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-100); }

.seg { display: flex; flex-wrap: wrap; width: 100%; }
.seg button { flex: 1 1 auto; min-height: 42px; white-space: nowrap; }
.seg--inline { width: auto; display: inline-flex; }

/* opzioni avanzate a scomparsa */
.adv { grid-column: 1 / -1; border: 1px dashed var(--line-strong); border-radius: var(--r-md); background: var(--surface-2); }
.adv summary {
	list-style: none; cursor: pointer; padding: .8rem 1rem; font-size: .9rem; font-weight: 600;
	display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.adv summary::-webkit-details-marker { display: none; }
.adv summary::after { content: "+"; font-family: var(--font-mono); font-size: 1.2rem; color: var(--green); }
.adv[open] summary::after { content: "\2212"; }
.adv__body { padding: 0 1rem 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* scontrino: righe che non si rompono su schermi stretti */
.receipt__big { overflow-wrap: anywhere; }
.receipt__row { gap: 1rem; }
.receipt__row span:first-child { min-width: 0; }
.receipt__row span:last-child { white-space: nowrap; text-align: right; }
.receipt__row.plus span:last-child { color: #9be7c4; }
.receipt__row.sub span:first-child { padding-left: .9rem; font-size: .84rem; }
.receipt__row.sub span:last-child { font-size: .84rem; color: var(--lcd-dim); }

/* barra "dove va il lordo" */
.split { margin-top: 1.2rem; position: relative; }
.split__bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: rgba(0, 0, 0, .25); }
.split__bar i { display: block; height: 100%; min-width: 0; transition: width .35s ease; }
.split__legend { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin-top: .6rem; font-family: var(--font-mono); font-size: .76rem; color: var(--lcd-dim); }
.split__legend span { display: inline-flex; align-items: center; gap: .4rem; }
.split__legend span::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.c-netto { --c: #6fe0b0; background: var(--c); }
.c-inps  { --c: #e9a23b; background: var(--c); }
.c-irpef { --c: #ef7d6f; background: var(--c); }
.c-addiz { --c: #9fb7ff; background: var(--c); }
.split__legend .c-netto, .split__legend .c-inps, .split__legend .c-irpef, .split__legend .c-addiz { background: none; }

.receipt__tools { position: relative; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.receipt__tools button {
	min-height: 40px; padding: 0 .9rem; border-radius: 999px; font-size: .82rem; font-weight: 600;
	font-family: var(--font-mono); color: var(--lcd-ink);
	background: rgba(216, 245, 233, .08); border: 1px solid rgba(216, 245, 233, .2);
}
.receipt__tools button:hover { border-color: var(--amber); }

/* tabelle nei contenuti */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.25rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: .65rem .9rem; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.table th:first-child, .table td:first-child { text-align: left; }
.table thead th { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table td { font-family: var(--font-mono); }
.table tbody tr[data-ral] { cursor: pointer; }
.table tbody tr[data-ral]:hover { background: var(--green-050); }

.prose { max-width: 72ch; }
.prose > h2:first-child { margin-top: 0; }
.prose ol { margin: 0 0 1rem 1.3rem; color: #33413b; }
.prose a { color: var(--green-700); text-decoration: underline; text-underline-offset: 3px; }
.prose .note { font-size: .86rem; color: var(--muted); }
.steps { list-style: none; margin: 0 0 1.25rem !important; padding: 0; counter-reset: s; display: grid; gap: .6rem; }
.steps li { counter-increment: s; position: relative; padding: .8rem 1rem .8rem 3.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin: 0; }
.steps li::before {
	content: counter(s); position: absolute; left: .9rem; top: .8rem; width: 1.6rem; height: 1.6rem; border-radius: 8px;
	display: grid; place-items: center; font-family: var(--font-mono); font-size: .8rem; font-weight: 700;
	background: var(--green-100); color: var(--green-700);
}

.side-list a { min-height: 42px; }
.side-card p { font-size: .88rem; color: var(--muted); }

@media (max-width: 900px) {
	.calc-layout { gap: 1.5rem; margin-top: 1.5rem; }
	.sidebar { gap: 1rem; }
}
@media (max-width: 767px) {
	.adv__body { grid-template-columns: 1fr; }
	.calc-hero p { font-size: .98rem; }
	.prose { margin-top: 2rem; }
	.prose h2 { font-size: 1.3rem; }
}
@media (max-width: 560px) {
	.breadcrumb { font-size: .8rem; padding-top: .9rem; }
	.calc-hero h1 { font-size: clamp(1.55rem, 7.4vw, 1.9rem); }
	.panel { border-radius: var(--r-lg); margin-inline: -.25rem; }
	.panel__head { padding: .9rem 1rem; }
	.panel__body { padding: 1rem; }
	.calc-form { gap: .95rem; }
	.calc-actions .btn { flex: 1 1 100%; }
	.receipt { padding: 1.1rem; border-radius: var(--r-lg); }
	.receipt__big { font-size: clamp(1.9rem, 10.5vw, 2.6rem); }
	.receipt__big small { display: block; font-size: .85rem; margin-top: .1rem; }
	.receipt__row { font-size: .84rem; gap: .6rem; }
	.receipt__row.total { font-size: .95rem; }
	.receipt__tools button { flex: 1 1 auto; }
	.disclaimer { font-size: .8rem; }
	.faq summary { padding: .9rem 1rem; }
	.faq details > p { padding: 0 1rem 1rem; }
	.table th, .table td { padding: .55rem .7rem; font-size: .84rem; }
}
@media (max-width: 360px) {
	.receipt__row { font-size: .78rem; }
	.seg button { padding: .5rem .5rem; }
}

/* =============================================================== FOOTER / COOKIE / VARIE v2 */
.footer-grid { grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); }
.footer-brand .brand__logo { height: 34px; filter: brightness(0) invert(1); opacity: .92; }
.footer-col a { display: inline-block; padding-block: .15rem; }
.footer-bottom span:first-child { max-width: 75ch; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; padding-block: 2rem 1.5rem; } }
@media (max-width: 340px) { .footer-grid { grid-template-columns: 1fr; } }

.cookie { bottom: max(1rem, env(safe-area-inset-bottom)); }
@media (max-width: 560px) {
	.cookie { left: .5rem; right: .5rem; bottom: .5rem; padding: .9rem; }
	.cookie__actions .btn { flex: 1 1 0; padding: 0 .75rem; }
}
.to-top { bottom: max(1rem, env(safe-area-inset-bottom)); }

/* pagina errore */
.error-page { text-align: center; padding-block: clamp(3rem, 10vw, 6rem); }
.error-page__code { font-family: var(--font-mono); font-weight: 700; font-size: clamp(3.5rem, 16vw, 7rem); line-height: 1; color: var(--green); }
.error-page h1 { font-family: var(--font-display); font-size: clamp(1.4rem, 4vw, 2rem); margin-top: .5rem; }
.error-page p { color: var(--muted); margin: .6rem auto 1.5rem; max-width: 46ch; }
.error-page .btn { display: inline-flex; }

/* schermi molto larghi: un po' piu' di respiro */
@media (min-width: 1500px) { :root { --wrap: 1320px; } }

@media (prefers-reduced-motion: reduce) { .hero__deco span { animation: none; } }
@media print {
	.site-header, .site-footer, .ad, .cookie, .to-top, .sidebar, .calc-actions, .receipt__tools { display: none !important; }
	body::before { display: none; }
}

/* comparsa in scroll solo se il JS e' attivo (senza JS il catalogo resta visibile) */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.in { opacity: 1; transform: none; }
.skip:focus { position: fixed; left: 1rem; top: 1rem; width: auto; height: auto; clip: auto; margin: 0; padding: .6rem 1rem; z-index: 100; background: var(--surface); border-radius: var(--r-sm); box-shadow: var(--shadow-2); }

/* filtri: una riga che scorre col dito, senza allargare la pagina */
@media (max-width: 640px) {
	.catalog-toolbar { flex-direction: column; align-items: stretch; }
	.catalog-toolbar .filters { min-width: 0; max-width: 100%; width: 100%; flex-wrap: nowrap; overflow-x: auto; }
}
@media (max-width: 340px) {
	.brand__logo { height: 22px; }
	.nav-toggle { width: 38px; height: 38px; }
	.header-action { padding: .3rem; }
}

/* rifiniture */
.footer-col ul, .side-list { padding: 0; }
.site-footer .brand__name b { color: #6fe0b0; }
.ad__inner { margin-inline: auto; }
.ad--infeed { width: 100%; }
.hero__deco span:nth-child(6) { left: 58%; top: 88%; }
.section--last { padding-top: 0; padding-bottom: clamp(1rem, 3vw, 2rem); }
@media (max-width: 560px) {
	.hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; }
	.hero__stat span { display: block; line-height: 1.25; }
}
.prose ul, .prose ol { margin-left: 0; padding-left: 1.2rem; }
.steps { padding-left: 0 !important; }
@media (max-width: 420px) {
	.table th, .table td { padding: .5rem .45rem; font-size: .78rem; }
	.table thead th { letter-spacing: 0; font-size: .66rem; }
}
