/* Segnale — inchiostro blu su carta fredda, magenta come segnale */
:root {
  --paper: #e9ecf2;
  --surface: #f6f7fa;
  --raised: #ffffff;
  --ink: #121a33;
  --ink-2: #4a5470;
  --ink-3: #7c86a2;
  --line: #ccd2de;
  --line-2: #dde1ea;
  --accent: #2340e8;
  --accent-ink: #ffffff;
  --signal: #d6246e;
  --veil: rgba(18, 26, 51, .42);
  --shadow: 0 1px 0 rgba(18,26,51,.04), 0 12px 32px -14px rgba(18,26,51,.28);

  --s-techcrunch: #0f8f68;
  --s-wired: #b77f00;
  --s-verge: #6a3ff0;
  --s-ars: #d2471f;
  --s-mit: #1f73c9;
  --s-toms: #b8287f;
  --s-htmlit: #4f7d1f;
  --s-wiredit: #8a6a12;
  --s-other: #66708c;
  --s-segnale: #d1236f;

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --r-s: 6px;
  --r-m: 14px;
  --r-l: 22px;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1380px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c1124; --surface: #131a32; --raised: #19213d; --ink: #e8ebf5; --ink-2: #a4acc6; --ink-3: #6f7899;
    --line: #2a3256; --line-2: #1f2746; --accent: #8fa3ff; --accent-ink: #0c1124; --signal: #ff5c9a;
    --veil: rgba(4, 7, 18, .62); --shadow: 0 1px 0 rgba(0,0,0,.2), 0 18px 40px -16px rgba(0,0,0,.7);
    --s-techcrunch: #3fd0a1; --s-wired: #f2c14e; --s-verge: #a98bff; --s-ars: #ff8a63; --s-mit: #62adff;
    --s-toms: #f06cbf; --s-htmlit: #9bd35a; --s-wiredit: #d9b55a; --s-other: #9aa3bf; --s-segnale: #ff5fa8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0c1124; --surface: #131a32; --raised: #19213d; --ink: #e8ebf5; --ink-2: #a4acc6; --ink-3: #6f7899;
  --line: #2a3256; --line-2: #1f2746; --accent: #8fa3ff; --accent-ink: #0c1124; --signal: #ff5c9a;
  --veil: rgba(4, 7, 18, .62); --shadow: 0 1px 0 rgba(0,0,0,.2), 0 18px 40px -16px rgba(0,0,0,.7);
  --s-techcrunch: #3fd0a1; --s-wired: #f2c14e; --s-verge: #a98bff; --s-ars: #ff8a63; --s-mit: #62adff;
  --s-toms: #f06cbf; --s-htmlit: #9bd35a; --s-wiredit: #d9b55a; --s-other: #9aa3bf; --s-segnale: #ff5fa8;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.5 var(--display); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: var(--r-s); }
.skip:focus { left: 12px; }
::selection { background: var(--signal); color: #fff; }

/* barra di avanzamento pagina */
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; background: var(--signal); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* ---------- barra superiore ---------- */
.bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: clamp(10px, 2vw, 28px);
  padding: 12px var(--gutter);
  background: color-mix(in oklab, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.bar.scrolled { border-bottom-color: var(--line); }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 720; font-size: 1.32rem; letter-spacing: -.035em; font-variation-settings: "wdth" 88; }
.mark-wave { width: 42px; height: 18px; fill: none; stroke: var(--signal); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 90; stroke-dashoffset: 0; }
.mark:hover .mark-wave { animation: wave 1.1s var(--ease); }
@keyframes wave { from { stroke-dashoffset: 90; } to { stroke-dashoffset: 0; } }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; padding: 7px 12px; border-radius: 999px; color: var(--ink-2); font-weight: 500; transition: color .2s, background .2s; }
.nav a:hover, .nav a.on { color: var(--ink); background: var(--line-2); }
.search-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 7px 8px 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.search-btn svg, .palette-input svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.search-btn:hover { color: var(--ink); border-color: var(--ink-3); }
kbd { font: 600 .72rem/1 var(--display); padding: 4px 6px; border-radius: 6px; background: var(--line-2); color: var(--ink-2); border: 1px solid var(--line); }
.theme-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.theme-btn svg { width: 21px; height: 21px; overflow: visible; }
.sun-core { fill: var(--ink); transition: r .5s var(--ease); }
.moon-cut { transition: cx .5s var(--ease), cy .5s var(--ease); }
.sun-rays { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; transform-origin: 12px 12px; transition: transform .5s var(--ease), opacity .3s; }
:root[data-dark="1"] .sun-core { r: 8.5px; }
:root[data-dark="1"] .moon-cut { cx: 17px; cy: 7px; }
:root[data-dark="1"] .sun-rays { transform: rotate(-60deg) scale(.4); opacity: 0; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- apertura: flusso ---------- */
.hero { padding: clamp(28px, 6vw, 84px) var(--gutter) 24px; max-width: var(--max); margin: 0 auto; }
.hero-head { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px 48px; align-items: end; }
.hero-title {
  margin: 0; font-weight: 700; font-size: clamp(2.5rem, 7vw, 6rem); line-height: .95; letter-spacing: -.028em;
  font-variation-settings: "wdth" 92, "opsz" 96;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; transform: translateY(105%); animation: rise .9s var(--ease) forwards; }
.hero-title .line:nth-child(2) > span { animation-delay: .08s; color: var(--ink-2); }
.hero-title .line:nth-child(3) > span { animation-delay: .16s; }
@keyframes rise { to { transform: none; } }
.hero-lede { margin: 0 0 .6em; max-width: 42ch; color: var(--ink-2); font: 400 1.14rem/1.55 var(--serif); }

.stream { position: relative; margin: clamp(26px, 4vw, 48px) 0 0; padding: 18px 0 0; border-top: 1.5px solid var(--ink); }
.stream-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.stream-svg .lane-label { font: 600 12.5px var(--display); fill: var(--ink-2); }
.stream-svg .lane-count { font: 500 11.5px var(--display); fill: var(--ink-3); }
.stream-svg .lane-line { stroke: var(--line); stroke-width: 1; }
.stream-svg .day-tick { stroke: var(--line); stroke-dasharray: 2 4; }
.stream-svg .day-label { font: 500 12px var(--display); fill: var(--ink-3); }
.stream-svg .dot { cursor: pointer; transition: r .25s var(--ease), opacity .3s; stroke: var(--paper); stroke-width: 2; }
.stream-svg .dot.full { stroke: var(--ink); stroke-width: 1.6; }
.stream-svg .dot.dim { opacity: .16; }
.stream-svg .dot.hot { r: 9px; }
.stream-svg .dot:focus-visible { outline: none; stroke: var(--accent); stroke-width: 3; }
.stream-svg .brush { fill: color-mix(in oklab, var(--accent) 12%, transparent); stroke: var(--accent); stroke-width: 1.2; }
.stream-svg .axis-hit { fill: transparent; cursor: ew-resize; }
.stream-svg .now-line { stroke: var(--signal); stroke-width: 1.5; }
.stream-svg .now-label { font: 650 11.5px var(--display); fill: var(--signal); }
.stream-svg .older { fill: var(--line-2); }
.stream-svg .older-label { font: 500 11.5px var(--display); fill: var(--ink-3); }
.stream-cap { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin-top: 10px; color: var(--ink-3); font-size: .9rem; }
.stream-cap .legend { display: inline-flex; align-items: center; gap: 6px; }
.stream-cap .legend i { width: 10px; height: 10px; border-radius: 50%; border: 1.6px solid var(--ink); }
.stream-cap .legend i.plain { border-color: transparent; background: var(--ink-3); }
.stream-cap button { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.stream-tip, .map-tip {
  position: absolute; z-index: 5; pointer-events: none; width: min(320px, 80vw);
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow);
  overflow: hidden; transform: translate(-50%, calc(-100% - 14px)); animation: pop .18s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, calc(-100% - 6px)) scale(.97); } }
.tip-img { aspect-ratio: 16/8; background: var(--tone, var(--line-2)) center/cover; }
.tip-body { padding: 10px 13px 12px; }
.tip-meta { display: flex; gap: 8px; align-items: center; font-size: .78rem; color: var(--ink-3); margin-bottom: 4px; }
.tip-title { font-weight: 640; font-size: .98rem; line-height: 1.25; letter-spacing: -.012em; }

/* testata come pastiglia */
.src { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .8rem; color: var(--ink-2); white-space: nowrap; }
.src::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sc, var(--s-other)); flex: none; }

/* ---------- in primo piano ---------- */
.lead { max-width: var(--max); margin: 0 auto; padding: clamp(36px, 6vw, 80px) var(--gutter) 0; }
.lead-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); }
.lead-main { position: relative; display: block; text-decoration: none; cursor: pointer; border: 0; padding: 0; background: none; text-align: left; }
.lead-main .ph { aspect-ratio: 16/10; border-radius: var(--r-l); overflow: hidden; background: var(--tone, var(--line-2)); }
.lead-main img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.lead-main:hover img { transform: scale(1.035); }
.lead-main h3 { margin: 18px 0 10px; font-weight: 720; font-size: clamp(1.7rem, 3.4vw, 2.8rem); line-height: 1.02; letter-spacing: -.026em; font-variation-settings: "wdth" 92; text-wrap: balance; }
.lead-main p { margin: 0; max-width: 60ch; color: var(--ink-2); font: 400 1.12rem/1.55 var(--serif); }
.lead-side { display: flex; flex-direction: column; }
.lead-side h2 { margin: 0 0 6px; font-size: 1rem; font-weight: 650; color: var(--ink-2); }
.side-item { display: grid; grid-template-columns: 1fr 92px; gap: 14px; align-items: start; padding: 16px 0; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; cursor: pointer; width: 100%; }
.side-item:last-child { border-bottom: 1px solid var(--line); }
.side-item h3 { margin: 6px 0 0; font-weight: 620; font-size: 1.08rem; line-height: 1.22; letter-spacing: -.015em; text-wrap: pretty; }
.side-item .th { aspect-ratio: 1; border-radius: var(--r-s); overflow: hidden; background: var(--tone, var(--line-2)); }
.side-item .th img { width: 100%; height: 100%; object-fit: cover; }
.side-item:hover h3, .lead-main:hover h3 { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; text-decoration-color: var(--signal); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: .8rem; color: var(--ink-3); }
.badge-full { display: inline-flex; gap: 5px; align-items: center; color: var(--ink); font-weight: 600; }
.badge-full svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- sezioni ---------- */
.sec-head { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sec-head h2 { margin: 0; font-weight: 740; font-size: clamp(2rem, 4.6vw, 3.6rem); letter-spacing: -.03em; line-height: 1; font-variation-settings: "wdth" 90; }
.sec-head p { margin: 12px 0 0; max-width: 62ch; color: var(--ink-2); font: 400 1.08rem/1.55 var(--serif); }

/* ---------- mappa ---------- */
.map-sec { padding: clamp(56px, 9vw, 120px) 0 0; }
.switch { display: inline-flex; gap: 10px; align-items: center; margin-top: 14px; color: var(--ink-2); font-size: .92rem; cursor: pointer; }
.switch input { appearance: none; width: 36px; height: 21px; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; transition: background .2s; margin: 0; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--raised); transition: transform .25s var(--ease); box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(15px); }
.map-wrap { position: relative; max-width: var(--max); margin: 24px auto 0; padding: 0 var(--gutter); }
#map { display: block; width: 100%; height: clamp(440px, 70vh, 760px); background: var(--surface); border-radius: var(--r-l); border: 1px solid var(--line-2); cursor: grab; touch-action: none; }
#map.dragging { cursor: grabbing; }
#map.pointing { cursor: pointer; }

/* ---------- archivio ---------- */
.archive { padding: clamp(56px, 9vw, 120px) 0 40px; }
.arch-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.arch-count { margin: 0 !important; font: 500 1rem var(--display) !important; color: var(--ink-3) !important; }
.filters { position: sticky; top: 64px; z-index: 20; max-width: var(--max); margin: 18px auto 0; padding: 12px var(--gutter); background: color-mix(in oklab, var(--paper) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-row + .filter-row { margin-top: 8px; }
.filter-row.topics { max-height: 76px; overflow: hidden; transition: max-height .4s var(--ease); }
.filter-row.topics.open { max-height: 400px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .88rem; font-weight: 520; white-space: nowrap; flex: none;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.chip:hover { color: var(--ink); border-color: var(--ink-3); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip .n { font-size: .76rem; opacity: .65; }
.chip.src-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sc); }
.chip.more { border-style: dashed; }
.filter-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.field input { width: min(320px, 70vw); padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent); }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--line-2); }
.seg button { border: 0; background: none; padding: 6px 13px; border-radius: 999px; cursor: pointer; color: var(--ink-2); font-size: .88rem; font-weight: 560; }
.seg button[aria-checked="true"] { background: var(--raised); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.reset { border: 0; background: none; color: var(--signal); font-weight: 600; cursor: pointer; padding: 6px 4px; text-decoration: underline; text-underline-offset: 3px; }

.grid { max-width: var(--max); margin: 18px auto 0; padding: 0 var(--gutter); }
.grid.mosaic { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); grid-auto-flow: dense; gap: 28px 22px; }
.card { position: relative; display: flex; flex-direction: column; gap: 10px; border: 0; padding: 0; background: none; text-align: left; cursor: pointer; color: inherit; min-width: 0; }
.card .ph { position: relative; aspect-ratio: 4/3; border-radius: var(--r-m); overflow: hidden; background: var(--tone, var(--line-2)); }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), filter .4s; }
.card:hover .ph img { transform: scale(1.05); }
.card h3 { margin: 0; font-weight: 640; font-size: 1.12rem; line-height: 1.2; letter-spacing: -.018em; text-wrap: pretty; }
.card p { margin: 0; color: var(--ink-2); font: 400 .98rem/1.5 var(--serif); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card:hover h3 { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: var(--signal); }
.card.wide { grid-column: span 2; }
.card.wide .ph { aspect-ratio: 16/9; }
.card.wide h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); letter-spacing: -.028em; }
/* notizie senza immagine: tessera tipografica col colore della testata */
.card.type .ph { display: flex; align-items: flex-end; padding: 16px; background: color-mix(in oklab, var(--sc) 14%, var(--surface)); border: 1px solid color-mix(in oklab, var(--sc) 30%, var(--line-2)); }
.card.type .ph .quote { font: 500 italic clamp(1.05rem, 1.6vw, 1.25rem)/1.25 var(--serif); color: color-mix(in oklab, var(--sc) 55%, var(--ink)); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.card.type .ph::before { content: ""; position: absolute; inset: 14px 14px auto; height: 22px; background: linear-gradient(90deg, var(--sc) 0 3px, transparent 3px 7px) 0 0/7px 100%; opacity: .5; }
.grid.list { display: flex; flex-direction: column; }
.grid.list .card { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 4px 20px; padding: 16px 0; border-top: 1px solid var(--line); align-items: start; }
.grid.list .card .ph { aspect-ratio: 4/3; grid-row: span 3; }
.grid.list .card.type .ph { padding: 10px; }
.grid.list .card.type .ph .quote { font-size: .82rem; -webkit-line-clamp: 4; }
.grid.list .card.wide { grid-column: auto; }
.grid.list .card.wide .ph { aspect-ratio: 4/3; }
.grid.list .card.wide h3, .grid.list .card h3 { font-size: 1.15rem; }
.card.enter { animation: cardIn .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 18ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } }
.empty { max-width: var(--max); margin: 40px auto; padding: 48px var(--gutter); text-align: center; color: var(--ink-2); font: 1.1rem var(--serif); }
.empty p { margin: 0 0 8px; }

.foot { max-width: var(--max); margin: 40px auto 0; padding: 28px var(--gutter) 48px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .9rem; display: flex; justify-content: space-between; gap: 8px 32px; flex-wrap: wrap; }
.foot p { margin: 0; max-width: 60ch; }

/* ---------- lettore ---------- */
.reader { position: fixed; inset: 0; z-index: 80; }
.reader-veil { position: absolute; inset: 0; background: var(--veil); animation: fade .3s; }
@keyframes fade { from { opacity: 0; } }
.reader-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(780px, 100%); background: var(--paper);
  display: flex; flex-direction: column; box-shadow: -30px 0 80px -30px rgba(0,0,0,.45); outline: none;
  animation: slideIn .5s var(--ease);
}
.reader.closing .reader-panel { animation: slideOut .32s var(--ease) forwards; }
.reader.closing .reader-veil { animation: fade .32s reverse forwards; }
@keyframes slideIn { from { transform: translateX(100%); } }
@keyframes slideOut { to { transform: translateX(100%); } }
.reader-bar { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.reader-nav { display: flex; gap: 4px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid transparent; background: none; cursor: pointer; }
.icon-btn:hover { background: var(--line-2); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.reader-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.reader-progress span { display: block; height: 100%; background: var(--signal); transform-origin: 0 50%; transform: scaleX(var(--rp, 0)); }
.reader-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.r-inner { padding: clamp(22px, 5vw, 48px) clamp(18px, 6vw, 64px) 64px; }
.r-inner.swap { animation: swapIn .45s var(--ease); }
@keyframes swapIn { from { opacity: 0; transform: translateX(var(--dir, 24px)); } }
.r-title { margin: 14px 0 14px; font-weight: 740; font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.02; letter-spacing: -.028em; font-variation-settings: "wdth" 92; text-wrap: balance; }
.r-dek { margin: 0 0 22px; font: 400 1.24rem/1.5 var(--serif); color: var(--ink-2); }
.r-fig { margin: 0 0 26px; border-radius: var(--r-m); overflow: hidden; background: var(--tone, var(--line-2)); }
.r-fig img { width: 100%; height: auto; }
.r-body { font: 400 1.16rem/1.72 var(--serif); max-width: 66ch; }
.r-body h2, .r-body h3 { font-family: var(--display); font-weight: 680; letter-spacing: -.02em; line-height: 1.15; margin: 1.8em 0 .5em; }
.r-body h2 { font-size: 1.5rem; }
.r-body h3 { font-size: 1.22rem; }
.r-body p { margin: 0 0 1.05em; }
.r-body blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--signal); font-style: italic; color: var(--ink-2); }
.r-body a { color: var(--accent); text-underline-offset: 3px; }
.r-body ul, .r-body ol { padding-left: 1.3em; }
.r-body li { margin-bottom: .4em; }
.r-note { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 24px; padding: 12px 16px; border-radius: var(--r-m); background: color-mix(in oklab, var(--signal) 9%, var(--surface)); color: var(--ink-2); font-size: .92rem; }
.r-note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; fill: none; stroke: var(--signal); stroke-width: 2; stroke-linecap: round; }
.r-cta { display: inline-flex; align-items: center; gap: 10px; margin: 8px 0 0; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 620; transition: transform .2s var(--ease), background .2s; }
.r-cta:hover { background: var(--accent); color: var(--accent-ink); transform: translateY(-1px); }
.r-cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.r-orig { margin: 18px 0 0; color: var(--ink-3); font-size: .88rem; }
.r-orig i { font-style: italic; }
.r-topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 28px 0 0; }
.r-rel { margin: 40px 0 0; padding-top: 22px; border-top: 1.5px solid var(--ink); }
.r-rel h2 { margin: 0 0 4px; font-size: 1.2rem; font-weight: 680; letter-spacing: -.015em; }
.r-rel > p { margin: 0 0 8px; color: var(--ink-3); font-size: .9rem; }
.rel-item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; align-items: center; }
.rel-item .th { aspect-ratio: 1; border-radius: var(--r-s); overflow: hidden; background: color-mix(in oklab, var(--sc) 18%, var(--surface)); }
.rel-item .th img { width: 100%; height: 100%; object-fit: cover; }
.rel-item h3 { margin: 4px 0 0; font-size: 1rem; font-weight: 620; line-height: 1.25; letter-spacing: -.01em; }
.rel-item .why { font-size: .78rem; color: var(--ink-3); }
.rel-item:hover h3 { color: var(--accent); }

/* ---------- ricerca ---------- */
.palette { position: fixed; inset: 0; z-index: 90; display: grid; place-items: start center; padding: min(14vh, 120px) 16px 16px; }
.palette-veil { position: absolute; inset: 0; background: var(--veil); animation: fade .2s; }
.palette-box { position: relative; width: min(640px, 100%); background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); overflow: hidden; animation: palIn .25s var(--ease); }
@keyframes palIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.palette-input input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); font: 500 1.15rem var(--display); }
.palette-list { list-style: none; margin: 0; padding: 6px; max-height: min(60vh, 520px); overflow-y: auto; }
.palette-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px 10px; border-radius: var(--r-s); cursor: pointer; }
.palette-list li[aria-selected="true"] { background: var(--line-2); }
.palette-list .pk { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: color-mix(in oklab, var(--sc, var(--accent)) 18%, var(--surface)); display: grid; place-items: center; font-weight: 700; color: var(--sc, var(--accent)); }
.palette-list .pk img { width: 100%; height: 100%; object-fit: cover; }
.palette-list .pt { font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.palette-list .ps { font-size: .8rem; color: var(--ink-3); }
.palette-list mark { background: color-mix(in oklab, var(--signal) 22%, transparent); color: inherit; border-radius: 2px; }
.palette-list .group { display: block; padding: 10px 10px 4px; font-size: .78rem; font-weight: 650; color: var(--ink-3); cursor: default; }
.palette-empty { padding: 26px; text-align: center; color: var(--ink-3); }

/* ---------- adattamento ---------- */
@media (max-width: 920px) {
  .hero-head, .lead-grid { grid-template-columns: 1fr; }
  .nav { display: none; }
  .search-btn { margin-left: auto; }
  .card.wide { grid-column: span 1; }
  .card.wide .ph { aspect-ratio: 4/3; }
}
@media (max-width: 560px) {
  .search-hint, .search-btn kbd { display: none; }
  .search-btn { padding: 9px; }
  .grid.list .card { grid-template-columns: 96px minmax(0, 1fr); gap: 4px 14px; }
  .grid.list .card p { display: none; }
  .filters { top: 60px; }
  .filter-row:first-child { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  .hero-title .line > span { transform: none; }
  html { scroll-behavior: auto; }
}
.r-sources { margin: 28px 0 0; padding: 16px 18px; border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 12px; }
.r-sources h2 { margin: 0 0 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.r-sources ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.r-sources a { color: inherit; text-decoration: none; font-size: .95rem; line-height: 1.35; display: inline-flex; gap: 6px; align-items: baseline; }
.r-sources a:hover { text-decoration: underline; }
.r-sources a svg { width: 12px; height: 12px; flex: none; }
