/* motoassicurazioni.it — premium editorial design 2026 */

:root {
  --brand:        #dc1f3f;
  --brand-dark:   #6f0a1c;
  --brand-light:  #ff4d6b;
  --brand-2:      #ff7847;
  --brand-grad:   linear-gradient(135deg, #ff4d6b 0%, #dc1f3f 50%, #6f0a1c 100%);
  --brand-grad-r: linear-gradient(135deg, #dc1f3f 0%, #ff7847 100%);
  --brand-grad-soft: linear-gradient(135deg, rgba(220,31,63,0.07) 0%, rgba(255,120,71,0.04) 100%);
  --ink:          #050810;
  --ink-2:        #14192a;
  --ink-3:        #2b3242;
  --text:         #3a4255;
  --muted:        #6b7385;
  --muted-2:      #9aa3b8;
  --bg:           #ffffff;
  --bg-alt:       #f5f7fc;
  --bg-soft:      #fafbff;
  --bg-dark:      #050810;
  --bg-dark-2:    #0e1424;
  --border:       #e8eaf2;
  --border-strong:#cdd3df;
  --accent:       #ffb800;
  --success:      #00c46a;
  --info:         #4f6cf6;
  --shadow-sm:    0 1px 2px rgba(11,15,23,0.04), 0 1px 3px rgba(11,15,23,0.05);
  --shadow:       0 4px 16px rgba(11,15,23,0.06), 0 2px 4px rgba(11,15,23,0.04);
  --shadow-lg:    0 24px 50px -8px rgba(11,15,23,0.16), 0 8px 16px -4px rgba(11,15,23,0.08);
  --shadow-xl:    0 40px 80px -20px rgba(11,15,23,0.25), 0 12px 24px -8px rgba(11,15,23,0.1);
  --shadow-brand: 0 18px 36px -8px rgba(220,31,63,0.4), 0 6px 14px -3px rgba(220,31,63,0.22);
  --shadow-inset: inset 0 1px 0 rgba(255,255,255,0.5);
  --radius-sm:    8px;
  --radius:       14px;
  --radius-lg:    22px;
  --radius-xl:    32px;
  --max-w:        780px;
  --max-w-wide:   1200px;
  --font:         "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font: 16px/1.7 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--brand); color: #fff; }

/* ========== Container ========== */
.container       { max-width: var(--max-w-wide); margin: 0 auto; padding: 0 24px; }
.container-narrow{ max-width: var(--max-w);      margin: 0 auto; padding: 0 24px; }

/* ========== Sticky Header ========== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.78);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(232,234,242,0.6);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; max-width: var(--max-w-wide); margin: 0 auto;
  gap: 24px; flex-wrap: wrap;
}
.site-header .logo {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-weight: 800; font-size: 18px; letter-spacing: -.025em;
  color: var(--ink);
}
.site-header .logo:hover { color: var(--brand); }
.site-header .logo__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: var(--brand-grad); border-radius: 11px;
  color: #fff;
  box-shadow: var(--shadow-brand), var(--shadow-inset);
  transition: transform .2s ease;
}
.site-header .logo:hover .logo__icon { transform: rotate(-6deg) scale(1.05); }
.site-header nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-header nav a {
  position: relative; padding: 8px 14px; border-radius: 10px;
  color: var(--ink-3); font-weight: 500; font-size: 14.5px;
  transition: all .15s ease;
}
.site-header nav a:hover { background: var(--bg-alt); color: var(--brand); text-decoration: none; }

/* ========== Article container ========== */
main { display: block; }
article { max-width: var(--max-w); margin: 0 auto; padding: 40px 24px 80px; }

/* ========== Typography ========== */
h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.1; letter-spacing: -.03em;
  color: var(--ink); font-weight: 800;
  margin-bottom: 18px;
}
h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.25; letter-spacing: -.02em;
  color: var(--ink); font-weight: 800;
  margin: 40px 0 16px;
}
h3 { font-size: 20px; font-weight: 700; color: var(--ink); margin: 28px 0 10px; line-height: 1.35; letter-spacing: -.01em;}
h4 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 20px 0 8px; }
p  { margin: 0 0 16px; }
strong { font-weight: 700; color: var(--ink-2); }

.updated {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); font-size: 13px; font-weight: 500;
  margin-bottom: 24px; padding: 5px 14px;
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 999px;
}
.updated svg { color: var(--brand); width: 14px; height: 14px; }
article > p { font-size: 17px; line-height: 1.78; }
article ul, article ol { margin: 0 0 18px 24px; }
article li { margin-bottom: 6px; line-height: 1.7; }
article a.gloss {
  color: var(--brand); border-bottom: 1px dashed var(--brand);
  font-weight: 500;
}
article a.gloss:hover { background: var(--brand-grad-soft); border-bottom-style: solid; text-decoration: none; padding: 0 2px; margin: 0 -2px; border-radius: 3px; }

/* Tables in article */
article table {
  width: 100%; border-collapse: collapse; margin: 24px 0;
  font-size: 15px; background: #fff;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
article th, article td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
article th { background: var(--bg-alt); font-weight: 700; color: var(--ink); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
article tr:last-child td { border-bottom: 0; }
article tr:nth-child(even) td { background: rgba(245,247,252,0.4); }

article blockquote {
  margin: 28px 0; padding: 24px 28px;
  background: var(--brand-grad-soft);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  font-size: 17px;
  color: var(--ink-2);
}

/* ========== CtaBox — premium ========== */
.ctabox {
  position: relative; overflow: hidden;
  background: var(--brand-grad);
  color: #fff;
  padding: 40px 32px;
  border-radius: var(--radius-lg);
  margin: 36px 0;
  box-shadow: var(--shadow-brand), var(--shadow-inset);
  text-align: center;
}
.ctabox::before {
  content: ""; position: absolute; inset: -30% -20% auto auto;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(255,255,255,0.22) 0%, transparent 65%);
  pointer-events: none;
}
.ctabox::after {
  content: ""; position: absolute; left: -80px; bottom: -80px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(255,77,107,0.4) 0%, transparent 70%);
  pointer-events: none;
}
.ctabox__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px); font-weight: 800;
  margin-bottom: 12px; letter-spacing: -.02em;
  position: relative; z-index: 2;
}
.ctabox__subtitle {
  font-size: 16px; opacity: 0.94; margin-bottom: 24px;
  line-height: 1.6;
  position: relative; z-index: 2;
}
.ctabox__btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; color: var(--brand-dark);
  font-weight: 700; font-size: 16px;
  padding: 16px 36px;
  border-radius: 14px;
  text-decoration: none;
  transition: all .2s ease;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.8);
  position: relative; z-index: 2;
}
.ctabox__btn::after {
  content: ""; width: 16px; height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14M13 5l7 7-7 7'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14M13 5l7 7-7 7'/></svg>") center/contain no-repeat;
  transition: transform .2s ease;
}
.ctabox__btn:hover {
  transform: translateY(-2px); text-decoration: none;
  box-shadow: 0 14px 28px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.8);
  color: var(--brand-dark);
}
.ctabox__btn:hover::after { transform: translateX(5px); }
.ctabox--secondary {
  background: linear-gradient(135deg, #ffffff 0%, var(--bg-alt) 100%);
  color: var(--ink);
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.ctabox--secondary::before, .ctabox--secondary::after { display: none; }
.ctabox--secondary .ctabox__title { color: var(--ink); }
.ctabox--secondary .ctabox__subtitle { color: var(--muted); opacity: 1; }
.ctabox--secondary .ctabox__btn { background: var(--brand-grad); color: #fff; box-shadow: var(--shadow-brand); }
.ctabox--secondary .ctabox__btn:hover { color: #fff; }

/* ========== Hero homepage — premium mesh ========== */
.hero {
  position: relative;
  padding: 96px 24px 80px;
  background:
    radial-gradient(60% 80% at 15% 10%, rgba(255,120,71,0.18) 0%, transparent 60%),
    radial-gradient(50% 70% at 85% 0%, rgba(220,31,63,0.18) 0%, transparent 55%),
    radial-gradient(70% 60% at 50% 100%, rgba(79,108,246,0.07) 0%, transparent 65%),
    linear-gradient(180deg, #fffafa 0%, #ffffff 100%);
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(11,15,23,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,15,23,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 25%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 25%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 -1px 0; height: 80px;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}
.hero__inner { max-width: 900px; margin: 0 auto; position: relative; z-index: 2; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px; margin-bottom: 28px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--ink-3);
  box-shadow: var(--shadow-sm);
}
.hero__eyebrow .dot {
  width: 8px; height: 8px;
  background: var(--success); border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(0,196,106,0.2);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(0,196,106,0.2); }
  50%     { box-shadow: 0 0 0 8px rgba(0,196,106,0.08); }
}
.hero__eyebrow strong { color: var(--brand-dark); font-weight: 700; }
.hero h1 {
  font-size: clamp(36px, 6.5vw, 64px);
  line-height: 1.05; letter-spacing: -.035em;
  margin-bottom: 24px;
  font-weight: 900;
  background: linear-gradient(135deg, #14192a 0%, #050810 60%, var(--brand-dark) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero h1 .accent {
  background: var(--brand-grad-r);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--muted);
  max-width: 680px; margin: 0 auto 36px;
  line-height: 1.6;
}
.hero__actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin-bottom: 48px;
}
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 32px;
  background: var(--brand-grad);
  color: #fff; font-weight: 700; font-size: 16px;
  border-radius: 14px;
  box-shadow: var(--shadow-brand), var(--shadow-inset);
  text-decoration: none;
  transition: all .2s ease;
  border: 0; cursor: pointer;
}
.btn-primary:hover { transform: translateY(-2px); color: #fff; text-decoration: none; box-shadow: 0 22px 44px -8px rgba(220,31,63,0.5); }
.btn-primary svg { width: 18px; height: 18px; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  color: var(--ink-2); font-weight: 600; font-size: 15px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  text-decoration: none;
  transition: all .2s ease;
}
.btn-ghost:hover { background: #fff; color: var(--brand); border-color: var(--brand-light); text-decoration: none; transform: translateY(-2px); }

/* Stats inline sotto hero */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  margin: 12px auto 0; max-width: 720px;
  padding: 28px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(232,234,242,0.6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.stats__item { text-align: center; }
.stats__num {
  display: block; font-family: var(--font-display);
  font-size: clamp(22px, 3.5vw, 32px); font-weight: 900;
  letter-spacing: -.02em;
  background: var(--brand-grad-r);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stats__label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
  margin-top: 4px;
}
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); gap: 18px; padding: 22px; }
}

/* ========== Sources row ========== */
.sources {
  padding: 36px 24px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  text-align: center;
}
.sources__label {
  font-size: 12px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted-2); font-weight: 600;
  margin-bottom: 20px;
}
.sources__list {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 32px 40px;
  align-items: center; max-width: 920px; margin: 0 auto;
}
.sources__item {
  font-family: var(--font-display);
  font-weight: 800; letter-spacing: .01em;
  color: var(--muted); font-size: 15px;
  opacity: .7; transition: opacity .15s ease;
}
.sources__item:hover { opacity: 1; }
.sources__item small { font-size: 10px; display: block; text-transform: uppercase; letter-spacing: .08em; font-weight: 500; opacity: .7; }

/* ========== Section general ========== */
.section { padding: 88px 24px; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--bg-dark); color: #fff; }
.section__head { text-align: center; margin-bottom: 56px; max-width: 720px; margin-left: auto; margin-right: auto; }
.section__eyebrow {
  display: inline-block; padding: 6px 14px;
  background: var(--brand-grad-soft);
  color: var(--brand-dark);
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 14px;
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  letter-spacing: -.025em;
  line-height: 1.15;
}
.section__lead {
  color: var(--muted); font-size: 17px;
  margin-top: 14px; line-height: 1.65;
}

/* ========== Steps "come funziona" ========== */
.steps {
  display: grid; grid-template-columns: 1fr; gap: 24px;
  max-width: var(--max-w-wide); margin: 0 auto;
}
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.step {
  position: relative;
  padding: 36px 28px 32px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform .2s ease;
}
.step:hover { transform: translateY(-4px); }
.step__num {
  position: absolute; top: -18px; left: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: var(--brand-grad);
  color: #fff; font-weight: 800; font-size: 16px;
  border-radius: 12px;
  box-shadow: var(--shadow-brand);
}
.step__icon {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-grad-soft);
  color: var(--brand);
  border-radius: 14px;
  margin-bottom: 18px;
}
.step h3 { margin: 0 0 10px; font-size: 19px; }
.step p { color: var(--muted); font-size: 15px; line-height: 1.65; margin: 0; }

/* ========== Features grid ========== */
.features {
  display: grid; gap: 20px;
  grid-template-columns: 1fr;
  max-width: var(--max-w-wide); margin: 0 auto;
}
@media (min-width: 700px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature {
  padding: 28px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all .2s ease;
}
.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.feature__icon {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-grad);
  color: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-brand);
  margin-bottom: 18px;
}
.feature h3 { font-size: 16px; margin: 0 0 8px; line-height: 1.4; }
.feature p { color: var(--muted); font-size: 14px; line-height: 1.65; margin: 0; }

/* ========== Cards featured ========== */
.cards {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
  max-width: var(--max-w-wide); margin: 0 auto;
}
@media (min-width: 700px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  display: flex; flex-direction: column;
  padding: 30px 28px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all .25s cubic-bezier(.2,.7,.2,1);
  position: relative; overflow: hidden;
  min-height: 250px;
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 100% 0%, rgba(220,31,63,0.05) 0%, transparent 60%);
  opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.card::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--brand-grad);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.card:hover {
  transform: translateY(-6px); text-decoration: none;
  box-shadow: var(--shadow-lg); border-color: transparent;
}
.card:hover::before { opacity: 1; }
.card:hover::after { transform: scaleX(1); }
.card__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.card__tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  background: var(--brand-grad-soft);
  color: var(--brand-dark);
  border-radius: 999px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em;
}
.card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #fff5f7 0%, #ffe3ea 100%);
  color: var(--brand);
  border-radius: 10px;
}
.card h3 {
  color: var(--ink); margin: 0 0 12px;
  font-size: 19px; line-height: 1.35;
  font-weight: 800; letter-spacing: -.015em;
}
.card p {
  color: var(--muted); font-size: 14.5px;
  line-height: 1.6; margin: 0;
  flex-grow: 1;
}
.card__foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 20px; padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.card__readtime { color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.card__readtime svg { width: 14px; height: 14px; }
.card__more {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--brand); font-weight: 700; font-size: 13px;
}
.card__more::after { content: "→"; transition: transform .15s ease; }
.card:hover .card__more::after { transform: translateX(4px); }

/* ========== Glossario ========== */
.glossario-page {
  padding: 64px 24px 80px;
  max-width: var(--max-w); margin: 0 auto;
}
.glossario-page__lead {
  color: var(--muted); font-size: 18px; line-height: 1.6;
  margin-bottom: 32px;
}
.glossario {
  display: grid; gap: 0;
}
.glossario dt {
  font-family: var(--font-display);
  font-weight: 800; font-size: 18px;
  color: var(--ink);
  margin-top: 24px; padding-top: 24px;
  border-top: 1px solid var(--border);
  position: relative; padding-left: 28px;
  letter-spacing: -.015em;
}
.glossario dt::before {
  content: ""; position: absolute; left: 0; top: 30px;
  width: 12px; height: 12px;
  background: var(--brand-grad);
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(220,31,63,0.3);
}
.glossario dd {
  margin-left: 28px; margin-top: 8px; color: var(--muted);
  font-size: 15.5px; line-height: 1.7;
}
.glossario dt:first-of-type { border-top: 0; padding-top: 8px; margin-top: 0; }
.glossario dt:first-of-type::before { top: 12px; }

/* ========== Hero tool (per pagina targa) ========== */
.hero--tool { padding: 72px 24px 56px; }
.hero--tool::after { display: none; }
.hero--tool h1 { font-size: clamp(30px, 4.5vw, 48px); }
.hero--tool p { font-size: 17px; max-width: 680px; }

/* ========== Tool targa ========== */
.targa-page {
  padding: 32px 24px 80px;
  max-width: 880px; margin: 0 auto;
  position: relative; z-index: 3;
}
.targa-form {
  display: flex; flex-direction: column; gap: 18px;
  margin: -50px 0 40px;
  padding: 28px;
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  position: relative; z-index: 4;
}
.targa-form__row { display: flex; gap: 14px; flex-wrap: wrap; }
.targa-form__row--main { flex-wrap: nowrap; }
.field {
  flex: 1 1 180px; display: flex; flex-direction: column; gap: 6px;
}
.field__lbl {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted);
}
.field input, .field select {
  padding: 14px 16px;
  font-size: 15px; font-weight: 500;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-soft);
  transition: all .15s ease;
  font-family: var(--font);
  color: var(--ink);
  width: 100%;
}
.field input:focus, .field select:focus {
  border-color: var(--brand); outline: none; background: #fff;
  box-shadow: 0 0 0 4px rgba(220,31,63,0.10);
}
.field--targa input {
  font-family: var(--font-mono);
  font-size: 22px; font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: 18px 20px;
  text-align: center;
}
.targa-form__actions {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-top: 4px;
}
.targa-form__hint { font-size: 13px; color: var(--muted); }

/* ========== Vehicle card (output) ========== */
.vcard {
  background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  margin-bottom: 32px;
  animation: vcardIn .35s cubic-bezier(.2,.7,.2,1);
}
@keyframes vcardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.vcard__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.vcard__plate {
  display: inline-flex; align-items: stretch;
  background: #fff;
  border: 2px solid var(--ink); border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.vcard__plate__flag {
  background: linear-gradient(180deg, #0a3a8c 0%, #082970 100%);
  color: #fff; padding: 0 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
}
.vcard__plate__flag b { font-size: 14px; letter-spacing: 0; }
.vcard__plate__txt {
  padding: 10px 18px;
  font-weight: 700; font-size: 22px;
  color: var(--ink); letter-spacing: .15em;
}
.vcard__status {
  display: inline-flex; align-items: center; padding: 8px 14px;
  border-radius: 999px; font-weight: 700; font-size: 13px;
  letter-spacing: .01em;
}
.vcard__status--success { background: rgba(0,196,106,0.12); color: #007a40; border: 1px solid rgba(0,196,106,0.25); }
.vcard__status--info    { background: rgba(79,108,246,0.10); color: #2640d4; border: 1px solid rgba(79,108,246,0.22); }
.vcard__status--warn    { background: rgba(255,184,0,0.14);  color: #8a5800; border: 1px solid rgba(255,184,0,0.32); }
.vcard__status--danger  { background: rgba(220,31,63,0.10); color: var(--brand-dark); border: 1px solid rgba(220,31,63,0.28); }

.vcard__grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bg-alt);
  border-radius: var(--radius);
}
.vcard__cell { display: flex; flex-direction: column; gap: 4px; }
.vcard__cell__lbl {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted);
}
.vcard__cell__val { font-weight: 700; color: var(--ink); font-size: 16px; }

.vcard__countdown {
  margin-bottom: 24px;
  padding: 18px 20px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.vcard__countdown__bar {
  height: 8px; background: #eaedf5; border-radius: 999px; overflow: hidden;
  margin-bottom: 12px;
}
.vcard__countdown__fill { height: 100%; border-radius: 999px; transition: width .6s cubic-bezier(.2,.7,.2,1); }
.vcard__countdown__txt { font-size: 14px; color: var(--ink-2); }

.vcard__premium {
  margin-bottom: 24px;
  padding: 24px;
  background: var(--brand-grad-soft);
  border-radius: var(--radius);
  border: 1px solid rgba(220,31,63,0.12);
}
.vcard__premium__head {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--brand-dark); margin-bottom: 8px;
}
.vcard__premium__amt {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 40px); font-weight: 900;
  color: var(--brand-dark);
  letter-spacing: -.02em;
  background: var(--brand-grad-r);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.vcard__premium__amt small {
  font-size: 14px; font-weight: 500; color: var(--muted);
  -webkit-text-fill-color: var(--muted);
  margin-left: 6px;
}
.vcard__premium__note { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.55; }

.vcard__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.vcard__actions .btn-primary, .vcard__actions .btn-ghost {
  padding: 13px 22px; font-size: 14px;
}
.vcard__actions svg { width: 16px; height: 16px; }
.vcard__disclaimer {
  font-size: 12px; color: var(--muted);
  line-height: 1.6; padding-top: 16px; border-top: 1px solid var(--border);
  margin: 0;
}
.result--err {
  padding: 20px 24px;
  background: rgba(220,31,63,0.06);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  color: var(--brand-dark); font-weight: 500;
}
.result--err code {
  font-family: var(--font-mono);
  background: rgba(220,31,63,0.10); padding: 2px 6px;
  border-radius: 4px; font-size: 13px;
}
.result {
  margin: 28px 0;
  padding: 32px;
  background: linear-gradient(135deg, #fff5f7 0%, #ffe7ec 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(220,31,63,0.15);
  box-shadow: var(--shadow);
}
.result h2 { margin-top: 0; }
.info { margin-top: 56px; }
details {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px; margin: 12px 0;
  transition: border-color .15s ease;
  box-shadow: var(--shadow-sm);
}
details[open] { border-color: var(--brand-light); box-shadow: var(--shadow); }
details > summary {
  cursor: pointer; font-weight: 700; color: var(--ink);
  font-size: 16px; list-style: none; padding-right: 32px;
  position: relative;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::after {
  content: ""; position: absolute; right: 0; top: 50%;
  width: 24px; height: 24px;
  margin-top: -12px;
  border-radius: 50%;
  background: var(--brand-grad);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .2s ease;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'><path d='M12 5v14M5 12h14'/></svg>") center/14px 14px no-repeat, linear-gradient(#000,#000);
  -webkit-mask-composite: source-over;
}
details[open] > summary::after { transform: rotate(45deg); }
details p { margin: 12px 0 0; color: var(--muted); font-size: 15px; }

/* ========== Article hero (pillar/articolo) ========== */
.article-meta {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.article-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  background: var(--brand-grad);
  color: #fff;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
}

/* ========== Static pages ========== */
.static-page { padding-top: 8px; }
.static-page h1 { margin-bottom: 28px; }

/* ========== Dark footer ========== */
footer {
  margin-top: 0;
  padding: 72px 24px 36px;
  background:
    radial-gradient(ellipse at top, rgba(220,31,63,0.08) 0%, transparent 60%),
    var(--bg-dark);
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}
footer .footer__inner {
  max-width: var(--max-w-wide); margin: 0 auto;
  display: grid; gap: 40px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  footer .footer__inner { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
}
footer .footer__brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-weight: 800; font-size: 19px; color: #fff;
  margin-bottom: 14px; letter-spacing: -.025em;
}
footer .footer__about { color: rgba(255,255,255,0.6); line-height: 1.7; font-size: 14px; max-width: 360px; }
footer h4 {
  color: #fff; font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  margin-bottom: 18px;
}
footer ul { list-style: none; padding: 0; margin: 0; }
footer ul li { margin-bottom: 10px; }
footer a { color: rgba(255,255,255,0.65); transition: color .15s ease; }
footer a:hover { color: #fff; }
.footer__bottom {
  max-width: var(--max-w-wide); margin: 48px auto 0;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; color: rgba(255,255,255,0.4); font-size: 13px;
}
.footer__bottom a { color: rgba(255,255,255,0.5); }
.disclaimer {
  font-size: 12px; color: rgba(255,255,255,0.45);
  max-width: 720px; line-height: 1.6;
}

/* ========== Cookie banner ========== */
#cookie-banner {
  position: fixed; bottom: 20px; left: 20px; right: 20px;
  max-width: 760px; margin: 0 auto;
  background: var(--ink); color: #fff;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  z-index: 999; font-size: 14px;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255,255,255,0.06);
}
#cookie-banner span { flex: 1 1 260px; line-height: 1.55; }
#cookie-banner a { color: #fff; text-decoration: underline; opacity: .85; }
#cookie-banner button {
  background: var(--brand-grad); color: #fff;
  border: 0; padding: 11px 24px;
  font-weight: 700; border-radius: 10px; cursor: pointer; font-size: 14px;
  transition: transform .15s ease;
}
#cookie-banner button:hover { transform: translateY(-1px); }
#cookie-banner button:last-of-type { background: rgba(255,255,255,0.12); }
#cookie-banner button:last-of-type:hover { background: rgba(255,255,255,0.2); }

/* ========== Misc ========== */
hr { border: 0; border-top: 1px solid var(--border); margin: 36px 0; }
