/* =========================================================================
   Mio Esame Sangue — Foglio di stile principale
   Identità editoriale medica · palette petrolio/cremisi · 100% self-hosted
   Nessun font esterno (conformità GDPR) · zero dipendenze di terze parti
   ========================================================================= */

:root {
  /* Brand — petrolio/teal (fiducia clinica) */
  --brand:        #0E6E63;
  --brand-600:    #0B5A51;
  --brand-700:    #093F39;
  --brand-300:    #4FA89E;
  --brand-50:     #E7F3F1;
  --brand-100:    #CDE7E3;

  /* Accento — cremisi "sangue" */
  --accent:       #C81E4F;
  --accent-600:   #A8143F;
  --accent-50:    #FBE9EF;

  /* Neutri */
  --ink:          #14202B;
  --ink-soft:     #2B3A47;
  --muted:        #5A6B78;
  --muted-light:  #5E6D7A;
  --line:         #E3EAEC;
  --line-soft:    #EEF3F3;
  --bg:           #FFFFFF;
  --bg-soft:      #F4F9F8;
  --bg-warm:      #FBFAF7;
  --bg-ink:       #0C1A1C;

  /* Stato */
  --ok:           #1B9E77;
  --warn:         #E0A23B;
  --danger:       #C81E4F;
  --info:         #0E6E63;

  /* Tipografia */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, "Source Serif Pro", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;

  /* Misure */
  --maxw: 1180px;
  --maxw-narrow: 760px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --header-h: 70px;
  --shadow-sm: 0 1px 2px rgba(20,32,43,.06), 0 1px 3px rgba(20,32,43,.05);
  --shadow:    0 6px 18px rgba(20,32,43,.08), 0 2px 6px rgba(20,32,43,.05);
  --shadow-lg: 0 24px 60px rgba(9,63,57,.16), 0 8px 24px rgba(20,32,43,.10);

  --gradient-brand: linear-gradient(135deg, #0E6E63 0%, #0B5A51 55%, #093F39 100%);
  --gradient-soft:  linear-gradient(135deg, #E7F3F1 0%, #F4F9F8 100%);
}

/* ----------------------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (max-width: 600px) { html { font-size: 16px; } }

body {
  font-family: var(--font-sans);
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-600); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent); }
/* Accessibilità: i link nel corpo del testo sono distinguibili anche senza colore */
p a:not(.btn), .verdict a, figcaption a, .info-box a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--brand-300); }
p a:not(.btn):hover, .verdict a:hover, figcaption a:hover, .info-box a:hover { text-decoration-color: var(--accent); }
.tool-callout p a, .tool-feature p a { text-decoration-color: rgba(255,255,255,.85); }
strong { font-weight: 700; color: var(--ink); }
ul, ol { padding-left: 1.3rem; }
li { margin: .35rem 0; }

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 2000;
  background: var(--brand-700); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; }

/* --------------------------------------------------------------- Layout */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 1.15rem; }
.container-narrow { max-width: var(--maxw-narrow); }
section { padding: clamp(2.5rem, 6vw, 4.75rem) 0; }
.section-tight { padding: clamp(1.75rem, 4vw, 3rem) 0; }

/* Headings — serif editoriale */
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 700; line-height: 1.18; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); margin-bottom: .8rem; }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
.disclaimer-box h3, .author-box h3 { font-size: 1.1rem; }
p { margin: 0 0 1.05rem; }

.section-header { text-align: center; max-width: 720px; margin: 0 auto 2.5rem; }
.section-header h2 { margin-bottom: .55rem; }
.section-subtitle { color: var(--muted); font-size: 1.08rem; }
.eyebrow {
  display: inline-block; font-family: var(--font-sans); font-weight: 700;
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-600); background: var(--brand-50);
  padding: .32rem .7rem; border-radius: 999px; margin-bottom: .85rem;
}
.eyebrow.accent { color: var(--accent-600); background: var(--accent-50); }

/* --------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  font-family: var(--font-sans); font-weight: 600; font-size: 1rem;
  padding: .8rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  text-align: center; line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gradient-brand); color: #fff; box-shadow: 0 8px 20px rgba(11,90,81,.28); }
.btn-primary:hover { color: #fff; box-shadow: 0 12px 26px rgba(11,90,81,.36); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(200,30,79,.26); }
.btn-accent:hover { color: #fff; background: var(--accent-600); }
.btn-ghost { background: #fff; color: var(--brand-700); border-color: var(--brand-100); }
.btn-ghost:hover { color: var(--brand-700); border-color: var(--brand-300); background: var(--brand-50); }
.btn-lg { padding: .95rem 1.7rem; font-size: 1.05rem; }

/* --------------------------------------------------------------- Header */
.topbar { background: var(--bg-ink); color: #cfeae6; font-size: .8rem; }
.topbar .container { display: flex; gap: 1rem; align-items: center; justify-content: center; padding-block: .4rem; text-align: center; }
.topbar a { color: #fff; font-weight: 600; }
.topbar .flag-it { letter-spacing: 2px; }

.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.92); backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand img, .brand svg { height: 42px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text .b-name { font-family: var(--font-serif); font-weight: 700; font-size: 1.18rem; color: var(--ink); }
.brand-text .b-tag { font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-600); font-weight: 600; }

.nav-menu { display: flex; align-items: center; gap: .25rem; list-style: none; padding: 0; margin: 0; }
.nav-menu a {
  display: inline-block; padding: .55rem .8rem; border-radius: 8px;
  color: var(--ink-soft); font-weight: 600; font-size: .96rem;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--brand-700); background: var(--brand-50); }
.nav-cta { margin-left: .4rem; }

/* Menu mobile SENZA JavaScript (checkbox hack) — ottimale per PageSpeed */
.nav-cb { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px;
  align-items: center; justify-content: center; background: none; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .2s; }
.nav-cb:focus-visible ~ .nav-toggle { outline: 3px solid var(--brand-300); outline-offset: 2px; }
.nav-cb:checked ~ .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-cb:checked ~ .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-cb:checked ~ .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line); padding: .8rem 1.15rem 1.3rem; gap: .15rem;
    box-shadow: var(--shadow); transform: translateY(-130%); transition: transform .28s ease;
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto; visibility: hidden;
  }
  .nav-cb:checked ~ .nav-menu { transform: translateY(0); visibility: visible; }
  .nav-menu a { padding: .8rem .6rem; font-size: 1.05rem; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .nav-cta { margin: .6rem 0 0; }
  .nav-cta a { justify-content: center; }
}

/* --------------------------------------------------------------- Hero */
.hero { background: var(--gradient-soft); position: relative; overflow: hidden; padding-top: clamp(2.5rem,5vw,3.75rem); }
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background:
    radial-gradient(420px 320px at 88% 8%, rgba(200,30,79,.10), transparent 60%),
    radial-gradient(520px 420px at 6% 94%, rgba(14,110,99,.12), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem,4vw,3.5rem); align-items: center; position: relative; }
.hero h1 { margin-bottom: 1rem; }
.hero h1 .hl { color: var(--brand-700); }
.hero-sub { font-size: 1.16rem; color: var(--ink-soft); max-width: 38ch; margin-bottom: 1.5rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.6rem; }
.hero-stats { display: flex; gap: 1.8rem; flex-wrap: wrap; }
.hero-stat .n { font-family: var(--font-serif); font-size: 1.7rem; font-weight: 700; color: var(--brand-700); display: block; }
.hero-stat .l { font-size: .82rem; color: var(--muted); }

.hero-visual { position: relative; }
.hero-figure { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); border: 6px solid #fff; }
.hero-figure img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.hero-figcaption { font-size: .8rem; color: var(--muted); margin-top: .6rem; text-align: center; }
.hero-pill {
  position: absolute; bottom: 14px; left: 14px; background: rgba(255,255,255,.95); backdrop-filter: blur(6px);
  border-radius: 999px; padding: .45rem .85rem; font-size: .82rem; font-weight: 700; color: var(--brand-700);
  box-shadow: var(--shadow); display: inline-flex; align-items: center; gap: .4rem;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-sub { max-width: none; }
  .hero-visual { order: -1; }
}

/* --------------------------------------------------------- Trust strip */
.trust-strip { background: var(--bg-ink); color: #d7ece8; }
.trust-strip .items { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: center; align-items: center; }
.trust-strip .item { display: inline-flex; align-items: center; gap: .55rem; font-size: .92rem; font-weight: 600; }
.trust-strip .item svg { width: 20px; height: 20px; color: var(--brand-300); flex: none; }

/* --------------------------------------------------------- Cards / grids */
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2,1fr); }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-4 { grid-template-columns: repeat(4,1fr); }
@media (max-width: 920px) { .grid-4 { grid-template-columns: repeat(2,1fr); } .grid-3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-100); }
.card .ico { font-size: 1.7rem; margin-bottom: .6rem; }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }

/* Feature blocks */
.feature-row { display: flex; gap: 1rem; align-items: flex-start; }
.feature-row .fi { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700); font-size: 1.3rem; }
.feature-row p { margin: .15rem 0 0; color: var(--muted); font-size: .95rem; }

/* Info two-column */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem,4vw,3.2rem); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.lead { font-size: 1.15rem; color: var(--ink-soft); }

/* Figure / images with SEO captions */
figure.media { margin: 1.6rem 0; }
figure.media img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); background: var(--bg-soft); }
figure.media figcaption { font-size: .85rem; color: var(--muted); margin-top: .6rem; line-height: 1.5; padding-left: .2rem; border-left: 3px solid var(--brand-100); padding: .1rem 0 .1rem .7rem; }
figure.media figcaption strong { color: var(--brand-700); }

/* Blood components */
.component-card { border-top: 4px solid var(--c, var(--brand)); }
.component-card .v { font-weight: 700; color: var(--ink); font-size: .95rem; }

/* Steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4,1fr); gap: 1.2rem; }
@media (max-width: 920px) { .steps { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.3rem; position: relative; }
.step .num { width: 38px; height: 38px; border-radius: 50%; background: var(--gradient-brand); color: #fff; font-family: var(--font-serif); font-weight: 700; display: grid; place-items: center; margin-bottom: .7rem; }
.step h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.step p { color: var(--muted); font-size: .93rem; margin: 0; }

/* --------------------------------------------------- Tool / Kantesti box */
.tool-feature { background: var(--gradient-brand); color: #fff; border-radius: var(--radius-lg); padding: clamp(1.6rem,4vw,2.8rem); position: relative; overflow: hidden; }
.tool-feature::after { content: ""; position: absolute; right: -60px; top: -60px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255,255,255,.06); }
.tool-feature .inner { position: relative; display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; }
@media (max-width: 820px) { .tool-feature .inner { grid-template-columns: 1fr; } }
.tool-feature h2 { color: #fff; }
.tool-feature p { color: rgba(255,255,255,.92); }
.tool-feature .badge-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chip { font-size: .74rem; font-weight: 700; letter-spacing: .04em; padding: .28rem .7rem; border-radius: 999px; background: rgba(255,255,255,.16); color: #fff; }
.chip.solid { background: #fff; color: var(--brand-700); }
.tool-feature .btn-ghost { background: #fff; }
.tool-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.tool-list li { display: flex; gap: .6rem; align-items: flex-start; margin: .5rem 0; color: rgba(255,255,255,.95); font-size: .96rem; }
.tool-list li::before { content: "✓"; font-weight: 800; color: #fff; background: rgba(255,255,255,.2); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: .8rem; }
.tool-link-strong { color: #fff !important; text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }

/* Comparison */
.compare { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.3rem; }
@media (max-width: 760px) { .compare { grid-template-columns: 1fr; } }
.compare-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; position: relative; }
.compare-card.winner { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.compare-rank { position: absolute; top: -14px; left: 1.4rem; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-family: var(--font-serif); }
.compare-card.winner .compare-rank { background: var(--brand); }
.editor-pick { position: absolute; top: -12px; right: 1.2rem; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .04em; padding: .25rem .65rem; border-radius: 999px; text-transform: uppercase; }
.compare-card h3 { margin: .4rem 0 .2rem; }
.rating { color: var(--warn); font-weight: 700; font-size: .95rem; margin-bottom: .6rem; }
.rating .val { color: var(--muted); font-weight: 600; }
.flist { list-style: none; padding: 0; margin: .7rem 0 0; font-size: .93rem; }
.flist li { display: flex; gap: .5rem; margin: .35rem 0; }
.flist .y { color: var(--ok); font-weight: 800; flex: none; }
.flist .n { color: var(--muted-light); font-weight: 800; flex: none; }
.verdict { margin-top: 1rem; padding: .85rem 1rem; background: var(--bg-soft); border-radius: var(--radius-sm); font-size: .92rem; }

/* Tabella di confronto editoriale (AI) */
.cmp-table th, .cmp-table td { text-align: center; vertical-align: middle; }
.cmp-table th:first-child, .cmp-table td:first-child { text-align: left; font-weight: 600; color: var(--ink); }
.cmp-table thead th.win { background: var(--brand); }
.cmp-table td.win { background: var(--brand-50); }
.cmp-table .yes { color: var(--ok); font-weight: 800; }
.cmp-table .no { color: var(--muted-light); font-weight: 800; }
.cmp-table .part { color: #B8860B; font-weight: 700; }
.cmp-table tr.score td { font-family: var(--font-serif); font-weight: 700; font-size: 1.02rem; border-top: 2px solid var(--brand-100); }
.cmp-table tr.score td.win { color: var(--brand-700); }
.cmp-note { font-size: .85rem; color: var(--muted); margin-top: .4rem; }

/* Biomarker reference grid */
.bio-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.3rem; transition: .2s; }
.bio-card:hover { border-color: var(--brand-300); box-shadow: var(--shadow); transform: translateY(-2px); }
.bio-card .tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-600); }
.bio-card h3 { font-size: 1.12rem; margin: .25rem 0 .3rem; color: var(--ink); }
.bio-card p { color: var(--muted); font-size: .9rem; margin: 0 0 .5rem; }
.bio-card .more { font-weight: 700; color: var(--brand-600); font-size: .88rem; }

/* --------------------------------------------------------------- FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: .75rem; background: #fff; overflow: hidden; }
.faq details[open] { border-color: var(--brand-100); box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; padding: 1.05rem 1.2rem; font-weight: 700; font-family: var(--font-serif); font-size: 1.08rem; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--brand); font-family: var(--font-sans); flex: none; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-body { padding: 0 1.2rem 1.1rem; color: var(--ink-soft); }
.faq .faq-body p { margin: 0 0 .6rem; }

/* --------------------------------------------------------- CTA band */
.cta-band { background: var(--bg-ink); color: #fff; border-radius: var(--radius-lg); padding: clamp(1.8rem,4vw,3rem); text-align: center; }
.cta-band h2 { color: #fff; margin-bottom: .6rem; }
.cta-band p { color: rgba(255,255,255,.85); max-width: 52ch; margin: 0 auto 1.4rem; }

/* --------------------------------------------------------- Breadcrumb */
.breadcrumb { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: .8rem 0; margin: 0; font-size: .85rem; color: var(--muted); }
.breadcrumb li { display: flex; gap: .4rem; align-items: center; }
.breadcrumb li:not(:last-child)::after { content: "›"; color: var(--muted-light); }
.breadcrumb a { color: var(--brand-600); font-weight: 600; }
.breadcrumb [aria-current="page"] { color: var(--ink-soft); }

/* --------------------------------------------------------- Article */
.article-head { background: var(--gradient-soft); padding: clamp(2rem,4vw,3rem) 0 clamp(1.5rem,3vw,2.2rem); }
.article-cat { display: inline-block; font-weight: 700; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-600); background: var(--accent-50); padding: .3rem .7rem; border-radius: 999px; margin-bottom: .9rem; }
.article-head h1 { max-width: 22ch; margin-bottom: .8rem; }
.article-dek { font-size: 1.18rem; color: var(--ink-soft); max-width: 60ch; }
.article-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: 1.1rem; font-size: .85rem; color: var(--muted); align-items: center; }
.article-meta .by { display: inline-flex; align-items: center; gap: .5rem; }
.article-meta .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gradient-brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-family: var(--font-serif); font-size: .9rem; }
.article-meta .sep { color: var(--line); }
.article-meta a { color: var(--brand-600); font-weight: 600; }

.article-hero-img { margin: clamp(1.2rem,3vw,2rem) 0 0; }
.article-hero-img img { width: 100%; aspect-ratio: 1200/630; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.article-hero-img figcaption { font-size: .82rem; color: var(--muted); margin-top: .55rem; }

.article-body { padding: clamp(1.8rem,4vw,2.8rem) 0; }
.article-body p, .article-body li { font-size: 1.06rem; color: var(--ink-soft); }
.article-body h2 { margin: 2rem 0 .8rem; padding-top: .4rem; }
.article-body h2::before { content: ""; display: block; width: 54px; height: 4px; border-radius: 3px; background: var(--accent); margin-bottom: .8rem; }
.article-body h3 { margin: 1.5rem 0 .5rem; color: var(--brand-700); }
.article-body ul, .article-body ol { margin: 0 0 1.1rem; }
.article-body a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--brand-100); }
.article-body a:hover { text-decoration-color: var(--accent); }

.toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 0 0 1.8rem; }
.toc h2 { font-size: 1.05rem; margin: 0 0 .6rem; }
.toc h2::before { display: none; }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.toc li { font-size: .95rem; margin: .25rem 0; }
@media (max-width: 600px) { .toc ol { columns: 1; } }

.article-intro { font-size: 1.05rem; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 1rem; margin-bottom: 1.4rem; }

.info-box, .key-box, .warn-box {
  border-radius: var(--radius); padding: 1.1rem 1.3rem; margin: 1.5rem 0; border: 1px solid var(--line);
}
.info-box { background: var(--brand-50); border-color: var(--brand-100); }
.info-box::before { content: "ℹ︎ Da ricordare"; display: block; font-weight: 700; color: var(--brand-700); margin-bottom: .3rem; font-size: .85rem; letter-spacing: .03em; text-transform: uppercase; }
.key-box { background: var(--bg-warm); border-left: 4px solid var(--warn); }
.warn-box { background: var(--accent-50); border-left: 4px solid var(--accent); }
.warn-box::before { content: "⚠ Quando preoccuparsi"; display: block; font-weight: 700; color: var(--accent-600); margin-bottom: .3rem; font-size: .85rem; letter-spacing: .03em; text-transform: uppercase; }
.info-box p:last-child, .warn-box p:last-child, .key-box p:last-child { margin-bottom: 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.4rem 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .96rem; background: #fff; }
thead th { background: var(--brand-700); color: #fff; text-align: left; padding: .8rem 1rem; font-family: var(--font-sans); font-weight: 600; font-size: .9rem; }
tbody td { padding: .75rem 1rem; border-top: 1px solid var(--line); color: var(--ink-soft); }
tbody tr:nth-child(even) { background: var(--bg-soft); }
tbody td:first-child { font-weight: 600; color: var(--ink); }

/* Key takeaways list (AISEO) */
.takeaways { background: var(--bg-soft); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 1.4rem 0; }
.takeaways h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
.takeaways h2::before { display: none; }
.takeaways ul { margin: 0; padding-left: 1.2rem; }
.takeaways li { font-size: .98rem; margin: .4rem 0; }

/* Inline tool callout inside articles */
.tool-callout { display: flex; gap: 1rem; align-items: center; background: var(--gradient-brand); color: #fff; border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 1.8rem 0; flex-wrap: wrap; }
.tool-callout .tc-body { flex: 1 1 280px; }
.tool-callout strong { color: #fff; }
.tool-callout p { margin: .2rem 0 0; color: rgba(255,255,255,.92); font-size: .95rem; }
.tool-callout .btn { flex: none; }

/* Disclaimer + author */
.disclaimer-box { background: var(--bg-warm); border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 1.6rem 0; }
.disclaimer-box h3 { color: var(--accent-600); margin-bottom: .4rem; }
.disclaimer-box p { font-size: .92rem; color: var(--muted); margin: 0 0 .5rem; }
.disclaimer-box .rev { font-size: .8rem; color: var(--muted-light); }

.author-box { display: flex; gap: 1.2rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; margin: 1.6rem 0; }
.author-box .a-av { width: 60px; height: 60px; border-radius: 50%; background: var(--gradient-brand); color: #fff; display: grid; place-items: center; font-family: var(--font-serif); font-weight: 700; font-size: 1.4rem; flex: none; }
.author-box h3 { margin-bottom: .15rem; }
.author-box .a-role { color: var(--brand-600); font-weight: 600; font-size: .88rem; margin-bottom: .4rem; }
.author-box p { font-size: .92rem; color: var(--muted); margin: 0; }

/* Sources */
.sources { font-size: .88rem; color: var(--muted); }
.sources h2 { font-size: 1.15rem; }
.sources ol { padding-left: 1.3rem; }
.sources li { margin: .4rem 0; }

/* Related */
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.2rem; }
@media (max-width: 820px) { .related-grid { grid-template-columns: 1fr; } }

/* Article list cards */
.post-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: .2s; height: 100%; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-100); }
.post-card .thumb { aspect-ratio: 1200/630; background: var(--gradient-soft); overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .pc-body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; flex: 1; }
.post-card .pc-cat { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-600); margin-bottom: .35rem; }
.post-card h3 { font-size: 1.15rem; line-height: 1.25; margin-bottom: .45rem; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--brand-600); }
.post-card p { font-size: .92rem; color: var(--muted); margin: 0 0 .9rem; }
.post-card .pc-meta { margin-top: auto; font-size: .8rem; color: var(--muted-light); display: flex; gap: .6rem; align-items: center; }

/* --------------------------------------------------------------- Footer */
.site-footer { background: var(--bg-ink); color: #b9cfcb; padding-top: 3rem; margin-top: 2rem; }
.footer-disclaimer { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-bottom: 2.4rem; display: flex; gap: .9rem; align-items: flex-start; }
.footer-disclaimer svg { width: 24px; height: 24px; color: var(--brand-300); flex: none; margin-top: 2px; }
.footer-disclaimer p { font-size: .85rem; line-height: 1.6; margin: 0; color: #aac4bf; }
.footer-disclaimer strong { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2.2rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.6rem; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .fb-name { font-family: var(--font-serif); font-size: 1.3rem; color: #fff; font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.footer-brand p { font-size: .9rem; margin: .7rem 0 0; max-width: 36ch; }
.footer-col h3 { color: #fff; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .9rem; font-family: var(--font-sans); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: .5rem 0; }
.footer-col a { color: #b9cfcb; font-size: .92rem; }
.footer-col a:hover { color: #fff; }
.footer-badge { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1rem; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 999px; padding: .35rem .8rem; font-size: .8rem; font-weight: 600; color: #fff; }
.footer-addr { font-size: .8rem; color: #8fa9a4; margin-top: .7rem; display: flex; align-items: flex-start; gap: .4rem; line-height: 1.5; }
.footer-addr svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--brand-300); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 1.3rem 0; display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between; align-items: center; font-size: .82rem; color: #8fa9a4; }
.footer-bottom .tri { display: inline-flex; height: 14px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.15); }
.footer-bottom .tri span { width: 16px; }
.footer-bottom .tri .g { background: #008C45; } .footer-bottom .tri .w { background: #fff; } .footer-bottom .tri .r { background: #CD212A; }

/* --------------------------------------------------------------- Misc */
.notice-404 { text-align: center; padding: clamp(3rem,8vw,6rem) 0; }
.notice-404 .big { font-family: var(--font-serif); font-size: clamp(4rem,14vw,7rem); color: var(--brand-100); line-height: 1; }

.legal-body { max-width: var(--maxw-narrow); }
.legal-body h2 { margin: 1.8rem 0 .6rem; }
.legal-body h2::before { display: none; }
.legal-body p, .legal-body li { color: var(--ink-soft); }
.legal-body .updated { color: var(--muted); font-size: .9rem; }

.prose-narrow { max-width: var(--maxw-narrow); margin-inline: auto; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
