/* Rubrica Telegram: usa le variabili del tema techboom-minimal, con valori di riserva per altri temi. */
.rt {
	--rt-surface: var(--surface, #fff);
	--rt-ink: var(--ink, #15161a);
	--rt-soft: var(--ink-soft, #54565e);
	--rt-line: var(--line, #e7e6df);
	--rt-link: var(--link, #1b6e3c);
	--rt-accent: var(--accent, #c9f227);
	--rt-radius: var(--radius, 14px);
	--rt-shadow: var(--shadow, 0 1px 2px rgba(20, 22, 26, .04), 0 8px 24px -12px rgba(20, 22, 26, .12));
	--rt-head: var(--font-head, inherit);
	--rt-tg: #1c7cbf;
	--rt-tg-ink: #fff;
	--rt-warn: #b42318;
}
.rt *, .rt *::before, .rt *::after { box-sizing: border-box; }

/* Briciole */
.rt-breadcrumb ol { list-style: none; margin: 1.2rem 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; font-size: .85rem; color: var(--rt-soft); }
.rt-breadcrumb li + li::before { content: "›"; margin-right: .25rem; color: var(--rt-soft); }
.rt-breadcrumb a { color: var(--rt-soft); }
.rt-breadcrumb li[aria-current] { color: var(--rt-ink); overflow-wrap: anywhere; }

/* Avvisi */
.rt-notice { margin: 0 0 1.2rem; padding: .8rem 1rem; border-radius: var(--rt-radius); border: 1px solid var(--rt-line); background: var(--rt-surface); font-size: .95rem; }
.rt-notice strong { display: inline-block; margin-right: .5rem; padding: .05rem .45rem; border-radius: 6px; background: var(--rt-warn); color: #fff; font-size: .8rem; }
.rt-notice--off { border-color: color-mix(in srgb, var(--rt-warn) 40%, var(--rt-line)); }

/* Avatar */
.rt-avatar { --rt-size: 64px; width: var(--rt-size); height: var(--rt-size); min-width: var(--rt-size); border-radius: 50%; object-fit: cover; display: block; background: var(--rt-line); }
.rt-avatar--initial { display: inline-flex; align-items: center; justify-content: center; font-family: var(--rt-head); font-weight: 700; font-size: calc(var(--rt-size) * .42); line-height: 1; color: #fff; background: hsl(var(--rt-hue, 200) 45% 42%); user-select: none; }

.rt-verified { display: inline-flex; vertical-align: -.15em; margin-left: .35rem; color: #2a9df4; }
.rt-verified svg { width: .85em; height: .85em; min-width: 18px; min-height: 18px; }

.rt-chip { display: inline-block; padding: .12rem .55rem; border-radius: 999px; background: color-mix(in srgb, var(--rt-accent) 35%, transparent); color: var(--rt-ink); font-size: .75rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }

/* Pulsanti */
.rt-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1.15rem; border-radius: 999px; border: 1px solid transparent; font-weight: 700; font-size: .95rem; line-height: 1.1; text-decoration: none; cursor: pointer; transition: transform .15s ease, filter .15s ease; }
.rt-btn:hover { transform: translateY(-1px); text-decoration: none; }
.rt a.rt-btn, .rt a.rt-btn span, .rt-list__title a, .rt-card__title a, .rt-pill, .rt-tags a { text-decoration: none; }
.rt-btn--tg { background: var(--rt-tg); color: var(--rt-tg-ink); }
.rt-btn--tg:hover { filter: brightness(1.08); color: var(--rt-tg-ink); }
.rt-btn--ghost { background: transparent; color: var(--rt-ink); border-color: var(--rt-line); }
.rt-btn--ghost:hover { border-color: var(--rt-ink); color: var(--rt-ink); }
.rt-btn--small { padding: .5rem .85rem; font-size: .85rem; }

/* Scheda */
.rt-head { display: flex; gap: 1.2rem; align-items: flex-start; margin: .5rem 0 1.5rem; }
.rt-head__text { flex: 1; min-width: 0; }
.rt-head__title { font-family: var(--rt-head); font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .6rem; overflow-wrap: anywhere; }
.rt-facts { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; margin: 0 0 1rem; color: var(--rt-soft); font-size: .92rem; }
.rt-facts a { color: var(--rt-link); font-weight: 600; }
.rt-sep { color: var(--rt-line); }
.rt-growth { color: var(--rt-link); font-weight: 600; }

.rt-brief { margin: 0 0 1.8rem; padding: 1.1rem 1.3rem; border-radius: var(--rt-radius); background: var(--rt-surface); border: 1px solid var(--rt-line); border-left: 4px solid var(--rt-accent); }
.rt-brief__title { margin: 0 0 .5rem; font-family: var(--rt-head); font-weight: 700; font-size: 1.05rem; }
.rt-brief ul { margin: 0; padding-left: 1.2rem; }
.rt-brief li { margin: .25rem 0; }

.rt-chart { margin: 2rem 0; padding: 1rem 1.2rem .8rem; border: 1px solid var(--rt-line); border-radius: var(--rt-radius); background: var(--rt-surface); }
.rt-chart__title { font-family: var(--rt-head); font-weight: 700; margin-bottom: .3rem; }
.rt-chart__labels, .rt-chart__dates { display: flex; justify-content: space-between; font-size: .78rem; color: var(--rt-soft); }
.rt-chart__svg { display: block; width: 100%; height: 160px; margin: .3rem 0; }
.rt-chart__axis { stroke: var(--rt-line); stroke-width: 1; }
.rt-chart__area { fill: color-mix(in srgb, var(--rt-tg) 14%, transparent); }
.rt-chart__line { fill: none; stroke: var(--rt-tg); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.rt-chart__dot { fill: var(--rt-tg); }

.rt-cta { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin: 2rem 0 1.4rem; padding: 1.1rem 1.3rem; border-radius: var(--rt-radius); background: color-mix(in srgb, var(--rt-tg) 8%, var(--rt-surface)); }
.rt-cta__user { color: var(--rt-soft); font-weight: 600; overflow-wrap: anywhere; }

.rt-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.2rem 0; }
.rt-tags a { padding: .25rem .65rem; border-radius: 999px; border: 1px solid var(--rt-line); color: var(--rt-soft); font-size: .85rem; }
.rt-tags a:hover { border-color: var(--rt-ink); color: var(--rt-ink); text-decoration: none; }
.rt-updated { color: var(--rt-soft); font-size: .82rem; }

.rt-section-title { font-family: var(--rt-head); font-weight: 700; font-size: 1.35rem; letter-spacing: -.02em; margin: 0 0 1rem; }
.rt-related { margin: 3rem 0 2rem; }
.rt-more { margin-top: 1rem; }

/* Griglia e card */
.rt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.rt-card { display: flex; gap: .9rem; padding: 1rem; border-radius: var(--rt-radius); border: 1px solid var(--rt-line); background: var(--rt-surface); transition: transform .2s ease, box-shadow .2s ease; min-width: 0; }
.rt-card:hover { transform: translateY(-2px); box-shadow: var(--rt-shadow); }
.rt-card__avatar { flex: 0 0 auto; }
.rt-card__body { display: flex; flex-direction: column; gap: .4rem; min-width: 0; flex: 1; }
.rt-card__title { margin: 0; font-family: var(--rt-head); font-weight: 700; font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere; }
.rt-card__title a { color: var(--rt-ink); }
.rt-card__title a:hover { color: var(--rt-link); text-decoration: none; }
.rt-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .82rem; color: var(--rt-soft); }
.rt-card__excerpt { margin: 0; color: var(--rt-soft); font-size: .9rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rt-card__actions { margin-top: auto; padding-top: .3rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.rt-card__actions .rt-btn--ghost { padding: .45rem .9rem; font-size: .85rem; }

/* Archivio */
.rt-archive__head { margin: .5rem 0 1.5rem; }
.rt-archive__title { font-family: var(--rt-head); font-size: clamp(1.7rem, 4.5vw, 2.6rem); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .6rem; }
.rt-archive__intro { max-width: 760px; color: var(--rt-soft); font-size: 1.05rem; }
.rt-index { margin: 0 0 2rem; }
.rt-index__types { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; }
.rt-pill { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .95rem; border-radius: 999px; background: var(--rt-surface); border: 1px solid var(--rt-line); color: var(--rt-ink); font-weight: 700; }
.rt-pill span { color: var(--rt-soft); font-weight: 500; font-size: .85rem; }
.rt-pill:hover { border-color: var(--rt-ink); text-decoration: none; }
.rt-index__cats { list-style: none; margin: 0; padding: 0; columns: 3 220px; column-gap: 1.5rem; }
.rt-index__cats li { break-inside: avoid; padding: .3rem 0; border-bottom: 1px solid var(--rt-line); display: flex; justify-content: space-between; gap: .5rem; }
.rt-index__cats a { color: var(--rt-ink); font-weight: 600; }
.rt-count { color: var(--rt-soft); font-size: .85rem; }

.rt-filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 1.4rem; padding: .8rem; border-radius: var(--rt-radius); background: var(--rt-surface); border: 1px solid var(--rt-line); }
.rt-filters label { margin: 0; }
.rt-filters__q { flex: 1 1 240px; }
.rt-filters input[type="search"], .rt-filters select { width: 100%; min-height: 42px; padding: .5rem .8rem; border-radius: 10px; border: 1px solid var(--rt-line); background: transparent; color: var(--rt-ink); font: inherit; font-size: .95rem; }
.rt-filters select { width: auto; }
.rt-filters select option { color: #15161a; }
.rt-filters__reset { font-size: .9rem; color: var(--rt-soft); }
.rt-results, .rt-empty { color: var(--rt-soft); }
.rt-pagination { margin: 2rem 0; }
.rt-pagination .nav-links { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.rt-pagination .page-numbers { padding: .45rem .8rem; border-radius: 10px; border: 1px solid var(--rt-line); color: var(--rt-ink); }
.rt-pagination .page-numbers.current { background: var(--rt-ink); color: var(--rt-surface); border-color: var(--rt-ink); }
.rt-adult-link { margin: 2.5rem 0 1rem; font-size: .85rem; text-align: center; }
.rt-adult-link a { color: var(--rt-soft); }

/* Elenco numerato negli articoli */
.rt-embed { margin: 1.6rem 0; }
.rt-list { list-style: none; counter-reset: rt; margin: 0; padding: 0; }
.rt-list__item { counter-increment: rt; position: relative; display: flex; gap: 1rem; padding: 1.1rem 0 1.1rem 2.4rem; border-bottom: 1px solid var(--rt-line); margin: 0; }
.rt-list__item::before { content: counter(rt); position: absolute; left: 0; top: 1.15rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--rt-accent); color: var(--accent-ink, #15161a); font-weight: 800; font-size: .9rem; display: flex; align-items: center; justify-content: center; }
.rt-list__avatar { flex: 0 0 auto; }
.rt-list__body { flex: 1; min-width: 0; }
.rt-list__title { margin: 0 0 .2rem; font-family: var(--rt-head); font-weight: 700; font-size: 1.15rem; line-height: 1.25; overflow-wrap: anywhere; }
.rt-list__title a { color: var(--rt-ink); }
.rt-list__meta { margin: 0 0 .4rem; color: var(--rt-soft); font-size: .85rem; }
.rt-list__excerpt { margin: 0 0 .7rem; font-size: .95rem; }
.rt-list__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.rt-list__more { font-size: .9rem; font-weight: 600; }
.rt-grid--embed { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Pulsante principale (colori del tema) */
.rt-btn--primary { background: var(--rt-accent); color: var(--accent-ink, #15161a); }
.rt-btn--primary:hover { filter: brightness(.95); color: var(--accent-ink, #15161a); }

/* Navigazione della rubrica */
.rt-navbar { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin: -.4rem 0 1.2rem; font-size: .9rem; font-weight: 600; }
.rt-navbar a { color: var(--rt-link); text-decoration: none; }
.rt-navbar a:hover { text-decoration: underline; }
.rt-navbox { margin: 2.5rem 0 1rem; padding: 1.4rem 1.5rem; border-radius: var(--rt-radius); border: 1px solid var(--rt-line); background: var(--rt-surface); text-align: center; }
.rt-navbox__title { margin: 0 0 .9rem; font-family: var(--rt-head); font-weight: 700; font-size: 1.2rem; }
.rt-navbox__actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.rt-archive__best { margin: 1rem 0 0; }
.rt-embed__more { margin: 1.6rem 0 0; text-align: center; }

/* Classifica negli articoli */
.rt-rank { list-style: none; margin: 0; padding: 0; }
.rt-rank__item { display: flex; gap: 1.1rem; align-items: flex-start; margin: 0; padding: 1.5rem 0; border-bottom: 1px solid var(--rt-line); }
.rt-rank__item:first-child { padding-top: .5rem; }
.rt-rank__avatar { flex: 0 0 auto; text-decoration: none; }
.rt-rank__body { flex: 1; min-width: 0; }
.rt .rt-rank__title { margin: 0 0 .25rem; font-family: var(--rt-head); font-weight: 700; font-size: 1.3rem; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.rt-rank__title a { color: var(--rt-ink); text-decoration: none; }
.rt-rank__title a:hover { color: var(--rt-link); }
.rt-rank__pos { color: var(--rt-soft); font-variant-numeric: tabular-nums; }
.rt .rt-rank__meta { margin: 0 0 .55rem; color: var(--rt-soft); font-size: .88rem; }
.rt .rt-rank__text { margin: 0 0 .6rem; }
.rt-rank__more { font-weight: 600; font-size: .95rem; }

.rt .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 560px) {
	.rt-head { flex-direction: column; gap: .8rem; }
	.rt-head .rt-avatar { --rt-size: 72px !important; }
	.rt-list__item { padding-left: 0; }
	.rt-list__item::before { top: .8rem; left: -.35rem; width: 1.5rem; height: 1.5rem; font-size: .8rem; z-index: 1; }
	.rt-list__avatar .rt-avatar { --rt-size: 44px !important; }
	.rt-filters select { flex: 1; }
	.rt-filters label:not(.rt-filters__q) { flex: 1 1 40%; }
	.rt-filters select { width: 100%; }
	/* Avatar accanto a titolo e dati, testo a tutta larghezza. */
	.rt-rank__item { display: grid; grid-template-columns: 48px 1fr; gap: 0 .8rem; align-items: center; }
	.rt-rank__body { display: contents; }
	.rt-rank__avatar { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
	.rt-rank__avatar .rt-avatar { --rt-size: 48px !important; }
	.rt .rt-rank__title { grid-column: 2; font-size: 1.15rem; }
	.rt .rt-rank__meta { grid-column: 2; }
	.rt .rt-rank__text, .rt-rank__more { grid-column: 1 / -1; }
	.rt .rt-rank__text { margin-top: .4rem; }
}
@media (prefers-reduced-motion: reduce) {
	.rt-card, .rt-btn { transition: none; }
	.rt-card:hover, .rt-btn:hover { transform: none; }
}
