/* -----------------------------------------------------------------------
   Timeline "timeline_blocks" — stile ripreso dal file di riferimento
   timeline-3gpp-rel20.html. Nessun overlay di completamento: il content
   type non ha quel campo (era solo nel file Excel di origine).
   ----------------------------------------------------------------------- */

.timeline {
  --bg: #FFFFFF;
  --panel: #F7F8F9;
  --line: #DFE4E8;
  --line-soft: #EAEDF0;
  --fg: #141F27;
  --fg-dim: #5C6B74;
  --fg-faint: #94A1A8;
  --accent: #C64B68;
  --now: #141F27;
/* 
  font-family: 'IBM Plex Sans', sans-serif; */
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.timeline__scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}

.timeline__grid {
  display: flex;
  flex-direction: column;
  min-width: 1100px;
}

.timeline__row {
  display: flex;
  align-items: stretch;
}

.timeline__row--years .timeline__label,
.timeline__row--years .timeline__lane {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.timeline__row--years .timeline__lane {
  min-height: 34px;
}

.timeline__row--section .timeline__label,
.timeline__row--section .timeline__lane {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  min-height: 58px;
}
.timeline__row--section .timeline__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 8px;
 /*  font-family: 'IBM Plex Sans', sans-serif;  */
}

.timeline__row--sub .timeline__label {
  padding-left: 36px;
  background: var(--bg);
  position: relative;
  min-height: 60px;
}
.timeline__row--sub .timeline__label::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 0;
  bottom: 0;
  border-left: 1px solid var(--line);
}
.timeline__row--sub .timeline__label .timeline__label-title {
  font-size: 12.5px;
  color: var(--fg-dim);
  font-weight: 500;
}
.timeline__row--sub .timeline__lane {
  min-height: 60px;
}

.timeline__dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: none;
  /* background: var(--accent); */
  background: #42A0D9;
}

/* colonna etichetta, fissa durante lo scroll orizzontale */
.timeline__label {
  position: sticky;
  left: 0;
  z-index: 3;
  flex: 0 0 260px;
  width: 260px;
  background: var(--bg);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 82px;
}
.timeline__label-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.3;
/*   font-family: 'IBM Plex Mono', monospace; */
  letter-spacing: -0.01em;
}
.timeline__label-sub {
  font-size: 11.5px;
  color: var(--fg-faint);
  margin-top: 4px;
}
.timeline__label-sub b {
  color: var(--fg-dim);
  font-weight: 500;
}

.timeline__lane {
  position: relative;
  flex: 1 1 820px;
  min-width: 820px;
  min-height: 82px;
  border-bottom: 1px solid var(--line-soft);
}

.timeline__stripe {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid var(--line-soft);
}

.timeline__tick {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid var(--line-soft);
  /* font-family: 'IBM Plex Mono', monospace; */
  font-size: 11px;
  color: var(--fg-faint);
  padding-left: 6px;
  padding-top: 10px;
}

.timeline__now {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1.5px dashed var(--now);
  z-index: 2;
}
.timeline__now-label {
  position: absolute;
  top: 9px;
  transform: translateX(-50%);
 /*  font-family: 'IBM Plex Mono', monospace; */
  font-size: 10px;
  color: var(--now);
  white-space: nowrap;
  background: var(--bg);
  padding: 0 4px;
}

/* barre */
.timeline__bar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 36px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
/*   font-family: 'IBM Plex Sans', sans-serif; */
  font-size: 12.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  padding: 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #FFFFFF;
  /* background: var(--accent); */
  background: #12a89d;
  transition: filter .12s ease;
}
.timeline__bar:hover {
  filter: brightness(1.1);
}
.timeline__bar:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}
.timeline__bar.is-selected {
  box-shadow: 0 0 0 2px var(--fg);
}
.timeline__bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 1;
}
.timeline__bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(255, 255, 255, .22);
  border-radius: 6px 0 0 6px;
}
.timeline__bar--parent .timeline__bar-fill {
  background: rgba(255, 255, 255, .18);
}
.timeline__bar-pct {
  position: relative;
  z-index: 1;
  margin-left: auto;
/*   font-family: 'IBM Plex Mono', monospace; */
  font-size: 10.5px;
  opacity: .85;
  padding-left: 8px;
}

.timeline__bar--parent {
  background: var(--fg);
  /* background: #2987c5; */
  height: 40px;
}
.timeline__bar--sub {
  height: 26px;
}
.timeline__bar--point {
  width: 20px !important;
  min-width: 20px;
  padding: 0;
  border-radius: 50%;
  height: 20px;
  justify-content: center;
}
.timeline__bar--point .timeline__bar-label {
  display: none;
}

.timeline__error {
  padding: 24px;
  color: var(--fg-faint);
  font-size: 13.5px;
  grid-column: 1 / -1;
}

/* pannello dettagli, sotto la timeline */
.timeline__detail {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 20px 24px;
  min-height: 100px;
}
.timeline__detail.is-empty {
  display: flex;
  align-items: center;
  color: var(--fg-faint);
  font-size: 13.5px;
}
.timeline__detail-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}
.timeline__detail-badge {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex: none;
  background: var(--accent);
}
.timeline__detail-title {
/*   font-family: 'Space Grotesk', sans-serif; */
  font-size: 19px;
  font-weight: 600;
  color: var(--fg);
}
.timeline__detail-period {
/*   font-family: 'IBM Plex Mono', monospace; */
  font-size: 11.5px;
  color: var(--fg-dim);
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.timeline__detail-source {
  font-size: 11.5px;
  color: var(--fg-faint);
  margin-bottom: 10px;
}
.timeline__detail-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.timeline__detail-meta-item {
  font-size: 12px;
  color: var(--fg-faint);
}
.timeline__detail-meta-item b {
  color: var(--fg-dim);
  font-weight: 500;
}
.timeline__detail-meta-item a {
  color: var(--accent);
  text-decoration: none;
}
.timeline__detail-meta-item a:hover {
  text-decoration: underline;
}
.timeline__detail-desc {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--fg-dim);
  max-width: 78ch;
}

.timeline__detail-subs {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.timeline__detail-sub {
  display: flex;
  gap: 10px;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 9px;
  cursor: pointer;
}
.timeline__detail-sub:hover .timeline__detail-sub-title {
  color: var(--fg);
}
.timeline__detail-sub-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 6px;
  flex: none;
  /* background: var(--accent); */
  background: #42A0D9;
}
.timeline__detail-sub-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-dim);
}
.timeline__detail-sub-period {
/*   font-family: 'IBM Plex Mono', monospace; */
  font-size: 10.5px;
  color: var(--fg-faint);
}

@media (max-width: 640px) {
  .timeline__detail {
    padding: 16px 18px;
  }
}

/* ---------- Modale dettagli ---------- */
.timeline-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 31, 39, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}
.timeline-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.timeline-modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: min(640px, 85vh);
  overflow-y: auto;
  background: var(--bg);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(20, 31, 39, 0.28), 0 2px 8px rgba(20, 31, 39, 0.12);
  padding: 28px 30px;
  transform: translateY(12px) scale(.98);
  transition: transform .18s ease;
}
.timeline-modal-overlay.is-open .timeline-modal {
  transform: translateY(0) scale(1);
}

.timeline-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: var(--panel);
  color: var(--fg-dim);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s ease, color .12s ease;
}
.timeline-modal__close:hover {
  background: var(--line-soft);
  color: var(--fg);
}

.timeline-modal__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 9px;
  padding-right: 30px;
}
.timeline-modal__badge {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex: none;
/*   background: var(--accent); */
  background: #13235B;
}
.timeline-modal__title {
/*   font-family: 'Space Grotesk', sans-serif; */
  font-size: 20px;
  font-weight: 600;
  color: var(--fg);
}
.timeline-modal__period {
/*   font-family: 'IBM Plex Mono', monospace; */
  font-size: 11.5px;
  color: var(--fg-dim);
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.timeline-modal__source {
  font-size: 11.5px;
  color: var(--fg-faint);
  margin-bottom: 10px;
}
.timeline-modal__meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.timeline-modal__meta-item {
  font-size: 12px;
  color: var(--fg-faint);
}
.timeline-modal__meta-item b {
  color: var(--fg-dim);
  font-weight: 500;
}
.timeline-modal__meta-item a {
  color: var(--accent);
  text-decoration: none;
}
.timeline-modal__meta-item a:hover {
  text-decoration: underline;
}
.timeline-modal__desc {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--fg-dim);
}

.timeline-modal__subs {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.timeline-modal__sub {
  display: flex;
  gap: 10px;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 9px;
  cursor: pointer;
}
.timeline-modal__sub:hover .timeline-modal__sub-title {
  color: var(--fg);
}
.timeline-modal__sub-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 6px;
  flex: none;
/*   background: var(--accent); */
  background: #42A0D9;
}
.timeline-modal__sub-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-dim);
}
.timeline-modal__sub-period {
/*   font-family: 'IBM Plex Mono', monospace; */
  font-size: 10.5px;
  color: var(--fg-faint);
}

@media (max-width: 640px) {
  .timeline-modal {
    padding: 22px 20px;
  }
}

.timeline-tabs__nav {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line, #DFE4E8);
  margin-bottom: 20px;
}

.timeline-tabs__btn {
  appearance: none;
  border: none;
  background: transparent;
  padding: 10px 18px;
/*   font-family: 'IBM Plex Sans', sans-serif; */
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fg-faint, #94A1A8);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .12s ease, border-color .12s ease;
}
.timeline-tabs__btn:hover {
  color: var(--fg-dim, #5C6B74);
}
.timeline-tabs__btn.is-active {
  color: var(--fg, #141F27);
  /* border-bottom-color: var(--accent, #C64B68); */
  border-bottom-color: #13235B;
}

.timeline-tabs__panel {
  display: none;
}
.timeline-tabs__panel.is-active {
  display: block;
}

/* ---------- Touch scroll più fluido su iOS ---------- */
.timeline__scroll {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  .timeline__grid {
    min-width: 820px;
  }
  .timeline__label {
    flex: 0 0 190px;
    width: 190px;
    padding: 12px 14px;
    min-height: 72px;
  }
  .timeline__lane {
    flex: 1 1 620px;
    min-width: 620px;
  }
  .timeline__row--sub .timeline__label {
    padding-left: 28px;
  }
  .timeline__label-title {
    font-size: 13.5px;
  }
  .timeline__label-sub {
    font-size: 11px;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .timeline__grid {
    min-width: 640px;
  }
  .timeline__label {
    flex: 0 0 150px;
    width: 150px;
    padding: 10px 12px;
    min-height: 64px;
  }
  .timeline__lane {
    flex: 1 1 480px;
    min-width: 480px;
    min-height: 64px;
  }
  .timeline__row--sub .timeline__label {
    padding-left: 22px;
    min-height: 52px;
  }
  .timeline__row--sub .timeline__lane {
    min-height: 52px;
  }
  .timeline__label-title {
    font-size: 12.5px;
    line-height: 1.25;
  }
  .timeline__label-sub {
    font-size: 10px;
  }
  .timeline__row--section .timeline__label {
    font-size: 12px;
    min-height: 44px;
  }
  .timeline__bar {
    height: 30px;
    font-size: 11px;
    padding: 0 8px;
  }
  .timeline__bar--parent {
    height: 34px;
  }
  .timeline__bar--sub {
    height: 22px;
  }
  .timeline__bar-pct {
    font-size: 9.5px;
    padding-left: 5px;
  }
  .timeline__tick {
    font-size: 10px;
    padding-left: 4px;
    padding-top: 8px;
  }
  .timeline__now-label {
    font-size: 9px;
  }
}

/* ---------- Tab nav responsive ---------- */
@media (max-width: 480px) {
  .timeline-tabs__nav {
    gap: 2px;
  }
  .timeline-tabs__btn {
    padding: 9px 12px;
    font-size: 12.5px;
  }
}