:root {
  /* Aliases onto shared.css variables */
  --accent:         #009DE0;  /* = --blue */
  --card-bg:        #1a3347;  /* = --navy2 */
  --border:         rgba(0,157,224,0.18);
  --text-primary:   #ffffff;  /* = --white */
  --text-secondary: #8aabb8;  /* = --gray */
  --text-muted:     #4a6a7a;  /* = --gray2 */
  --bg-secondary:   #1e3d52;  /* = --navy3 */
}

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--blue);
  color: var(--white);
  font-family: 'Inter', 'Novelin', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 16px 32px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, filter 0.2s;
}
.btn-primary:hover { background: var(--blue-lt); filter: brightness(1.06); transform: translateY(-2px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--gray);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 12px 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ═══════════════════════════════════════════════════════
   MagicSaldi — style.css
   Dark navy theme, consistent with MagicScore/MagicPrezzo
   ═══════════════════════════════════════════════════════ */

/* ── WELCOME SCREEN ─────────────────────────────────────────────────────── */
#screen-welcome.active {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#screen-welcome .w-mid-grid {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px 32px;
  gap: 0;
}

#screen-welcome h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
  margin: 0 0 16px;
}

.w-preheadline {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.w-sub {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 560px;
  margin: 0 0 28px;
}

.w-stats-block {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 28px;
  margin-bottom: 28px;
  width: 100%;
  max-width: 480px;
  justify-content: center;
}
.wsb-item { display: flex; flex-direction: column; align-items: center; flex: 1; }
.wsb-num  { font-size: 1.6rem; font-weight: 800; color: var(--accent); line-height: 1; }
.wsb-label{ font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.wsb-sep  { width: 1px; background: var(--border); height: 40px; margin: 0 8px; }

.w-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 480px;
  margin-bottom: 28px;
}
.wf-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: left;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.wf-icon { font-size: 1.2rem; flex-shrink: 0; }

.w-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 12px;
}

.text-accent { color: var(--accent); }

/* ── FORM SCREEN ────────────────────────────────────────────────────────── */
#screen-form.active {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.form-wrap {
  flex: 1;
  max-width: 600px;
  margin: 0 auto;
  padding: 32px 24px 40px;
  width: 100%;
}

.form-headline {
  margin-bottom: 28px;
}
.form-headline h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
}
.form-headline p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.field-group {
  margin-bottom: 24px;
}
.field-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.field-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.input-prefix-wrap {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.input-prefix, .input-suffix {
  padding: 0 14px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  height: 48px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.input-suffix {
  border-right: none;
  border-left: 1px solid var(--border);
}
.input-prefix-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 14px;
  height: 48px;
  font-size: 1rem;
  color: var(--text-primary);
  font-family: inherit;
}
.input-prefix-wrap input::placeholder { color: var(--text-muted); }

/* Weeks grid */
.weeks-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
}
.week-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  padding: 10px 0;
  cursor: pointer;
  transition: all 0.15s;
}
.week-btn:hover   { border-color: var(--accent); color: var(--accent); }
.week-btn.active  { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.cat-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.cat-btn input[type="radio"] { display: none; }
.cat-btn span { display: flex; align-items: center; gap: 6px; }
.cat-btn:hover  { border-color: var(--accent); }
.cat-btn.active { background: rgba(0,157,224,0.12); border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* Channel grid */
.ch-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ch-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s;
  user-select: none;
}
.ch-btn input[type="radio"] { display: none; }
.ch-btn:hover  { border-color: var(--accent); color: var(--accent); }
.ch-btn.active { background: rgba(0,157,224,0.12); border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* Objective stack */
.obj-stack { display: flex; flex-direction: column; gap: 10px; }
.obj-btn {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.15s;
}
.obj-btn input[type="radio"] { display: none; }
.obj-info { display: flex; flex-direction: column; gap: 3px; }
.obj-info strong { font-size: 0.9rem; color: var(--text-primary); }
.obj-info span   { font-size: 0.78rem; color: var(--text-muted); }
.obj-btn:hover  { border-color: var(--accent); }
.obj-btn.active { background: rgba(0,157,224,0.12); border-color: var(--accent); }
.obj-btn.active .obj-info strong { color: var(--accent); }

.form-error {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

/* ── LOADING SCREEN ─────────────────────────────────────────────────────── */
#screen-loading.active {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.loading-wrap {
  text-align: center;
  padding: 40px 24px;
}
.loading-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 24px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-wrap h3 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.loading-sub {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 0 0 24px;
}
.loading-progress {
  width: 260px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto;
  overflow: hidden;
}
.loading-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.4s ease;
}

/* ── RESULTS SCREEN ─────────────────────────────────────────────────────── */
#screen-results.active {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.results-wrap {
  flex: 1;
  max-width: 700px;
  margin: 0 auto;
  padding: 32px 24px 40px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Score section */
.score-section {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}
.score-ring-wrap {
  position: relative;
  flex-shrink: 0;
  width: 120px;
  height: 120px;
}
.score-ring { width: 120px; height: 120px; transform: rotate(-90deg); }
.ring-bg   { fill: none; stroke: var(--border); stroke-width: 10; }
.ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4,0,0.2,1);
}
.score-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.score-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
  margin-top: 3px;
}
.score-meta { flex: 1; }
.score-meta h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.score-meta p { color: var(--text-secondary); font-size: 0.9rem; margin: 0 0 12px; }
.score-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.s-pill {
  display: inline-block;
  background: rgba(0,157,224,0.15);
  border: 1px solid rgba(0,157,224,0.3);
  color: var(--accent);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* Soglia box */
.box-section {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.25);
  border-radius: 12px;
  padding: 18px 20px;
}
.box-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 1px; }
.box-content strong { font-size: 0.9rem; color: #fbbf24; display: block; margin-bottom: 4px; }
.box-content p { font-size: 0.85rem; color: var(--text-secondary); margin: 0; line-height: 1.5; }

/* Semaforo box override (colori neutri, l'emoji porta il colore) */
.semaforo-box {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.1);
}
.semaforo-light {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.semaforo-box .box-content strong { color: var(--text-primary); }

/* Costo box */
.costo-box {
  background: rgba(239,68,68,0.07);
  border-color: rgba(239,68,68,0.2);
}
.costo-box .box-content strong { color: #f87171; }

/* Section title */
.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 16px;
}

/* Timeline */
.timeline-section { /* container */ }
.timeline-scroll { overflow-x: auto; }
.timeline-table {
  width: 100%;
  min-width: 380px;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.timeline-table th {
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.timeline-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}
.timeline-table tbody tr:last-child td { border-bottom: none; }
.timeline-table tbody tr:hover td { background: var(--bg-secondary); }
.timeline-table td:nth-child(2) { font-weight: 700; color: var(--accent); }
.timeline-table td:nth-child(3) { font-weight: 600; color: var(--text-primary); }
.timeline-total td {
  background: var(--bg-secondary);
  border-top: 2px solid var(--border);
  font-size: 0.9rem;
}
.timeline-total td:nth-child(2) { font-weight: 700; color: var(--text-primary); font-size: 1rem; }

/* Compare bars */
.compare-bars { display: flex; flex-direction: column; gap: 16px; }
.cbar-wrap { }
.cbar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.cbar-val { font-weight: 700; color: var(--text-primary); }
.bar-track {
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 5px;
  background: var(--accent);
  width: 0%;
  transition: width 1s ease;
}
.bar-fill--neutral { background: var(--text-muted); }
.badge-better {
  background: rgba(34,197,94,0.15);
  color: #4ade80;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-left: 4px;
}
.compare-note {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

/* AI section */
.ai-section {
  background: linear-gradient(135deg, rgba(0,157,224,0.08) 0%, rgba(0,100,160,0.06) 100%);
  border: 1px solid rgba(0,157,224,0.2);
  border-radius: 16px;
  padding: 24px;
}
.ai-header { margin-bottom: 16px; }
.ai-badge {
  display: inline-block;
  background: rgba(0,157,224,0.15);
  color: var(--accent);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.ai-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.ai-recs {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ai-recs li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.ai-recs li::before {
  content: '→';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.ai-action {
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 14px 16px;
}
.ai-action-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  display: block;
  margin-bottom: 6px;
}
.ai-action p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.5;
}

/* CTA section */
.cta-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
}
.cta-section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px;
}
.cta-section p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0 0 20px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.btn-cta { max-width: 320px; margin: 0 auto; }

/* Google Reviews Carousel */
.rev-section {
  padding: 36px 20px 32px;
  border-top: 1px solid rgba(255,255,255,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, transparent 100%);
}

.rev-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  text-align: center;
  margin-bottom: 24px;
}

/* ── Inner layout: row on desktop, column on mobile ── */
.rev-inner {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Left: rating summary ── */
.rev-summary {
  flex: 0 0 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-right: 4px;
  border-right: 1px solid rgba(255,255,255,0.08);
}

.rev-rating-word {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: var(--white);
}

.rev-stars-row { display: flex; gap: 1px; }

.rev-star {
  font-size: 20px;
  line-height: 1;
  color: #F9AB00;
}

.rev-star--half {
  position: relative;
  overflow: hidden;
  display: inline-block;
  width: 0.55em;
  color: #F9AB00;
}

.rev-count {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  text-align: center;
  line-height: 1.4;
}
.rev-count strong { color: var(--white); }

.rev-glogo {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.rev-glogo-text {
  font-family: 'Product Sans', Arial, sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1;
}

/* ── Carousel wrapper ── */
.rev-carousel {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.rev-viewport {
  flex: 1 1 0;
  overflow: hidden;
  min-width: 0;
}

.rev-track {
  display: flex;
  gap: 16px;
  transition: transform 0.42s cubic-bezier(0.4,0,0.2,1);
  will-change: transform;
}

/* ── Single review card ── */
.rev-card {
  flex: 0 0 100%;
  background: #fff;
  border-radius: 12px;
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  min-width: 0;
}

.rev-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rev-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
}

.rev-meta {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.rev-name {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rev-date {
  font-size: 11px;
  color: #888;
  margin-top: 1px;
}

.rev-g-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.rev-stars-card {
  font-size: 14px;
  color: #F9AB00;
  letter-spacing: 1px;
  line-height: 1;
}

.rev-verified {
  font-size: 11px;
  color: #1a73e8;
  font-weight: 700;
  vertical-align: middle;
}

.rev-text {
  font-size: 12.5px;
  color: #444;
  line-height: 1.55;
  font-family: Arial, sans-serif;
  font-weight: 400;
}

/* ── Nav arrows ── */
.rev-nav {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: var(--white);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  padding: 0;
  padding-bottom: 2px;
}

.rev-nav:hover   { background: rgba(255,255,255,0.14); }
.rev-nav:disabled { opacity: 0.25; cursor: default; }

/* ── Dots ── */
.rev-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
}

.rev-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.2);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s, transform 0.25s;
}

.rev-dot--active {
  background: var(--blue);
  transform: scale(1.25);
}

/* ── Responsive ── */
@media (max-width: 580px) {
  .rev-inner       { flex-direction: column; gap: 20px; }
  .rev-summary     { flex-direction: row; flex: none; width: 100%; border-right: none;
                     border-bottom: 1px solid rgba(255,255,255,0.08);
                     padding-right: 0; padding-bottom: 16px; justify-content: center; gap: 16px; align-items: center; }
  .rev-rating-word { font-size: 22px; }
  .rev-count       { text-align: left; }
  .rev-card        { flex: 0 0 100%; }
}

/* Why MagicStore (pre-CTA) */
.precta-section {
  padding: 0 16px 8px;
  max-width: 820px;
  margin: 0 auto;
}

.precta-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,157,224,0.4), transparent);
  margin-bottom: 36px;
}

.precta-header {
  text-align: center;
  margin-bottom: 28px;
}
.precta-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}
.precta-title {
  font-family: 'Novelin', 'Segoe UI', system-ui, sans-serif;
  font-weight: 900;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--white);
}

.precta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.precta-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius);
  padding: 20px 14px 16px;
  text-align: center;
  transition: background 0.2s, box-shadow 0.2s;
}
.precta-card:hover {
  background: rgba(0,157,224,0.08);
  box-shadow: 0 4px 20px rgba(0,157,224,0.15);
}
.precta-icon-wrap {
  font-size: 26px;
  width: 52px;
  height: 52px;
  background: rgba(0,157,224,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.precta-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
  line-height: 1.35;
}
.precta-card-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  line-height: 1.55;
}

.precta-reassurance {
  background: linear-gradient(135deg, rgba(0,157,224,0.1) 0%, rgba(21,37,53,0.6) 100%);
  border: 1px solid rgba(0,157,224,0.3);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.precta-lead {
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.6;
}
.precta-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  line-height: 1.65;
}
.precta-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.precta-badge-green {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(46,204,113,0.15);
  border: 1px solid rgba(46,204,113,0.4);
  color: #2ecc71;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 99px;
}
.precta-solo {
  font-size: 15px;
  font-style: italic;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}

/* Insight section */
.insight-section { /* container via results-wrap gap */ }
.insight-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.insight-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.insight-card {
  display: flex;
  gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}
.ic-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.ic-body { flex: 1; }
.ic-title { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); margin-bottom: 5px; }
.ic-desc  { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.55; margin-bottom: 8px; }
.ic-link  { font-size: 0.78rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.ic-link:hover { text-decoration: underline; }

/* Results actions */
.results-actions {
  display: flex;
  justify-content: center;
}

/* ── SHARED BUTTON STYLES ───────────────────────────────────────────────── */
.back-link {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-left: auto;
  white-space: nowrap;
}
.back-link:hover { color: var(--text-secondary); }

.back-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.back-btn:hover { color: var(--text-secondary); }

/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .score-section { flex-direction: column; text-align: center; }
  .score-pills   { justify-content: center; }
  .weeks-grid    { grid-template-columns: repeat(4, 1fr); }
  .cat-grid      { grid-template-columns: repeat(2, 1fr); }
  .w-stats-block { padding: 16px 12px; gap: 0; }
  .wsb-num       { font-size: 1.3rem; }
  .timeline-table { font-size: 0.8rem; }
  .timeline-table th, .timeline-table td { padding: 8px 10px; }
}

/* ── Sticky CTA mobile ─────────────────────────────────────── */
@keyframes ctaPulseGlow {
  0%, 100% { box-shadow: 0 6px 24px rgba(0,194,212,0.5), 0 0 0 0 rgba(0,194,212,0.35); }
  50%       { box-shadow: 0 6px 24px rgba(0,194,212,0.5), 0 0 0 12px rgba(0,194,212,0); }
}
.w-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 12px 16px max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(13,27,42,0.98) 0%, rgba(13,27,42,0.82) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 300;
  border-top: 1px solid rgba(0,194,212,0.15);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.w-sticky-cta.visible { transform: translateY(0); }
.btn-cta-sticky {
  width: 100% !important;
  max-width: 420px !important;
  background: #009DE0 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  padding: 15px 24px !important;
  border-radius: 50px !important;
  max-width: 100% !important;
  animation: ctaPulseGlow 2s ease-in-out infinite;
}
@media (max-width: 900px) {
  .w-sticky-cta { display: flex; justify-content: center; align-items: center; }
}

/* ── Sticky CTA: nascosto su mobile (confligge con ai-disclaimer, bottone inline già presente) ── */
@media (max-width: 640px) {
  .w-sticky-cta { display: none !important; }
}

/* ── Carousel mobile: frecce nascoste, swipe + dots ── */
@media (max-width: 580px) {
  .rev-nav      { display: none; }
  .rev-carousel { gap: 0; }
  .rev-dots     { margin-top: 14px; }
  .rev-dot      { width: 8px; height: 8px; }
}
