/* =====================================================
   STEFANO SIMONE — stefano.simonelabs.it
   Design: bianco + grafite + blu elettrico
   Fonts: Poppins (display) + Inter (body)
===================================================== */

:root {
  --bg:           #FFFFFF;
  --surface:      #F6F7F9;
  --surface-2:    #EDEEF2;
  --text:         #1C1F26;
  --text-muted:   #6B7280;
  --accent:       #5B8CFF;
  --accent-2:     #3A6BE0;
  --accent-light: rgba(91, 140, 255, 0.08);
  --accent-dim:   rgba(91, 140, 255, 0.12);
  --border:       rgba(28, 31, 38, 0.10);
  --border-strong: rgba(28, 31, 38, 0.18);
  --radius:       6px;
  --radius-lg:    12px;
  --transition:   200ms ease;
  --max-w:        1040px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: hidden; max-width: 100%; }

body {
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

img { max-width: 100%; height: auto; display: block; }
ul  { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── TYPOGRAPHY ─────────────────────────────────── */
h1, h2 {
  font-family: 'Poppins', system-ui, sans-serif;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h3, h4 {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.25;
  font-weight: 600;
}
h1 { font-size: clamp(2.4rem, 8vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
h3 { font-size: 1.05rem; }
p  { max-width: 68ch; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--transition);
}
a:hover { color: var(--accent-2); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
  text-decoration: none;
}

/* ── LAYOUT ──────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
section { padding: 5rem 0; }
section:nth-child(even) { background: var(--surface); }

/* ── NAVIGATION ──────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.nav__logo {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.nav__logo:hover { color: var(--accent); text-decoration: none; }
.nav__menu { display: flex; gap: 2.5rem; align-items: center; }
.nav__menu a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
  letter-spacing: 0.01em;
}
.nav__menu a:hover,
.nav__menu a[aria-current="page"] { color: var(--text); }
.nav__cta {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #fff !important;
  padding: 0.4em 1em;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none !important;
}
.nav__cta:hover { background: var(--accent-2) !important; color: #fff !important; }

/* "News" segue lo stesso criterio di tutti i link della nav (nessuno stile speciale) */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  color: var(--text);
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
@media (max-width: 680px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
    z-index: 200;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 1.5rem;
    background: var(--bg);
    border-top: 1px solid var(--border);
    overflow-y: auto;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .nav__menu.is-open { pointer-events: auto; opacity: 1; transform: translateY(0); }
  .nav__menu li { list-style: none; }
  .nav__menu a { font-size: 1.25rem; }
}

/* Menu a tendina "Conoscimi" */
.nav__dropdown { position: relative; }
.nav__dropdown-btn {
  background: none; border: none; cursor: pointer; font-family: inherit;
  color: var(--text-muted); font-size: 0.875rem; font-weight: 500;
  letter-spacing: 0.01em; padding: 0;
  display: inline-flex; align-items: center; gap: 0.35em;
  transition: color var(--transition);
}
.nav__dropdown-btn:hover,
.nav__dropdown.is-open .nav__dropdown-btn { color: var(--text); }
.nav__dropdown-caret { display: inline-flex; align-items: center; transition: transform 0.2s ease; }
.nav__dropdown-caret svg { display: block; }
.nav__dropdown.is-open .nav__dropdown-caret { transform: rotate(180deg); }

.nav__dropdown-menu {
  list-style: none; margin: 0; padding: 0.5rem;
  position: absolute; top: calc(100% + 16px); left: 50%;
  min-width: 180px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px -14px rgba(20,28,45,0.22);
  opacity: 0; pointer-events: none;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.nav__dropdown.is-open .nav__dropdown-menu {
  opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0);
}
.nav__dropdown-menu a {
  display: block; padding: 0.6rem 0.8rem; border-radius: 8px;
  color: var(--text-muted); font-size: 0.875rem; font-weight: 500;
  text-decoration: none; white-space: nowrap; transition: background var(--transition), color var(--transition);
}
.nav__dropdown-menu a:hover,
.nav__dropdown-menu a[aria-current="page"] { background: var(--accent-light); color: var(--text); }

@media (max-width: 680px) {
  .nav__dropdown { width: 100%; text-align: center; }
  .nav__dropdown-btn { justify-content: center; width: 100%; font-size: 1.25rem; }
  .nav__dropdown-menu {
    position: static; margin-top: 0; padding: 0;
    background: transparent; border: none; box-shadow: none;
    opacity: 1; pointer-events: auto; transform: none;
    max-height: 0; overflow: hidden;
    transition: max-height 0.25s ease, padding 0.25s ease;
  }
  .nav__dropdown.is-open .nav__dropdown-menu { max-height: 260px; padding-top: 1rem; transform: none; }
  .nav__dropdown-menu a { text-align: center; font-size: 1.05rem; padding: 0.6rem; }
}

/* ── SECTION LABEL ───────────────────────────────── */
.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 0.6rem;
  display: block;
}
.section-title { margin-bottom: 2rem; }

/* ── TIMELINE ────────────────────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 1.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 1px;
  background: var(--border-strong);
}
.timeline__item { position: relative; padding-bottom: 2.5rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: '';
  position: absolute;
  left: -1.5rem; top: 8px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-3px);
}
.timeline__period {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.timeline__title {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.timeline__org { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 0.6rem; }
.timeline__desc { font-size: 0.9rem; color: var(--text-muted); }
.timeline__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.timeline__tag {
  font-size: 0.72rem;
  padding: 0.2em 0.65em;
  border-radius: 100px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ── SKILL TAGS ──────────────────────────────────── */
.skills__grid { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.skill-tag {
  display: inline-block;
  padding: 0.4em 0.9em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 500;
  transition: border-color var(--transition), color var(--transition);
  text-decoration: none;
}
.skill-tag:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.skill-tag--primary {
  border-color: rgba(91,140,255,0.35);
  background: var(--accent-dim);
  color: var(--accent);
}

/* ── PROJECT CARDS ───────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 600px) { .projects-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 900px) { .projects-grid { grid-template-columns: repeat(3,1fr); } }

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition);
  text-decoration: none;
  color: var(--text);
}
.project-card:hover { border-color: var(--accent); transform: translateY(-3px); color: var(--text); }
.project-card__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  text-decoration: none;
}
.project-card__title { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.project-card__desc { font-size: 0.875rem; color: var(--text-muted); flex: 1; margin-bottom: 1rem; max-width: none; }
.project-card__tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.project-card__tag {
  font-size: 0.7rem;
  padding: 0.2em 0.6em;
  border-radius: 100px;
  background: var(--surface-2);
  color: var(--text-muted);
}
.project-card--placeholder { opacity: 0.55; }
.project-card--placeholder:hover { border-color: var(--border); transform: none; cursor: default; }

/* ── BREADCRUMB ──────────────────────────────────── */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  padding-top: 2rem;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb__sep { color: var(--border-strong); }
.breadcrumb__current { color: var(--text); }

/* ── PAGE HERO ───────────────────────────────────── */
.page-hero {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { font-size: clamp(1.8rem, 6vw, 3rem); margin-bottom: 0.75rem; }
.page-hero .lead { font-size: 1.05rem; color: var(--text-muted); max-width: 58ch; line-height: 1.65; }

/* ── INFO CARD ───────────────────────────────────── */
.info-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: border-color var(--transition);
}
.info-card:hover { border-color: var(--accent); }
.info-card h3 { margin-bottom: 0.6rem; transition: color var(--transition); }
.info-card:hover h3 { color: var(--accent); }
.info-card p { color: var(--text-muted); font-size: 0.925rem; }

.two-col { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* ── CONTACT PAGE ────────────────────────────────── */
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  transition: border-color var(--transition);
}
.contact-item:hover { border-color: var(--accent); }
.contact-item__icon {
  width: 44px; height: 44px;
  background: var(--accent-dim);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  color: var(--accent);
}
.contact-item__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.2rem;
  text-decoration: none;
}
.contact-item__value { font-size: 1rem; font-weight: 500; color: var(--text); }
.contact-item__value a { color: var(--text); text-decoration: none; }
.contact-item__value a:hover { color: var(--accent); }
.contact-item__note { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ── FOOTER ──────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg);
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.footer a { color: var(--text-muted); text-decoration: none; }
.footer a:hover { color: var(--accent); }

/* ── UTILITY ─────────────────────────────────────── */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.text-muted { color: var(--text-muted); }
.text-hint  { color: var(--text-muted); font-size: 0.875rem; }
.note-inline { font-size: 0.75em; color: var(--text-muted); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ══════════════════════════════════════════════════
   HOME — Jobiri-inspired layout
   Namespace: jb- (no conflict with existing styles)
══════════════════════════════════════════════════ */

/* Immagine con bordi arrotondati asimmetrici */
.jb-img {
  width: 100%;
  min-height: 360px;
  border-radius: 0 80px 80px 80px;
  background: linear-gradient(135deg, var(--accent) 0%, #1a3a9e 100%);
  flex-shrink: 0;
  overflow: hidden;
}
.jb-img img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.jb-img--round     { border-radius: 80px; }
.jb-img--round-alt { border-radius: 80px 0 80px 80px; }
.jb-img--round-bl  { border-radius: 0 80px 80px 80px; }

/* Bottoni */
.jb-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.8rem 1.75rem;
  border-radius: 9999px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
}
.jb-btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.jb-btn--primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; text-decoration: none; }
.jb-btn--ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
.jb-btn--ghost:hover { background: var(--accent); color: #fff; text-decoration: none; }
.jb-btn--white { background: #fff; color: var(--accent); border-color: #fff; }
.jb-btn--white:hover { background: #eef2ff; color: var(--accent-2); text-decoration: none; }
.jb-btn--outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.jb-btn--outline-white:hover { border-color: #fff; text-decoration: none; }

/* Grid 2 colonne */
.jb-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 768px) {
  .jb-grid { grid-template-columns: 1fr 1fr; gap: 5rem; }
  .jb-grid--rev > *:first-child { order: 2; }
  .jb-grid--rev > *:last-child  { order: 1; }
}

/* Eyebrow */
.jb-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.jb-eyebrow--white  { color: rgba(255,255,255,0.7); }
.jb-eyebrow--center { text-align: center; }

/* Titoli sezione */
.jb-h2 {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1rem;
}
.jb-h2--white  { color: #fff; }
.jb-h2--center { text-align: center; }

.jb-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1.25rem;
  max-width: 60ch;
}
.jb-lead--white  { color: rgba(255,255,255,0.8); }
.jb-lead--center { text-align: center; margin-left: auto; margin-right: auto; }

/* Utility */
.jb-btn--mt    { margin-top: 0.5rem; }
.jb-btn--mt-lg { margin-top: 2.5rem; }

/* ── 1. HERO ──────────────────────────────────────── */
section.jb-hero {
  background: var(--accent-light) !important;
  padding: 5rem 0 !important;
  border-bottom: 1px solid var(--border);
}
.jb-hero__h1 {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.jb-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}
.jb-hero--nophoto { text-align: center; }
.jb-hero__center { max-width: 760px; margin: 0 auto; }
.jb-hero__actions--center { justify-content: center; }

/* ── 1.5 CHAT CON L'ASSISTENTE AI ─────────────────── */
section.jb-chat-section {
  background: linear-gradient(180deg, #0A0F1A 0%, #0d1424 100%) !important;
  padding: 5.5rem 0 !important;
}
.jb-chat-section .container { max-width: 720px; }

.jb-chat {
  margin-top: 2.75rem;
  display: flex;
  flex-direction: column;
  background: #11172a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,0.4);
}
.jb-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.jb-chat__header-info { display: flex; align-items: center; gap: 0.85rem; }
.jb-chat__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
}
.jb-chat__title { color: #fff; font-weight: 600; font-size: 0.92rem; line-height: 1.3; }
.jb-chat__status {
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4em;
  margin-top: 0.1rem;
}
.jb-chat__status-dot { width: 6px; height: 6px; border-radius: 50%; background: #34D399; display: inline-block; flex-shrink: 0; }
.jb-chat__reset {
  color: rgba(255,255,255,0.55);
  font-size: 0.78rem;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  padding: 0.4em 0.95em;
  transition: color 0.15s, border-color 0.15s;
}
.jb-chat__reset:hover { color: #fff; border-color: rgba(255,255,255,0.4); }

.jb-chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 420px;
  min-height: 220px;
  scroll-behavior: smooth;
}
.jb-chat__msg { display: flex; }
.jb-chat__msg--user { justify-content: flex-end; }
.jb-chat__bubble {
  max-width: 82%;
  padding: 0.75rem 1.05rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.65;
}
.jb-chat__bubble p { margin: 0 0 0.6em; }
.jb-chat__bubble p:last-child { margin-bottom: 0; }
.jb-chat__bubble ul { margin: 0.3em 0 0.6em 1.1em; padding: 0; }
.jb-chat__bubble li { margin-bottom: 0.3em; }
.jb-chat__msg--bot .jb-chat__bubble { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.92); border-bottom-left-radius: 4px; }
.jb-chat__msg--user .jb-chat__bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.jb-chat__msg--error .jb-chat__bubble { background: rgba(239,68,68,0.12); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }

.jb-chat__bubble--loading { display: flex; gap: 5px; align-items: center; padding: 0.95rem 1.1rem; }
.jb-chat__dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.5); animation: jb-chat-bounce 1.2s infinite ease-in-out; }
.jb-chat__dot:nth-child(2) { animation-delay: 0.15s; }
.jb-chat__dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes jb-chat-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .jb-chat__dot { animation: none; }
}

.jb-chat__suggestions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 1.4rem 1.1rem; }
.jb-chat__chip {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.7);
  border-radius: 100px;
  padding: 0.4em 0.95em;
  font-size: 0.78rem;
  transition: border-color 0.15s, color 0.15s;
}
.jb-chat__chip:hover { border-color: var(--accent); color: #fff; }
.jb-chat__chip[disabled] { opacity: 0.4; cursor: default; }

.jb-chat__inputbar {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  padding: 1rem 1.2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.jb-chat__inputbar textarea {
  flex: 1;
  resize: none;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  padding: 0.7rem 0.95rem;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
  max-height: 120px;
}
.jb-chat__inputbar textarea::placeholder { color: rgba(255,255,255,0.35); }
.jb-chat__inputbar textarea:focus { outline: none; border-color: var(--accent); }
.jb-chat__send {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, opacity 0.15s;
}
.jb-chat__send svg { width: 18px; height: 18px; }
.jb-chat__send:hover { background: var(--accent-2); }
.jb-chat__send[disabled] { opacity: 0.5; cursor: default; }

@media (max-width: 560px) {
  .jb-chat__messages { max-height: 340px; }
  .jb-chat__bubble { max-width: 90%; }
}

/* ── 2. CHI SONO ──────────────────────────────────── */
section.jb-chisono {
  background: var(--surface) !important;
  padding: 5rem 0 !important;
}

/* ── 3. COMPETENZE DARK ───────────────────────────── */
section.jb-dark {
  background: #0A0F1A !important;
  padding: 5rem 0 !important;
}
.jb-dark .container { text-align: center; }
.jb-skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2.5rem;
}
.jb-skill-pill {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 9999px;
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.jb-skill-pill:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ── 4. RADAR AI (step cards) ─────────────────────── */
section.jb-radar {
  background: var(--accent-light) !important;
  padding: 5rem 0 !important;
}
.jb-radar .container { text-align: center; }
.jb-radar .jb-eyebrow { text-align: center; }
.jb-radar-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
}
.jb-radar-card {
  background: #fff;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: left;
  box-shadow: 0 2px 12px rgba(91,140,255,0.08);
  border: 1px solid var(--border);
}
.jb-radar-card__icon {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1rem;
}
.jb-radar-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.jb-radar-card__body {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: none;
}

/* ── 5. COSA ESPLORO ──────────────────────────────── */
section.jb-esploro {
  background: #fff !important;
  padding: 5rem 0 !important;
}
.jb-check-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-top: 1.75rem;
}
.jb-check-item { display: flex; gap: 1rem; align-items: flex-start; }
.jb-check-item__icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  background: var(--accent-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.75rem;
  margin-top: 3px;
  font-weight: 700;
}
.jb-check-item__title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.jb-check-item__body {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: none;
}

/* ── 6. PERCORSO MINI ─────────────────────────────── */
section.jb-percorso {
  background: var(--surface) !important;
  padding: 5rem 0 !important;
}

/* ── 7. CTA FINALE ────────────────────────────────── */
section.jb-cta-final {
  background: linear-gradient(135deg, #1a3a9e 0%, #0A0F1A 100%) !important;
  padding: 6rem 0 !important;
  text-align: center;
}
.jb-cta-final .container { text-align: center; }
.jb-lead--mt { margin-top: 0.75rem; }
.jb-dark__cta { margin-top: 2.5rem; text-align: center; }
.jb-percorso .timeline { max-width: 600px; margin-top: 2rem; }

.jb-cta-final__btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ── COME COSTRUISCO (step cards) ────────────────── */
section.jb-come {
  background: #fff !important;
  padding: 5rem 0 !important;
}
.jb-step-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
}
.jb-step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
}
.jb-step-card__num {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.75rem;
}
.jb-step-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.jb-step-card__body {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: none;
}

/* ── COSA SONO (glossario dark) ──────────────────── */
section.jb-spiego {
  background: linear-gradient(160deg, #0A0E1F 0%, #12193A 100%) !important;
  padding: 5rem 0 !important;
}
.jb-compare-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 2.5rem 0 3rem;
}
.jb-compare-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.jb-compare-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.jb-compare-card__body {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  max-width: none;
}

/* ── ESPERIENZA ──────────────────────────────────── */
section.jb-esperienza {
  background: var(--surface) !important;
  padding: 5rem 0 !important;
}
.jb-esperienza .timeline { margin-top: 2rem; }

/* ── SPORT ───────────────────────────────────────── */
section.jb-sport {
  background: #fff !important;
  padding: 5rem 0 !important;
}
.jb-sport-card {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
}
.jb-sport-card__badge {
  flex-shrink: 0;
  width: 56px; height: 56px;
  background: var(--accent-dim);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--accent);
}
.jb-sport-card__gym {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
@media (max-width: 520px) {
  .jb-sport-card { flex-direction: column; }
}

/* ── FAQ ──────────────────────────────────────────── */
section.jb-faq {
  background: var(--accent-light) !important;
  padding: 5rem 0 !important;
}
.jb-faq-list {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.jb-faq-item { border-bottom: 1px solid var(--border); }
.jb-faq-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  gap: 1rem;
}
.jb-faq-btn:hover { color: var(--accent); }
.jb-faq-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  color: var(--accent);
  transition: transform 0.2s;
}
.jb-faq-item.is-open .jb-faq-icon { transform: rotate(180deg); }
.jb-faq-answer {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.75;
  padding-bottom: 1.5rem;
  max-width: 72ch;
}

/* ══════════════════════════════════════════════════
   NEWS / NEWSLETTER — stefano.simonelabs.it/news
   Namespace: news- / article- / presento (no conflitti)
══════════════════════════════════════════════════ */

/* ── ELENCO POST ──────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
@media (min-width: 640px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }

.news-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.news-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(91,140,255,0.10);
  text-decoration: none;
}
.news-card__cover {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--accent) 0%, #1a3a9e 100%);
  overflow: hidden;
}
.news-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.news-card__body { padding: 1.25rem 1.35rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.news-card__meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  font-size: 0.72rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.6rem;
}
.news-card__tag { color: var(--accent); font-weight: 600; }
.news-card__sep { color: var(--border-strong); }
.news-card__title {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.05rem; font-weight: 600; line-height: 1.3;
  margin-bottom: 0.5rem; color: var(--text);
}
.news-card__excerpt { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; flex: 1; max-width: none; }
.news-card__more { margin-top: 1rem; font-size: 0.82rem; font-weight: 600; color: var(--accent); }

/* Post in evidenza (ultimo) */
.news-featured { margin-top: 2.5rem; }
@media (min-width: 780px) {
  .news-featured .news-card { flex-direction: row; }
  .news-featured .news-card__cover { flex: 0 0 46%; aspect-ratio: auto; min-height: 260px; }
  .news-featured .news-card__body { padding: 2.25rem 2.25rem; justify-content: center; }
  .news-featured .news-card__title {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 1.7rem; font-weight: 600; line-height: 1.15;
  }
  .news-featured .news-card__excerpt { font-size: 0.975rem; }
}

/* Copertina placeholder (finché non c'è l'immagine di Gemini) */
.news-cover-ph {
  display: flex; align-items: center; justify-content: center;
  height: 100%; min-height: 160px;
  color: rgba(255,255,255,0.85); font-size: 0.8rem;
  letter-spacing: 0.03em; text-align: center; padding: 1rem;
}

/* Stato vuoto */
.news-empty {
  margin-top: 2rem; padding: 2.5rem;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
  text-align: center; color: var(--text-muted);
}

/* ── ARTICOLO ─────────────────────────────────────── */
.article { padding-bottom: 4rem; }
.article__header { max-width: 760px; margin: 0 auto; padding-top: 0.5rem; }
.article__meta {
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center;
  font-size: 0.78rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1rem;
}
.article__tag { color: var(--accent); font-weight: 600; }
.article__sep { color: var(--border-strong); }
.article__title {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 3rem); font-weight: 600; line-height: 1.1;
  margin-bottom: 1rem;
}
.article__standfirst { font-size: 1.15rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 2rem; max-width: none; }
.article__share-btn {
  display: flex;
  width: fit-content;
  margin: 2rem auto 0;
  align-items: center;
  gap: 0.4em;
  padding: 0.5em 1.1em;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}
.article__share-btn:hover { border-color: var(--accent); color: var(--accent); }
.article__share-btn svg { flex-shrink: 0; }
.article__cover {
  max-width: 900px; margin: 0 auto 2.5rem;
  border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--accent) 0%, #1a3a9e 100%);
}
.article__cover img { width: 100%; height: 100%; object-fit: cover; }
.article__body { max-width: 720px; margin: 0 auto; }
.article__body h2 { font-family: 'Poppins', system-ui, sans-serif; font-size: clamp(1.5rem, 3vw, 2rem); margin: 2.5rem 0 1rem; }
.article__body h3 { font-size: 1.15rem; margin: 2rem 0 0.75rem; }
.article__body p { margin-bottom: 1.25rem; font-size: 1.05rem; line-height: 1.8; color: var(--text); max-width: none; }
.article__body ul, .article__body ol { margin: 0 0 1.25rem 1.35rem; }
.article__body ul { list-style: disc; }
.article__body ol { list-style: decimal; }
.article__body li { margin-bottom: 0.5rem; line-height: 1.75; }
.article__body strong { color: var(--text); font-weight: 600; }
.article__body blockquote {
  margin: 2rem 0; padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 1.4rem; line-height: 1.4; color: var(--text);
}
.article__body blockquote p { font-size: inherit; margin: 0; max-width: none; }

/* Fonti */
.article__sources { max-width: 720px; margin: 3rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.article__sources h2 {
  font-family: 'Open Sans', sans-serif; font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.75rem;
}
.article__sources ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.article__sources a { font-size: 0.9rem; }

/* Articoli correlati a fondo pagina news */
.related-posts {
  max-width: 960px; margin: 3rem auto 0;
  background: var(--accent-light); border: 1px solid var(--accent-dim);
  border-radius: var(--radius-lg); padding: 2rem 2rem 2.25rem;
}
.related-posts[hidden] { display: none; }
.related-posts__title {
  font-family: 'Poppins', system-ui, sans-serif; font-size: 1.3rem; font-weight: 600;
  margin: 0.2rem 0 1.25rem; color: var(--text);
}

/* CTA "non mi conosci, mi presento" */
.presento {
  max-width: 720px; margin: 3rem auto 0;
  background: linear-gradient(135deg, #1a3a9e 0%, #0A0F1A 100%);
  border-radius: var(--radius-lg); padding: 2.5rem 2rem; text-align: center;
}
.presento__eyebrow { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.7); margin-bottom: 0.6rem; }
.presento__title { font-family: 'Poppins', system-ui, sans-serif; font-size: 1.7rem; font-weight: 600; color: #fff; margin-bottom: 0.6rem; line-height: 1.2; }
.presento__text { color: rgba(255,255,255,0.8); font-size: 0.975rem; margin: 0 auto 1.5rem; max-width: 50ch; }

/* Banner "post di esempio" (rimuovere quando parte l'automazione) */
.demo-banner {
  max-width: 760px; margin: 0 auto 2rem;
  background: var(--accent-light); border: 1px solid var(--accent-dim);
  border-radius: var(--radius); padding: 0.85rem 1.1rem;
  font-size: 0.85rem; color: var(--accent-2); text-align: center; line-height: 1.5;
}

/* ── CATEGORIE (raggruppamento articoli) ──────────── */
.news-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.news-chip {
  padding: 0.4em 0.95em; border-radius: 100px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.8rem; font-weight: 600;
  text-decoration: none; transition: border-color var(--transition), color var(--transition);
}
.news-chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.news-cat { margin-top: 3.5rem; scroll-margin-top: 80px; }
.news-cat__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  border-bottom: 1px solid var(--border); padding-bottom: 0.75rem; margin-bottom: 1.75rem;
}
.news-cat__title {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; margin: 0;
}
.news-cat__count { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.news-cat__more { margin-top: 1.75rem; text-align: center; }
.news-cat__empty { margin-top: 0.5rem; color: var(--text-muted); font-size: 0.9rem; }
.news-card.is-hidden { display: none; }

/* ── FILTRO CATEGORIE + VETRINA ───────────────────── */
/* fascia a tutta larghezza: il contenuto resta nel .container interno */
.news-browse { margin-top: 3.5rem; background: var(--surface); padding: 4rem 0 5rem; }
.news-search { margin-top: 0.5rem; }
.news-search__input {
  width: 100%;
  max-width: 480px;
  padding: 0.75rem 1.1rem;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
}
.news-search__input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.news-search-results { margin-top: 1rem; }
.news-search-results mark { background: var(--accent-dim); color: var(--accent-2); border-radius: 3px; padding: 0 0.1em; }
.news-filter { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.25rem 0 2.5rem; }
.news-filter__btn {
  padding: 0.5em 1.1em; border-radius: 100px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-muted); font-size: 0.85rem; font-weight: 600;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.news-filter__btn:hover { border-color: var(--accent); color: var(--accent); }
.news-filter__btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 10px rgba(91,140,255,0.30); }
.news-pool { display: none; }
.news-pool.is-active { display: block; animation: news-fade 0.25s ease; }
@keyframes news-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ── Nascondi il badge "Powered by Netlify" (HUD) ── */
netlify-hud,
[data-netlify-site-id],
[class*="netlify-badge" i],
[id*="netlify-badge" i],
a[href*="netlify.com" i],
a[href*="netlify.app" i] { display: none !important; }

/* == RADAR AI: like/dislike + commenti (stile YouTube) == */
.radar-social { max-width: 68ch; margin: 2.5rem auto 0; }
.rs-hp { position:absolute; left:-9999px; width:1px; height:1px; opacity:0; }
.rs-msg { font-size:0.85rem; margin-top:0.4rem; }
.rs-msg--ok { color:#15803d; } .rs-msg--err { color:#b91c1c; }
.rs-loading,.rs-empty,.rs-err { color:var(--text-muted); font-size:0.9rem; padding:0.5rem 0; }

.yt-actions { margin-bottom:2rem; }
.yt-likepill { display:inline-flex; align-items:center; background:var(--surface-2); border-radius:100px; overflow:hidden; }
.yt-btn { display:inline-flex; align-items:center; gap:0.5em; padding:0.5em 1em; color:var(--text); font-weight:600; font-size:0.95rem; background:transparent; transition:background var(--transition); }
.yt-btn:hover { background:rgba(0,0,0,0.06); }
.yt-div { width:1px; height:24px; background:var(--border-strong); }
.yt-ic { width:22px; height:22px; fill:currentColor; }
.yt-ic--flip { transform:rotate(180deg) scaleX(-1); }
.yt-btn.is-active { color:var(--accent); }
.yt-btn.is-active .yt-ic { fill:var(--accent); }

.yt-com-head { font-size:1.1rem; font-weight:700; margin-bottom:1.5rem; }
.yt-composer { display:flex; gap:1rem; margin-bottom:2rem; }
.yt-composer__main { flex:1; min-width:0; }
.yt-input { width:100%; border:none; border-bottom:1px solid var(--border-strong); background:transparent; font:inherit; color:var(--text); padding:0.4em 0; resize:none; overflow:hidden; }
.yt-input:focus { outline:none; border-bottom:2px solid var(--text); }
.yt-composer__row { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-top:0.6rem; flex-wrap:wrap; }
.yt-name { border:none; border-bottom:1px solid var(--border); background:transparent; font:inherit; font-size:0.85rem; color:var(--text); padding:0.2em 0; max-width:200px; }
.yt-name:focus { outline:none; border-bottom-color:var(--text); }
.yt-composer__btns { display:flex; align-items:center; gap:0.5rem; margin-left:auto; }
.yt-cancel { padding:0.5em 1em; border-radius:100px; font-weight:600; font-size:0.9rem; color:var(--text); }
.yt-cancel:hover { background:rgba(0,0,0,0.06); }
.yt-send { padding:0.5em 1.1em; border-radius:100px; font-weight:600; font-size:0.9rem; background:var(--accent); color:#fff; }
.yt-send:hover { background:var(--accent-2); }
.yt-send:disabled { opacity:0.5; cursor:default; }

.yt-avatar { width:40px; height:40px; flex-shrink:0; border-radius:50%; background:var(--accent); color:#fff; font-weight:600; display:flex; align-items:center; justify-content:center; font-size:1rem; }
.yt-list { display:flex; flex-direction:column; gap:1.25rem; }
.yt-item { display:flex; gap:1rem; }
.yt-item__main { flex:1; min-width:0; }
.yt-item__head { font-size:0.85rem; margin-bottom:0.2rem; }
.yt-item__name { font-weight:600; }
.yt-item__time { color:var(--text-muted); font-size:0.78rem; margin-left:0.4em; }
.yt-item__body { font-size:0.95rem; color:var(--text); word-wrap:break-word; }
.yt-del { margin-left:auto; width:1.6em; height:1.6em; flex-shrink:0; border-radius:50%; color:#b91c1c; font-size:1.2rem; line-height:1; }
.yt-del:hover { background:rgba(185,28,28,0.1); }


/* Avviso "prodotto da AI" */
.ai-notice {
  display: flex; align-items: flex-start; gap: 0.6em;
  background: var(--accent-light); border: 1px solid var(--accent-dim);
  border-radius: var(--radius-lg); padding: 0.8em 1em;
  font-size: 0.85rem; color: var(--text); margin: 1.5rem auto; max-width: 68ch;
}
.ai-notice__icon { font-size: 1.1em; flex-shrink: 0; }
.news-browse .ai-notice, .page-hero + .container .ai-notice { max-width: none; }

/* Login social nel widget */
.yt-authbar { margin-bottom: 1rem; }
.yt-loginrow { display:flex; align-items:center; gap:0.6rem; flex-wrap:wrap; font-size:0.85rem; color:var(--text-muted); }
.yt-loginrow__txt { flex:1 1 100%; margin-bottom:0.2rem; }
.yt-login { display:inline-flex; align-items:center; gap:0.5em; padding:0.45em 0.9em; border-radius:100px; border:1px solid var(--border-strong); background:var(--bg); color:var(--text); font-weight:600; font-size:0.85rem; transition:background var(--transition),border-color var(--transition); }
.yt-login:hover { background:var(--surface); border-color:var(--text-muted); }
.yt-login--gh { color:#fff; background:#1c1f26; border-color:#1c1f26; }
.yt-login--gh:hover { background:#000; }
.yt-me { display:flex; align-items:center; gap:0.5em; font-size:0.88rem; color:var(--text-muted); }
.yt-me strong { color:var(--text); }
.yt-avatar--sm { width:26px; height:26px; font-size:0.8rem; }
.yt-linkbtn { color:var(--accent); font-weight:600; font-size:0.88rem; }
.yt-linkbtn:hover { text-decoration:underline; }
.yt-badge { display:inline-block; font-size:0.68rem; font-weight:600; text-transform:capitalize; color:var(--accent); background:var(--accent-light); border-radius:100px; padding:0.05em 0.55em; vertical-align:middle; }

/* ═══ ANIMAZIONI MODERNE (aurora + reveal + typewriter) ═══ */
.aurora {
  position: absolute; top: 0; left: -8%; right: -8%; z-index: -1; pointer-events: none;
  filter: blur(80px); opacity: 0.55;
  background:
    radial-gradient(40% 60% at 15% 20%, rgba(91,140,255,0.60), transparent 62%),
    radial-gradient(38% 55% at 85% 12%, rgba(160,120,255,0.50), transparent 62%),
    radial-gradient(46% 60% at 65% 75%, rgba(70,200,220,0.38), transparent 62%),
    radial-gradient(30% 45% at 45% 40%, rgba(255,120,180,0.25), transparent 60%);
  animation: aurora 18s ease-in-out infinite alternate;
}
@keyframes aurora {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(2%,-3%,0) scale(1.08); }
  100% { transform: translate3d(-2%,2%,0) scale(1.05); }
}

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.2,.6,.2,1), transform .6s cubic-bezier(.2,.6,.2,1); will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: none; }

.tw-caret { display: inline-block; width: 0; border-right: 2px solid var(--accent); margin-left: 3px; height: 0.9em; vertical-align: -0.1em; animation: tw-blink 1s step-end infinite; }
.tw-caret--done { animation: tw-blink 1s step-end 4 forwards; }
@keyframes tw-blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .aurora { display: none !important; }
}

/* Fix: banda commenti/like a tutta larghezza (full-bleed) */
.radar-social {
  width: 100vw; margin-left: calc(50% - 50vw); max-width: none;
  background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 3rem 1.5rem; margin-top: 3rem;
}
.radar-social > * { max-width: 68ch; margin-left: auto; margin-right: auto; }

/* Micro-interazioni: card che si sollevano con glow */
.news-card, .jb-card, .card { transition: transform .32s cubic-bezier(.2,.6,.2,1), box-shadow .32s ease; }
.news-card:hover, .jb-card:hover, .card:hover { transform: translateY(-6px); box-shadow: 0 20px 44px -20px rgba(91,140,255,0.5); }

/* Brillìo che scorre sul bottone primario */
.jb-btn--primary { position: relative; overflow: hidden; }
.jb-btn--primary::after {
  content: ""; position: absolute; top: 0; left: -130%; width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-18deg); pointer-events: none;
}
.jb-btn--primary:hover::after { animation: btn-shine .75s ease; }
@keyframes btn-shine { from { left: -130%; } to { left: 140%; } }

/* ═══════════════════════════════════════════════════
   PAGINA PROGETTI — griglia portfolio con anteprime
══════════════════════════════════════════════════ */
section.jb-portfolio-hero {
  background: linear-gradient(135deg, #0A0F1A 0%, #131b30 100%) !important;
  padding: 4rem 0 6.5rem !important;
}
.jb-portfolio-hero__h1 {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 600;
  color: #fff;
  margin: 0.6rem 0 1rem;
  line-height: 1.1;
}
section.jb-portfolio-featured { padding: 0 !important; margin-top: -4rem; position: relative; z-index: 2; }
.jb-featured-card {
  display: block;
  text-decoration: none !important;
  color: inherit;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(10,15,26,0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.jb-featured-card:hover { transform: translateY(-4px); box-shadow: 0 28px 70px rgba(10,15,26,0.22); }
.jb-featured-card__thumb {
  height: 220px;
  position: relative;
  background: linear-gradient(135deg, var(--accent) 0%, #1a3a9e 100%);
  overflow: hidden;
}
.jb-featured-card__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.jb-featured-card__badge {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background: rgba(255,255,255,0.15);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35em 0.9em;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.3);
}
.jb-featured-card__body { padding: 2rem 2.25rem 2.25rem; }
.jb-featured-card__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.jb-featured-card__title {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.jb-featured-card__desc { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; max-width: 62ch; margin-bottom: 1.5rem; }
.jb-featured-card__stats { display: flex; gap: 2rem; margin-bottom: 1.5rem; }
.jb-featured-card__stats strong { display: block; font-family: 'Poppins', system-ui, sans-serif; font-size: 1.3rem; color: var(--text); }
.jb-featured-card__stats span { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.jb-featured-card__link { color: var(--accent); font-weight: 600; font-size: 0.9rem; }

section.jb-portfolio-grid-section { background: #fff !important; padding: 3.5rem 0 5rem !important; }
.jb-portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.75rem; }
.jb-pf-card {
  display: block;
  text-decoration: none !important;
  color: inherit;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.jb-pf-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(20,28,45,0.10); border-color: rgba(91,140,255,0.35); }
.jb-pf-card__thumb { height: 130px; }
.jb-pf-card__thumb--rag { background: linear-gradient(135deg, #5B8CFF 0%, #22d3ee 100%); }
.jb-pf-card__thumb--n8n { background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%); }
.jb-pf-card__body { padding: 1.5rem 1.6rem 1.75rem; }
.jb-pf-card__label { font-size: 0.75rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.5rem; }
.jb-pf-card__title { font-family: 'Poppins', system-ui, sans-serif; font-size: 1.1rem; font-weight: 600; color: var(--text); margin-bottom: 0.6rem; }
.jb-pf-card__desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 1rem; }
.jb-pf-card__link { color: var(--accent); font-weight: 600; font-size: 0.85rem; }

.jb-portfolio-more { margin-top: 2.5rem; padding: 2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.jb-portfolio-more__label { font-size: 0.75rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.5rem; }
.jb-portfolio-more__body { color: var(--text-muted); font-size: 0.9rem; }

@media (max-width: 680px) {
  section.jb-portfolio-featured { margin-top: -2.5rem; }
  .jb-featured-card__body { padding: 1.5rem 1.4rem 1.75rem; }
  .jb-featured-card__stats { gap: 1.25rem; }
}

/* ═══════════════════════════════════════════════════
   PAGINA PERCORSO — timeline visiva a zig-zag
══════════════════════════════════════════════════ */
section.jb-path-timeline-section { padding: 5rem 0 !important; background: var(--surface) !important; }
.jb-path-timeline { position: relative; margin-top: 3.5rem; }
.jb-path-timeline::before {
  content: '';
  position: absolute;
  left: 50%; top: 4px; bottom: 4px;
  width: 2px;
  background: var(--border-strong);
  transform: translateX(-50%);
}
.jb-path-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 3.5rem;
  margin-bottom: 3rem;
}
.jb-path-row:last-child { margin-bottom: 0; }
.jb-path-node {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, 0);
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 0 0 6px var(--surface);
  z-index: 2;
}
.jb-path-node--final { background: linear-gradient(135deg, var(--accent) 0%, #1a3a9e 100%); font-size: 1.2rem; }
.jb-path-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 4px 16px rgba(20,28,45,0.05);
}
.jb-path-card--final { border-color: rgba(91,140,255,0.4); box-shadow: 0 8px 24px rgba(91,140,255,0.12); }
.jb-path-row--left .jb-path-card { grid-column: 1; }
.jb-path-row--right .jb-path-card { grid-column: 2; }
.jb-path-card__area { font-size: 0.75rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.4rem; }
.jb-path-card__title { font-family: 'Poppins', system-ui, sans-serif; font-size: 1.05rem; font-weight: 600; color: var(--text); margin-bottom: 0.6rem; }
.jb-path-card__desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.65; }
.jb-path-card__desc a { color: var(--accent); }
.jb-path-card__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; }
.jb-path-card__tags span {
  font-size: 0.72rem;
  padding: 0.2em 0.65em;
  border-radius: 100px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

@media (max-width: 880px) {
  .jb-path-timeline::before { left: 20px; }
  .jb-path-row { grid-template-columns: 1fr; column-gap: 0; padding-left: 3.25rem; }
  .jb-path-node { left: 20px; }
  .jb-path-row--left .jb-path-card,
  .jb-path-row--right .jb-path-card { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .news-card:hover, .jb-card:hover, .card:hover { transform: none; }
  .jb-btn--primary:hover::after { animation: none; }
}

/* ═══════════════════════════════════════════════════
   PAGINA HOME — racconto personale a capitoli
══════════════════════════════════════════════════ */
.jb-story-narrow { max-width: 700px; }
.jb-story-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
section.jb-story-chapter { background: #fff !important; padding: 4.5rem 0 !important; }
section.jb-story-chapter--alt { background: var(--surface) !important; }
.jb-story-h2 {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 1.5rem;
}
.jb-story-p { font-size: 1.02rem; color: var(--text-muted); line-height: 1.85; margin-bottom: 1.25rem; }
.jb-story-p:last-child { margin-bottom: 0; }
.jb-story-p strong { color: var(--text); }
.jb-story-quote {
  border-left: 3px solid var(--accent);
  margin: 1.75rem 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
}

.jb-story-steps { list-style: none; margin-top: 2rem; display: flex; flex-direction: column; gap: 1.75rem; }
.jb-story-steps li { display: flex; gap: 1.25rem; align-items: flex-start; }
.jb-story-steps__num {
  flex-shrink: 0;
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent);
  border: 2px solid var(--accent);
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.jb-story-steps__title { font-weight: 600; color: var(--text); margin-bottom: 0.3rem; }
.jb-story-steps__body { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }

section.jb-focus-list { background: #fff !important; padding: 4.5rem 0 !important; }
.jb-focus-rows { margin-top: 2.5rem; }
.jb-focus-row {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding: 1.75rem 0;
  border-top: 1px solid var(--border);
}
.jb-focus-row:last-child { border-bottom: 1px solid var(--border); }
.jb-focus-row__num {
  flex-shrink: 0;
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--accent-dim);
  min-width: 3ch;
}
.jb-focus-row__title { font-family: 'Poppins', system-ui, sans-serif; font-size: 1.1rem; font-weight: 600; color: var(--text); margin-bottom: 0.5rem; }
.jb-focus-row__body { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; max-width: 62ch; }

@media (max-width: 680px) {
  .jb-focus-row { gap: 1.1rem; }
  .jb-focus-row__num { font-size: 1.15rem; }
}

/* ═══════════════════════════════════════════════════
   PROGETTO — Dibattito AI multi-agente (demo live)
══════════════════════════════════════════════════ */
.jb-pf-card__thumb--debate {
  background: linear-gradient(120deg, #5B8CFF 0%, #8b5cf6 50%, #F59E0B 100%);
  position: relative;
}
.jb-featured-card__thumb--debate {
  background: radial-gradient(circle at 20% 30%, rgba(91,140,255,0.55), transparent 55%),
              radial-gradient(circle at 80% 70%, rgba(245,158,11,0.45), transparent 55%),
              linear-gradient(135deg, #0A0F1A 0%, #1d1640 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}
.jb-featured-card__thumb--debate .jb-debate-chip { font-size: 0.85rem; }

.jb-debate-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.35em 0.9em;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
}
.jb-debate-chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.jb-debate-chip--pro { color: #8fb0ff; }
.jb-debate-chip--contro { color: #fbbf24; }
.jb-debate-chip--judge { color: #c4b5fd; }

section.jb-debate-section {
  background: linear-gradient(180deg, #0A0F1A 0%, #0d1424 100%) !important;
  padding: 4.5rem 0 5rem !important;
  color: #fff;
}
.jb-debate-section .container { max-width: 820px; }
.jb-debate-section h2 { color: #fff; }
.jb-debate-section .jb-debate__intro { color: rgba(255,255,255,0.65); margin-top: 0.75rem; max-width: 60ch; }
.jb-debate__agents { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }

.jb-debate {
  margin-top: 2rem;
  background: #11172a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.4);
  overflow: hidden;
}
.jb-debate__form { display: flex; gap: 0.6rem; padding: 1.1rem 1.2rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.jb-debate__form input {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
}
.jb-debate__form input::placeholder { color: rgba(255,255,255,0.35); }
.jb-debate__form input:focus { outline: none; border-color: var(--accent); }
.jb-debate__start {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 14px;
  padding: 0 1.2rem;
  transition: opacity 0.15s;
}
.jb-debate__start[disabled] { opacity: 0.55; cursor: default; }
.jb-debate__stop {
  flex-shrink: 0;
  background: transparent;
  color: #fca5a5;
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid rgba(239,68,68,0.45);
  border-radius: 14px;
  padding: 0 1.1rem;
  transition: background 0.15s;
}
.jb-debate__stop:hover { background: rgba(239,68,68,0.12); }
.jb-debate__stop[hidden] { display: none; }

.jb-debate__suggestions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 1rem 1.2rem 0; }
.jb-debate__suggestions button {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.7);
  border-radius: 100px;
  padding: 0.4em 0.95em;
  font-size: 0.78rem;
  text-align: left;
  transition: border-color 0.15s, color 0.15s;
}
.jb-debate__suggestions button:hover { border-color: var(--accent); color: #fff; }
.jb-debate__suggestions button[disabled] { opacity: 0.4; cursor: default; }

.jb-debate__status { padding: 0.9rem 1.2rem 0; font-size: 0.78rem; color: rgba(255,255,255,0.5); min-height: 1.2em; }

.jb-debate__arena { display: flex; flex-direction: column; gap: 1.1rem; padding: 1.25rem 1.2rem 1.5rem; }
.jb-debate__topic {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  text-align: center;
  padding: 0.25rem 0 0.5rem;
}
.jb-debate__topic span {
  display: block;
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.25rem;
}

.jb-debate__turn { display: flex; flex-direction: column; max-width: 86%; }
.jb-debate__turn--pro { align-self: flex-start; }
.jb-debate__turn--contro { align-self: flex-end; align-items: flex-end; }
.jb-debate__turn--judge { align-self: stretch; max-width: 100%; margin-top: 0.5rem; }

.jb-debate__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5em; font-size: 0.72rem; margin-bottom: 0.35rem; }
.jb-debate__who { font-weight: 700; letter-spacing: 0.05em; }
.jb-debate__model { color: rgba(255,255,255,0.45); }
.jb-debate__round { color: rgba(255,255,255,0.45); }
.jb-debate__round::before { content: '· '; }
.jb-debate__turn--pro .jb-debate__who { color: #8fb0ff; }
.jb-debate__turn--contro .jb-debate__who { color: #fbbf24; }
.jb-debate__turn--judge .jb-debate__who { color: #c4b5fd; }

.jb-debate__bubble {
  padding: 0.8rem 1.05rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.92);
  min-height: 2.6em;
}
.jb-debate__bubble p { margin: 0 0 0.6em; }
.jb-debate__bubble p:last-child { margin-bottom: 0; }
.jb-debate__turn--pro .jb-debate__bubble { background: rgba(91,140,255,0.14); border: 1px solid rgba(91,140,255,0.28); border-top-left-radius: 4px; }
.jb-debate__turn--contro .jb-debate__bubble { background: rgba(245,158,11,0.10); border: 1px solid rgba(245,158,11,0.28); border-top-right-radius: 4px; }
.jb-debate__turn--judge .jb-debate__bubble { background: rgba(139,92,246,0.12); border: 1px solid rgba(139,92,246,0.35); padding: 1.1rem 1.25rem; }
.jb-debate__turn--judge .jb-debate__bubble strong { color: #ddd6fe; }

.jb-debate__bubble.is-typing::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: rgba(255,255,255,0.6);
  animation: jb-debate-caret 0.9s steps(1) infinite;
}
.jb-debate__bubble.is-typing p:last-child { display: inline; }
@keyframes jb-debate-caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .jb-debate__bubble.is-typing::after { animation: none; }
}

.jb-debate__error {
  background: rgba(239,68,68,0.12);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
}
.jb-debate__note { font-size: 0.75rem; color: rgba(255,255,255,0.4); padding: 0 1.2rem 1.1rem; }

.jb-debate-steps { counter-reset: step; list-style: none; padding: 0; margin: 1rem 0 0; }
.jb-debate-steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1rem 2.4rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.jb-debate-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 560px) {
  .jb-debate__form { flex-direction: column; }
  .jb-debate__start { padding: 0.8rem 1rem; }
  .jb-debate__turn { max-width: 94%; }
}

/* ═══════════════════════════════════════════════════
   CRONOLOGIA PRIVATA — cassetto laterale (account.js)
══════════════════════════════════════════════════ */
.jb-chat, .jb-debate { position: relative; }
.jb-chat:has(> .jb-drawer:not([hidden])), .jb-debate:has(> .jb-drawer:not([hidden])) { min-height: 520px; }
.jb-chat__suggestions[hidden] { display: none; }
.jb-chat__header-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
.jb-chat__reset[aria-expanded="true"] { color: #fff; border-color: var(--accent); background: rgba(91,140,255,0.15); }

.jb-debate__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.jb-debate__bar-title { color: rgba(255,255,255,0.75); font-size: 0.85rem; font-weight: 600; }

.jb-drawer { position: absolute; inset: 0; z-index: 20; overflow: hidden; border-radius: inherit; }
.jb-drawer[hidden] { display: none; }
.jb-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5,8,18,0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.jb-drawer__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(340px, 88%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #151d36 0%, #10172b 100%);
  border-right: 1px solid rgba(255,255,255,0.1);
  box-shadow: 18px 0 50px rgba(0,0,0,0.45);
  transform: translateX(-100%);
  transition: transform 0.22s cubic-bezier(.2,.7,.2,1);
}
.jb-drawer.is-open .jb-drawer__backdrop { opacity: 1; }
.jb-drawer.is-open .jb-drawer__panel { transform: translateX(0); }

.jb-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.1rem 0.6rem 1.25rem;
}
.jb-drawer__title { font-family: 'Poppins', system-ui, sans-serif; color: #fff; font-weight: 600; font-size: 1rem; }
.jb-drawer__close {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: rgba(255,255,255,0.55);
  font-size: 1.35rem;
  line-height: 1;
}
.jb-drawer__close:hover { background: rgba(255,255,255,0.08); color: #fff; }

.jb-drawer__body { flex: 1; min-height: 0; overflow-y: auto; padding: 0.4rem 0.75rem 1rem; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent; }

.jb-drawer__search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0.25rem 0.75rem;
  padding: 0 0.8rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.45);
  transition: border-color 0.15s;
}
.jb-drawer__search:focus-within { border-color: var(--accent); }
.jb-drawer__search input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.6rem 0;
}
.jb-drawer__search input::placeholder { color: rgba(255,255,255,0.35); }

.jb-drawer__group {
  margin: 0.9rem 0.6rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
}
.jb-drawer__group:first-child { margin-top: 0.2rem; }
.jb-drawer__items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.jb-drawer__item { position: relative; border-radius: 10px; transition: background 0.15s, opacity 0.2s; }
.jb-drawer__item:hover { background: rgba(255,255,255,0.06); }
.jb-drawer__item.is-active { background: rgba(91,140,255,0.16); }
.jb-drawer__item.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
}
.jb-drawer__item.is-removing { opacity: 0.35; pointer-events: none; }
.jb-drawer__open {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 2.4rem 0.6rem 0.7rem;
  text-align: left;
  border-radius: 10px;
}
.jb-drawer__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
}
.jb-drawer__item.is-active .jb-drawer__icon { background: rgba(91,140,255,0.25); color: #c7d6ff; }
.jb-drawer__label {
  flex: 1;
  min-width: 0;
  color: rgba(255,255,255,0.88);
  font-size: 0.85rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.jb-drawer__time { flex-shrink: 0; color: rgba(255,255,255,0.35); font-size: 0.7rem; transition: opacity 0.15s; }
.jb-drawer__del {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.jb-drawer__item:hover .jb-drawer__del,
.jb-drawer__del:focus-visible { opacity: 1; }
.jb-drawer__item:hover .jb-drawer__time { opacity: 0; }
.jb-drawer__del:hover { background: rgba(239,68,68,0.15); color: #fca5a5; }
@media (hover: none) {
  .jb-drawer__del { opacity: 1; }
  .jb-drawer__time { display: none; }
}

.jb-drawer__skeleton {
  height: 44px;
  margin: 0 0.25rem 6px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: jb-drawer-shimmer 1.2s linear infinite;
}
@keyframes jb-drawer-shimmer { to { background-position: -200% 0; } }

.jb-drawer__empty, .jb-drawer__login {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.45rem;
  padding: 2.2rem 1rem;
}
.jb-drawer__empty-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 0.4rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c7d6ff;
  background: linear-gradient(135deg, rgba(91,140,255,0.25), rgba(139,92,246,0.25));
  box-shadow: 0 0 0 6px rgba(91,140,255,0.08);
}
.jb-drawer__empty strong, .jb-drawer__login strong { color: #fff; font-size: 0.95rem; }
.jb-drawer__empty p, .jb-drawer__login p { color: rgba(255,255,255,0.55); font-size: 0.82rem; line-height: 1.55; margin: 0; max-width: 26ch; }
.jb-drawer__login-btn {
  margin-top: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  background: #fff;
  color: #1C1F26;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 100px;
  padding: 0.65em 1.25em;
  box-shadow: 0 8px 22px rgba(0,0,0,0.3);
  transition: transform 0.15s;
}
.jb-drawer__login-btn:hover { transform: translateY(-1px); }
.jb-drawer__hint { color: rgba(255,255,255,0.45); font-size: 0.82rem; text-align: center; padding: 1.5rem 0.5rem; margin: 0; }

.jb-drawer__foot { padding: 0.75rem 1rem 1rem; border-top: 1px solid rgba(255,255,255,0.08); }
.jb-drawer__foot[hidden] { display: none; }
.jb-drawer__clear {
  width: 100%;
  padding: 0.6rem;
  border-radius: 10px;
  color: rgba(255,255,255,0.5);
  font-size: 0.78rem;
  transition: background 0.15s, color 0.15s;
}
.jb-drawer__clear:hover { background: rgba(239,68,68,0.1); color: #fca5a5; }

@media (prefers-reduced-motion: reduce) {
  .jb-drawer__panel, .jb-drawer__backdrop { transition: none; }
  .jb-drawer__skeleton { animation: none; }
}
@media (max-width: 560px) {
  .jb-chat__header { flex-wrap: wrap; gap: 0.6rem; }
  .jb-drawer__panel { width: 100%; border-right: none; }
}

/* ═══════════════════════════════════════════════════
   ACCOUNT IN NAVIGAZIONE + FINESTRA DI ACCESSO
══════════════════════════════════════════════════ */
.nav__account-login {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.38em 0.95em;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  background: transparent;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.nav__account-login:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.nav__account-btn { gap: 0.5em; }
.nav__account-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(91,140,255,0.35);
}
.nav__account-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nav__account-avatar--lg { width: 40px; height: 40px; font-size: 1rem; box-shadow: none; }
.nav__account-name { color: var(--text); font-weight: 600; }
.nav__account-menu { min-width: 250px; left: auto; right: 0; transform: translateY(-6px); }
.nav__account.is-open .nav__account-menu { transform: translateY(0); }
.nav__account-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem 0.8rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}
.nav__account-who { display: flex; flex-direction: column; min-width: 0; }
.nav__account-who strong { color: var(--text); font-size: 0.88rem; }
.nav__account-who span { color: var(--text-muted); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; }
.nav__account-sep { border-top: 1px solid var(--border); margin-top: 0.35rem; padding-top: 0.35rem; }
.nav__account-logout {
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  color: #dc2626;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  background: none;
  cursor: pointer;
}
.nav__account-logout:hover { background: rgba(220,38,38,0.08); }
@media (max-width: 680px) {
  .nav__account-login { font-size: 1.1rem; padding: 0.5em 1.4em; }
  .nav__account-menu { min-width: 0; }
  .nav__account-head { justify-content: center; border-bottom: none; }
  .nav__account-logout { text-align: center; }
}

.ra-noscroll { overflow: hidden; }
.ra-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.ra-modal[hidden] { display: none; }
.ra-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6,10,20,0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.ra-modal__card {
  position: relative;
  width: 100%;
  max-width: 410px;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: 2.4rem 2rem 1.8rem;
  border-radius: 22px;
  background: radial-gradient(circle at 15% 0%, rgba(91,140,255,0.28), transparent 55%),
              radial-gradient(circle at 100% 100%, rgba(139,92,246,0.25), transparent 55%),
              #0f1528;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  color: #fff;
  text-align: center;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.ra-modal.is-open .ra-modal__backdrop { opacity: 1; }
.ra-modal.is-open .ra-modal__card { opacity: 1; transform: none; }
.ra-modal__close {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: rgba(255,255,255,0.6);
  font-size: 1.4rem;
  line-height: 1;
}
.ra-modal__close:hover { background: rgba(255,255,255,0.08); color: #fff; }
.ra-modal__orb {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  box-shadow: 0 0 0 6px rgba(91,140,255,0.15), 0 12px 30px rgba(91,140,255,0.45);
}
.ra-modal__title { font-family: 'Poppins', system-ui, sans-serif; font-size: 1.35rem; font-weight: 600; color: #fff; margin: 0 0 0.5rem; }
.ra-modal__sub { color: rgba(255,255,255,0.68); font-size: 0.9rem; line-height: 1.6; margin: 0 0 1.3rem; }
.ra-modal__perks { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-direction: column; gap: 0.55rem; text-align: left; }
.ra-modal__perks li { display: flex; align-items: center; gap: 0.65rem; font-size: 0.86rem; color: rgba(255,255,255,0.85); }
.ra-modal__perks svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 3px;
  border-radius: 50%;
  background: rgba(52,211,153,0.15);
  color: #34D399;
}
.ra-modal__google {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65em;
  background: #fff;
  color: #1C1F26;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 14px;
  padding: 0.85em 1em;
  box-shadow: 0 10px 26px rgba(0,0,0,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
.ra-modal__google:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(0,0,0,0.35); }
.ra-modal__google:focus-visible { outline: 3px solid rgba(91,140,255,0.6); outline-offset: 3px; }
.ra-modal__fine { color: rgba(255,255,255,0.45); font-size: 0.74rem; line-height: 1.55; margin: 1.1rem 0 0; }
@media (prefers-reduced-motion: reduce) {
  .ra-modal__card, .ra-modal__backdrop { transition: none; }
}

/* Copertina progetto Dibattito AI */
.jb-pf-card__thumb--debate { position: relative; background: #f7f7f7; }
.jb-pf-card__thumb--debate img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 60%; display: block; }
.jb-pf-card__thumb--debate::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 -40px 40px -24px rgba(10,15,26,0.35), inset 0 0 0 1px rgba(10,15,26,0.06);
}
.jb-project-cover { margin: 2rem 0 3.25rem; }
.jb-project-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  background: #f7f7f7;
  box-shadow:
    0 0 0 1px rgba(10,15,26,0.10),
    0 2px 6px rgba(10,15,26,0.08),
    0 18px 36px -12px rgba(10,15,26,0.28),
    0 42px 80px -28px rgba(10,15,26,0.45);
}
.jb-project-cover figcaption { margin-top: 1rem; font-size: 0.8rem; color: var(--text-muted); text-align: center; }

/* Interruttore "Notifiche news" nel menu del profilo */
.nav__push {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  background: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition);
}
.nav__push:hover:not(:disabled) { background: var(--accent-light); }
.nav__push:disabled { cursor: default; }
.nav__push-text { display: flex; flex-direction: column; gap: 0.1rem; }
.nav__push-label { color: var(--text); font-size: 0.875rem; font-weight: 500; }
.nav__push-hint { color: var(--text-muted); font-size: 0.72rem; }
.nav__push-switch {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 20px;
  border-radius: 100px;
  background: var(--border-strong);
  transition: background 0.2s;
}
.nav__push-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.2s;
}
.nav__push.is-on .nav__push-switch { background: var(--accent); }
.nav__push.is-on .nav__push-switch::after { transform: translateX(16px); }
.nav__push:disabled .nav__push-switch { opacity: 0.5; }
@media (max-width: 680px) {
  .nav__push { justify-content: center; }
  .nav__push-text { align-items: center; }
}
.nav__push.is-error .nav__push-hint { color: #dc2626; }

/* ═══════════════════════════════════════════════════
   MOBILE: account sempre visibile + CARD "RICEVI RADAR AI"
══════════════════════════════════════════════════ */
.nav__mobile-account { display: none; }
@media (max-width: 680px) {
  .nav__inner { gap: 0.6rem; }
  .nav__logo { margin-right: auto; }
  .nav__mobile-account {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.35em 0.8em;
    border-radius: 100px;
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
  }
  .nav__mobile-account:has(.nav__account-avatar) { padding: 0; border: none; }
  .nav__menu .nav__account-login { display: none; }
}

.ra-promo {
  position: fixed;
  z-index: 900;
  right: 1.5rem;
  bottom: 1.5rem;
  width: min(380px, calc(100vw - 2rem));
  padding: 1.4rem 1.4rem 1.25rem;
  border-radius: 22px;
  color: #fff;
  background: radial-gradient(circle at 0% 0%, rgba(91,140,255,0.32), transparent 55%),
              radial-gradient(circle at 100% 100%, rgba(139,92,246,0.28), transparent 55%),
              #0f1528;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 30px 70px -20px rgba(5,8,20,0.65), 0 0 0 1px rgba(0,0,0,0.04);
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 0.28s ease, transform 0.35s cubic-bezier(.2,.8,.2,1);
}
.ra-promo[hidden] { display: none; }
.ra-promo.is-open { opacity: 1; transform: none; }
.ra-promo__close {
  position: absolute;
  top: 0.7rem;
  right: 0.75rem;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  color: rgba(255,255,255,0.55);
  font-size: 1.3rem;
  line-height: 1;
}
.ra-promo__close:hover { background: rgba(255,255,255,0.1); color: #fff; }

.ra-promo__notif {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.8rem;
  margin: 0.2rem 1.6rem 1.1rem 0;
  border-radius: 16px;
  background: rgba(255,255,255,0.94);
  color: #1C1F26;
  box-shadow: 0 14px 30px -12px rgba(0,0,0,0.5);
  animation: ra-notif-in 0.6s 0.35s cubic-bezier(.2,.9,.25,1.2) both;
}
.ra-promo__notif-icon { flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px; overflow: hidden; }
.ra-promo__notif-icon img { width: 100%; height: 100%; display: block; }
.ra-promo__notif-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.ra-promo__notif-text strong { font-size: 0.78rem; }
.ra-promo__notif-text span { font-size: 0.74rem; color: #4b5563; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ra-promo__notif-time { align-self: flex-start; font-size: 0.68rem; color: #9ca3af; }
@keyframes ra-notif-in { from { opacity: 0; transform: translateY(-14px) scale(0.96); } to { opacity: 1; transform: none; } }

.ra-promo__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 0.8rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  box-shadow: 0 10px 24px -8px rgba(91,140,255,0.7);
  color: #fff;
}
.ra-promo__badge--ok { background: linear-gradient(135deg, #10b981, #34d399); box-shadow: 0 10px 24px -8px rgba(16,185,129,0.7); }
.ra-promo__badge--ok svg { width: 24px; height: 24px; }
.ra-promo__eyebrow { margin: 0 0 0.35rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #a5b8ff; }
.ra-promo__title { margin: 0 0 0.45rem; font-family: 'Poppins', system-ui, sans-serif; font-size: 1.12rem; font-weight: 600; line-height: 1.3; color: #fff; padding-right: 1.4rem; }
.ra-promo__text { margin: 0 0 1rem; font-size: 0.86rem; line-height: 1.55; color: rgba(255,255,255,0.72); }
.ra-promo__text strong { color: #fff; }
.ra-promo__steps { margin: 0.2rem 0 1rem; padding-left: 1.2rem; font-size: 0.86rem; line-height: 1.8; color: rgba(255,255,255,0.8); }
.ra-promo__steps svg { vertical-align: -3px; color: #a5b8ff; }
.ra-promo__actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.ra-promo__cta {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.75em 1.1em;
  border-radius: 14px;
  background: #fff;
  color: #1C1F26;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 24px -10px rgba(0,0,0,0.5);
  transition: transform 0.15s;
}
.ra-promo__cta svg { width: 18px; height: 18px; color: var(--accent); }
.ra-promo__cta:hover:not(:disabled) { transform: translateY(-1px); }
.ra-promo__cta:disabled { opacity: 0.7; cursor: default; }
.ra-promo__later {
  padding: 0.75em 1.1em;
  border-radius: 14px;
  color: rgba(255,255,255,0.7);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
}
.ra-promo__later:hover { background: rgba(255,255,255,0.08); color: #fff; }
.ra-promo__fine { margin: 0.8rem 0 0; font-size: 0.72rem; color: rgba(255,255,255,0.45); line-height: 1.5; }

@media (max-width: 560px) {
  .ra-promo {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    border-radius: 24px 24px 0 0;
    padding: 1.6rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
    transform: translateY(100%);
  }
  .ra-promo::before {
    content: '';
    position: absolute;
    top: 0.55rem;
    left: 50%;
    width: 38px;
    height: 4px;
    margin-left: -19px;
    border-radius: 4px;
    background: rgba(255,255,255,0.25);
  }
  .ra-promo.is-open { transform: none; }
  .ra-promo__notif { margin-right: 1.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ra-promo, .ra-promo__notif { transition: none; animation: none; }
}

/* Menu profilo su mobile: spazio sufficiente per tutte le voci (incluso "Esci") */
@media (max-width: 680px) {
  .nav__account.is-open .nav__account-menu { max-height: 640px; }
}
.nav__push-hint--ios { font-size: 0.68rem; opacity: 0.8; }

/* Card iscrizione: i due passaggi (accedi → attiva) */
.ra-promo__flow { list-style: none; display: flex; gap: 0.5rem; margin: 0 0 1rem; padding: 0; }
.ra-promo__flow li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.6rem;
  border-radius: 12px;
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}
.ra-promo__flow li span {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.ra-promo__flow li.is-current { color: #fff; border-color: rgba(165,184,255,0.55); background: rgba(91,140,255,0.15); }
.ra-promo__flow li.is-current span { background: var(--accent); }
.ra-promo__flow li.is-done span { background: #10b981; }
.ra-promo__cta svg[viewBox="0 0 48 48"] { color: inherit; }

/* Card iscrizione: versione compatta ("pillola") */
.ra-promo.ra-promo--mini {
  width: auto;
  max-width: calc(100vw - 2rem);
  padding: 0.35rem 0.35rem 0.35rem 0.4rem;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.ra-promo--mini::before { display: none; }
.ra-promo__pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.35rem 0.3rem 0.3rem;
  border-radius: 100px;
  color: #fff;
  font-family: inherit;
  text-align: left;
}
.ra-promo__pill-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  animation: ra-bell 2.6s 1s ease-in-out 2;
}
.ra-promo__pill-icon svg { width: 18px; height: 18px; }
.ra-promo__pill-text { font-size: 0.86rem; font-weight: 600; white-space: nowrap; }
.ra-promo__pill-cta {
  margin-left: 0.3rem;
  padding: 0.4em 0.95em;
  border-radius: 100px;
  background: #fff;
  color: #1C1F26;
  font-size: 0.8rem;
  font-weight: 700;
}
.ra-promo__pill:hover .ra-promo__pill-cta { background: #e8eeff; }
.ra-promo__pill-close {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  color: rgba(255,255,255,0.55);
  font-size: 1.15rem;
  line-height: 1;
}
.ra-promo__pill-close:hover { background: rgba(255,255,255,0.1); color: #fff; }
@keyframes ra-bell {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(-14deg); }
  20%, 40% { transform: rotate(14deg); }
}
@media (max-width: 560px) {
  .ra-promo.ra-promo--mini {
    left: 50%;
    right: auto;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    width: auto;
    border-radius: 100px;
    transform: translate(-50%, 140%);
  }
  .ra-promo.ra-promo--mini.is-open { transform: translate(-50%, 0); }
  .ra-promo__pill-text { font-size: 0.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ra-promo__pill-icon { animation: none; }
}

/* Diagnosi notifiche (?promo=check) */
.ra-promo__diag { list-style: none; margin: 0 0 1rem; padding: 0; font-size: 0.82rem; }
.ra-promo__diag li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.ra-promo__diag span { color: rgba(255,255,255,0.6); }
.ra-promo__diag strong { color: #fff; text-align: right; word-break: break-all; }

/* ═══════════════════════════════════════════════════
   CERTIFICAZIONI (curriculum + home)
══════════════════════════════════════════════════ */
    /* ── CERTIFICAZIONI ─────────────────────────────────── */
    .cert-sec { margin-bottom:4rem; scroll-margin-top:80px; }
    .cert-sec__intro { color:var(--text-muted); max-width:62ch; }
    .cert-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1.25rem; margin-top:1.25rem; }
    .cert-card { display:block; border:1px solid var(--border); border-radius:14px; overflow:hidden; text-decoration:none !important; color:inherit; background:#fff; transition:transform .2s ease, box-shadow .2s ease; }
    .cert-card:hover { transform:translateY(-3px); box-shadow:0 14px 34px -14px rgba(20,28,45,.3); }
    .cert-card img { display:block; width:100%; height:auto; }
    .cert-card__body { padding:.9rem 1.1rem 1.05rem; }
    .cert-card__title { font-weight:700; color:var(--text); margin:0 0 .2rem; }
    .cert-card__meta { font-size:.8rem; color:var(--text-muted); margin:0 0 .45rem; }
    .cert-card__link { font-size:.82rem; font-weight:600; color:var(--accent); }
    /* su telefono e tablet due badge per riga, così i 6 badge non diventano una colonna lunghissima */
    @media (max-width: 860px) {
      .cert-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; }
      .cert-card { border-radius:12px; }
      .cert-card__body { padding:.65rem .75rem .8rem; }
      .cert-card__title { font-size:.86rem; line-height:1.3; }
      .cert-card__meta { font-size:.72rem; margin-bottom:.35rem; }
      .cert-card__link { font-size:.76rem; }
    }


/* ═══════════════════════════════════════════════════
   PROGETTO — Chiedi al codice (RAG sul codice sorgente)
══════════════════════════════════════════════════ */
.jb-code__thread { display: flex; flex-direction: column; gap: 1.1rem; padding: 1.25rem 1.2rem 0.5rem; }
.jb-code__thread[hidden] { display: none; }
.jb-code__form { border-bottom: none; border-top: 1px solid rgba(255,255,255,0.08); margin-top: 0.75rem; }
.jb-code .jb-debate__suggestions { padding-bottom: 0.25rem; }
.jb-code__q {
  align-self: flex-end;
  max-width: 86%;
  padding: 0.7rem 1rem;
  border-radius: 16px 16px 4px 16px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.5;
}
.jb-code__a { display: flex; flex-direction: column; gap: 0.6rem; }
.jb-code__answer {
  padding: 0.9rem 1.1rem;
  border-radius: 4px 16px 16px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92);
  font-size: 0.9rem;
  line-height: 1.65;
}
.jb-code__answer p { margin: 0 0 0.6em; }
.jb-code__answer p:last-child { margin-bottom: 0; }
.jb-code__answer ul { margin: 0.3em 0 0.6em 1.1em; padding: 0; }
.jb-code__answer li { margin-bottom: 0.3em; }
.jb-code__answer code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82em;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: rgba(91,140,255,0.18);
  color: #c7d6ff;
}
.jb-code__src-label { margin: 0.2rem 0 0; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.45); }
.jb-code__src {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  background: #0d1117;
  overflow: hidden;
}
.jb-code__src summary {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.8rem;
  background: rgba(255,255,255,0.03);
}
.jb-code__src summary::-webkit-details-marker { display: none; }
.jb-code__src summary::before { content: '▸'; color: rgba(255,255,255,0.45); transition: transform 0.15s; }
.jb-code__src[open] summary::before { transform: rotate(90deg); }
.jb-code__src-path { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #8fb0ff; font-weight: 600; word-break: break-all; }
.jb-code__src-range { color: rgba(255,255,255,0.45); }
.jb-code__pre {
  margin: 0;
  max-height: 340px;
  overflow: auto;
  font-size: 0.76rem;
  line-height: 1.55;
  counter-reset: line var(--start, 0);
}
.jb-code__pre code.hljs, .jb-code__pre code { display: block; padding: 0.8rem 1rem; background: transparent; white-space: pre; }
.jb-code__src-link { display: inline-block; padding: 0.5rem 0.9rem 0.7rem; font-size: 0.78rem; font-weight: 600; color: #8fb0ff; }
.jb-code__loading { display: flex; align-items: center; gap: 0.4rem; padding: 0.7rem 0.2rem; color: rgba(255,255,255,0.6); font-size: 0.82rem; }
.jb-code__loading-text { margin-left: 0.4rem; }
@media (max-width: 560px) {
  .jb-code__q { max-width: 94%; }
  .jb-code__pre { font-size: 0.72rem; }
}
.jb-pf-card__thumb--code {
  display: flex;
  align-items: center;
  padding: 0 1.4rem;
  background: radial-gradient(circle at 85% 20%, rgba(91,140,255,0.35), transparent 55%), #0d1117;
}
.jb-pf-card__code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; line-height: 1.7; color: #e6edf3; }
.jb-pf-card__code b { color: #7ee787; font-weight: 700; }
.jb-pf-card__code i { font-style: normal; color: #8fb0ff; }
.jb-code__inline-pre { margin: 0.6em 0; border-radius: 10px; background: #0d1117; border: 1px solid rgba(255,255,255,0.08); overflow-x: auto; font-size: 0.78rem; }
.jb-code__inline-pre code { display: block; padding: 0.7rem 0.9rem; background: transparent !important; color: #e6edf3; white-space: pre; }
