/* ===========================================================
   datastack — design system (ported from the prototype)
   Terminal-tech editorial. Mono labels, hairline grids,
   index numerals, neutral-warm base + coral accent.
   =========================================================== */

:root {
	--font-display: "Space Grotesk", system-ui, sans-serif;
	--font-body: "IBM Plex Sans", system-ui, sans-serif;
	--font-mono: "IBM Plex Mono", ui-monospace, monospace;

	/* neutral-warm scale (light) */
	--bg:        oklch(0.987 0.003 85);
	--bg-2:      oklch(0.965 0.004 85);
	--surface:   oklch(1 0 0);
	--ink:       oklch(0.20 0.006 60);
	--ink-2:     oklch(0.44 0.006 60);
	--ink-3:     oklch(0.62 0.006 60);
	--hair:      oklch(0.90 0.004 70);
	--hair-2:    oklch(0.83 0.004 70);

	/* accent */
	--accent:     var(--wp--custom--ds--accent, oklch(0.63 0.18 33));
	--accent-ink: var(--wp--custom--ds--accent-ink, oklch(0.50 0.18 33));
	--accent-wash: color-mix(in srgb, var(--accent) 12%, transparent);

	--maxw: 1280px;
	--gut: 32px;
	--radius: 3px;
	--hair-w: 1px;
}

/* dark theme — toggled by [data-theme="dark"] on <html> */
[data-theme="dark"] {
	--bg:        oklch(0.18 0.008 260);
	--bg-2:      oklch(0.21 0.010 260);
	--surface:   oklch(0.225 0.012 260);
	--ink:       oklch(0.94 0.004 250);
	--ink-2:     oklch(0.72 0.006 250);
	--ink-3:     oklch(0.56 0.008 250);
	--hair:      oklch(0.32 0.012 260);
	--hair-2:    oklch(0.40 0.014 260);
	--accent-wash: color-mix(in srgb, var(--accent) 18%, transparent);
	--accent:    var(--wp--custom--ds--accent-dark, oklch(0.70 0.16 33));
	--accent-ink: var(--wp--custom--ds--accent-ink-dark, oklch(0.78 0.15 33));
}

/* Bridge WordPress preset variables to the runtime design vars, so core
   blocks (body, links, buttons, generated global styles) follow the dark
   toggle. html:root beats the :root rule WP prints for theme.json. */
html:root {
	--wp--preset--color--base: var(--bg);
	--wp--preset--color--subtle: var(--bg-2);
	--wp--preset--color--surface: var(--surface);
	--wp--preset--color--contrast: var(--ink);
	--wp--preset--color--muted: var(--ink-2);
	--wp--preset--color--faint: var(--ink-3);
	--wp--preset--color--hairline: var(--hair);
	--wp--preset--color--hairline-2: var(--hair-2);
	--wp--preset--color--accent: var(--accent);
	--wp--preset--color--accent-ink: var(--accent-ink);
}

* { box-sizing: border-box; }

.ds-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); width: 100%; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html body {
	font-family: var(--font-body);
	background: var(--bg);
	color: var(--ink);
	margin: 0;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	line-height: 1.6;
}

::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.06;
}

/* ---- shared label primitives ---- */
.mono, .is-style-mono {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-3);
}
.kicker.accent { color: var(--accent-ink); }
.kicker {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-3);
}
.idx {
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--ink-3);
	letter-spacing: 0.04em;
}

/* category pill (used by the .is-style-cat post-terms block too) */
.cat,
.wp-block-post-terms.is-style-cat {
	font-family: var(--font-mono);
	font-size: 10.5px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--accent-ink);
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	row-gap: 2px;
	column-gap: 6px;
	max-width: 100%;
	min-width: 0;
}
.cat::before,
.wp-block-post-terms.is-style-cat::before {
	content: "";
	width: 6px; height: 6px;
	background: var(--accent);
	display: inline-block;
	flex: none;
}
.wp-block-post-terms.is-style-cat a { color: inherit; text-decoration: none; }

/* dotted grid background */
.is-style-dotgrid, .dotgrid {
	background-image: radial-gradient(var(--hair-2) 0.7px, transparent 0.7px);
	background-size: 22px 22px;
	background-position: -1px -1px;
}

/* link arrow */
.go {
	font-family: var(--font-mono);
	color: var(--accent-ink);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	letter-spacing: 0.04em;
}
.go .arr { transition: transform 0.18s ease; }
a:hover .go .arr, .go:hover .arr { transform: translateX(4px); }

/* hairline rule */
.rule { height: var(--hair-w); background: var(--hair); border: 0; margin: 0; }

/* scrollbar */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--hair-2); }
*::-webkit-scrollbar-track { background: transparent; }

/* ---- buttons (core button + .btn) ---- */
.wp-block-button__link, .btn {
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border-radius: var(--radius);
}

/* density */
[data-density="compact"] { --gut: 24px; }
[data-density="comfy"] { --gut: 44px; }

/* theme-settings toggles (Aspetto → datastack) */
.ds-hide-ticker .ds-ticker-bar { display: none; }
/* Each header-area template part renders wrapped in
   <header class="wp-block-template-part">. WordPress' root block-gap adds a
   margin-block-start between these wrappers (and before <main>), which pushed
   the nav down from the ticker. Zero it on the wrappers so the header zone is
   flush (content keeps its own top padding). */
.wp-site-blocks > header.wp-block-template-part,
.wp-site-blocks > main {
	margin-top: 0 !important;
	margin-block-start: 0 !important;
}
.ds-no-sticky .ds-header { position: static; }
/* dotted page background (Aspetto → datastack) — never on the home */
.ds-page-dots {
	background-image: radial-gradient(var(--hair-2) 0.7px, transparent 0.7px);
	background-size: 22px 22px;
	background-position: -1px -1px;
}
/* a dotgrid hero keeps its own pattern: give it a solid bg so the page dots
   don't show through and double up into a moiré */
.ds-page-dots .ds-hero.is-style-dotgrid { background-color: var(--bg); }
.ds-hide-ad .ds-sec-ad,
.ds-hide-archivio .ds-sec-archivio,
.ds-hide-sezioni .ds-sec-sezioni,
.ds-hide-newsletter .ds-sec-newsletter { display: none; }
/* Single-post ad slots (inside the 720px article column): hidden unless the
   position is selected in the panel */
/* category/tag image in the archive header (panel: cat_img / cat_img_style).
   Sits inside the constrained header, so it never widens the container. */
.ds-term-media { margin: 0; line-height: 0; }
.ds-term-media img { display: block; }
/* thumbnail layout: title + subtitle on the left, round image on the right,
   vertically centred, inside the content width (never overflows or drops) */
/* image LEFT, title + subtitle tight on the right; image height tracks the
   text block so the header section never grows */
.ds-term-head { display: flex; align-items: stretch; gap: clamp(16px, 2.4vw, 28px); }
.ds-term-head-text { min-width: 0; flex: 1 1 auto; align-self: center; }
.ds-term-head-text > .wp-block-query-title,
.ds-term-head-text > h1 { margin: 0; }
.ds-term-dek { margin-top: 6px; color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.ds-term-dek > * { margin: 0; }
.ds-term-media.is-thumb { flex: 0 0 auto; align-self: stretch; aspect-ratio: 1; height: auto; width: auto; max-height: 190px; min-height: 80px; border-radius: 50%; overflow: hidden; }
.ds-term-media.is-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ds-term-media.is-banner { width: 100%; height: clamp(120px, 17vw, 200px); border-radius: 16px; overflow: hidden; margin: 0 0 18px; border: var(--hair-w) solid var(--hair); }
.ds-term-media.is-banner img { width: 100%; height: 100%; object-fit: cover; }

.ds-singlead { display: none; margin: 30px 0; }
/* the top ad sits right under the hero image (body already has padding-top) */
.ds-singlead-top { margin-top: 4px; }
.ds-show-singlead-top .ds-singlead-top,
.ds-show-singlead-share .ds-singlead-share { display: block; }
/* Home ad slots: hidden unless their position is selected in the panel */
.ds-adsec { display: none; }
.ds-show-adsec-ultime .ds-adsec-ultime,
.ds-show-adsec-trending .ds-adsec-trending,
.ds-show-adsec-archivio .ds-adsec-archivio,
.ds-show-adsec-sezioni .ds-adsec-sezioni { display: block; }
/* "space available" CTA placeholder (shown when AdSense isn't configured) */
.ds-ad-cta {
	display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
	padding: 26px 30px; border: var(--hair-w) dashed var(--hair-2); border-radius: 12px;
	background: var(--bg-2); text-decoration: none;
	transition: border-color 0.18s ease, background 0.18s ease;
}
.ds-ad-cta:hover { border-color: var(--accent); background: var(--accent-wash); }
.ds-ad-cta-tag { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.ds-ad-cta-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(18px, 2vw, 24px); letter-spacing: -0.02em; color: var(--ink); }
.ds-ad-cta-text { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.ds-ad-cta-btn { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-ink); margin-top: 4px; }
.ds-ad-cta:hover .ds-ad-cta-btn { color: var(--accent); }

/* header layout: logo centered */
.ds-header-center .ds-header .ds-wrap { flex-wrap: wrap; justify-content: center; }
.ds-header-center .ds-logo { order: 1; flex: 1 1 100%; justify-content: center; }
.ds-header-center .ds-catnav { order: 2; justify-content: center; flex: 1 1 100%; }
.ds-header-center .ds-navtoggle { order: 1; position: absolute; right: var(--gut); }
@media (min-width: 761px) { .ds-header-center .ds-header .ds-wrap { height: auto; padding-top: 12px; padding-bottom: 12px; } }

/* =========================================================
   TOP BAR + TICKER
   ========================================================= */
.ds-statusbar {
	border-bottom: var(--hair-w) solid var(--hair);
	background: var(--bg);
	color: var(--ink-3);
}
.ds-statusbar .ds-wrap {
	display: flex; justify-content: space-between; align-items: center;
	height: 30px; font-family: var(--font-mono); font-size: 11px;
	letter-spacing: 0.06em; white-space: nowrap;
}
.ds-statusbar .ds-status-right { display: flex; gap: 18px; align-items: center; }
.ds-live { color: var(--accent-ink); }
.ds-clock-s { color: var(--ink-2); }
.ds-theme-toggle {
	font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
	background: none; border: 0; color: var(--ink-3); cursor: pointer; padding: 0;
	text-transform: uppercase;
}
.ds-theme-toggle:hover { color: var(--ink); }

.ds-ticker-bar {
	border-bottom: var(--hair-w) solid var(--hair);
	background: var(--bg-2); overflow: hidden;
	display: flex; align-items: stretch;
}
.ds-ticker-tag {
	flex: none; display: flex; align-items: center; padding: 0 14px;
	background: var(--accent); color: #fff;
	font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em;
	text-transform: uppercase; z-index: 2;
}
.ds-ticker-mask { overflow: hidden; flex: 1; display: flex; align-items: center; }
.ds-ticker {
	display: inline-flex; white-space: nowrap; gap: 22px;
	animation: ds-marquee 38s linear infinite;
}
.ds-ticker:hover, .ds-ticker:focus-within { animation-play-state: paused; }
.ds-ticker span {
	font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2);
	padding: 8px 0; display: inline-flex; align-items: center; gap: 22px;
}
.ds-ticker span b { color: var(--accent); font-weight: 400; }
.ds-ticker-item {
	text-decoration: none; color: inherit; display: inline-flex;
	transition: color 0.14s ease;
}
.ds-ticker-item:hover { color: var(--accent-ink); }
.ds-ticker-item:hover span { color: var(--accent-ink); }
@keyframes ds-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ds-ticker { animation: none; } }

/* =========================================================
   HEADER / NAV
   ========================================================= */
.ds-header {
	border-bottom: var(--hair-w) solid var(--hair-2);
	background: var(--bg); position: sticky; top: 0; z-index: 40;
}
.ds-header .ds-wrap {
	display: flex; align-items: center; justify-content: space-between;
	min-height: 64px; gap: 24px; padding-block: 8px;
}
.ds-logo { display: inline-flex; align-items: center; gap: 10px; flex: none; min-width: 0; }
.ds-logo svg { display: block; flex: none; }
.ds-logo .wp-block-site-title { margin: 0; font-size: var(--ds-name-size, 19px); line-height: 1.05; }
.ds-logo .wp-block-site-title a { color: var(--ds-name-color, var(--ink)); text-decoration: none; font-size: inherit; }
[data-theme="dark"] .ds-logo .wp-block-site-title a { color: var(--ds-name-color-dark, var(--ink)); }
/* uploadable Site Logo (Settings / Site Editor) replaces the default SVG mark.
   Height is driven by the panel (--ds-logo-h); width stays auto so any logo —
   square or horizontal-with-wordmark — scales keeping its proportions. */
.ds-logo .wp-block-site-logo { display: flex; line-height: 0; width: auto !important; }
.ds-logo .wp-block-site-logo img {
	height: var(--ds-logo-h, 28px); width: auto; display: block;
	max-width: min(320px, 52vw);
}
.ds-logo .ds-logo-mark { display: inline-flex; }
.ds-logo .ds-logo-mark svg { height: var(--ds-logo-h, 21px); width: auto; max-width: 320px; display: block; }
.ds-logo:has(.wp-block-site-logo img) .ds-logo-mark { display: none; }
/* light/dark logo swap (panel: dark logo upload or assets/img/logo/logo-dark.svg).
   Both marks are inlined; CSS shows one per theme so the live toggle works. */
.ds-logo .ds-logo-mark .ds-mark { display: inline-flex; line-height: 0; }
.ds-logo .ds-logo-mark .ds-mark-d { display: none; }
[data-theme="dark"] .ds-logo .ds-logo-mark .ds-mark-l { display: none; }
[data-theme="dark"] .ds-logo .ds-logo-mark .ds-mark-d { display: inline-flex; }
/* hide the default site-name wordmark (for logos that already include the name) */
.ds-logo-notext .ds-logo .wp-block-site-title { display: none; }

/* =========================================================================
   TEXT EFFECTS (panel: fx_logo / fx_name / fx_secthead / fx_titles / fx_hero)
   Targets: name = site title · sec = section headers · title = archive/search
   titles · hero = single article title. Logo rainbow/gradient/outline are
   painted into the SVG server-side; glow/shadow on the logo are CSS filters.
   ====================================================================== */
/* --- RAINBOW (text) --- */
.ds-fx-name-rainbow .ds-logo .wp-block-site-title a,
.ds-fx-sec-rainbow .ds-secthead h2,
.ds-fx-title-rainbow .wp-block-query-title,
.ds-fx-hero-rainbow .ds-hero-title {
	background-image: linear-gradient(90deg, #ff3b30, #ff9500, #ffcc00, #34c759, #007aff, #af52de, #ff3b30);
	background-size: 200% 100%; -webkit-background-clip: text; background-clip: text;
	-webkit-text-fill-color: transparent; color: transparent;
}
/* --- GRADIENT accent (text) — colours from the panel (fx_grad_a/b) --- */
.ds-fx-name-gradient .ds-logo .wp-block-site-title a,
.ds-fx-sec-gradient .ds-secthead h2,
.ds-fx-title-gradient .wp-block-query-title,
.ds-fx-hero-gradient .ds-hero-title {
	background-image: linear-gradient(90deg, var(--ds-fx-grad-a, var(--accent)), var(--ds-fx-grad-b, var(--accent-ink)));
	background-size: 200% 100%; -webkit-background-clip: text; background-clip: text;
	-webkit-text-fill-color: transparent; color: transparent;
}
/* --- GLOW (text) --- */
.ds-fx-name-glow .ds-logo .wp-block-site-title a,
.ds-fx-sec-glow .ds-secthead h2,
.ds-fx-title-glow .wp-block-query-title,
.ds-fx-hero-glow .ds-hero-title {
	text-shadow: 0 0 10px color-mix(in srgb, var(--accent) 70%, transparent), 0 0 22px color-mix(in srgb, var(--accent) 45%, transparent);
}
/* --- OUTLINE (text) --- */
.ds-fx-name-outline .ds-logo .wp-block-site-title a,
.ds-fx-sec-outline .ds-secthead h2,
.ds-fx-title-outline .wp-block-query-title,
.ds-fx-hero-outline .ds-hero-title {
	-webkit-text-stroke: 1.4px var(--accent); -webkit-text-fill-color: transparent; color: transparent;
}
/* --- SHADOW (text) --- */
.ds-fx-name-shadow .ds-logo .wp-block-site-title a,
.ds-fx-sec-shadow .ds-secthead h2,
.ds-fx-title-shadow .wp-block-query-title,
.ds-fx-hero-shadow .ds-hero-title {
	text-shadow: 4px 4px 0 color-mix(in srgb, var(--accent) 60%, transparent);
}
/* --- LOGO glow / shadow (filters; gradient effects are in the SVG) --- */
.ds-fx-logo-glow .ds-logo-mark svg { filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 75%, transparent)) drop-shadow(0 0 11px color-mix(in srgb, var(--accent) 45%, transparent)); }
.ds-fx-logo-shadow .ds-logo-mark svg { filter: drop-shadow(3px 3px 0 rgba(0,0,0,.28)); }
/* --- per-target animation for rainbow/gradient text --- */
.ds-fx-anim-name .ds-logo .wp-block-site-title a,
.ds-fx-anim-sec .ds-secthead h2,
.ds-fx-anim-title .wp-block-query-title,
.ds-fx-anim-hero .ds-hero-title { animation: ds-fx-move 5s linear infinite; }
@keyframes ds-fx-move { to { background-position: 200% 0; } }
@media (prefers-reduced-motion: reduce) {
	.ds-fx-anim-name .ds-logo .wp-block-site-title a,
	.ds-fx-anim-sec .ds-secthead h2,
	.ds-fx-anim-title .wp-block-query-title,
	.ds-fx-anim-hero .ds-hero-title { animation: none; }
}

/* header layout: logo pinned left, category tabs fill the rest and align right */
.ds-header .ds-wrap { flex-wrap: nowrap; }
.ds-catnav {
	display: flex; gap: 4px; flex-wrap: nowrap;
	flex: 1 1 auto; min-width: 0; justify-content: flex-end;
	overflow-x: auto; scrollbar-width: none;
}
.ds-catnav::-webkit-scrollbar { display: none; }

/* mobile nav toggle (hamburger) — hidden on desktop */
.ds-navtoggle {
	display: none; flex: none; background: none; border: 0; cursor: pointer;
	font-size: 20px; line-height: 1; color: var(--ink); padding: 4px 6px;
}
.ds-navtoggle:hover { color: var(--accent-ink); }

/* ---- HEADER NAVIGATION BLOCK (core wp:navigation, styled like the tabs) ---- */
.ds-header .ds-nav.wp-block-navigation {
	font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
	flex: 1 1 auto; justify-content: flex-end;
}
.ds-header .ds-nav .wp-block-navigation__container { gap: 2px; }
.ds-header .ds-nav .wp-block-navigation-item__content {
	color: var(--ink-2); text-decoration: none;
	padding: 6px 10px; border-bottom: 2px solid transparent;
}
.ds-header .ds-nav .wp-block-navigation-item__content:hover,
.ds-header .ds-nav .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content { color: var(--ink); }
.ds-header .ds-nav .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content { border-bottom-color: var(--accent); }
/* dropdown / submenu */
.ds-header .ds-nav .wp-block-navigation__submenu-container {
	background: var(--surface); border: var(--hair-w) solid var(--hair);
	min-width: 200px; padding: 6px 0; box-shadow: 0 10px 30px oklch(0.2 0 0 / 0.08);
}
.ds-header .ds-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	display: block; padding: 8px 16px; border-bottom: 0;
}
.ds-header .ds-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--bg-2); color: var(--accent-ink); }
.ds-header .ds-nav .wp-block-navigation__submenu-icon { padding: 0 2px; }
/* mobile overlay */
.ds-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--bg); padding: 24px var(--gut);
}
.ds-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 16px; padding: 12px 0; border-bottom: var(--hair-w) solid var(--hair);
}
.ds-nav .wp-block-navigation__responsive-container-open,
.ds-nav .wp-block-navigation__responsive-container-close { color: var(--ink); }
.ds-catnav a {
	font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
	padding: 6px 10px; color: var(--ink-2); text-decoration: none;
	border-bottom: 2px solid transparent;
}
.ds-catnav a:hover { color: var(--ink); }
.ds-catnav a.is-active { color: var(--ink); border-bottom-color: var(--accent); }

/* =========================================================
   SECTION HEAD
   ========================================================= */
.ds-secthead {
	display: flex; align-items: flex-end; justify-content: space-between;
	gap: 16px; border-bottom: 2px solid var(--ink); padding-bottom: 10px;
	margin-bottom: 22px;
}
.ds-secthead-l { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.ds-secthead h2 { font-size: 26px; letter-spacing: -0.02em; margin: 0; }
.ds-secthead .ds-seeall { flex: none; white-space: nowrap; align-self: flex-end; }

/* Home page: larger section titles + kickers (Ultime, Più letti, Archivio, Sezioni…) */
.home .ds-secthead { padding-bottom: 12px; margin-bottom: 26px; }
.home .ds-secthead h2 { font-size: clamp(30px, 3.6vw, 42px); letter-spacing: -0.03em; }
.home .ds-secthead .kicker { font-size: 13px; letter-spacing: 0.1em; }

/* =========================================================
   IMAGE PLACEHOLDER (diagonal stripes) behind featured images
   ========================================================= */
.wp-block-post-featured-image {
	position: relative; overflow: hidden; background-color: var(--bg-2);
	background-image: repeating-linear-gradient(45deg, var(--hair) 0, var(--hair) 1px, transparent 1px, transparent 9px);
}
.wp-block-post-featured-image img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* =========================================================
   ARTICLE CARDS  (query loop → post-template.ds-cards)
   ========================================================= */
.ds-cards.wp-block-post-template {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
	counter-reset: dscard;
}
.ds-cards.wp-block-post-template > li {
	counter-increment: dscard;
	position: relative; display: flex; flex-direction: column; gap: 12px;
	margin: 0;
	padding: 18px; background: var(--surface);
	border: var(--hair-w) solid var(--hair);
	transition: border-color 0.16s ease, transform 0.16s ease;
}
.ds-cards.wp-block-post-template > li:hover { border-color: var(--ink); transform: translateY(-2px); }
/* Image-optional cards. Instead of stretching an imageless card and leaving a
   void (or faking an image), treat it as an intentional TEXT card: equal height
   kept, content vertically centred, title enlarged, and the theme's dot-grid as
   a quiet texture. Scoped to the standard card grids (not the hero lead/stack,
   which are flex and intentionally image-free). Uses :has() — modern browsers. */
/* uniform, larger card title across cards — image or not, standard grid or hero
   stack — so the text reads consistently (cards already align to equal height).
   The lead keeps its display-size headline. */
.ds-cards.wp-block-post-template:not(.is-lead) .wp-block-post-title {
	font-size: 22px; line-height: 1.16;
}
/* imageless card = intentional text card: centred content + dot-grid texture
   (no fake image). Applies to the standard grids, the hero stack, and the lead. */
.ds-cards.wp-block-post-template:not(.is-lead) > li:not(:has(.wp-block-post-featured-image)),
.ds-cards.is-lead.wp-block-post-template > li:not(:has(.wp-block-post-featured-image)) {
	justify-content: center;
	background-image: radial-gradient(var(--hair) 0.6px, transparent 0.6px);
	background-size: 16px 16px;
}
.ds-cards.wp-block-post-template:not(.is-lead):not(.is-stack) > li:not(:has(.wp-block-post-featured-image)) .ds-card-meta {
	margin-top: 18px;
}
/* HERO image-free cards: text stays LEFT-aligned, but the whole block is
   centred VERTICALLY (not split top/bottom). Slightly larger type. min-height
   gives real vertical space to centre into when the hero is short.
   Standalone (no :has()) so the always-imageless stack centres regardless. */
.ds-cards.is-stack.wp-block-post-template > li {
	justify-content: center; align-items: stretch; text-align: left;
	min-height: 120px;
}
.ds-cards.is-lead.wp-block-post-template > li:not(:has(.wp-block-post-featured-image)) {
	justify-content: center; align-items: stretch; text-align: left;
	min-height: 360px;
}
/* keep the meta with the block (kill margin-top:auto) so it centres too */
.ds-cards.is-stack.wp-block-post-template > li .ds-card-meta,
.ds-cards.is-lead.wp-block-post-template > li:not(:has(.wp-block-post-featured-image)) .ds-card-meta {
	margin-top: 16px;
}
.ds-cards.is-stack.wp-block-post-template > li .wp-block-post-title {
	font-size: 25px; line-height: 1.18;
}
.ds-cards.is-stack.wp-block-post-template > li .wp-block-post-excerpt {
	font-size: 15.5px; line-height: 1.55;
}
/* image-less stack cards: enlarge the type so the card fills its height and
   doesn't look empty next to a sibling that has a thumbnail */
.ds-cards.is-stack.wp-block-post-template > li:not(:has(.wp-block-post-featured-image)) .wp-block-post-title {
	font-size: clamp(26px, 2.2vw, 32px); line-height: 1.14;
}
.ds-cards.is-stack.wp-block-post-template > li:not(:has(.wp-block-post-featured-image)) .wp-block-post-excerpt {
	font-size: 17px; line-height: 1.6;
}
.ds-cards.is-lead.wp-block-post-template > li:not(:has(.wp-block-post-featured-image)) .wp-block-post-excerpt {
	font-size: 18px;
}
.ds-cards > li::after {
	content: counter(dscard, decimal-leading-zero);
	position: absolute; top: 18px; right: 18px;
	font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em;
}
.ds-cards .wp-block-post-featured-image { aspect-ratio: 3 / 2; border-radius: 0; }
/* hero stack cards: when a post has a featured image, show it (top-aligned,
   compact) instead of the centred text-card treatment. Keep the subtitle. */
.ds-cards.is-stack.wp-block-post-template > li:has(.wp-block-post-featured-image) {
	justify-content: flex-start; gap: 9px;
}
/* smaller, cinematic thumbnail so image + subtitle fit the compact card */
.ds-cards.is-stack .wp-block-post-featured-image { aspect-ratio: 5 / 2; margin-bottom: 2px; }
/* compact hero: shorter lead image + tighter stack cards so the section
   isn't too tall (the lead drives the height, the stack fills it) */
.ds-hero-grid .ds-cards.is-lead .wp-block-post-featured-image { aspect-ratio: 16 / 9; }
.ds-cards.is-stack.wp-block-post-template > li:has(.wp-block-post-featured-image) { gap: 7px; }
.ds-hero-grid .ds-cards.is-stack > li { padding: 16px 18px; }
.ds-cards.is-stack.wp-block-post-template > li:has(.wp-block-post-featured-image) .wp-block-post-title { font-size: 19px; line-height: 1.18; }
.ds-cards.is-stack.wp-block-post-template > li:has(.wp-block-post-featured-image) .wp-block-post-excerpt {
	font-size: 14px; line-height: 1.45;
}
/* lead WITH image: keep the meta with the content (not pushed to the bottom)
   so the whole block centres vertically inside the tall hero column */
.ds-cards.is-lead.wp-block-post-template > li:has(.wp-block-post-featured-image) .ds-card-meta { margin-top: 16px; }
.ds-cards .wp-block-post-title { font-size: 18.5px; line-height: 1.12; margin: 0; }
.ds-cards .wp-block-post-title a { color: var(--ink); text-decoration: none; }
.ds-cards > li:hover .wp-block-post-title a { color: var(--accent-ink); }
.ds-cards .wp-block-post-excerpt { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.ds-cards .wp-block-post-excerpt__more-text { display: none; }
.ds-card-meta {
	margin-top: auto; display: flex; justify-content: flex-start; align-items: center;
	gap: 6px 12px; flex-wrap: wrap;
	padding-top: 10px; border-top: var(--hair-w) solid var(--hair);
}
.ds-card-meta > * { min-width: 0; }
.ds-card-meta .wp-block-post-author-name { margin-right: auto; }
/* meta pills: comment count + views, mono like the date */
.ds-meta-pill {
	font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em;
	color: var(--ink-3); white-space: nowrap;
}
.ds-article-meta .ds-meta-pill { font-size: 11px; }
.ds-card-meta .wp-block-post-author-name,
.ds-card-meta .wp-block-post-date {
	font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em;
}
.ds-card-meta a { color: inherit; text-decoration: none; }

/* lead / large card variant */
.ds-cards.is-lead { grid-template-columns: 1fr; }
.ds-cards.is-stack { grid-template-columns: 1fr; }
.ds-cards.is-lead .wp-block-post-featured-image { aspect-ratio: 16 / 9; }
.ds-cards.is-lead .wp-block-post-title { font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -0.03em; line-height: 1.12; }

/* ---------------------------------------------------------
   LIST VARIANT (block style «Lista — immagine a destra»).
   Per-loop dall'Editor (is-style-ds-list) o su tutti gli archivi
   dal pannello (Layout degli archivi). Righe orizzontali separate
   da hairline: testo a sinistra, miniatura a destra del titolo.
   --------------------------------------------------------- */
.ds-cards.wp-block-post-template.is-style-ds-list {
	display: flex; flex-direction: column; gap: 0;
	border-top: var(--hair-w) solid var(--hair);
}
.ds-cards.wp-block-post-template.is-style-ds-list > li {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 200px;
	grid-template-areas: "terms img" "title img" "excerpt img" "meta img";
	align-content: start; align-items: start;
	column-gap: 24px; row-gap: 8px;
	padding: 22px 0;
	background: var(--bg); background-image: none;
	border: 0; border-bottom: var(--hair-w) solid var(--hair);
}
.ds-cards.wp-block-post-template.is-style-ds-list > li:hover { border-color: var(--hair); transform: none; }
.ds-cards.wp-block-post-template.is-style-ds-list > li::after { display: none; }
.ds-cards.is-style-ds-list > li > .wp-block-post-terms { grid-area: terms; }
.ds-cards.is-style-ds-list > li > .wp-block-post-title { grid-area: title; }
.ds-cards.is-style-ds-list > li > .wp-block-post-excerpt { grid-area: excerpt; }
.ds-cards.is-style-ds-list > li > .ds-card-meta { grid-area: meta; margin-top: 2px; border-top: 0; padding-top: 0; }
.ds-cards.is-style-ds-list > li > .wp-block-post-featured-image {
	grid-area: img; width: 100%; aspect-ratio: 3 / 2; margin: 0; align-self: start;
}
/* riga senza immagine: il testo occupa tutta la larghezza (niente colonna vuota,
   niente trama a puntini della text-card) */
.ds-cards.wp-block-post-template.is-style-ds-list > li:not(:has(.wp-block-post-featured-image)) {
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "terms" "title" "excerpt" "meta";
	justify-content: start;
}
@media (max-width: 700px) {
	.ds-cards.wp-block-post-template.is-style-ds-list > li {
		grid-template-columns: minmax(0, 1fr) 112px;
		column-gap: 14px; row-gap: 6px; padding: 16px 0;
	}
	.ds-cards.is-style-ds-list > li > .wp-block-post-featured-image { aspect-ratio: 1 / 1; }
	.ds-cards.is-style-ds-list > li > .wp-block-post-excerpt { display: none; }
	.ds-cards.wp-block-post-template.is-style-ds-list:not(.is-lead) .wp-block-post-title { font-size: 18px; }
}

/* article dek (subtitle) */
.ds-dek { font-family: var(--font-body); font-size: 19px; color: var(--ink-2); line-height: 1.5; }

/* =========================================================
   DENSE LIST ROWS (query loop → post-template.ds-rows)
   ========================================================= */
.ds-rows.wp-block-post-template {
	list-style: none; margin: 0; padding: 0;
	border-top: var(--hair-w) solid var(--hair);
	counter-reset: dsrow;
}
.ds-rows.wp-block-post-template > li {
	counter-increment: dsrow;
	display: grid; grid-template-columns: 56px 110px 1fr auto;
	gap: 18px; align-items: center;
	padding: 16px 8px; border-bottom: var(--hair-w) solid var(--hair);
	transition: background 0.14s ease;
}
.ds-rows.wp-block-post-template > li:hover { background: var(--bg-2); }
.ds-rows > li::before {
	content: counter(dsrow, decimal-leading-zero);
	font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
}
.ds-rows .wp-block-post-terms { grid-column: 2; min-width: 0; align-self: center; }
.ds-rows .ds-row-main { grid-column: 3; min-width: 0; }
.ds-rows .wp-block-post-title { font-size: 17px; letter-spacing: -0.01em; margin: 0; }
.ds-rows .wp-block-post-title a { color: var(--ink); text-decoration: none; }
.ds-rows .wp-block-post-excerpt { margin: 4px 0 0; color: var(--ink-3); font-size: 13.5px; }
.ds-rows .wp-block-post-excerpt__more-text { display: none; }
.ds-rows .ds-row-end { grid-column: 4; display: flex; gap: 16px; align-items: center; white-space: nowrap; }
.ds-rows .wp-block-post-date { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.ds-rows .ds-row-arrow { font-family: var(--font-mono); color: var(--accent-ink); }

/* =========================================================
   ARTICLE LIST (author page — thumbnail + body rows, TechCrunch-style)
   ========================================================= */
.ds-list.wp-block-post-template { list-style: none; margin: 0; padding: 0; }
.ds-list.wp-block-post-template > li {
	display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start;
	padding: 26px 0; border-bottom: var(--hair-w) solid var(--hair);
}
.ds-list.wp-block-post-template > li:first-child { padding-top: 6px; }
.ds-list .ds-list-thumb { margin: 0; }
.ds-list .ds-list-thumb.wp-block-post-featured-image { aspect-ratio: 16 / 10; border-radius: 0; }
.ds-list .ds-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ds-list .ds-list-body { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ds-list .ds-list-body .wp-block-post-title { font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; margin: 0; }
.ds-list .ds-list-body .wp-block-post-title a { color: var(--ink); text-decoration: none; }
.ds-list .ds-list-body .wp-block-post-title a:hover { color: var(--accent-ink); }
.ds-list .ds-list-body .wp-block-post-excerpt { color: var(--ink-2); font-size: 15px; line-height: 1.55; margin: 0; }
.ds-list .ds-list-body .wp-block-post-excerpt__more-text { display: none; }
.ds-list .ds-list-body .ds-card-meta { margin-top: 4px; border-top: 0; padding-top: 0; }
/* no featured image → the body spans the full width (no empty slot, no collapse) */
.ds-list.wp-block-post-template > li:not(:has(.ds-list-thumb)) { grid-template-columns: 1fr; }
@media (max-width: 680px) {
	.ds-list.wp-block-post-template > li { grid-template-columns: 1fr; }
	.ds-list .ds-list-thumb.wp-block-post-featured-image { aspect-ratio: 16 / 9; }
}

/* =========================================================
   HERO  (home)
   ========================================================= */
.ds-hero { border-bottom: var(--hair-w) solid var(--hair-2); }
.ds-hero-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.ds-hero-head h1 { font-size: clamp(34px, 5vw, 60px); letter-spacing: -0.04em; max-width: 760px; margin: 0; }
.ds-hero-head h1 .accent { color: var(--accent); }
/* hero highlight — default: clean accent-coloured text (no background) */
.ds-hero-head h1 mark,
.ds-hero-head h1 .has-accent-color { background: transparent; color: var(--accent); }
/* hero highlight — "evidenziato": on-brand accent background marker */
.ds-hero-mark .ds-hero-head h1 mark,
.ds-hero-mark .ds-hero-head h1 .has-accent-color {
	background: color-mix(in srgb, var(--accent) 22%, transparent);
	color: var(--ink);
	padding: 0.02em 0.18em; border-radius: 5px;
	box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.ds-hero-grid {
	display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--hair-w);
	border: var(--hair-w) solid var(--hair-2); background: var(--hair-2);
}
.ds-hero-grid .ds-lead-cell { background: var(--surface); padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.ds-hero-grid .ds-lead-stack { display: flex; flex-direction: column; gap: var(--hair-w); background: var(--hair-2); }
.ds-hero-grid .ds-lead-stack .ds-lead-cell { flex: 1; padding: 24px; }
@media (max-width: 980px) { .ds-hero-grid { grid-template-columns: 1fr; } }

/* hero cards equal-height alignment — kill grey bleed from grid bg */
.ds-hero-grid.wp-block-columns {
	align-items: stretch;
	gap: var(--hair-w) !important; /* override WP column gap */
}
.ds-hero-grid > .wp-block-column {
	display: flex; flex-direction: column;
	background: var(--surface);
	padding: 0 !important; margin: 0 !important;
}
.ds-hero-grid > .wp-block-column > .wp-block-query {
	flex: 1; display: flex; flex-direction: column;
}
/* the hero-right column wraps its content in .ds-hero-alt groups (swap feature):
   keep the featured stack filling the column height so it lines up with the lead */
.ds-hero-grid > .wp-block-column > .ds-hero-alt { margin: 0; padding: 0; }
.ds-hero-grid > .wp-block-column > .ds-hero-alt-stack,
.ds-hero-grid > .wp-block-column > .ds-hero-alt-stack > .wp-block-query {
	flex: 1; display: flex; flex-direction: column;
}
.ds-cards.is-stack.wp-block-post-template {
	display: flex; flex-direction: column;
	flex: 1; gap: var(--hair-w);
	background: var(--hair-2);
}
/* margin:0 kills WP's flow-layout margin-block that would otherwise show the
   grey container bg as a thick band between the stacked cards.
   flex:1 0 auto = grow to fill the column (matches the lead height, no grey gap)
   but NEVER shrink below content, so cards stay dynamic and text is never cut.
   A card with an image is naturally taller; an image-less one takes less. */
.ds-cards.is-stack.wp-block-post-template > li { flex: 1 0 auto; margin: 0; }

/* lead card must also fill its column height so no grey bg leaks below it */
.ds-cards.is-lead.wp-block-post-template {
	flex: 1; display: flex; flex-direction: column;
}
.ds-cards.is-lead.wp-block-post-template > li { flex: 1; }

/* hero cards: seamless hairline grid. Drop per-card borders and the hover
   lift so the only grey is the 1px gaps between equal-height cells. */
.ds-hero-grid .ds-cards.wp-block-post-template > li { border: 0; }
.ds-hero-grid .ds-cards.wp-block-post-template > li:hover { transform: none; }

/* lead card: larger type to match the generous space it occupies */
/* lead fills the hero row height (flex:1); centre its content vertically so the
   left article stays centred when the right column (e.g. an 8-item "Più letti"
   list) makes the row taller than the lead card */
.ds-cards.is-lead > li { padding: 26px; gap: 16px; justify-content: center; }
.ds-cards.is-lead .wp-block-post-excerpt { font-size: 18.5px; line-height: 1.7; color: var(--ink-2); }
.ds-cards.is-lead .wp-block-post-terms.is-style-cat { font-size: 11.5px; }
/* hero: bigger category pill + index number, kept proportional */
.ds-hero-grid .ds-cards .wp-block-post-terms.is-style-cat { font-size: 14px; padding: 5px 12px; }
.ds-hero-grid .ds-cards.is-lead .wp-block-post-terms.is-style-cat { font-size: 16px; padding: 6px 14px; }
.ds-hero-grid .ds-cards > li::after { font-size: 17px; top: 20px; right: 20px; }
.ds-hero-grid .ds-cards.is-lead > li::after { font-size: 22px; top: 26px; right: 26px; }
.ds-cards.is-lead .ds-card-meta .wp-block-post-author-name,
.ds-cards.is-lead .ds-card-meta .wp-block-post-date { font-size: 12px; }
/* hero "no featured post" fallback */
.ds-hero-grid .wp-block-query-no-results {
	padding: 26px; border: 0; color: var(--ink-3); margin: 0;
}

/* =========================================================
   CATEGORY TILES (home strip)  → pattern output
   ========================================================= */
.ds-cattiles {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
	border-top: var(--hair-w) solid var(--hair);
	border-left: var(--hair-w) solid var(--hair);
}
.ds-cattile {
	display: flex; flex-direction: column; gap: 8px; padding: 22px;
	background: transparent; text-decoration: none; color: inherit;
	border-right: var(--hair-w) solid var(--hair);
	border-bottom: var(--hair-w) solid var(--hair);
	transition: background 0.16s ease;
}
.ds-cattile:hover { background: var(--bg-2); }
.ds-cattile-top { display: flex; justify-content: space-between; }
.ds-cattile-name { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -0.02em; }
.ds-cattile-desc { color: var(--ink-2); font-size: 13.5px; }
@media (max-width: 980px) { .ds-cattiles { grid-template-columns: repeat(2, 1fr); } }

/* =========================================================
   NEWSLETTER
   ========================================================= */
.ds-newsletter {
	border: var(--hair-w) solid var(--ink); padding: 48px 40px;
	display: flex; gap: 40px 48px; justify-content: center; flex-wrap: wrap; align-items: center;
}
.ds-newsletter > .wp-block-group { max-width: 520px !important; }
.ds-newsletter h2 { font-size: clamp(30px, 3.6vw, 42px); letter-spacing: -0.03em; line-height: 1.08; margin: 10px 0 0; }
.ds-newsletter .kicker.accent { color: var(--accent-ink); }
.ds-newsletter .ds-nl-copy { max-width: 460px; }
.ds-newsletter .ds-nl-form { max-width: 480px; min-width: 320px; }
/* anchor scroll offset (was an inline scroll-margin that broke block validation) */
.ds-sec-newsletter { scroll-margin-top: 80px; }

/* ---- NEWSLETTER SIGNUP FORM (datastack-newsletter plugin) ---- */
.ds-nl-form { display: flex; flex-direction: column; gap: 12px; min-width: 320px; flex: 1; max-width: 440px; }
.ds-nl-row { display: flex; gap: 0; align-items: stretch; }
.ds-nl-input {
	flex: 1; min-width: 0;
	font-family: var(--font-mono); font-size: 16px; letter-spacing: 0.01em;
	background: var(--surface); color: var(--ink);
	border: var(--hair-w) solid var(--ink); border-right: 0;
	padding: 17px 18px; border-radius: var(--radius) 0 0 var(--radius);
	transition: border-color 0.14s ease;
}
.ds-nl-input:focus { outline: none; border-color: var(--accent); }
.ds-nl-input::placeholder { color: var(--ink-3); }
.ds-nl-btn {
	flex: none;
	font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.06em;
	text-transform: uppercase; cursor: pointer; white-space: nowrap;
	background: var(--ink); color: var(--bg); border: var(--hair-w) solid var(--ink);
	padding: 17px 26px; border-radius: 0 var(--radius) var(--radius) 0;
	transition: background 0.14s ease, border-color 0.14s ease;
}
.ds-nl-btn:hover { background: var(--accent); border-color: var(--accent); }
.ds-nl-btn:disabled { opacity: 0.6; cursor: default; }
.ds-nl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ds-nl-msg {
	margin: 0; min-height: 1.2em;
	font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; color: var(--ink-3);
}
.ds-nl-msg.is-ok { color: var(--accent-ink); }
.ds-nl-msg.is-error { color: var(--accent); }

/* =========================================================
   SINGLE / ARTICLE
   ========================================================= */
.ds-progress { position: sticky; top: 64px; z-index: 30; height: 2px; background: transparent; }
.ds-progress > i { display: block; height: 2px; width: 0; background: var(--accent); transition: width 0.08s linear; }

.ds-breadcrumb { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px 8px; text-transform: lowercase; min-width: 0; }
.ds-breadcrumb .wp-block-post-terms { display: inline; }
.ds-breadcrumb a { color: var(--ink-3); text-decoration: none; }
.ds-breadcrumb .wp-block-post-terms a { color: var(--accent-ink); }

.ds-article-meta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding-top: 18px; border-top: var(--hair-w) solid var(--hair); }
.ds-article-meta .wp-block-avatar { flex: none; }
.ds-article-meta .wp-block-avatar img { width: 34px; height: 34px; border: var(--hair-w) solid var(--accent); border-radius: 50%; }
.ds-article-meta .wp-block-post-author-name { font-size: 14px; }
.ds-article-meta .wp-block-post-time-to-read { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; }
.ds-article-meta .wp-block-post-date { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); margin-left: auto; }

/* =========================================================
   AUTHOR ARCHIVE HEADER
   ========================================================= */
.ds-author-head { display: flex; gap: 32px; align-items: center; }
.ds-author-avatar { flex: none; }
.ds-author-avatar img {
	width: 150px; height: 150px; display: block; border-radius: 50%;
	border: 2px solid var(--accent);
}
.ds-author-meta { flex: 1; min-width: 0; }
.ds-author-name { font-size: clamp(36px, 5.5vw, 58px); letter-spacing: -0.035em; line-height: 1.02; margin: 8px 0 0; }
.ds-author-bio { color: var(--ink-2); font-size: 19px; line-height: 1.6; max-width: 720px; margin: 16px 0 0; }
@media (max-width: 720px) { .ds-author-head { gap: 18px; } .ds-author-avatar img { width: 104px; height: 104px; } }
.ds-author-social { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.ds-author-social a {
	font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em;
	color: var(--ink-2); text-decoration: none;
	border: var(--hair-w) solid var(--hair-2); padding: 5px 10px;
	transition: border-color 0.14s ease, color 0.14s ease;
}
.ds-author-social a:hover { border-color: var(--accent); color: var(--accent-ink); }
@media (max-width: 600px) { .ds-author-head { flex-direction: column; gap: 14px; } }

/* drop cap (Aspetto → datastack) — big initial on the first article paragraph */
.ds-dropcap .ds-body > p:first-of-type::first-letter {
	float: left; font-family: var(--font-display); font-weight: 600;
	font-size: 3.4em; line-height: 0.78; margin: 4px 10px 0 0; color: var(--accent-ink);
}

/* ad slot injected every N items in lists — neutralise card/row li styling */
li.ds-listad {
	grid-column: 1 / -1; list-style: none; display: block;
	margin: 22px 0; padding: 0; border: 0; background: none;
}
li.ds-listad::before, li.ds-listad::after { content: none !important; }
li.ds-listad:hover { transform: none; background: none; }

/* article body rhythm */
.ds-body { font-size: 17.5px; }
.ds-body p { line-height: 1.72; margin: 0 0 22px; }
.ds-body h2 { font-size: 25px; letter-spacing: -0.02em; margin: 38px 0 14px; }
.ds-body h3 { font-size: 20px; margin: 30px 0 12px; }
.ds-body a { color: var(--accent-ink); border-bottom: 1px solid var(--hair-2); }
.ds-body blockquote {
	margin: 30px 0; padding-left: 22px; border-left: 3px solid var(--accent);
}
.ds-body blockquote p { font-family: var(--font-display); font-size: 24px; line-height: 1.3; letter-spacing: -0.02em; }
.ds-body blockquote cite { font-family: var(--font-mono); color: var(--ink-3); font-style: normal; font-size: 12px; }
.ds-body ul, .ds-body ol { padding-left: 1.1em; }
.ds-body li { margin: 0 0 10px; line-height: 1.6; }
.ds-body img { border-radius: 0; }
/* generous, consistent rhythm around rich blocks in article bodies */
.ds-body .wp-block-code,
.ds-body .wp-block-preformatted,
.ds-body .wp-block-table,
.ds-body .wp-block-image,
.ds-body figure,
.ds-body .wp-block-pullquote,
.ds-body .wp-block-details,
.ds-body .wp-block-quote { margin-top: 30px; margin-bottom: 30px; }
.ds-body .is-style-ds-check { margin: 22px 0; }

.ds-tags { display: flex; gap: 8px; flex-wrap: wrap; }
/* the tags live inside one post-terms block as inline links; make THAT a
   flex-wrap row so each pill is a flex item with proper row + column gap
   (no overlap when a long tag wraps to the next line) */
.ds-tags .wp-block-post-terms {
	display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0;
}
.ds-tags .wp-block-post-terms__separator { display: none; }
.ds-tags .wp-block-post-terms a {
	display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; max-width: 100%;
	font-family: var(--font-mono); font-size: 11px; line-height: 1.2; letter-spacing: 0.04em; color: var(--ink-2);
	border: var(--hair-w) solid var(--hair-2); border-radius: var(--radius); padding: 5px 9px; text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease;
}
.ds-tags .wp-block-post-terms a:hover { border-color: var(--accent); color: var(--accent-ink); }
.ds-tags .wp-block-post-terms a::before { content: "#"; color: var(--ink-3); }

/* ---- SHARE ---- */
.ds-share {
	display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
	margin: 32px 0; padding: 16px 0;
	border-top: var(--hair-w) solid var(--hair); border-bottom: var(--hair-w) solid var(--hair);
}
.ds-share-label {
	font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
	text-transform: uppercase; color: var(--ink-3); margin-right: 4px;
}
.ds-share-link, .ds-share-copy {
	font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em;
	color: var(--ink-2); text-decoration: none; background: none; cursor: pointer;
	border: var(--hair-w) solid var(--hair-2); padding: 6px 11px; border-radius: var(--radius);
	transition: border-color 0.14s ease, color 0.14s ease;
}
.ds-share-link:hover, .ds-share-copy:hover { border-color: var(--accent); color: var(--accent-ink); }

/* ---- AUTHOR BOX (end of article) ---- */
.ds-authorbox {
	display: flex; gap: 24px; align-items: center; margin: 40px 0;
	padding: 26px 28px; border-radius: 12px;
	border: var(--hair-w) solid color-mix(in srgb, var(--accent) 22%, var(--hair));
	background:
		linear-gradient(180deg, color-mix(in srgb, var(--accent) 5%, transparent), transparent 70%),
		color-mix(in srgb, var(--surface) 70%, transparent);
	backdrop-filter: blur(4px);
}
.ds-authorbox-avatar { flex: none; }
.ds-authorbox-avatar img {
	width: 96px; height: 96px; display: block; border-radius: 50%;
	border: 2px solid var(--accent);
}
.ds-authorbox-meta { flex: 1; min-width: 0; }
.ds-authorbox-name {
	font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.02em;
	color: var(--ink); text-decoration: none; display: inline-block; margin-top: 2px;
}
.ds-authorbox-name:hover { color: var(--accent-ink); }
.ds-authorbox-bio { color: var(--ink-2); font-size: 14.5px; line-height: 1.6; margin: 8px 0 0; }
.ds-authorbox .ds-author-social { margin-top: 12px; }
@media (max-width: 600px) { .ds-authorbox { flex-direction: column; gap: 14px; } }

/* ---- POST NAVIGATION (prev / next) ---- */
.ds-postnav { margin: 40px 0; gap: 16px; }
.ds-postnav .wp-block-post-navigation-link { flex: 1 1 0; min-width: 0; }
.ds-postnav .wp-block-post-navigation-link:last-child { text-align: right; }

/* ---- COMMENTS — Reddit-style: compact, username-first, threaded with a
   collapsible reply line at every nesting level. ---- */
.ds-comments { margin-top: 52px; padding-top: 30px; border-top: 2px solid var(--ink); }
.ds-comments .wp-block-comments-title {
	font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em;
	margin: 0 0 16px; font-size: 22px;
}
.ds-comments .wp-block-comment-template { list-style: none; margin: 0; padding: 0; }
.ds-comments .wp-block-comment-template > li { padding: 9px 0 0; border: 0; }
.ds-comment { gap: 10px; align-items: flex-start; border: 0; padding: 0; }
.ds-comment > .wp-block-avatar { flex: none; }
.ds-comment .wp-block-avatar img {
	width: 28px; height: 28px; border-radius: 50%; border: var(--hair-w) solid var(--hair);
}
/* meta line: [–] toggle · username · time · (N risposte quando compresso) */
.ds-comment-meta { gap: 4px 8px; align-items: center; margin-bottom: 3px; flex-wrap: wrap; }
.ds-comment-collapse {
	flex: none; width: 18px; height: 18px; padding: 0; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
	background: none; border: 0; color: var(--ink-3);
	font-family: var(--font-mono); font-size: 12px; line-height: 1;
}
.ds-comment-collapse:hover { color: var(--accent); }
.ds-comments .wp-block-comment-author-name,
.ds-comments .wp-block-comment-author-name a {
	font-family: var(--font-body); font-weight: 600; font-size: 13.5px;
	color: var(--ink); text-decoration: none;
}
.ds-comments .wp-block-comment-author-name a:hover { color: var(--accent-ink); }
.ds-comments .wp-block-comment-date { display: inline-flex; align-items: center; }
.ds-comments .wp-block-comment-date::before { content: "·"; margin-right: 8px; color: var(--ink-3); }
/* style the container/time/link the same, so the relative label ("10 ore fa"),
   which the filter leaves as bare text inside <time>, matches the normal date */
.ds-comments .wp-block-comment-date,
.ds-comments .wp-block-comment-date time,
.ds-comments .wp-block-comment-date a {
	font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.02em; color: var(--ink-3); text-decoration: none;
}
.ds-comment-replies { display: none; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.ds-comments .wp-block-comment-content { color: var(--ink); font-size: 14.5px; line-height: 1.55; margin: 0 0 4px; }
.ds-comments .wp-block-comment-content p { margin: 0 0 8px; }
.ds-comments .wp-block-comment-content p:last-child { margin-bottom: 0; }
.ds-comments .wp-block-comment-reply-link a {
	font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase;
	color: var(--ink-3); text-decoration: none;
}
.ds-comments .wp-block-comment-reply-link a:hover { color: var(--accent-ink); }
/* threading: nested replies live in a bare <ol> (no class). Draw a continuous
   vertical thread line per level, with a ROUNDED connector branching into each
   reply — like Reddit. */
.ds-comments .wp-block-comment-template ol {
	list-style: none; margin: 2px 0 0; padding-left: 30px; position: relative;
}
.ds-comments .wp-block-comment-template ol::before {
	content: ""; position: absolute; left: 15px; top: 2px; bottom: 0;
	width: 2px; background: var(--hair); border-radius: 2px;
}
.ds-comments .wp-block-comment-template ol > li { position: relative; }
.ds-comments .wp-block-comment-template ol > li::before {
	content: ""; position: absolute; left: -15px; top: 0; width: 13px; height: 19px;
	border-left: 2px solid var(--hair); border-bottom: 2px solid var(--hair);
	border-bottom-left-radius: 12px;
}
/* erase the vertical line below the LAST reply's connector */
.ds-comments .wp-block-comment-template ol > li:last-child::after {
	content: ""; position: absolute; left: -16px; top: 19px; bottom: -2px;
	width: 4px; background: var(--bg);
}
/* highlight the whole thread line of a sub-tree on hover */
.ds-comments .wp-block-comment-template ol:hover > li::before,
.ds-comments .wp-block-comment-template ol:hover::before { border-color: var(--hairline-2); }

/* collapsed: hide body + replies, keep the meta line and show the reply count */
.ds-comments li.is-collapsed > .ds-comment .wp-block-comment-content,
.ds-comments li.is-collapsed > .ds-comment .wp-block-comment-reply-link,
.ds-comments li.is-collapsed > ol { display: none; }
.ds-comments li.is-collapsed > .ds-comment .ds-comment-replies { display: inline-flex; }
.ds-comments li.is-collapsed > .ds-comment .wp-block-avatar { opacity: 0.55; }

/* vote widget (Reddit-style ▲ score ▼) inside the meta line */
.ds-cvote { display: inline-flex; align-items: center; gap: 2px; margin-right: 2px; }
.ds-cvote button {
	background: none; border: 0; padding: 0 2px; cursor: pointer; line-height: 1;
	font-size: 10px; color: var(--ink-3);
	transition: color 0.12s ease, transform 0.12s ease;
}
.ds-cvote button:hover { color: var(--ink); transform: scale(1.18); }
.ds-cvote .ds-cvote-up.is-active { color: var(--accent); }
.ds-cvote .ds-cvote-down.is-active { color: var(--accent-ink); }
.ds-cvote-score {
	font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
	color: var(--ink-2); min-width: 16px; text-align: center; font-variant-numeric: tabular-nums;
}
.ds-cvote.is-pos .ds-cvote-score { color: var(--accent); }
.ds-cvote.is-neg .ds-cvote-score { color: var(--accent-ink); }
.ds-cvote.is-busy { opacity: 0.55; pointer-events: none; }
/* hide votes on a collapsed comment's meta? keep visible — score is useful */
/* Comment + reply form */
.ds-comments .comment-reply-title,
.ds-comments .wp-block-post-comments-form .comment-reply-title {
	font-family: var(--font-display); font-weight: 600;
	font-size: clamp(28px, 3.8vw, 46px); letter-spacing: -0.03em; line-height: 1.1;
	margin: 0 0 10px;
}
.ds-comments .wp-block-post-comments-form { margin-top: 28px; padding-top: 26px; border-top: var(--hair-w) solid var(--hair); }
/* small print: "Connesso come…", "I campi obbligatori…" */
.ds-comments .comment-form-logged-in-as,
.ds-comments .comment-notes,
.ds-comments .logged-in-as,
.ds-comments .required-field-message {
	font-family: var(--font-mono); font-size: 11px; line-height: 1.5;
	letter-spacing: 0.02em; color: var(--ink-3); margin: 4px 0 14px;
}
.ds-comments .comment-form-logged-in-as a,
.ds-comments .comment-notes a { color: var(--accent-ink); }
/* comment form fields: roomy textarea + on-brand inputs */
.ds-comments .comment-form textarea,
.ds-comments .wp-block-post-comments-form textarea {
	width: 100%; min-height: 150px; resize: vertical;
	font-family: var(--font-body); font-size: 15px; line-height: 1.6;
	padding: 12px 14px; border: var(--hair-w) solid var(--hair); border-radius: 8px;
	background: var(--surface); color: var(--ink); box-sizing: border-box;
}
.ds-comments .comment-form input[type=text],
.ds-comments .comment-form input[type=email],
.ds-comments .comment-form input[type=url] {
	font-family: var(--font-body); font-size: 14px;
	padding: 9px 12px; border: var(--hair-w) solid var(--hair); border-radius: 8px;
	background: var(--surface); color: var(--ink); max-width: 320px;
}
.ds-comments .comment-form textarea:focus,
.ds-comments .comment-form input:focus {
	border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); outline: 2px solid transparent;
}
.ds-comments .comment-form label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--ink-2); }
.ds-comments .comment-form-comment { margin-bottom: 14px; }

/* =========================================================
   FOOTER
   ========================================================= */
.ds-footer { border-top: var(--hair-w) solid var(--hair-2); margin-top: 80px; background: var(--bg); }
.ds-foot-bio { max-width: 320px; }
/* footer columns: align every section to the same top line */
.ds-footer > .wp-block-group:first-child {
	align-items: flex-start; gap: 48px;
}
.ds-footer > .wp-block-group:first-child > .wp-block-group { align-self: flex-start; }
/* the brand column may run wider; the link columns stay compact */
.ds-footer > .wp-block-group:first-child > .wp-block-group:first-child { max-width: 320px; }
.ds-footer .wp-block-navigation { font-family: var(--font-mono); font-size: 13px; }
.ds-footer a { color: var(--ink-2); text-decoration: none; }
.ds-footer a:hover { color: var(--accent-ink); }
/* reset any list-based block inside footer */
.ds-footer .wp-block-categories,
.ds-footer .wp-block-page-list,
.ds-footer .wp-block-archives { list-style: none; padding: 0; margin: 0; border: 0; }
.ds-footer .wp-block-categories li,
.ds-footer .wp-block-page-list li,
.ds-footer .wp-block-archives li { border: 0; padding: 0; margin: 0 0 6px; }
.ds-footer .wp-block-categories li a,
.ds-footer .wp-block-page-list li a,
.ds-footer .wp-block-archives li a { font-family: var(--font-mono); font-size: 13px; }
/* footer sub-pages nested list */
.ds-footer .wp-block-page-list .wp-block-pages-list__item__link { display: inline; }
.ds-footer .wp-block-page-list .wp-block-pages-list__item .wp-block-pages-list__item { margin-left: 12px; }

/* =========================================================
   CORE BLOCKS — unified design-system styling
   ========================================================= */

/* ---- PAGE LIST ---- */
.wp-block-page-list {
	list-style: none; padding: 0; margin: 0;
}
.wp-block-page-list li {
	margin: 0 0 6px; padding: 0; border: 0;
}
.wp-block-page-list a {
	font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em;
	color: var(--ink-2); text-decoration: none;
}
.wp-block-page-list a:hover { color: var(--accent-ink); }
/* nested sub-pages */
.wp-block-page-list .wp-block-pages-list__item .wp-block-pages-list__item { margin-left: 14px; }

/* ---- NAVIGATION ---- */
.wp-block-navigation {
	font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em;
}
.wp-block-navigation a { color: var(--ink-2); text-decoration: none; }
.wp-block-navigation a:hover { color: var(--accent-ink); }
.wp-block-navigation .wp-block-navigation-item__content { padding: 6px 8px; }
.wp-block-navigation .wp-block-navigation__submenu-container {
	background: var(--surface); border: var(--hair-w) solid var(--hair);
	padding: 8px 0; min-width: 180px;
}
.wp-block-navigation .wp-block-navigation__submenu-container a {
	padding: 6px 16px; display: block;
}
.wp-block-navigation .wp-block-navigation__submenu-container a:hover { background: var(--bg-2); }

/* ---- SEARCH ---- */
.wp-block-search {
	font-family: var(--font-body);
}
.wp-block-search__label {
	font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
	text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px;
}
.wp-block-search__input {
	font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em;
	background: var(--surface); color: var(--ink); border: var(--hair-w) solid var(--hair-2);
	padding: 10px 14px; border-radius: var(--radius);
	transition: border-color 0.14s ease;
}
.wp-block-search__input:focus { border-color: var(--accent); outline: none; }
.wp-block-search__input::placeholder { color: var(--ink-3); }
.wp-block-search__button {
	font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
	text-transform: uppercase; background: var(--ink); color: var(--bg);
	border: 0; padding: 10px 18px; border-radius: var(--radius); cursor: pointer;
	transition: background 0.14s ease;
}
.wp-block-search__button:hover { background: var(--accent); }

/* ---- TABLE ---- */
.wp-block-table {
	font-family: var(--font-body); font-size: 14.5px;
	overflow-x: auto; margin: 0 0 22px;
}
.wp-block-table table {
	width: 100%; border-collapse: collapse; border-spacing: 0;
}
.wp-block-table th {
	font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
	text-transform: uppercase; text-align: left; color: var(--ink-3);
	padding: 10px 14px; border-bottom: 2px solid var(--ink);
	background: var(--bg-2); white-space: nowrap;
}
.wp-block-table td {
	padding: 10px 14px; border-bottom: var(--hair-w) solid var(--hair);
	vertical-align: top;
}
.wp-block-table tr:hover td { background: var(--bg-2); }
.wp-block-table figcaption {
	font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
	letter-spacing: 0.04em; text-align: left; margin-top: 8px;
}
/* striped variant */
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) td { background: var(--bg-2); }
.wp-block-table.is-style-stripes tbody tr:hover td { background: var(--accent-wash); }

/* ---- CODE ---- */
.wp-block-code {
	position: relative;
	font-family: var(--font-mono); font-size: 13.5px; line-height: 1.65;
	letter-spacing: 0; background: var(--bg-2); color: var(--ink);
	border: var(--hair-w) solid var(--hair); padding: 38px 22px 20px;
	overflow-x: auto; border-radius: var(--radius); margin: 0 0 22px;
	tab-size: 4;
}
/* terminal chrome: a thin header bar with window dots */
.wp-block-code::before {
	content: ""; position: absolute; inset: 0 0 auto 0; height: 28px;
	background: var(--bg); border-bottom: var(--hair-w) solid var(--hair);
	border-radius: var(--radius) var(--radius) 0 0;
}
.wp-block-code::after {
	content: "\25CF \25CF \25CF"; position: absolute; top: 8px; left: 16px;
	font-size: 9px; letter-spacing: 3px; color: var(--hair-2); line-height: 1;
}
.wp-block-code code {
	font-family: inherit; font-size: inherit; background: none;
	padding: 0; border: 0; color: inherit;
}

/* ---- PREFORMATTED ---- */
.wp-block-preformatted {
	font-family: var(--font-mono); font-size: 13.5px; line-height: 1.6;
	background: var(--bg-2); border: var(--hair-w) solid var(--hair);
	padding: 20px 22px; overflow-x: auto; border-radius: var(--radius);
	margin: 0 0 22px; white-space: pre-wrap; tab-size: 4;
}

/* ---- INLINE CODE (inside paragraphs) ---- */
.ds-body code, p code, li code, td code {
	font-family: var(--font-mono); font-size: 0.88em;
	background: var(--bg-2); border: var(--hair-w) solid var(--hair);
	padding: 2px 6px; border-radius: 2px;
}

/* ---- QUOTE ---- */
.wp-block-quote {
	margin: 30px 0; padding-left: 22px; border-left: 3px solid var(--accent);
}
.wp-block-quote p {
	font-family: var(--font-display); font-size: 22px; line-height: 1.3;
	letter-spacing: -0.02em;
}
.wp-block-quote cite {
	font-family: var(--font-mono); color: var(--ink-3); font-style: normal;
	font-size: 12px; letter-spacing: 0.04em;
}
.wp-block-quote.is-style-plain { border-left: 0; padding-left: 0; }
.wp-block-quote.is-style-plain p { font-family: var(--font-body); font-size: inherit; }

/* ---- PULLQUOTE ---- */
.wp-block-pullquote {
	border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
	padding: 28px 0; margin: 36px 0; text-align: center;
}
.wp-block-pullquote blockquote { border: 0; padding: 0; margin: 0; }
.wp-block-pullquote p {
	font-family: var(--font-display); font-size: clamp(22px, 3vw, 30px);
	line-height: 1.2; letter-spacing: -0.03em; color: var(--ink);
}
.wp-block-pullquote cite {
	font-family: var(--font-mono); font-size: 12px; color: var(--ink-3);
	letter-spacing: 0.06em; text-transform: uppercase; font-style: normal;
	display: block; margin-top: 14px;
}

/* ---- IMAGE ---- */
.wp-block-image { margin: 0 0 22px; }
.wp-block-image img { display: block; max-width: 100%; height: auto; border-radius: 0; }
.wp-block-image figcaption {
	font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
	letter-spacing: 0.04em; margin-top: 10px; padding-top: 8px;
	border-top: var(--hair-w) solid var(--hair);
}

/* ---- GALLERY ---- */
.wp-block-gallery { margin: 0 0 22px; gap: var(--hair-w) !important; }
.wp-block-gallery .wp-block-image { margin: 0; }
.wp-block-gallery figcaption {
	font-family: var(--font-mono); font-size: 11px; color: #fff;
	letter-spacing: 0.04em; background: oklch(0.2 0 0 / 0.7); padding: 6px 10px;
}

/* ---- COVER ---- */
.wp-block-cover { min-height: 340px; margin: 0 0 22px; border-radius: 0; }
.wp-block-cover .wp-block-cover__inner-container {
	font-family: var(--font-display);
}

/* ---- MEDIA & TEXT ---- */
.wp-block-media-text { margin: 0 0 22px; gap: 28px; }
.wp-block-media-text .wp-block-media-text__content {
	padding: 0;
}

/* ---- FILE ---- */
.wp-block-file {
	background: var(--bg-2); border: var(--hair-w) solid var(--hair);
	padding: 14px 18px; margin: 0 0 22px; display: flex; align-items: center;
	justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; border-radius: var(--radius);
}
.wp-block-file a:not(.wp-block-file__button) { min-width: 0; word-break: break-word; }
.wp-block-file a:not(.wp-block-file__button) {
	font-family: var(--font-mono); font-size: 13px; color: var(--ink);
	text-decoration: none; letter-spacing: 0.02em;
}
.wp-block-file .wp-block-file__button {
	font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
	text-transform: uppercase; background: var(--ink); color: var(--bg);
	padding: 8px 14px; border-radius: var(--radius); text-decoration: none;
	transition: background 0.14s ease;
}
.wp-block-file .wp-block-file__button:hover { background: var(--accent); }

/* ---- VIDEO / AUDIO ---- */
.wp-block-video, .wp-block-audio { margin: 0 0 22px; }
.wp-block-video video { display: block; width: 100%; border-radius: 0; }
.wp-block-video figcaption, .wp-block-audio figcaption {
	font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
	letter-spacing: 0.04em; margin-top: 8px;
}
.wp-block-audio audio { width: 100%; }

/* ---- EMBED ---- */
.wp-block-embed { margin: 0 0 22px; }
.wp-block-embed figcaption {
	font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
	letter-spacing: 0.04em; margin-top: 8px; text-align: center;
}

/* ---- ARCHIVES ---- */
.wp-block-archives {
	list-style: none; padding: 0; margin: 0;
}
.wp-block-archives li {
	margin: 0 0 6px; padding: 0; border: 0;
}
.wp-block-archives a {
	font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em;
	color: var(--ink-2); text-decoration: none;
}
.wp-block-archives a:hover { color: var(--accent-ink); }
/* dropdown variant */
.wp-block-archives select {
	font-family: var(--font-mono); font-size: 13px; background: var(--surface);
	border: var(--hair-w) solid var(--hair-2); padding: 8px 12px; color: var(--ink);
	border-radius: var(--radius);
}

/* ---- TAG CLOUD ---- */
.wp-block-tag-cloud {
	display: flex; flex-wrap: wrap; gap: 6px;
}
.wp-block-tag-cloud a {
	font-family: var(--font-mono); font-size: 11px !important; letter-spacing: 0.04em;
	color: var(--ink-2); text-decoration: none;
	border: var(--hair-w) solid var(--hair-2); padding: 5px 10px;
	transition: border-color 0.14s ease, color 0.14s ease;
}
.wp-block-tag-cloud a:hover { border-color: var(--accent); color: var(--accent-ink); }

/* ---- LATEST POSTS ---- */
.wp-block-latest-posts {
	list-style: none; padding: 0; margin: 0;
}
.wp-block-latest-posts li {
	margin: 0; padding: 14px 0; border-bottom: var(--hair-w) solid var(--hair);
}
.wp-block-latest-posts li:first-child { padding-top: 0; }
.wp-block-latest-posts a {
	font-family: var(--font-display); font-weight: 600;
	font-size: 17px; letter-spacing: -0.01em;
	color: var(--ink); text-decoration: none;
}
.wp-block-latest-posts a:hover { color: var(--accent-ink); }
.wp-block-latest-posts .wp-block-latest-posts__post-date {
	font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
	letter-spacing: 0.04em; display: block; margin-top: 4px;
}
.wp-block-latest-posts .wp-block-latest-posts__post-excerpt {
	color: var(--ink-2); font-size: 14px; margin-top: 4px; line-height: 1.5;
}
.wp-block-latest-posts .wp-block-latest-posts__post-author {
	font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
	letter-spacing: 0.04em;
}
/* grid layout */
.wp-block-latest-posts.is-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px;
}
.wp-block-latest-posts.is-grid li {
	padding: 18px; border: var(--hair-w) solid var(--hair);
	background: var(--surface); border-bottom: var(--hair-w) solid var(--hair);
}

/* ---- LATEST COMMENTS ---- */
.wp-block-latest-comments {
	padding: 0; margin: 0;
}
.wp-block-latest-comments__comment {
	padding: 14px 0; border-bottom: var(--hair-w) solid var(--hair);
}
.wp-block-latest-comments__comment-meta {
	font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
	letter-spacing: 0.04em;
}
.wp-block-latest-comments__comment-meta a { color: var(--accent-ink); text-decoration: none; }
.wp-block-latest-comments__comment-excerpt { color: var(--ink-2); font-size: 14px; margin-top: 4px; }

/* ---- CALENDAR ---- */
.wp-block-calendar {
	font-family: var(--font-mono); font-size: 13px;
}
.wp-block-calendar table {
	border-collapse: collapse; width: 100%;
}
.wp-block-calendar caption {
	font-family: var(--font-display); font-weight: 600; font-size: 18px;
	letter-spacing: -0.02em; text-align: left; padding: 0 0 12px;
	border-bottom: 2px solid var(--ink); margin-bottom: 8px;
}
.wp-block-calendar th {
	font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
	color: var(--ink-3); padding: 8px 4px; text-align: center;
}
.wp-block-calendar td {
	padding: 6px 4px; text-align: center; border: 0;
}
.wp-block-calendar td a {
	color: var(--accent-ink); font-weight: 600; text-decoration: none;
}
.wp-block-calendar #today { background: var(--accent-wash); font-weight: 600; }
.wp-block-calendar nav { display: flex; justify-content: space-between; margin-top: 8px; }
.wp-block-calendar nav a {
	font-family: var(--font-mono); font-size: 11px; color: var(--ink-2);
	text-decoration: none; letter-spacing: 0.04em;
}

/* ---- SOCIAL LINKS ---- */
.wp-block-social-links {
	gap: 8px;
}
.wp-block-social-links .wp-social-link {
	background: var(--bg-2); border: var(--hair-w) solid var(--hair);
	transition: border-color 0.14s ease, background 0.14s ease;
}
.wp-block-social-links .wp-social-link:hover {
	border-color: var(--accent); background: var(--accent-wash);
}
.wp-block-social-links .wp-social-link svg { fill: var(--ink); }
.wp-block-social-links.is-style-logos-only .wp-social-link { background: none; border: 0; }

/* ---- DETAILS / ACCORDION ---- */
.wp-block-details {
	border: var(--hair-w) solid var(--hair); margin: 0 0 8px;
	background: var(--surface); border-radius: var(--radius);
}
.wp-block-details summary {
	font-family: var(--font-display); font-weight: 600; font-size: 16px;
	letter-spacing: -0.01em; padding: 14px 18px; cursor: pointer;
	display: flex; align-items: center; gap: 10px;
	transition: background 0.14s ease; list-style: none;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::before {
	content: "›"; font-family: var(--font-mono); font-size: 16px;
	color: var(--accent); transition: transform 0.14s ease;
	display: inline-block; flex: none; width: 14px; text-align: center;
}
.wp-block-details[open] summary::before { transform: rotate(90deg); }
.wp-block-details summary:hover { background: var(--bg-2); }
.wp-block-details > :not(summary) {
	padding: 0 18px 16px; color: var(--ink-2); font-size: 15px;
}

/* ---- SEPARATOR ---- */
.wp-block-separator {
	border: 0; height: var(--hair-w); background: var(--hair);
	margin: 30px 0; opacity: 1;
}
.wp-block-separator.is-style-wide { width: 100%; }
.wp-block-separator.is-style-dots {
	background: none; height: auto; text-align: center;
	font-family: var(--font-mono); font-size: 20px; letter-spacing: 1em;
	color: var(--ink-3);
}

/* ---- PAGINATION (query / comments) ---- */
.wp-block-query-pagination {
	font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em;
}
.wp-block-query-pagination a {
	color: var(--ink-2); text-decoration: none; padding: 6px 12px;
	border: var(--hair-w) solid var(--hair); border-radius: var(--radius);
	transition: border-color 0.14s ease, color 0.14s ease;
}
.wp-block-query-pagination a:hover { border-color: var(--accent); color: var(--accent-ink); }
.wp-block-query-pagination .current {
	background: var(--ink); color: var(--bg); border-color: var(--ink);
	padding: 6px 12px; border-radius: var(--radius);
}

/* ---- COLUMNS ---- */
.wp-block-columns { gap: 28px; }
.wp-block-column { min-width: 0; }

/* ---- FOOTNOTES ---- */
.wp-block-footnotes {
	font-family: var(--font-mono); font-size: 12px; color: var(--ink-2);
	letter-spacing: 0.02em; padding-top: 18px;
	border-top: var(--hair-w) solid var(--hair); margin-top: 36px;
}
.wp-block-footnotes li { margin: 0 0 6px; }

/* ---- LISTS (global reset for widget/sidebar lists) ---- */
.wp-block-categories,
.wp-block-archives,
.wp-block-page-list { list-style: none; padding: 0; }

/* ---- FORMS (comments, search, generic) ---- */
input[type="text"], input[type="email"], input[type="url"],
input[type="search"], input[type="password"], textarea {
	font-family: var(--font-body); font-size: 15px;
	background: var(--surface); color: var(--ink);
	border: var(--hair-w) solid var(--hair-2);
	padding: 10px 14px; border-radius: var(--radius);
	transition: border-color 0.14s ease;
}
input:focus, textarea:focus { border-color: var(--accent); outline: none; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
label {
	font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
	text-transform: uppercase; color: var(--ink-3); display: block; margin: 0 0 6px;
}
select {
	font-family: var(--font-mono); font-size: 13px; background: var(--surface);
	border: var(--hair-w) solid var(--hair-2); padding: 8px 12px; color: var(--ink);
	border-radius: var(--radius);
}
input[type="submit"], button[type="submit"] {
	font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
	text-transform: uppercase; background: var(--ink); color: var(--bg);
	border: 0; padding: 10px 22px; border-radius: var(--radius); cursor: pointer;
	transition: background 0.14s ease;
}
input[type="submit"]:hover, button[type="submit"]:hover { background: var(--accent); }

/* ---- COMMENTS SECTION ---- */
.comment-respond { margin-top: 40px; }
.comment-reply-title {
	font-family: var(--font-display); font-weight: 600; font-size: 22px;
	letter-spacing: -0.02em;
}
.comment-list {
	list-style: none; padding: 0; margin: 0;
}
.comment-list .comment {
	padding: 18px 0; border-bottom: var(--hair-w) solid var(--hair);
}
.comment-list .comment-meta {
	font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
	letter-spacing: 0.04em; margin-bottom: 8px;
}
.comment-list .comment-content { font-size: 15px; color: var(--ink-2); }

/* ---- AD SLOT ---- */
.ad-slot {
	background: var(--bg-2); border: var(--hair-w) dashed var(--hair-2);
	min-height: 90px; display: flex; align-items: center; justify-content: center;
}
.ad-slot__label { margin: 0; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.ad-slot:has(iframe), .ad-slot:has(ins), .ad-slot:has(.adsbygoogle) { background: transparent; border: 0; min-height: 0; }
.ad-slot:has(iframe) .ad-slot__label, .ad-slot:has(ins) .ad-slot__label, .ad-slot:has(.adsbygoogle) .ad-slot__label { display: none; }

/* =========================================================
   CORE BLOCKS — coverage completion
   Every block the editor can insert shares the same
   design language: mono labels, hairlines, accent hover.
   ========================================================= */

/* ---- CATEGORIES (now matches page-list / archives) ---- */
.wp-block-categories { list-style: none; padding: 0; margin: 0; }
.wp-block-categories li { margin: 0 0 6px; padding: 0; border: 0; }
.wp-block-categories a {
	font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em;
	color: var(--ink-2); text-decoration: none;
}
.wp-block-categories a:hover { color: var(--accent-ink); }
.wp-block-categories .children,
.wp-block-categories ul { list-style: none; padding: 0; margin: 6px 0 0 14px; }
/* post-count number */
.wp-block-categories li { color: var(--ink-3); }
.wp-block-categories li .post-count { color: var(--ink-3); }
/* inline / horizontal variant */
.wp-block-categories.wp-block-categories-list.is-inline,
.wp-block-categories.is-style-inline { display: flex; flex-wrap: wrap; gap: 6px; }
.wp-block-categories.is-style-inline li { margin: 0; }
/* dropdown variant inherits the global <select> styling */

/* ---- LIST (content lists, .wp-block-list) ---- */
.wp-block-list { padding-left: 1.1em; margin: 0 0 22px; }
.wp-block-list li { margin: 0 0 8px; line-height: 1.6; }
.wp-block-list .wp-block-list, .wp-block-list ul, .wp-block-list ol { margin: 8px 0 0; }
.wp-block-list li::marker { color: var(--ink-3); }
ol.wp-block-list { list-style: decimal-leading-zero; }
/* "ds-check" list style — mono arrow markers */
ul.wp-block-list.is-style-ds-check { list-style: none; padding-left: 0; }
ul.wp-block-list.is-style-ds-check > li { position: relative; padding-left: 26px; }
ul.wp-block-list.is-style-ds-check > li::before {
	content: "\2192"; position: absolute; left: 0; top: 0;
	color: var(--accent); font-family: var(--font-mono);
}

/* ---- DEFINITION LIST ---- */
dl { margin: 0 0 22px; }
dl dt { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }
dl dd { color: var(--ink-2); margin: 4px 0 14px; }

/* ---- HEADINGS (generic content, beyond theme.json h1/h2) ---- */
.wp-block-heading { font-family: var(--font-display); }
h3.wp-block-heading { font-size: 20px; letter-spacing: -0.01em; }
h4.wp-block-heading { font-size: 17px; }
h5.wp-block-heading, h6.wp-block-heading {
	font-family: var(--font-mono); font-weight: 600; font-size: 12px;
	letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
}

/* ---- BUTTONS (hover + outline variant) ---- */
.wp-block-buttons { gap: 10px; }
.wp-block-button__link:hover { background: var(--accent); color: #fff; }
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent; color: var(--ink);
	border: var(--hair-w) solid var(--ink); box-shadow: none;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--ink); color: var(--bg); border-color: var(--ink);
}

/* ---- RSS ---- */
.wp-block-rss { list-style: none; padding: 0; margin: 0; }
.wp-block-rss li { padding: 14px 0; border-bottom: var(--hair-w) solid var(--hair); }
.wp-block-rss .wp-block-rss__item-title a {
	font-family: var(--font-display); font-weight: 600; font-size: 16px;
	letter-spacing: -0.01em; color: var(--ink); text-decoration: none;
}
.wp-block-rss .wp-block-rss__item-title a:hover { color: var(--accent-ink); }
.wp-block-rss__item-publish-date, .wp-block-rss__item-author {
	font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em;
}
.wp-block-rss__item-excerpt { color: var(--ink-2); font-size: 14px; margin-top: 4px; line-height: 1.5; }
.wp-block-rss.is-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.wp-block-rss.is-grid li { border: var(--hair-w) solid var(--hair); padding: 18px; }

/* ---- AVATAR / POST AUTHOR ---- */
.wp-block-avatar img { border-radius: 0; }
.wp-block-post-author { display: flex; gap: 12px; align-items: center; }
.wp-block-post-author__avatar img { border: var(--hair-w) solid var(--accent); border-radius: 0; }
.wp-block-post-author__name { font-family: var(--font-display); font-weight: 600; }
.wp-block-post-author__byline {
	font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
	letter-spacing: 0.06em; text-transform: uppercase;
}
.wp-block-post-author-biography { color: var(--ink-2); font-size: 14.5px; line-height: 1.6; }

/* ---- QUERY / TERM / ARCHIVE TITLES + DESCRIPTIONS ---- */
.wp-block-query-title, .wp-block-archive-title { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; }
.wp-block-term-description { color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.wp-block-post-terms { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; }
.wp-block-post-terms a { color: var(--accent-ink); text-decoration: none; }

/* ---- POST NAVIGATION (single prev / next) ---- */
.wp-block-post-navigation-link, .wp-block-query-pagination-previous, .wp-block-query-pagination-next {
	font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
}
.wp-block-post-navigation-link a { color: var(--accent-ink); text-decoration: none; }
.wp-block-post-navigation-link a:hover { color: var(--ink); }

/* ---- COMMENTS — base styles live in the scoped .ds-comments block above.
   Only the generic comments-title fallback is kept here for non-single uses. ---- */
.wp-block-comments-title, .wp-block-post-comments-form .comment-reply-title {
	font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em;
}

/* ---- QUERY NO RESULTS ---- */
.wp-block-query-no-results {
	font-family: var(--font-mono); font-size: 13px; color: var(--ink-2);
	padding: 18px 0; border-top: var(--hair-w) solid var(--hair);
}

/* ---- VERSE ---- */
.wp-block-verse {
	font-family: var(--font-mono); font-size: 14px; line-height: 1.6;
	background: var(--bg-2); border: var(--hair-w) solid var(--hair);
	padding: 18px 20px; border-radius: var(--radius); margin: 0 0 22px;
}

/* ---- TABLE OF CONTENTS ---- */
.wp-block-table-of-contents { font-family: var(--font-mono); font-size: 13px; }
.wp-block-table-of-contents ul { list-style: none; padding-left: 14px; margin: 0; }
.wp-block-table-of-contents a { color: var(--ink-2); text-decoration: none; }
.wp-block-table-of-contents a:hover { color: var(--accent-ink); }

/* ---- SITE TAGLINE ---- */
.wp-block-site-tagline {
	font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.04em;
}

/* ---- INLINE: highlight / mark, kbd, sub-sup ---- */
mark { background: var(--accent-wash); color: inherit; padding: 0 2px; border-radius: 2px; }
kbd {
	font-family: var(--font-mono); font-size: 0.85em; background: var(--bg-2);
	border: var(--hair-w) solid var(--hair-2); border-bottom-width: 2px;
	padding: 1px 6px; border-radius: 3px;
}
sub, sup { font-family: var(--font-mono); font-size: 0.72em; }

/* ---- LOGIN/OUT + POST COMMENTS FORM inherit the global form styles ---- */
.wp-block-loginout, .wp-block-post-comments-form { font-family: var(--font-body); }

/* =========================================================
   ACCESSIBILITY
   ========================================================= */
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; padding: 0; overflow: hidden;
	position: absolute; word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: var(--surface); color: var(--ink); clip: auto; clip-path: none;
	display: block; height: auto; width: auto; padding: 12px 18px; left: 8px; top: 8px;
	z-index: 100000; border: var(--hair-w) solid var(--ink);
	font-family: var(--font-mono); font-size: 13px;
}

/* =========================================================
   PRINT
   ========================================================= */
@media print {
	.ds-statusbar, .ds-ticker-bar, .ds-header, .ds-footer, .ds-progress,
	.ds-share, .ds-postnav, .ds-comments, .ad-slot, .ds-newsletter,
	.ds-navtoggle, .wp-block-post-comments-form { display: none !important; }
	html, body { background: #fff !important; color: #000 !important; }
	.ds-body { font-size: 12pt; }
	a { color: #000 !important; text-decoration: underline; }
	.ds-wrap, main { max-width: 100% !important; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 760px) {
	.hide-sm { display: none !important; }
	/* statusbar: give the tagline the room it needs — slim the right group and
	   drop the decorative LIVE badge; ellipsis stays only as a last-resort guard */
	.ds-statusbar .ds-wrap { font-size: 10px; letter-spacing: 0.04em; gap: 12px; }
	.ds-statusbar .ds-wrap > span:first-child { flex: 1 1 auto; min-width: 0; }
	.ds-statusbar .ds-status-right { gap: 10px; flex: none; }
	.ds-statusbar .ds-live { display: none; }
	.ds-navtoggle { display: inline-flex; }
	.ds-header .ds-wrap { position: relative; }
	.ds-catnav { display: none !important; }
	.ds-header.ds-nav-open .ds-catnav {
		display: flex !important; flex-direction: column; align-items: stretch;
		position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
		background: var(--bg); border-bottom: var(--hair-w) solid var(--hair-2);
		padding: 4px var(--gut) 12px; gap: 0; overflow: visible;
	}
	.ds-header.ds-nav-open .ds-catnav a {
		padding: 12px 2px; border-top: var(--hair-w) solid var(--hair); font-size: 14px;
	}
	.ds-cards.wp-block-post-template { grid-template-columns: 1fr; }
	.ds-cattiles { grid-template-columns: 1fr; }
	.ds-rows.wp-block-post-template > li { grid-template-columns: 40px 1fr; }
	.ds-rows .wp-block-post-terms, .ds-rows .wp-block-post-excerpt, .ds-rows .ds-row-end .wp-block-post-date { display: none !important; }
	.ds-rows .ds-row-main { grid-column: 2; }
	.ds-rows .ds-row-end { grid-column: 2; }
}

/* =========================================================================
 * OPTIONAL FEATURES (toggled from the theme panel via body classes)
 * Each feature is hidden by default and revealed only when its switch is on.
 * ====================================================================== */

/* ---- "Più letti" / Trending ranking -------------------------------------- */
.ds-sec-trending { display: none; }
.ds-show-trending .ds-sec-trending { display: block; }

/* Hero right column content (panel: hero_right) — affects ONLY the hero.
   The hide selectors match the centering rule's specificity path so they win. */
.ds-hero-alt-trend { display: none; }
.ds-hero-trending .ds-hero-grid > .wp-block-column > .ds-hero-alt-stack { display: none; }
.ds-hero-trending .ds-hero-grid > .wp-block-column > .ds-hero-alt-trend { display: block; }

/* "In evidenza" header above the hero lead (panel: hero_header) */
.ds-hero-head-sec { display: none; padding: 24px 26px 0; }
.ds-show-herohead .ds-hero-head-sec { display: block; }
.ds-hero-head-sec .ds-secthead { margin-bottom: 6px; padding-bottom: 0; }
/* "In evidenza" section — independent toggle; only when there are real featured */
.ds-sec-featured { display: none; }
.ds-show-featured.ds-has-featured .ds-sec-featured { display: block; }
/* featured list: text left, image right (if present), like a tidy editorial list */
.ds-flist.wp-block-post-template { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ds-flist > li {
	display: grid; grid-template-columns: 1fr 260px; gap: 30px; align-items: center;
	margin: 0; padding: 22px 0; border-top: var(--hair-w) solid var(--hair);
}
.ds-flist > li:first-child { border-top: 0; padding-top: 4px; }
.ds-flist > li:not(:has(.ds-flist-thumb)) { grid-template-columns: 1fr; }
.ds-flist-thumb { margin: 0; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; }
.ds-flist-body .wp-block-post-title { font-size: clamp(20px, 2vw, 27px); line-height: 1.16; letter-spacing: -0.02em; margin: 6px 0 0; }
.ds-flist-body .wp-block-post-excerpt { color: var(--ink-2); font-size: 15px; line-height: 1.5; margin-top: 8px; }
.ds-flist-body .wp-block-post-excerpt p { margin: 0; }
.ds-flist-body .ds-card-meta { margin-top: 12px; gap: 8px 14px; }
@media (max-width: 720px) {
	.ds-flist > li { grid-template-columns: 1fr; gap: 14px; }
	.ds-flist > li .ds-flist-thumb { order: -1; }
}
/* compact "Più letti" list inside the narrow hero-right column */
.ds-hero-grid > .wp-block-column > .ds-hero-alt-trend { padding: 26px 28px; }
.ds-hero-alt-trend .ds-secthead { margin-bottom: 16px; }
.ds-hero-alt-trend .ds-trending-item { gap: 14px; padding: 12px 0; }
.ds-hero-alt-trend .ds-trending-rank { font-size: 16px; padding-top: 3px; }
.ds-hero-alt-trend .ds-trending-title { font-size: 16px; }
.ds-hero-alt-trend .ds-trending-sub { display: none; }
.ds-hero-alt-trend .ds-trending-meta { margin-top: 6px; }

.ds-trending {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}
.ds-trending-item {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 20px;
	padding: 22px 0;
	border-top: var(--hair-w) solid var(--hair);
}
.ds-trending-item:first-child { border-top: 0; padding-top: 4px; }
.ds-trending-rank {
	font-family: var(--font-mono);
	font-size: 22px;
	font-weight: 500;
	line-height: 1;
	color: var(--accent);
	padding-top: 5px;
	font-variant-numeric: tabular-nums;
}
.ds-trending-body { min-width: 0; }
.ds-trending-cat {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 10.5px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--accent-ink);
	text-decoration: none;
	border: 0;
}
.ds-trending-cat:hover { color: var(--accent); }
.ds-trending-title {
	display: block;
	width: 100%;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 24px;
	line-height: 1.16;
	letter-spacing: -0.02em;
	color: var(--ink);
	text-decoration: none;
	border: 0;
	margin: 0;
}
.ds-trending-title:hover { color: var(--accent-ink); }
.ds-trending-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px 12px;
	margin-top: 9px;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.04em;
	color: var(--ink-3);
}
.ds-trending-cat { margin: 0; }
.ds-trending-views { color: var(--accent-ink); }
.ds-trending-sub {
	margin: 7px 0 0;
	color: var(--ink-2);
	font-size: 14px;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Home "Più letti": one column, full-width rows with a large title. */
.ds-sec-trending .ds-trending { display: flex; flex-direction: column; }
.ds-sec-trending .ds-trending-title { font-size: clamp(22px, 2.4vw, 30px); }
.ds-sec-trending .ds-trending-rank { font-size: 24px; }

/* Sidebar context: compact, no excerpt. */
.ds-side-box .ds-trending-item { gap: 14px; padding: 14px 0; }
.ds-side-box .ds-trending-rank { font-size: 16px; padding-top: 3px; }
.ds-side-box .ds-trending-title { font-size: 15.5px; }
.ds-side-box .ds-trending-sub { display: none; }
.ds-side-box .ds-trending-meta { margin-top: 7px; }

/* ---- Archive / author sidebar layout ------------------------------------- */
.ds-with-side-aside { display: none; }
.ds-has-sidebar .ds-with-side {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 312px;
	gap: 56px;
	align-items: start;
}
.ds-has-sidebar .ds-with-side-aside {
	display: block;
	position: sticky;
	top: 84px;
}
.ds-sidebar { display: flex; flex-direction: column; gap: 30px; }
.ds-side-box { padding-top: 28px; border-top: var(--hair-w) solid var(--hair); }
.ds-sidebar > .ds-side-box:first-child { padding-top: 0; border-top: 0; }
.ds-side-box .kicker { margin: 0 0 14px; }
.ds-side-box h3 { margin: 0 0 14px; }
.ds-side-box .ds-nl-form,
.ds-side-box .ds-newsletter .ds-nl-form { min-width: 0; max-width: none; }
.ds-side-box .wp-block-tag-cloud { margin: 0; }
/* sidebar sections toggled from the panel (the part stays editable natively) */
.ds-sideoff-trending .ds-side-trending,
.ds-sideoff-newsletter .ds-side-newsletter,
.ds-sideoff-tags .ds-side-tags,
.ds-sideoff-ad .ds-side-ad { display: none; }
/* ad/banner box: keep media inside the column width with sane proportions */
.ds-side-ad .ad-slot, .ds-side-ad .ds-ad-cta { width: 100%; max-width: 100%; box-sizing: border-box; }
.ds-side-ad img, .ds-side-ad ins, .ds-side-ad iframe { max-width: 100%; height: auto; display: block; }
.ds-side-ad .ad-slot { min-height: 250px; }

/* ---- Reactions / claps --------------------------------------------------- */
.ds-reactions { display: none; }
.ds-show-reactions .ds-reactions {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 36px 0 0;
	padding: 22px 0;
	border-top: var(--hair-w) solid var(--hair);
	border-bottom: var(--hair-w) solid var(--hair);
}
.ds-clap {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 11px 20px;
	border: var(--hair-w) solid var(--hair-2);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink);
	cursor: pointer;
	transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.ds-clap:hover { border-color: var(--accent); color: var(--accent-ink); }
.ds-clap .ds-clap-emoji { font-size: 17px; line-height: 1; }
.ds-clap.is-clapping { transform: scale(1.08); }
.ds-clap.is-done {
	border-color: var(--accent);
	color: var(--accent-ink);
	background: var(--accent-wash);
	cursor: default;
}
.ds-clap-count {
	font-family: var(--font-mono);
	font-size: 13px;
	color: var(--ink-2);
	font-variant-numeric: tabular-nums;
}

/* ---- Table of contents (single posts) ------------------------------------ */
/* Default (narrow / tablet): a compact inline card above the article. */
.ds-toc { display: none; }
.ds-has-toc .ds-toc.is-ready {
	display: block;
	margin: 0 0 34px;
	padding: 18px 22px;
	background: var(--bg-2);
	border: var(--hair-w) solid var(--hair);
	border-radius: var(--radius);
}
.ds-toc-title {
	margin: 0 0 12px;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-3);
}
.ds-toc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.ds-toc-item a {
	display: block;
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 14.5px;
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: var(--ink-2);
	text-decoration: none;
	border: 0;
	transition: color 0.15s ease;
}
.ds-toc-item a:hover,
.ds-toc-item.is-active > a { color: var(--accent); }
.ds-toc-item.lvl-3 { padding-left: 14px; }
.ds-toc-item.lvl-3 a { font-size: 13px; font-weight: 400; color: var(--ink-3); }

/* Wide screens: a quiet rail in the right gutter. It is position:fixed (so it
 * stays OUT of the flow and never disturbs the centred article column) and is
 * revealed only after the reader scrolls past the masthead — that keeps it from
 * ever riding over the sticky header/navigation at the top of the page. The
 * horizontal offset is measured from the widest element (the 1040px hero image)
 * so it clears the image, the dek and the body text. */
@media (min-width: 1200px) {
	.ds-toc-side .ds-toc.is-ready {
		position: fixed;
		top: 96px;
		right: calc((100vw - 720px) / 2 - 224px);
		width: 192px;
		max-height: calc(100vh - 140px);
		overflow-y: auto;
		margin: 0;
		padding: 2px 0 2px 16px;
		background: none;
		border: 0;
		border-left: 2px solid var(--hair);
		border-radius: 0;
		z-index: 20;
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.25s ease;
		overscroll-behavior: contain;
	}
	.ds-toc-side.ds-in-article .ds-toc.is-ready { opacity: 1; visibility: visible; }
	.ds-toc-side .ds-toc.is-ready::-webkit-scrollbar { width: 0; }
	.ds-toc-side .ds-toc-title { margin-bottom: 14px; }
	.ds-toc-side .ds-toc-list { gap: 12px; }
	.ds-toc-side .ds-toc-item { position: relative; }
	.ds-toc-side .ds-toc-item.is-active::before {
		content: "";
		position: absolute;
		left: -17px; top: 1px; bottom: 1px;
		width: 2px;
		background: var(--accent);
	}
}

/* ---- Article category rail (left gutter, follows scroll) ------------------ */
/* Same model as the TOC: fixed (out of flow, never breaks centring), shown only
 * after scrolling. Default below the breakpoint: inline above the title. */
@media (min-width: 1280px) {
	.ds-cat-rail .ds-cat-sticky.wp-block-post-terms.is-style-cat {
		position: fixed;
		top: 96px;
		/* sit in the gutter to the LEFT of the 1040px hero image, never over it;
		   width fills that gutter (capped) so long category names wrap instead
		   of running onto the image */
		left: 24px;
		width: min(190px, calc((100vw - 1040px) / 2 - 40px));
		flex-direction: column;
		align-items: flex-start;
		row-gap: 9px;
		column-gap: 0;
		font-size: 13px;
		letter-spacing: 0.08em;
		overflow-wrap: anywhere;
		word-break: break-word;
		z-index: 20;
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.25s ease;
	}
	.ds-cat-rail.ds-scrolled .ds-cat-sticky.wp-block-post-terms.is-style-cat { opacity: 1; visibility: visible; }
	.ds-cat-rail .ds-cat-sticky.wp-block-post-terms.is-style-cat::before {
		width: 8px; height: 8px;
		margin-bottom: 2px;
	}
	.ds-cat-rail .ds-cat-sticky.wp-block-post-terms.is-style-cat a {
		display: block;
		max-width: 100%;
		line-height: 1.25;
		transition: color 0.15s ease;
	}
	.ds-cat-rail .ds-cat-sticky.wp-block-post-terms.is-style-cat a:hover { color: var(--accent); }
}

/* ---- Image captions / credits -------------------------------------------- */
.ds-body figure.wp-block-image { margin: 30px 0; }
.ds-body .wp-block-image figcaption,
.ds-feat-caption {
	margin-top: 9px;
	font-family: var(--font-mono);
	font-size: 11.5px;
	line-height: 1.5;
	letter-spacing: 0.02em;
	color: var(--ink-3);
	text-align: center;
}
.ds-body .wp-block-image figcaption a,
.ds-feat-caption a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.ds-body .wp-block-image figcaption a:hover,
.ds-feat-caption a:hover { color: var(--accent-ink); }
.ds-feat-caption { margin-top: 11px; }

/* ---- "Altri dell'autore" (single posts) ---------------------------------- */
.ds-feat-authormore { display: none; }
.ds-show-authormore .ds-feat-authormore { display: block; }

/* Correlati + Altri dell'autore: titoli più grandi e sottotitolo (excerpt) */
.ds-sec-related .ds-cards .wp-block-post-title,
.ds-feat-authormore .ds-cards .wp-block-post-title {
	font-size: clamp(19px, 1.8vw, 24px); line-height: 1.18; letter-spacing: -0.02em;
}
.ds-sec-related .ds-cards .wp-block-post-excerpt,
.ds-feat-authormore .ds-cards .wp-block-post-excerpt {
	margin-top: 7px;
}
.ds-sec-related .ds-cards .wp-block-post-excerpt p,
.ds-sec-related .ds-cards .wp-block-post-excerpt__excerpt,
.ds-feat-authormore .ds-cards .wp-block-post-excerpt p,
.ds-feat-authormore .ds-cards .wp-block-post-excerpt__excerpt {
	margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.5;
	display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
	-webkit-box-orient: vertical; overflow: hidden;
}

/* ---- Single-post element switches (panel: Pagina articolo) ---------------- */
.ds-no-progress .ds-progress { display: none; }
.ds-no-readingtime .ds-article-meta .wp-block-post-time-to-read { display: none; }
.ds-no-share .ds-share { display: none; }
.ds-no-authorbox .ds-authorbox { display: none; }
.ds-no-related .ds-sec-related { display: none; }

/* ---- "La redazione" — editorial masthead --------------------------------- */
.ds-masthead-intro {
	max-width: none;
	width: 100%;
	margin: 0 0 12px;
	color: var(--ink);
	font-family: var(--font-display);
	font-weight: 500;
	font-size: clamp(22px, 2.8vw, 32px);
	line-height: 1.32;
	letter-spacing: -0.02em;
}
.ds-masthead-group { margin-top: 52px; }
.ds-masthead-group:first-of-type { margin-top: 28px; }
.ds-masthead-head {
	margin: 0 0 26px;
	padding-bottom: 14px;
	border-bottom: 2px solid var(--ink);
}
.ds-masthead-title {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: clamp(28px, 3.6vw, 40px);
	letter-spacing: -0.03em;
	color: var(--ink);
}
.ds-masthead-blurb {
	margin: 8px 0 0;
	color: var(--ink-2);
	font-size: clamp(15px, 1.6vw, 18px);
	line-height: 1.5;
}

.ds-authors-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 26px;
}
.ds-author-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	padding: 34px 32px;
	background:
		linear-gradient(180deg, color-mix(in srgb, var(--accent) 4%, transparent), transparent 60%),
		color-mix(in srgb, var(--surface) 78%, transparent);
	border: var(--hair-w) solid var(--hair);
	border-radius: 14px;
	text-decoration: none;
	transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.ds-author-card:hover {
	border-color: color-mix(in srgb, var(--accent) 45%, var(--hair));
	transform: translateY(-3px);
	box-shadow: 0 12px 30px -18px color-mix(in srgb, var(--accent) 60%, transparent);
}
.ds-author-card-avatar { line-height: 0; }
.ds-author-card-avatar img {
	width: 104px; height: 104px; border-radius: 50%;
	border: 2px solid color-mix(in srgb, var(--accent) 40%, var(--hair));
}
.ds-author-card-name {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 23px;
	letter-spacing: -0.02em;
	color: var(--ink);
	margin-top: 18px;
}
.ds-author-card-role {
	font-family: var(--font-mono);
	font-size: 11.5px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--accent-ink);
	margin-top: 4px;
}
.ds-author-card-bio { margin-top: 12px; color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.ds-author-card-count {
	margin-top: 16px;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.04em;
	color: var(--ink-3);
}

@media (max-width: 980px) {
	.ds-has-sidebar .ds-with-side { grid-template-columns: 1fr; gap: 44px; }
	.ds-has-sidebar .ds-with-side-aside { position: static; }
	.ds-sec-trending .ds-trending { grid-template-columns: 1fr; column-gap: 0; }
	.ds-sec-trending .ds-trending-item:nth-child(2) { border-top: var(--hair-w) solid var(--hair); padding-top: 22px; }
}
