/* ==========================================================================
   THEME SYNTHESIS: Linear + The Verge + Josh W. Comeau
   Specifiche Tecniche & Design System
   ========================================================================== */


/* Token e variabili attive quando data-style="synthesis" */
html[data-style="synthesis"] {
  color-scheme: dark;

  /* Layer 1: Linear Surfaces & Base */
  --bg-canvas: #08090A;
  --bg-surface-1: #121316;
  --bg-surface-2: #181A1E;
  --bg-surface-code: #0E0F12;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --text-primary: #EDEDED;
  --text-secondary: #8A8F98;

  /* Layer 2: The Verge Neon Accents */
  --accent-tech: #22E58B;    /* Verde elettrico: tech, code, news */
  --accent-design: #D946EF;  /* Magenta/viola neon: arte, design, mostre */
  --accent-flash: #FACC15;   /* Giallo acido: annunci flash, fast stream */

  /* Mappatura sui token globali del sito */
  --paper: var(--bg-canvas);
  --paper-2: var(--bg-surface-1);
  --ink: var(--text-primary);
  --ink-soft: var(--text-secondary);
  --line: var(--border-subtle);
  --accent: var(--accent-tech);
  --accent-deep: #16a34a;
  --accent-on-dark: var(--accent-tech);
  --olive: var(--accent-tech);
  --on-dark: #EDEDED;
  --on-dark-soft: #8A8F98;
  --on-light: #EDEDED;

  /* Font Stack Synthesis */
  --font-display: "Cabinet Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", "GeistSans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "GeistMono", monospace;

  background-color: var(--bg-canvas);
  color: var(--text-primary);
}

/* Base Body in Synthesis */
html[data-style="synthesis"] body {
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-body);
  letter-spacing: -0.011em;
}

/* Griglia & Contenitore a 1440px max fluidi */
html[data-style="synthesis"] .container {
  max-width: 1440px;
  padding-inline: clamp(16px, 3.5vw, 42px);
}

/* Header Synthesis */
html[data-style="synthesis"] .masthead {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(8, 9, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html[data-style="synthesis"] .mast-logo {
  padding: 24px 0 16px;
}

html[data-style="synthesis"] .logo--image img {
  filter: brightness(1.2) drop-shadow(0 0 12px rgba(255, 255, 255, 0.08));
}

html[data-style="synthesis"] .bb-img--fallback {
  object-fit: contain !important;
  padding: 32px 24px !important;
  background: var(--bg-surface-2, #181A1E) !important;
  filter: brightness(1.15) drop-shadow(0 0 8px rgba(255, 255, 255, 0.08));
}

html[data-style="synthesis"] .navbar {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(18, 19, 22, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

html[data-style="synthesis"] .nav-links a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13.5px;
  color: var(--text-secondary);
  transition: color 0.18s ease;
}

html[data-style="synthesis"] .nav-links a:hover {
  color: var(--text-primary);
}

html[data-style="synthesis"] .ticker {
  background: #000000;
  border-bottom: 1px solid var(--border-subtle);
}

html[data-style="synthesis"] .ticker-item b {
  color: var(--accent-tech);
}

/* Badge di Categoria Neon */
html[data-style="synthesis"] .tag,
html[data-style="synthesis"] .chip {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 4px 9px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

html[data-style="synthesis"] .chip.active {
  background: rgba(34, 229, 139, 0.12);
  border-color: var(--accent-tech);
  color: var(--accent-tech);
}

html[data-style="synthesis"] .chip:hover:not(.active) {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

/* Card Modulari con Specular Highlight (Linear style) */
html[data-style="synthesis"] .post-card,
html[data-style="synthesis"] .ev-card,
html[data-style="synthesis"] .archive-tile {
  background: var(--bg-surface-1) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  transition: border-color 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Riflesso radiale mobile sincronizzato con il mouse */
html[data-style="synthesis"] .post-card::before,
html[data-style="synthesis"] .ev-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    380px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.065),
    transparent 50%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

html[data-style="synthesis"] .post-card:hover::before,
html[data-style="synthesis"] .ev-card:hover::before {
  opacity: 1;
}

html[data-style="synthesis"] .post-card:hover,
html[data-style="synthesis"] .ev-card:hover {
  border-color: var(--border-hover) !important;
  transform: translateY(-2px);
}

html[data-style="synthesis"] .post-card,
html[data-style="synthesis"] .ev-card {
  display: flex;
  flex-direction: column;
}

/* Padding confortevole per il corpo del testo nelle card */
html[data-style="synthesis"] .post-card__body,
html[data-style="synthesis"] .ev-card__body {
  padding: 22px 24px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

/* Fallback per elementi card diretti */
html[data-style="synthesis"] .post-card > :not(.post-media):not(.post-card__body),
html[data-style="synthesis"] .ev-card > :not(.ev-media):not(.ev-card__body) {
  padding-inline: 24px;
}

html[data-style="synthesis"] .post-card .post-media,
html[data-style="synthesis"] .ev-card .ev-media {
  border-bottom: 1px solid var(--border-subtle);
}

html[data-style="synthesis"] .post-top,
html[data-style="synthesis"] .ev-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
}

html[data-style="synthesis"] .post-title,
html[data-style="synthesis"] .ev-title,
html[data-style="synthesis"] .hero-title {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 0;
  line-height: 1.25;
}

html[data-style="synthesis"] .post-title {
  font-size: 1.22rem;
}

html[data-style="synthesis"] .post-excerpt,
html[data-style="synthesis"] .ev-excerpt {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
  margin-top: 0;
}

html[data-style="synthesis"] .post-read,
html[data-style="synthesis"] .ev-read {
  margin-top: auto;
  padding-top: 8px;
  color: var(--accent-tech);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 700;
}

html[data-style="synthesis"] .date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

/* ==========================================================================
   WIDGET CALENDARIO IN MODALITÀ SYNTHESIS
   ========================================================================== */
html[data-style="synthesis"] .bb-cal-bar {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

html[data-style="synthesis"] .bb-cal-month-nav {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

html[data-style="synthesis"] .bb-cal-month-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}

html[data-style="synthesis"] .bb-cal-btn-nav {
  color: var(--text-secondary);
}

html[data-style="synthesis"] .bb-cal-btn-nav:hover:not(:disabled) {
  color: var(--accent-tech);
  background: rgba(255, 255, 255, 0.05);
}

/* Pillole giorno in Synthesis */
html[data-style="synthesis"] .bb-cal-pill {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 8px;
}

html[data-style="synthesis"] .bb-cal-pill__dow {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-secondary);
}

html[data-style="synthesis"] .bb-cal-pill__num {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Giorni con articoli pubblicati: Verde Elettrico Neon #22E58B */
html[data-style="synthesis"] .bb-cal-pill.has-posts {
  border-color: rgba(34, 229, 139, 0.45);
  background: rgba(34, 229, 139, 0.07);
}

html[data-style="synthesis"] .bb-cal-pill.has-posts .bb-cal-pill__dow {
  color: var(--accent-tech);
}

html[data-style="synthesis"] .bb-cal-pill.has-posts .bb-cal-pill__num {
  color: #ffffff;
}

html[data-style="synthesis"] .bb-cal-pill.has-posts .bb-cal-pill__dot {
  background: var(--accent-tech);
  box-shadow: 0 0 8px var(--accent-tech);
}

html[data-style="synthesis"] .bb-cal-pill.has-posts:hover {
  background: rgba(34, 229, 139, 0.16);
  border-color: var(--accent-tech);
}

/* Giorno selezionato attivo */
html[data-style="synthesis"] .bb-cal-pill.is-active {
  background: var(--accent-tech) !important;
  border-color: var(--accent-tech) !important;
  color: #08090A !important;
  box-shadow: 0 0 16px rgba(34, 229, 139, 0.5) !important;
}

html[data-style="synthesis"] .bb-cal-pill.is-active .bb-cal-pill__dow,
html[data-style="synthesis"] .bb-cal-pill.is-active .bb-cal-pill__num {
  color: #08090A !important;
  font-weight: 800;
}

html[data-style="synthesis"] .bb-cal-pill.is-active .bb-cal-pill__dot {
  background: #08090A !important;
  box-shadow: none !important;
}

/* Tasti azione rapida in Synthesis */
html[data-style="synthesis"] .bb-cal-act-btn {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 10.5px;
  border-radius: 8px;
}

html[data-style="synthesis"] .bb-cal-act-btn--all {
  border-color: rgba(217, 70, 239, 0.4);
  color: var(--accent-design);
}

html[data-style="synthesis"] .bb-cal-act-btn--all.is-active,
html[data-style="synthesis"] .bb-cal-act-btn--all:hover {
  background: var(--accent-design);
  border-color: var(--accent-design);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(217, 70, 239, 0.45);
}

html[data-style="synthesis"] .bb-cal-act-btn--today {
  border-color: rgba(34, 229, 139, 0.4);
  color: var(--accent-tech);
  background: rgba(34, 229, 139, 0.05);
}

html[data-style="synthesis"] .bb-cal-act-btn--today.is-active,
html[data-style="synthesis"] .bb-cal-act-btn--today:hover {
  background: var(--accent-tech);
  border-color: var(--accent-tech);
  color: #08090A;
  box-shadow: 0 0 14px rgba(34, 229, 139, 0.45);
}

html[data-style="synthesis"] .bb-cal-act-btn--month {
  border-color: rgba(250, 204, 21, 0.4);
  color: var(--accent-flash);
  background: rgba(250, 204, 21, 0.05);
}

html[data-style="synthesis"] .bb-cal-act-btn--month.is-active,
html[data-style="synthesis"] .bb-cal-act-btn--month:hover {
  background: var(--accent-flash);
  border-color: var(--accent-flash);
  color: #08090A;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.45);
}

html[data-style="synthesis"] .bb-cal-filter-status {
  background: var(--bg-surface-1);
  border-left: 3px solid var(--accent-tech);
  border-top: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

html[data-style="synthesis"] .bb-cal-filter-status__clear {
  background: var(--bg-surface-2);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

html[data-style="synthesis"] .bb-cal-filter-status__clear:hover {
  background: var(--accent-tech);
  border-color: var(--accent-tech);
  color: #08090A;
}

/* ==========================================================================
   COMMAND PALETTE (Cmd + K) MODAL
   ========================================================================== */
.synthesis-cmd-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(60px, 12vh, 120px);
  animation: cmdFadeIn 0.18s ease-out;
}

@keyframes cmdFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.synthesis-cmd-panel {
  width: min(640px, 94vw);
  background: #121316;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  animation: cmdSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cmdSlideDown {
  from { transform: translateY(-12px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.synthesis-cmd-header {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
}

.synthesis-cmd-icon {
  font-size: 16px;
  color: #8A8F98;
}

.synthesis-cmd-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #EDEDED;
  font-family: inherit;
  font-size: 15px;
}

.synthesis-cmd-input::placeholder {
  color: #555962;
}

.synthesis-cmd-badge {
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #8A8F98;
}

.synthesis-cmd-body {
  max-height: 380px;
  overflow-y: auto;
  padding: 10px;
}

.synthesis-cmd-group-title {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666C77;
  padding: 8px 10px 4px;
}

.synthesis-cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  color: #EDEDED;
  cursor: pointer;
  text-decoration: none;
  font-size: 13.5px;
  transition: background 0.12s ease;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
}

.synthesis-cmd-item:hover,
.synthesis-cmd-item.is-selected {
  background: rgba(255, 255, 255, 0.07);
}

.synthesis-cmd-item__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.synthesis-cmd-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  background: #0E0F12;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  color: #666C77;
  font-family: var(--font-mono, monospace);
}

/* ==========================================================================
   THEME STYLE TOGGLE BUTTON (IN NAVBAR / HEADER)
   ========================================================================== */
.theme-style-switcher {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  gap: 2px;
}

.theme-style-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.16s ease;
  border: none;
  background: none;
}

.theme-style-btn.is-active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

html[data-style="synthesis"] .theme-style-btn.is-active {
  background: #181A1E;
  color: var(--accent-tech);
  box-shadow: 0 0 10px rgba(34, 229, 139, 0.2);
}

.cmd-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.cmd-trigger-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cmd-trigger-btn kbd {
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   SIDENOTES & ARTICOLO SINGOLO (Josh Comeau style)
   ========================================================================== */
html[data-style="synthesis"] .single-wrap {
  display: grid;
  grid-template-columns: minmax(0, 720px) 320px;
  gap: 36px;
  justify-content: center;
  max-width: 1140px;
  margin: 36px auto 0;
  padding-inline: 24px;
}

html[data-style="synthesis"] .single-article {
  max-width: 720px;
  width: 100%;
}

.synthesis-sidenote-rail {
  display: none;
}

html[data-style="synthesis"] .synthesis-sidenote-rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 86px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 4px;
}

html[data-style="synthesis"] .synthesis-sidenote-rail::-webkit-scrollbar {
  width: 4px;
}
html[data-style="synthesis"] .synthesis-sidenote-rail::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}

.synthesis-sidenote {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-left: 2px solid var(--accent-tech);
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.synthesis-sidenote__tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--accent-tech);
  text-transform: uppercase;
  margin-bottom: 4px;
  display: block;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* Comment Box Styles */
.bb-comments-box {
  border-left: 3px solid var(--accent-tech);
}

.bb-comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.bb-comments-header__left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bb-comments-header .synthesis-sidenote__tag {
  margin-bottom: 0;
}

.bb-comments-count-pill {
  font-size: 11px;
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(34, 229, 139, 0.14);
  color: var(--accent-tech, #22E58B);
  border: 1px solid rgba(34, 229, 139, 0.28);
}

.bb-comments-sub {
  margin: 0 0 12px;
  font-size: 11.5px;
  color: var(--text-muted, #7E828B);
  line-height: 1.4;
}

.bb-comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 14px;
  padding-right: 4px;
}

.bb-comments-list::-webkit-scrollbar {
  width: 4px;
}
.bb-comments-list::-webkit-scrollbar-thumb {
  background: var(--border-subtle, rgba(255, 255, 255, 0.1));
  border-radius: 4px;
}

.bb-comments-empty {
  font-size: 11.5px;
  color: var(--text-muted, #7E828B);
  padding: 12px;
  text-align: center;
  border: 1px dashed var(--border-subtle, rgba(255, 255, 255, 0.1));
  border-radius: 6px;
}

.bb-comment-item {
  padding: 10px 12px;
  background: var(--bg-surface-2, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
  border-radius: 8px;
  font-size: 12px;
  transition: border-color 0.15s ease;
}

.bb-comment-item:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.bb-comment-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 8px;
}

.bb-comment-author-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.bb-comment-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-tech, #22E58B);
  color: #08090A;
  font-size: 9.5px;
  font-weight: 800;
  flex-shrink: 0;
  text-transform: uppercase;
}

.bb-comment-author-name {
  font-weight: 700;
  color: var(--text-primary, #EDEDED);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bb-comment-meta-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.bb-comment-date {
  font-size: 10px;
  font-family: var(--font-mono, monospace);
  color: var(--text-muted, #7E828B);
}

.bb-comment-delete-btn {
  background: none;
  border: none;
  color: var(--text-muted, #7E828B);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0 2px;
  transition: color 0.15s ease;
}

.bb-comment-delete-btn:hover {
  color: #FF5A5F;
}

.bb-comment-text {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-secondary, #B3B7C0);
  word-break: break-word;
}

.bb-comment-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.bb-comment-input,
.bb-comment-textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  background: var(--bg-canvas, #08090A);
  color: var(--text-primary, #EDEDED);
  font-family: inherit;
  font-size: 11.5px;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bb-comment-input:focus,
.bb-comment-textarea:focus {
  border-color: var(--accent-tech, #22E58B);
  box-shadow: 0 0 0 2px rgba(34, 229, 139, 0.18);
}

.bb-comment-textarea {
  resize: vertical;
  min-height: 54px;
}

.bb-comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bb-comment-submit-btn {
  padding: 7px 13px;
  border-radius: 6px;
  border: none;
  background: var(--accent-tech, #22E58B);
  color: #08090A;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.bb-comment-submit-btn:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

.bb-comment-submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bb-comment-char-count {
  font-size: 10px;
  font-family: var(--font-mono, monospace);
  color: var(--text-muted, #7E828B);
}

.bb-comment-success-msg {
  font-size: 11px;
  color: var(--accent-tech, #22E58B);
  font-weight: 600;
  margin-top: 4px;
}

/* Add to Calendar Button & Dropdown */
.bb-cal-export {
  position: relative;
  display: inline-block;
}

.bb-cal-export__trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  background: var(--bg-surface-2, #181A1E);
  color: var(--text-primary, #EDEDED);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.bb-cal-export__trigger:hover {
  border-color: var(--accent-tech, #22E58B);
  color: var(--accent-tech, #22E58B);
  background: rgba(34, 229, 139, 0.06);
}

.bb-cal-export__trigger--compact {
  padding: 3px 8px;
  font-size: 10px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: none;
}

.bb-cal-export__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 230px;
  background: var(--bg-surface-1, #121316);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  padding: 6px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 3px;
  backdrop-filter: blur(12px);
}

.bb-cal-export__title {
  padding: 6px 8px 4px;
  font-size: 10px;
  font-family: var(--font-mono, monospace);
  color: var(--text-muted, #7E828B);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
  margin-bottom: 2px;
}

.bb-cal-export__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 5px;
  background: transparent;
  border: none;
  color: var(--text-primary, #EDEDED) !important;
  text-decoration: none !important;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease;
  width: 100%;
}

.bb-cal-export__item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.bb-cal-export__icon {
  font-size: 14px;
  flex-shrink: 0;
}

.bb-cal-export__sub {
  margin-left: auto;
  font-size: 9.5px;
  font-family: var(--font-mono, monospace);
  color: var(--text-muted, #7E828B);
}

/* Editorial Fallback Comments Wrapper */
html[data-style="synthesis"] .editorial-comments-wrap {
  display: none;
}

@media (max-width: 1100px) {
  html[data-style="synthesis"] .single-wrap {
    grid-template-columns: 1fr;
    max-width: 760px;
    padding-inline: 20px;
  }
  html[data-style="synthesis"] .synthesis-sidenote-rail {
    display: flex;
    position: static;
    max-height: none;
    margin-top: 48px;
    width: 100%;
  }
}

/* ==========================================================================
   PULSANTI CONTATTI & LINK IN MODALITÀ SYNTHESIS
   ========================================================================== */
html[data-style="synthesis"] .bb-contact-btn {
  background: var(--bg-surface-2, #181A1E);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  color: var(--text-primary, #EDEDED) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

html[data-style="synthesis"] .bb-contact-btn__icon {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

html[data-style="synthesis"] .bb-contact-btn__label {
  color: #FFFFFF;
}

html[data-style="synthesis"] .bb-contact-btn__sub {
  color: var(--text-secondary, #8A8F98);
}

/* Web button hover: Verde Elettrico Neon */
html[data-style="synthesis"] .bb-contact-btn--web:hover {
  background: #14171B;
  border-color: var(--accent-tech, #22E58B);
  box-shadow: 0 0 16px rgba(34, 229, 139, 0.25);
  color: var(--accent-tech, #22E58B) !important;
}

html[data-style="synthesis"] .bb-contact-btn--web:hover .bb-contact-btn__icon {
  background: rgba(34, 229, 139, 0.15);
  color: var(--accent-tech, #22E58B);
}

html[data-style="synthesis"] .bb-contact-btn--web:hover .bb-contact-btn__label {
  color: var(--accent-tech, #22E58B);
}

/* Email button hover: Magenta Neon */
html[data-style="synthesis"] .bb-contact-btn--email:hover {
  background: #14171B;
  border-color: var(--accent-design, #D946EF);
  box-shadow: 0 0 16px rgba(217, 70, 239, 0.25);
  color: var(--accent-design, #D946EF) !important;
}

html[data-style="synthesis"] .bb-contact-btn--email:hover .bb-contact-btn__icon {
  background: rgba(217, 70, 239, 0.15);
  color: var(--accent-design, #D946EF);
}

html[data-style="synthesis"] .bb-contact-btn--email:hover .bb-contact-btn__label {
  color: var(--accent-design, #D946EF);
}

/* Phone button hover: Giallo Acido Neon */
html[data-style="synthesis"] .bb-contact-btn--phone:hover {
  background: #14171B;
  border-color: var(--accent-flash, #FACC15);
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.25);
  color: var(--accent-flash, #FACC15) !important;
}

html[data-style="synthesis"] .bb-contact-btn--phone:hover .bb-contact-btn__icon {
  background: rgba(250, 204, 21, 0.15);
  color: var(--accent-flash, #FACC15);
}

html[data-style="synthesis"] .bb-contact-btn--phone:hover .bb-contact-btn__label {
  color: var(--accent-flash, #FACC15);
}

html[data-style="synthesis"] .bb-contact-heading {
  color: var(--accent-tech, #22E58B);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
}

html[data-style="synthesis"] .bb-contact-org {
  background: var(--bg-surface-1, #121316);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

/* ==========================================================================
   ARCHIVIO 3D CON THREE.JS (HUD & CONTROLS)
   ========================================================================== */
.bb-archive-3d-wrap {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #060709;
  z-index: 9999;
  font-family: var(--font-sans, system-ui, sans-serif);
  color: #ededed;
  user-select: none;
}

.bb-archive-3d-canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.bb-3d-hud-header {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(14, 16, 20, 0.78);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  z-index: 100;
  flex-wrap: wrap;
}

.bb-3d-hud-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bb-3d-back-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ededed !important;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.16s ease;
}

.bb-3d-back-btn:hover {
  background: rgba(34, 229, 139, 0.18);
  border-color: #22e58b;
  color: #22e58b !important;
}

.bb-3d-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bb-3d-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
  color: #fff;
}

.bb-3d-badge {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(34, 229, 139, 0.12);
  color: #22e58b;
  border: 1px solid rgba(34, 229, 139, 0.28);
  font-weight: 700;
}

.bb-3d-search-box {
  position: relative;
  flex: 1;
  max-width: 320px;
  min-width: 200px;
}

.bb-3d-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: 0.5;
}

.bb-3d-search-input {
  width: 100%;
  padding: 7px 28px 7px 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 11.5px;
  outline: none;
  transition: border-color 0.15s ease;
}

.bb-3d-search-input:focus {
  border-color: #22e58b;
}

.bb-3d-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 11px;
}

.bb-3d-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bb-3d-mode-selector {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.bb-3d-mode-btn {
  padding: 5px 9px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.bb-3d-mode-btn:hover {
  color: #fff;
}

.bb-3d-mode-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #22e58b;
  font-weight: 700;
}

.bb-3d-icon-btn {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #ededed;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bb-3d-icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.bb-3d-icon-btn.active {
  border-color: #22e58b;
  color: #22e58b;
}

.bb-3d-categories-bar {
  position: absolute;
  top: 76px;
  left: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  z-index: 90;
  scrollbar-width: none;
}

.bb-3d-categories-bar::-webkit-scrollbar {
  display: none;
}

.bb-3d-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(14, 16, 20, 0.7);
  backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.bb-3d-cat-pill:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.bb-3d-cat-pill.active {
  border-color: #22e58b;
  background: rgba(34, 229, 139, 0.15);
  color: #22e58b;
  font-weight: 700;
}

.bb-3d-cat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Hover HUD Card */
.bb-3d-hud-card {
  position: absolute;
  bottom: 54px;
  right: 20px;
  width: 320px;
  max-width: calc(100vw - 40px);
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(16, 18, 24, 0.88);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(34, 229, 139, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 24px rgba(34, 229, 139, 0.12);
  z-index: 100;
  animation: hudFadeIn 0.18s ease-out;
  pointer-events: none;
}

@keyframes hudFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bb-3d-hud-card__cat {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  color: #22e58b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  font-weight: 700;
}

.bb-3d-hud-card__title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 8px;
  color: #fff;
}

.bb-3d-hud-card__excerpt {
  font-size: 11.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 10px;
}

.bb-3d-hud-card__footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 8px;
}

.bb-3d-hud-card__hint {
  font-size: 10px;
  font-family: var(--font-mono, monospace);
  color: #22e58b;
}

/* Modal Card on Click */
.bb-3d-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 200;
  padding: 20px;
}

.bb-3d-modal {
  position: relative;
  width: 480px;
  max-width: 100%;
  border-radius: 14px;
  background: #111317;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(34, 229, 139, 0.15);
  padding: 24px;
  max-height: 90vh;
  overflow-y: auto;
}

.bb-3d-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 12px;
  transition: background 0.14s ease;
}

.bb-3d-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.bb-3d-modal__header {
  margin-bottom: 14px;
}

.bb-3d-modal__tag {
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  color: #22e58b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bb-3d-modal__title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  margin: 6px 0 0;
  color: #fff;
}

.bb-3d-modal__media {
  margin: 12px 0 16px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-height: 220px;
}

.bb-3d-modal__media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.bb-3d-modal__excerpt {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 20px;
}

.bb-3d-modal__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.bb-3d-btn-primary {
  padding: 10px 18px;
  border-radius: 8px;
  background: #22e58b;
  color: #08090a;
  border: none;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.bb-3d-btn-primary:hover {
  opacity: 0.9;
}

.bb-3d-btn-secondary {
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.bb-3d-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
}

.bb-3d-bottom-hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-mono, monospace);
  background: rgba(14, 16, 20, 0.7);
  backdrop-filter: blur(10px);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .bb-3d-hud-header {
    flex-direction: column;
    align-items: stretch;
  }
  .bb-3d-controls {
    justify-content: space-between;
  }
  .bb-3d-bottom-hint {
    display: none;
  }
}



@font-face { font-family: Geist; src: url("assets/fonts/files/geist-variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: GeistMono; src: url("assets/fonts/files/geist-mono-variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
html[data-style="synthesis"] { --font-display: Geist, ui-sans-serif, sans-serif; --font-body: Geist, ui-sans-serif, sans-serif; --font-mono: GeistMono, ui-monospace, monospace; }
html[data-style="synthesis"] .ultime > .sec-head { margin-top: 2rem; }
html[data-style="synthesis"] .bbp-category-filters { margin-block: 2rem; gap: .55rem; }
html[data-style="synthesis"] .bbp-category-filters .chip { cursor: pointer; }
html[data-style="synthesis"] .bbp-category-filters sup { color: var(--accent-tech); }
html[data-style="synthesis"] .bb-calendar-widget { margin: 2.1rem 0 2rem; }
html[data-style="synthesis"] .bb-cal-month-select { color: transparent; }
html[data-style="synthesis"] .bb-cal-month-label { text-transform: uppercase; }
html[data-style="synthesis"] .bb-cal-pill__dot-placeholder { display: block; height: 6px; }

/* Archivio calendario completo: mese navigabile, griglia e risultati per data. */
html[data-style="synthesis"] .bbp-explorer-page:has(> .bbp-calendar) { max-width: 1440px; padding-block: clamp(28px, 5vw, 68px) 80px; }
html[data-style="synthesis"] .bbp-explorer-page > .kicker { color: var(--accent-tech); font: 700 12px/1.4 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }
html[data-style="synthesis"] .bbp-explorer-page > h1 { margin: 8px 0 30px; font-size: clamp(34px, 5vw, 58px); letter-spacing: -.045em; }
html[data-style="synthesis"] .bbp-calendar { padding: clamp(18px, 3vw, 34px); border: 1px solid var(--border-subtle); border-radius: 18px; background: linear-gradient(145deg, var(--bg-surface-1), #0e0f11); box-shadow: 0 24px 70px rgba(0,0,0,.22); }
html[data-style="synthesis"] .bbp-calendar-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border-subtle); }
html[data-style="synthesis"] .bbp-calendar-tools form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
html[data-style="synthesis"] .bbp-calendar-tools label { display: flex; align-items: center; gap: 10px; color: var(--text-secondary); font-size: 13px; font-weight: 650; }
html[data-style="synthesis"] .bbp-calendar-tools select { min-width: 220px; padding: 11px 14px; color: var(--text-primary); background: var(--bg-surface-2); border: 1px solid var(--border-hover); border-radius: 9px; }
html[data-style="synthesis"] .bbp-calendar-tools p { margin: 0; color: var(--text-secondary); font-size: 13px; }
html[data-style="synthesis"] .bbp-calendar .bbp-button { padding: 10px 16px; color: var(--text-primary); background: var(--bg-surface-2); border: 1px solid var(--border-hover); border-radius: 9px; cursor: pointer; font-weight: 700; }
html[data-style="synthesis"] .bbp-calendar .bbp-button:hover { border-color: var(--accent-tech); color: var(--accent-tech); }
html[data-style="synthesis"] .bbp-calendar-layout { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.5fr); gap: clamp(24px, 4vw, 54px); padding-top: 28px; }
html[data-style="synthesis"] .bbp-calendar-board { min-width: 0; padding: 20px; border: 1px solid var(--border-subtle); border-radius: 14px; background: rgba(255,255,255,.018); }
html[data-style="synthesis"] .bbp-calendar-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
html[data-style="synthesis"] .bbp-month-label { margin: 0; color: var(--text-primary); font: 750 17px/1.3 var(--font-mono); text-align: center; text-transform: uppercase; }
html[data-style="synthesis"] .bbp-calendar-step { display: grid; width: 38px; height: 38px; place-items: center; color: var(--text-primary); background: var(--bg-surface-2); border: 1px solid var(--border-subtle); border-radius: 10px; font-size: 25px; text-decoration: none; }
html[data-style="synthesis"] .bbp-calendar-step:hover { color: var(--accent-tech); border-color: var(--accent-tech); }
html[data-style="synthesis"] .bbp-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
html[data-style="synthesis"] .bbp-days > span { display: grid; min-height: 32px; place-items: center; color: var(--text-secondary); font: 700 11px var(--font-mono); }
html[data-style="synthesis"] .bbp-days > a { position: relative; display: grid; min-height: 50px; place-items: center; color: var(--text-secondary); background: var(--bg-surface-2); border: 1px solid var(--border-subtle); border-radius: 9px; font: 650 14px var(--font-mono); text-decoration: none; transition: border-color .15s, color .15s, background .15s; }
html[data-style="synthesis"] .bbp-days > a.has-posts { color: var(--text-primary); border-color: rgba(34,229,139,.34); }
html[data-style="synthesis"] .bbp-days > a.has-posts::after { position: absolute; bottom: 5px; width: 5px; height: 5px; background: var(--accent-tech); border-radius: 50%; content: ""; }
html[data-style="synthesis"] .bbp-days > a:hover, html[data-style="synthesis"] .bbp-days > a[aria-current="date"] { color: #07110c; background: var(--accent-tech); border-color: var(--accent-tech); }
html[data-style="synthesis"] .bbp-days > a small { display: none; }
html[data-style="synthesis"] .bbp-calendar-legend { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; color: var(--text-secondary); font-size: 11px; }
html[data-style="synthesis"] .bbp-calendar-legend span { width: 7px; height: 7px; background: var(--accent-tech); border-radius: 50%; }
html[data-style="synthesis"] .bbp-calendar-status { margin: 0 0 18px; color: var(--text-secondary); font: 700 12px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
html[data-style="synthesis"] .bbp-calendar-results { min-height: 180px; }
html[data-style="synthesis"] .bbp-calendar-results .post-card, html[data-style="synthesis"] .bbp-calendar-results article { margin-bottom: 12px; }
html[data-style="synthesis"] .bbp-calendar-pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
html[data-style="synthesis"] .bbp-calendar-pagination a { display: grid; min-width: 38px; min-height: 38px; place-items: center; color: var(--text-primary); background: var(--bg-surface-2); border: 1px solid var(--border-subtle); border-radius: 8px; text-decoration: none; }
html[data-style="synthesis"] .bbp-calendar-pagination a[aria-current="page"], html[data-style="synthesis"] .bbp-calendar-pagination a:hover { color: #07110c; background: var(--accent-tech); border-color: var(--accent-tech); }
@media (max-width: 850px) { html[data-style="synthesis"] .bbp-calendar-layout { grid-template-columns: 1fr; } }
@media (max-width: 520px) { html[data-style="synthesis"] .bbp-calendar { padding: 14px; border-radius: 13px; } html[data-style="synthesis"] .bbp-calendar-board { padding: 13px; } html[data-style="synthesis"] .bbp-days { gap: 4px; } html[data-style="synthesis"] .bbp-days > a { min-height: 42px; font-size: 12px; } html[data-style="synthesis"] .bbp-calendar-tools select { min-width: 0; max-width: 190px; } }

/* Articolo singolo Synthesis: contenuto editoriale, colonna laterale e commenti WordPress sotto il testo. */
html[data-style="synthesis"] .single-page { max-width: 1140px; margin: 36px auto 0; padding-inline: 24px; }
html[data-style="synthesis"] .single-page > .single-wrap { margin: 0; padding: 0; }
html[data-style="synthesis"] .single-page > .post-comments-wrap { max-width: 760px; margin: 54px auto 0; }
html[data-style="synthesis"] .single-page > .post-comments-wrap .comments-area { max-width: none; margin: 0; padding: 26px; background: var(--bg-surface-1); border: 1px solid var(--border-subtle); border-left: 3px solid var(--accent-tech); border-radius: 12px; }
html[data-style="synthesis"] .single-page > .bb-synthesis-related { max-width: 760px; margin: 54px auto 0; }
html[data-style="synthesis"] .bb-sidebar-event__date { margin: 8px 0 4px; color: var(--accent-tech); font-size: 13px; font-weight: 750; }
html[data-style="synthesis"] .bb-sidebar-event__location { margin: 0 0 8px; font-size: 11px; }
html[data-style="synthesis"] .bb-sidebar-event .bbp-event { margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
html[data-style="synthesis"] .bb-sidebar-event .bbp-event-actions { display: grid; gap: 8px; margin: 10px 0 0; }
html[data-style="synthesis"] .bb-sidebar-event .bbp-event-actions a { display: inline-flex; justify-content: center; background: var(--bg-surface-2); border: 1px solid var(--border-subtle); color: var(--text-primary); border-radius: 8px; }
html[data-style="synthesis"] .bb-sidebar-event .bbp-event-actions a:hover { border-color: var(--accent-tech); color: var(--accent-tech); }
html[data-style="synthesis"] .bb-sidebar-metadata { display: grid; gap: 5px; }
html[data-style="synthesis"] .bb-sidebar-metadata .synthesis-sidenote__tag { margin-bottom: 2px; }
html[data-style="synthesis"] .bb-comments-count-pill { text-decoration: none; }
html[data-style="synthesis"] .bb-sidebar-comments-link { color: var(--accent-tech); font-size: 11px; font-weight: 650; }
html[data-style="synthesis"] .post-comments-wrap .comment-list { margin: 20px 0; }
html[data-style="synthesis"] .post-comments-wrap .comment-list .comment { border-top-color: var(--border-subtle); }
@media (max-width: 1100px) { html[data-style="synthesis"] .single-page { padding-inline: 20px; } }
@media (max-width: 760px) { html[data-style="synthesis"] .single-page { margin-top: 20px; padding-inline: 16px; } html[data-style="synthesis"] .single-page > .post-comments-wrap .comments-area { padding: 20px 16px; } }

/* Palette chiara Synthesis, selezionabile dal toggle globale del tema. */
html[data-style="synthesis"][data-theme="light"] {
  color-scheme: light;
  --bg-canvas: #f4f6f5;
  --bg-surface-1: #ffffff;
  --bg-surface-2: #e9eeeb;
  --bg-surface-code: #e4e9e6;
  --border-subtle: rgba(16, 31, 23, .12);
  --border-hover: rgba(16, 31, 23, .24);
  --text-primary: #17211b;
  --text-secondary: #5d6a62;
  --accent-tech: #087a49;
  --accent-design: #a21caf;
  --accent-flash: #8b6500;
  --paper: var(--bg-canvas);
  --paper-2: var(--bg-surface-1);
  --ink: var(--text-primary);
  --ink-soft: var(--text-secondary);
  --line: var(--border-subtle);
  --accent: var(--accent-tech);
  --accent-deep: #075d39;
  --accent-on-dark: var(--accent-tech);
  --olive: var(--accent-tech);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
}
html[data-style="synthesis"][data-theme="light"] body { background: var(--bg-canvas); color: var(--text-primary); }
html[data-style="synthesis"][data-theme="light"] .bbp-calendar { background: linear-gradient(145deg, #fff, #eef2ef); box-shadow: 0 18px 52px rgba(25, 43, 32, .09); }
html[data-style="synthesis"][data-theme="light"] .bbp-calendar-board,
html[data-style="synthesis"][data-theme="light"] .bbp-days > a { background: rgba(20, 44, 29, .035); }
html[data-style="synthesis"][data-theme="light"] .bbp-days > a.has-posts { background: rgba(8, 122, 73, .09); }
html[data-style="synthesis"][data-theme="light"] .bbp-days > a:hover,
html[data-style="synthesis"][data-theme="light"] .bbp-days > a[aria-current="date"] { color: #fff; }
html[data-style="synthesis"][data-theme="light"] .bbp-calendar-pagination a[aria-current="page"],
html[data-style="synthesis"][data-theme="light"] .bbp-calendar-pagination a:hover { color: #fff; }
html[data-style="synthesis"][data-theme="light"] .post-card,
html[data-style="synthesis"][data-theme="light"] .ev-card,
html[data-style="synthesis"][data-theme="light"] .archive-tile,
html[data-style="synthesis"][data-theme="light"] .synthesis-sidenote,
html[data-style="synthesis"][data-theme="light"] .comments-area { box-shadow: 0 8px 28px rgba(25, 43, 32, .06); }
