/* ─────────────────────────────────────────────────────────────
   VerificaTarga — Design System
   Colore accento: giallo ombroso (#F59E0B / #FBBF24)
   ───────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/inter-var-latin.woff2?v=20261013') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Giallo ombroso (accento principale) */
  --gold-50:  #FFFBEB;
  --gold-100: #FEF3C7;
  --gold-200: #FDE68A;
  --gold-300: #FCD34D;
  --gold-400: #FBBF24;
  --gold-500: #F59E0B;
  --gold-600: #D97706;
  --gold-700: #B45309;
  --gold-800: #92400E;

  /* Neutri */
  --gray-50:  #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;

  /* Successo / Errore */
  --green-50:  #F0FDF4;
  --green-500: #22C55E;
  --green-600: #16A34A;
  --red-50:    #FFF1F2;
  --red-400:   #FB7185;
  --red-500:   #F43F5E;
  --amber-50:  #FFFBEB;
  --amber-500: #F59E0B;

  /* Tipografia */
  --font: 'Inter', system-ui, -apple-system, sans-serif;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg:  0 10px 40px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.05);
  --shadow-sky: 0 4px 24px rgba(245,158,11,.25);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── HEADER ──────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.logo-icon { width: 36px; height: 36px; flex-shrink: 0; }

.logo-text {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--gray-700);
  letter-spacing: -.01em;
}
.logo-text strong { color: var(--gold-700); font-weight: 700; }

.nav-link {
  font-size: .875rem;
  font-weight: 500;
  color: var(--gray-500);
  text-decoration: none;
  transition: color .15s;
}
.nav-link:hover { color: var(--gold-600); }

/* ── MAIN ────────────────────────────────────────────────────── */
.main { flex: 1; }

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 24px 96px;
  background: linear-gradient(160deg, #FFFFFF 0%, var(--gold-50) 50%, var(--gold-100) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--gold-50);
  border: 1px solid var(--gold-200);
  font-size: .8rem;
  font-weight: 500;
  color: var(--gold-700);
  margin-bottom: 24px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-500);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .7; transform: scale(1.3); }
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
  letter-spacing: -.03em;
  margin-bottom: 16px;
}

.accent { color: var(--gold-500); }

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--gray-500);
  max-width: 480px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* ── SEARCH CARD ─────────────────────────────────────────────── */
.search-card {
  background: white;
  border-radius: var(--r-xl);
  padding: 28px 28px 20px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-100);
  max-width: 540px;
  margin: 0 auto;
}

.search-form {
  display: flex;
  gap: 12px;
}

.input-wrapper {
  position: relative;
  flex: 1;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--gray-400);
  pointer-events: none;
}

.targa-input {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 44px;
  border: 2px solid var(--gray-200);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  letter-spacing: .12em;
  text-transform: uppercase;
  background: var(--gray-50);
  transition: border-color .15s, box-shadow .15s, background .15s;
  outline: none;
}

.targa-input::placeholder {
  color: var(--gray-300);
  font-weight: 400;
  letter-spacing: .04em;
}

.targa-input:focus {
  border-color: var(--gold-400);
  box-shadow: 0 0 0 4px rgba(251,191,36,.15);
  background: white;
}

.search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 24px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  border: none;
  border-radius: var(--r-md);
  color: white;
  font-family: var(--font);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, filter .15s;
  white-space: nowrap;
  box-shadow: var(--shadow-sky);
}

.search-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 30px rgba(245,158,11,.35);
}

.search-btn:active:not(:disabled) { transform: translateY(0); }

.search-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.btn-icon { width: 18px; height: 18px; }

.search-hint {
  margin-top: 12px;
  font-size: .78rem;
  color: var(--gray-500);
  text-align: center;
}

/* ── DECORAZIONI SFONDO ──────────────────────────────────────── */
.hero-decoration { position: absolute; inset: 0; pointer-events: none; }

.deco-circle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-200), transparent 70%);
  opacity: .5;
}

.deco-1 { width: 500px; height: 500px; top: -200px; right: -150px; }
.deco-2 { width: 300px; height: 300px; bottom: -100px; left: -80px; }
.deco-3 { width: 200px; height: 200px; top: 40%; left: 10%; opacity: .3; }

/* ── LOADING ─────────────────────────────────────────────────── */
.loading-section {
  padding: 80px 24px;
  display: flex;
  justify-content: center;
}

.loading-card {
  background: white;
  border-radius: var(--r-xl);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-100);
  text-align: center;
  max-width: 440px;
  width: 100%;
}

/* Spinner doppio anello */
.spinner {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
}

.spinner-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--gold-500);
  animation: spin 1s linear infinite;
}

.spinner-ring--delay {
  border-top-color: var(--gold-300);
  animation-duration: 1.5s;
  animation-direction: reverse;
  inset: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 8px;
}

.loading-text p {
  font-size: .9rem;
  color: var(--gray-500);
  margin-bottom: 28px;
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  background: var(--gray-50);
  border-radius: var(--r-md);
  padding: 16px 20px;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .875rem;
  color: var(--gray-400);
  font-weight: 500;
  transition: color .3s;
}

.step--active { color: var(--gray-700); }
.step--done   { color: var(--green-600); }

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gray-300);
  flex-shrink: 0;
  transition: background .3s;
}

.step-dot--active {
  background: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(245,158,11,.2);
  animation: pulse 1.5s infinite;
}

.step-dot--done { background: var(--green-500); box-shadow: none; }

/* ── RESULTS ─────────────────────────────────────────────────── */
.results-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.results-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -.02em;
}

.results-targa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: .9rem;
  color: var(--gray-500);
  font-weight: 500;
}

.results-targa::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-400);
}

.new-search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-md);
  border: 2px solid var(--gray-200);
  background: white;
  color: var(--gray-600);
  font-family: var(--font);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
}

.new-search-btn svg { width: 16px; height: 16px; }

.new-search-btn:hover {
  border-color: var(--gold-400);
  color: var(--gold-600);
  box-shadow: 0 2px 8px rgba(245,158,11,.15);
}

/* ── SUMMARY GRID ────────────────────────────────────────────── */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.summary-card {
  background: white;
  border-radius: var(--r-lg);
  padding: 20px 24px;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
}

.summary-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.summary-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -.02em;
}

.summary-sub {
  font-size: .8rem;
  color: var(--gray-500);
  margin-top: 2px;
}

/* ── TABLE ───────────────────────────────────────────────────── */
.table-wrapper {
  background: white;
  border-radius: var(--r-xl);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.revisions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

.revisions-table thead {
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-100);
}

.revisions-table th {
  padding: 14px 20px;
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}

.revisions-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: middle;
}

.revisions-table tbody tr:last-child td { border-bottom: none; }

.revisions-table tbody tr {
  transition: background .12s;
}
.revisions-table tbody tr:hover { background: var(--gold-50); }

/* ── BADGE ESITO ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge--ok {
  background: var(--green-50);
  color: var(--green-600);
  border: 1px solid #BBF7D0;
}

.badge--fail {
  background: var(--red-50);
  color: var(--red-500);
  border: 1px solid #FECDD3;
}

.badge--partial {
  background: var(--amber-50);
  color: var(--amber-500);
  border: 1px solid #FDE68A;
}

.badge-icon { width: 10px; height: 10px; border-radius: 50%; }
.badge--ok   .badge-icon { background: var(--green-500); }
.badge--fail .badge-icon { background: var(--red-500); }
.badge--partial .badge-icon { background: var(--amber-500); }

.km-value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--gray-800);
}

.targa-chip {
  font-weight: 700;
  letter-spacing: .08em;
  font-size: .85rem;
  background: var(--gold-50);
  color: var(--gold-700);
  border: 1px solid var(--gold-200);
  padding: 3px 8px;
  border-radius: var(--r-sm);
}

/* ── RESULTS FOOTER ──────────────────────────────────────────── */
.results-footer {
  margin-top: 20px;
  font-size: .78rem;
  color: var(--gray-400);
  text-align: center;
}

.results-footer a {
  color: var(--gold-500);
  text-decoration: none;
}
.results-footer a:hover { text-decoration: underline; }

/* ── EMPTY STATE ─────────────────────────────────────────────── */
.empty-section,
.error-section {
  padding: 80px 24px;
  display: flex;
  justify-content: center;
}

.empty-card,
.error-card {
  background: white;
  border-radius: var(--r-xl);
  padding: 56px 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-100);
  text-align: center;
  max-width: 460px;
  width: 100%;
}

.empty-icon,
.error-icon {
  margin: 0 auto 24px;
  width: 80px;
  height: 80px;
}

.empty-card h3,
.error-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 10px;
}

.empty-card p,
.error-card p {
  font-size: .95rem;
  color: var(--gray-500);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.footer {
  background: white;
  border-top: 1px solid var(--gray-100);
  padding: 20px 24px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
  font-size: .78rem;
  color: var(--gray-400);
}

/* ── UTILITIES ───────────────────────────────────────────────── */
[hidden] { display: none !important; }

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeSlideUp .4s ease-out forwards;
}

/* ── RATE LIMIT INFO ─────────────────────────────────────────── */
.rate-limit-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  padding: 7px 14px;
  border-radius: 100px;
  background: var(--gold-50);
  border: 1px solid var(--gold-200);
  font-size: .78rem;
  font-weight: 500;
  color: var(--gold-700);
  transition: background .2s, border-color .2s, color .2s;
}

.rate-limit-info.rate--warning {
  background: #FFFBEB;
  border-color: #FDE68A;
  color: #92400E;
}

.rate-limit-info.rate--exhausted {
  background: #FFF1F2;
  border-color: #FECDD3;
  color: var(--red-500);
}

.rate-icon { font-size: .85rem; line-height: 1; }

/* ── MODAL ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn .2s ease-out;
}

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

.modal-card {
  position: relative;
  background: white;
  border-radius: var(--r-2xl);
  padding: 48px 40px 36px;
  box-shadow: 0 24px 64px rgba(0,0,0,.18), 0 8px 24px rgba(0,0,0,.08);
  max-width: 480px;
  width: 100%;
  text-align: center;
  animation: slideUp .25s ease-out;
}

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

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  cursor: pointer;
  color: var(--gray-500);
  transition: background .15s, color .15s;
}

.modal-close svg { width: 16px; height: 16px; }
.modal-close:hover { background: var(--gray-200); color: var(--gray-700); }

.modal-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -.02em;
  margin-bottom: 12px;
}

.modal-desc {
  font-size: .95rem;
  color: var(--gray-500);
  line-height: 1.65;
  margin-bottom: 28px;
}

.modal-desc strong { color: var(--gray-700); }

/* Upgrade box */
.modal-upgrade-box {
  background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
  border: 1px solid var(--gold-200);
  border-radius: var(--r-lg);
  padding: 24px 20px 20px;
  margin-bottom: 20px;
}

.upgrade-badge {
  display: inline-block;
  padding: 3px 10px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: white;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.upgrade-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 8px;
}

.upgrade-desc {
  font-size: .85rem;
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 16px;
}

.upgrade-btn {
  display:         flex;
  align-items:     center;
  justify-content: center;
  gap:             8px;
  width:           100%;
  padding:         13px 20px;
  background:      linear-gradient(135deg, var(--gold-400), var(--gold-600));
  border:          none;
  border-radius:   var(--r-md);
  color:           white;
  font-family:     var(--font);
  font-size:       .88rem;
  font-weight:     600;
  cursor:          pointer;
  opacity:         1;
  margin-bottom:   8px;
  transition:      filter .15s, transform .15s, box-shadow .15s;
  box-shadow:      var(--shadow-sky);
}

.upgrade-btn:hover:not(:disabled) {
  filter:    brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(245,158,11,.35);
}

.upgrade-btn:active:not(:disabled) { transform: translateY(0); }

.upgrade-btn:disabled {
  cursor:  not-allowed;
  opacity: .55;
}

.upgrade-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.upgrade-note {
  font-size: .75rem;
  color: var(--gold-600);
  opacity: .8;
}

.modal-dismiss {
  width: 100%;
  padding: 11px 16px;
  background: transparent;
  border: 2px solid var(--gray-200);
  border-radius: var(--r-md);
  color: var(--gray-500);
  font-family: var(--font);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.modal-dismiss:hover {
  border-color: var(--gray-300);
  color: var(--gray-700);
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 56px 16px 72px; }
  .search-form { flex-direction: column; }
  .search-btn { width: 100%; justify-content: center; }
  .search-card { padding: 20px 16px 16px; }
  .results-header { flex-direction: column; }
  .results-section { padding: 40px 16px 60px; }
  .revisions-table { font-size: .82rem; }
  .revisions-table th,
  .revisions-table td { padding: 12px 12px; }
  .loading-card { padding: 36px 24px; }
  .modal-card { padding: 40px 24px 28px; }
}

/* ══════════════════════════════════════════════════════════════
   STRIPE CHECKOUT — Nuovi elementi UI
   ══════════════════════════════════════════════════════════════ */

/* ── Modal ampliato per il checkout ──────────────────────────── */
.modal-card--checkout {
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

/* ── Step management ─────────────────────────────────────────── */
.modal-step[hidden] { display: none; }

/* ── Prezzo in evidenza ──────────────────────────────────────── */
.price-display {
  display:         flex;
  align-items:     baseline;
  gap:             8px;
  justify-content: center;
  margin:          16px 0 20px;
}

.price-amount {
  font-size:   2rem;
  font-weight: 700;
  color:       var(--gray-900);
}

.price-unit {
  font-size:  .875rem;
  color:      var(--gray-500);
  font-weight: 400;
}

/* ── Badge sicurezza ─────────────────────────────────────────── */
.upgrade-note {
  display:     flex;
  align-items: center;
  gap:         5px;
  font-size:   .75rem;
  color:       var(--gray-500);
  justify-content: center;
  margin-top:  10px;
}

/* ── Topbar step 2 (checkout) ────────────────────────────────── */
.checkout-topbar {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  margin-bottom:   20px;
  padding-bottom:  16px;
  border-bottom:   1px solid var(--gray-200);
}

.checkout-back-btn {
  display:      flex;
  align-items:  center;
  gap:          6px;
  background:   none;
  border:       none;
  color:        var(--gray-600);
  font-size:    .875rem;
  font-weight:  500;
  cursor:       pointer;
  padding:      6px 10px;
  border-radius: var(--r-sm);
  transition:   background .15s, color .15s;
}

.checkout-back-btn:hover {
  background: var(--gray-100);
  color:      var(--gray-900);
}

.checkout-topbar-info {
  display:     flex;
  align-items: center;
  gap:         5px;
  font-size:   .75rem;
  color:       var(--gray-500);
}

/* ── Spinner checkout loading ────────────────────────────────── */
.checkout-loading {
  display:         flex;
  flex-direction:  column;
  align-items:     center;
  gap:             14px;
  padding:         40px 0;
  color:           var(--gray-500);
  font-size:       .9rem;
}

.checkout-spinner {
  width:        36px;
  height:       36px;
  border:       3px solid var(--gray-200);
  border-top:   3px solid var(--gold-500);
  border-radius: 50%;
  animation:    spin .7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Container Stripe embedded ───────────────────────────────── */
#checkout-container {
  min-height: 100px;
}

/* Stripe monta un iframe, assicuriamo che occupi tutta la larghezza */
#checkout-container iframe {
  width: 100% !important;
}

/* ── Pulsante verde (step 3) ─────────────────────────────────── */
.upgrade-btn--green {
  background: linear-gradient(135deg, #16A34A 0%, #15803D 100%);
}

.upgrade-btn--green:hover {
  background: linear-gradient(135deg, #15803D 0%, #166534 100%);
}

/* ── Step 3 — crediti acquistati ─────────────────────────────── */
.success-circle {
  width:  72px;
  height: 72px;
  margin: 0 auto 20px;
  animation: popIn .4s cubic-bezier(.175, .885, .32, 1.275) both;
}

.success-circle svg {
  width:  100%;
  height: 100%;
}

@keyframes popIn {
  0%   { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.success-credits-box {
  background:    var(--gold-50);
  border:        1.5px solid var(--gold-200);
  border-radius: var(--r-lg);
  padding:       20px;
  text-align:    center;
  margin:        20px 0 24px;
}

.credits-count {
  font-size:   3rem;
  font-weight: 700;
  color:       var(--gold-600);
  line-height: 1;
}

.credits-label {
  font-size:   1rem;
  font-weight: 500;
  color:       var(--gray-700);
  margin-top:  4px;
}

.credits-note {
  font-size:  .78rem;
  color:      var(--gray-500);
  margin-top: 6px;
}

/* ── Banner crediti pagati (sotto il rate limit) ─────────────── */
.paid-credits-info {
  display:       flex;
  align-items:   center;
  gap:           8px;
  margin-top:    8px;
  padding:       8px 12px;
  background:    linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border:        1.5px solid #FCD34D;
  border-radius: var(--r-sm);
  font-size:     .82rem;
  color:         #92400E;
  font-weight:   500;
}

.paid-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.buy-more-link {
  margin-left:   auto;
  background:    none;
  border:        1.5px solid #D97706;
  color:         #D97706;
  font-size:     .75rem;
  font-weight:   600;
  padding:       3px 10px;
  border-radius: 20px;
  cursor:        pointer;
  transition:    background .15s, color .15s;
  white-space:   nowrap;
  flex-shrink:   0;
}

.buy-more-link:hover {
  background: #D97706;
  color:      #fff;
}

/* ── Bottone "Acquista" (quando limite esaurito) ─────────────── */
.search-btn--upgrade {
  background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
  box-shadow: 0 4px 24px rgba(249,115,22,.35);
  animation:  pulseOrange 2s ease-in-out infinite;
}

.search-btn--upgrade:hover {
  background: linear-gradient(135deg, #EA580C 0%, #C2410C 100%);
}

@keyframes pulseOrange {
  0%, 100% { box-shadow: 0 4px 24px rgba(249,115,22,.35); }
  50%       { box-shadow: 0 4px 32px rgba(249,115,22,.6);  }
}

/* ── RESPONSIVE aggiuntivo checkout ──────────────────────────── */
@media (max-width: 640px) {
  .modal-card--checkout { max-height: 95vh; }
  .price-amount         { font-size: 1.6rem; }
  .credits-count        { font-size: 2.4rem; }
}

/* ═══════════════════════════════════════════════════════════════
   SEZIONE PREZZI — Pricing section
   ═══════════════════════════════════════════════════════════════ */
.pricing-section {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 4rem 1.5rem;
}

.pricing-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.pricing-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.pricing-badge {
  display: inline-block;
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: .3rem .9rem;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: .8rem;
  letter-spacing: .01em;
}

.pricing-title {
  font-size: 1.9rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: .5rem;
  line-height: 1.25;
}

.pricing-sub {
  font-size: 1rem;
  color: #64748b;
}

.pricing-group-label {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
  margin-bottom: 1rem;
}

.pricing-grid {
  display: grid;
  gap: 1.2rem;
}

.pricing-grid--2 { grid-template-columns: repeat(2, 1fr); }
.pricing-grid--3 { grid-template-columns: repeat(3, 1fr); }

.pricing-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.6rem 1.4rem;
  position: relative;
  transition: box-shadow .2s, border-color .2s;
}

.pricing-card:hover {
  box-shadow: 0 8px 28px rgba(217,119,6,.1);
  border-color: #fde68a;
}

.pricing-card--popular {
  border-color: #d97706;
  box-shadow: 0 6px 24px rgba(217,119,6,.15);
}

.pricing-popular-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #d97706, #fbbf24);
  color: white;
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .8rem;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: .04em;
}

.pricing-card-badge {
  font-size: .82rem;
  font-weight: 600;
  color: #b45309;
  margin-bottom: .4rem;
}

.pricing-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: .4rem;
}

.pricing-card-price {
  display: flex;
  align-items: baseline;
  gap: .3rem;
  margin-bottom: .6rem;
}

.price-big {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
}

.price-period {
  font-size: .85rem;
  color: #64748b;
}

.price-save {
  background: #fef3c7;
  color: #92400e;
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: 999px;
  align-self: center;
}

.pricing-card-desc {
  font-size: .85rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.pricing-card-features {
  list-style: none;
  margin-bottom: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.pricing-card-features li {
  font-size: .85rem;
  color: #374151;
}

.pricing-cta-btn {
  width: 100%;
  padding: .65rem;
  background: #f1f5f9;
  color: #0f172a;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}

.pricing-cta-btn:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.pricing-cta-btn--accent {
  background: #b45309;
  color: #fff;
  border-color: #b45309;
}

.pricing-cta-btn--accent:hover {
  background: #92400E;
  border-color: #92400E;
}

.pricing-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin-top: 2rem;
  font-size: .82rem;
  color: var(--gray-500);
}

@media (max-width: 900px) {
  .pricing-grid--3 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .pricing-grid--2 { grid-template-columns: 1fr; }
  .pricing-title   { font-size: 1.4rem; }
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.nav-link--cta {
  color: var(--gold-700);
  font-weight: 600;
  padding: .38rem .9rem;
  border: 1.5px solid rgba(217,119,6,.35);
  border-radius: 6px;
  transition: background .15s, color .15s, border-color .15s;
}
.nav-link--cta:hover {
  background: rgba(251,191,36,.12);
  color: var(--gold-800);
  border-color: var(--gold-500);
}

.how-section {
  padding: 4rem 1.5rem;
  background: white;
  border-top: 1px solid var(--gray-100);
}
.how-inner { max-width: 1000px; margin: 0 auto; }
.how-header { text-align: center; margin-bottom: 2.4rem; }
.how-badge {
  display: inline-block;
  background: var(--gold-50);
  color: var(--gold-700);
  border: 1px solid var(--gold-200);
  border-radius: 999px;
  padding: .3rem .9rem;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: .8rem;
}
.how-title { font-size: 1.9rem; font-weight: 700; color: var(--gray-900); margin-bottom: .5rem; letter-spacing: -.01em; }
.how-sub { color: var(--gray-500); }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.how-card {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-lg);
  padding: 1.7rem 1.5rem;
  counter-increment: howstep;
}
.how-grid { counter-reset: howstep; }
.how-card::before {
  content: counter(howstep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: white;
  font-weight: 700;
  margin-bottom: 1rem;
}
.how-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--gray-900); margin-bottom: .45rem; }
.how-card p { font-size: .92rem; color: var(--gray-500); line-height: 1.65; }
@media (max-width: 760px) {
  .how-grid { grid-template-columns: 1fr; }
  .how-title { font-size: 1.5rem; }
  .header-nav { gap: .9rem; }
  .nav-link--hide-mobile { display: none; }
}

.mini-faq-section {
  padding: 4rem 1.5rem;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-100);
}
.mini-faq-inner { max-width: 760px; margin: 0 auto; }
.mini-faq-title { text-align: center; font-size: 1.8rem; font-weight: 700; color: var(--gray-900); margin-bottom: .5rem; letter-spacing: -.01em; }
.mini-faq-sub { text-align: center; color: var(--gray-500); margin-bottom: 2.2rem; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr 1fr;
  gap: 2.5rem;
  text-align: left;
  padding-bottom: 1.8rem;
}
.footer-logo { font-size: 1.1rem; font-weight: 400; color: var(--gray-700); margin-bottom: .7rem; }
.footer-logo strong { color: var(--gold-700); font-weight: 700; }
.footer-col--brand p { font-size: .82rem; color: var(--gray-500); line-height: 1.7; max-width: 280px; }
.footer-col-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--gray-500);
  margin-bottom: .8rem;
}
.footer-col a {
  display: block;
  font-size: .84rem;
  color: var(--gray-500);
  text-decoration: none;
  padding: .22rem 0;
  transition: color .15s;
}
.footer-col a:hover { color: var(--gold-600); }
.footer-legal {
  border-top: 1px solid var(--gray-100);
  padding-top: 1.2rem;
  text-align: center;
  font-size: .75rem;
  color: var(--gray-500);
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.6rem; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.faq-list { display: grid; gap: .8rem; }
.faq-item {
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.faq-item[open] { border-color: var(--gold-300); box-shadow: var(--shadow-sm); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 3rem 1rem 1.2rem;
  font-weight: 600;
  font-size: .98rem;
  color: var(--gray-800);
  position: relative;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2.5px solid var(--gold-600);
  border-bottom: 2.5px solid var(--gold-600);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s;
}
.faq-item[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq-item__body { padding: 0 1.2rem 1.1rem; color: var(--gray-600); font-size: .93rem; line-height: 1.7; }
.faq-item__body a { color: var(--gold-600); }
.btn-primary {
  display: inline-block;
  background: var(--gold-700);
  color: white;
  font-weight: 600;
  font-size: .93rem;
  padding: .7rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background .15s;
}
.btn-primary:hover { background: var(--gold-800); }
.guide-list { display: grid; gap: 1rem; }
.guide-list--grid { grid-template-columns: 1fr; gap: 1rem; max-width: 860px; margin: 0 auto; }
@media (min-width: 640px) { .guide-list--grid { grid-template-columns: repeat(2, 1fr); } }
.guide-link {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-md);
  padding: 1.3rem 1.4rem;
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s;
}
.guide-link:hover { border-color: var(--gold-300); box-shadow: var(--shadow-sm); }
.guide-link__icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: var(--r-md);
  background: var(--gold-50);
  border: 1px solid var(--gold-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.guide-link__title { font-size: 1.02rem; font-weight: 700; color: var(--gray-900); margin-bottom: .25rem; }
.guide-link__desc { font-size: .88rem; color: var(--gray-500); line-height: 1.55; }
.guide-link__meta { font-size: .75rem; color: var(--gray-400); margin-top: .45rem; }
