/**
 * RadarAddress — Foglio di stile principale
 * Aria di famiglia con RadarWave / RadarQuick / DB-Quick
 *
 * Palette: arancio/oro (radarquick-orange + dbquick-gold)
 * Tipografia: Inter + Space Grotesk display
 */

/* ===============================================
   VARIABILI CSS
   =============================================== */
:root {
    /* Brand RadarAddress */
    --ra-orange:       #e85520;
    --ra-orange-dark:  #c44214;
    --ra-orange-light: #f06b38;
    --ra-amber:        #f0a020;
    --ra-gold:         #b8860b;
    --ra-gold-dark:    #996f00;

    /* Sintesi brand */
    --primary:         var(--ra-orange);
    --primary-dark:    var(--ra-orange-dark);
    --primary-light:   var(--ra-orange-light);
    --accent:          var(--ra-amber);

    /* Stati */
    --success:  #10b981;
    --warning:  #f59e0b;
    --error:    #ef4444;
    --info:     #3b82f6;

    /* Neutri */
    --white:    #ffffff;
    --bg:       #fafafa;
    --bg-soft:  #f5f5f4;
    --bg-card:  #ffffff;
    --border:   #e5e7eb;
    --border-strong: #d1d5db;
    --text:     #111827;
    --text-soft:#4b5563;
    --text-muted:#9ca3af;

    /* Ombre */
    --shadow-sm:  0 1px 2px rgba(0,0,0,0.05);
    --shadow-md:  0 4px 10px rgba(0,0,0,0.08);
    --shadow-lg:  0 10px 25px rgba(0,0,0,0.10);
    --shadow-brand: 0 10px 25px rgba(232, 85, 32, 0.25);

    /* Tipografia */
    --font-sans:    'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', 'Consolas', 'Monaco', monospace;

    /* Spaziature */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.25rem;
    --sp-6: 1.5rem;
    --sp-8: 2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;
    --sp-16: 4rem;
    --sp-20: 5rem;

    /* Raggi */
    --radius-sm: 6px;
    --radius:    10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-pill: 999px;

    /* Transizioni */
    --t-fast: 0.15s ease;
    --t:      0.25s ease;

    /* Gradienti brand */
    --grad-primary: linear-gradient(135deg, var(--ra-orange) 0%, var(--ra-orange-dark) 100%);
    --grad-warm:    linear-gradient(135deg, var(--ra-orange) 0%, var(--ra-amber) 100%);
    --grad-hero:    linear-gradient(135deg, #fff7ed 0%, #ffedd5 50%, #fed7aa 100%);
    --grad-gold:    linear-gradient(135deg, var(--ra-gold) 0%, var(--ra-orange) 100%);
}

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

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--primary-dark); text-decoration: underline; }

button { font-family: inherit; cursor: pointer; }

/* ===============================================
   TIPOGRAFIA
   =============================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text);
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p { color: var(--text-soft); }

.text-gradient {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    background: rgba(232, 85, 32, 0.08);
    border: 1px solid rgba(232, 85, 32, 0.25);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.eyebrow::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

/* Skip link a11y */
.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--primary); color: #fff;
    padding: 0.6rem 1rem; border-radius: 0 0 6px 6px;
    z-index: 100;
}
.skip-link:focus { left: 1rem; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ===============================================
   LAYOUT
   =============================================== */
.container { max-width: 1180px; margin: 0 auto; padding: 0 var(--sp-6); }
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 var(--sp-6); }

main { min-height: calc(100vh - 200px); }

section { padding: var(--sp-16) 0; }
section.compact { padding: var(--sp-10) 0; }

/* ===============================================
   HEADER + NAV (aria di famiglia radarwave)
   =============================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--sp-4);
    padding-bottom: var(--sp-4);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-logo {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: var(--grad-warm);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    box-shadow: var(--shadow-brand);
    flex-shrink: 0;
}
.brand-text { line-height: 1.1; }
.brand-text strong {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}
.brand-text span {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary);
    margin-top: 2px;
}

.site-nav { display: flex; gap: 0.25rem; align-items: center; }
.site-nav a {
    padding: 0.5rem 0.95rem;
    border-radius: var(--radius-pill);
    color: var(--text-soft);
    font-weight: 500;
    font-size: 0.92rem;
    transition: all var(--t-fast);
}
.site-nav a:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.site-nav a.active { color: var(--text); background: var(--bg-soft); }

/* Override: il bottone Accedi è un .btn-primary dentro .site-nav. Senza questa
   regola la specificità di ".site-nav a" sovrascriverebbe il color:#fff del btn. */
.site-nav a.btn-primary,
.site-nav a.btn-primary:hover,
.site-nav a.btn-primary:focus {
    color: #fff;
    background: var(--grad-primary);
}

.nav-toggle { display: none; background: none; border: 1px solid var(--border); padding: 0.5rem; border-radius: 8px; }
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; }
    .site-nav { display: none; }
    .site-nav.open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: #fff;
        padding: var(--sp-3) var(--sp-4);
        border-bottom: 1px solid var(--border);
        gap: 2px;
    }
    .site-nav.open a { padding: 0.7rem 0.95rem; border-radius: 8px; }
}

/* ===============================================
   BOTTONI
   =============================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    transition: all var(--t-fast);
    cursor: pointer;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn-primary {
    background: var(--grad-primary);
    color: #fff;
    box-shadow: var(--shadow-brand);
}
.btn-primary:hover { color: #fff; box-shadow: 0 14px 30px rgba(232, 85, 32, 0.35); }
.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-soft); }
.btn-ghost {
    background: transparent;
    color: var(--primary);
}
.btn-ghost:hover { background: rgba(232, 85, 32, 0.08); }
.btn-lg { padding: 0.95rem 1.85rem; font-size: 1rem; }
.btn-md { padding: 0.6rem 1.2rem; font-size: 0.9rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ===============================================
   HERO
   =============================================== */
.hero {
    position: relative;
    overflow: hidden;
    padding: var(--sp-20) 0 var(--sp-16);
    background: var(--grad-hero);
}
.hero::before {
    content: '';
    position: absolute;
    top: -200px; right: -200px;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(240, 160, 32, 0.25) 0%, transparent 70%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -150px; left: -150px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(232, 85, 32, 0.15) 0%, transparent 70%);
    pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-10);
    align-items: center;
}
@media (min-width: 960px) {
    .hero-grid { grid-template-columns: 1.15fr 1fr; gap: var(--sp-16); }
}
.hero h1 { margin: var(--sp-4) 0 var(--sp-5); }
.hero .lead { font-size: 1.15rem; color: var(--text-soft); margin-bottom: var(--sp-6); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-6); }

/* Visualizzazione "radar" trasformazione esempio (mockup) */
.hero-visual {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: var(--sp-6);
    border: 1px solid var(--border);
}
.transform-card {
    border-radius: var(--radius);
    padding: var(--sp-4);
    margin-bottom: var(--sp-3);
}
.transform-card .label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--sp-1);
}
.transform-card.input {
    background: #fef2f2;
    border-left: 4px solid #fca5a5;
}
.transform-card.input .text { font-family: var(--font-mono); color: #991b1b; }
.transform-card.output {
    background: #ecfdf5;
    border-left: 4px solid var(--success);
}
.transform-card.output .text { font-family: var(--font-mono); color: #065f46; }
.transform-arrow {
    text-align: center;
    color: var(--primary);
    margin: var(--sp-2) 0;
    font-size: 1.5rem;
}

/* ===============================================
   CARD GENERICA
   =============================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--sp-6);
    transition: all var(--t);
}
.card:hover {
    transform: translateY(-3px);
    border-color: rgba(232, 85, 32, 0.3);
    box-shadow: var(--shadow-md);
}
.card-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--grad-warm);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: var(--sp-4);
    box-shadow: var(--shadow-brand);
}
.card h3 { margin-bottom: var(--sp-2); }

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.section-head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto var(--sp-12);
}
.section-head h2 { margin: var(--sp-3) 0 var(--sp-3); }
.section-head p { font-size: 1.05rem; }

/* ===============================================
   FORM
   =============================================== */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--sp-5) var(--sp-6);
    box-shadow: var(--shadow-md);
}
@media (max-width: 600px) {
    .form-card { padding: var(--sp-4); }
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--sp-3);
}
.field { display: flex; flex-direction: column; gap: 0.2rem; }
.field.col-12 { grid-column: span 12; }
.field.col-8 { grid-column: span 8; }
.field.col-6 { grid-column: span 6; }
.field.col-4 { grid-column: span 4; }
.field.col-3 { grid-column: span 3; }
.field.col-2 { grid-column: span 2; }
@media (max-width: 720px) {
    .field[class*="col-"] { grid-column: span 12; }
}
.field label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-soft);
    letter-spacing: 0.01em;
}
.field label .required { color: var(--primary); }
.field .hint { font-size: 0.75rem; color: var(--text-muted); }
.field input[type="text"],
.field input[type="email"],
.field input[type="file"],
.field select,
.field textarea {
    width: 100%;
    padding: 0.45rem 0.7rem;
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232, 85, 32, 0.15);
}
.field textarea { resize: vertical; min-height: 100px; }

.form-actions {
    display: flex; flex-wrap: wrap; gap: var(--sp-3);
    margin-top: var(--sp-4);
    align-items: center;
}

/* ===============================================
   RISULTATO NORMALIZZAZIONE
   =============================================== */
.result {
    margin-top: var(--sp-8);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
}
/* (#1) variante "attaccata" per la pagina verifica: il pannello viene
   subito dopo il titolo, niente margin-top da pagine marketing. */
.result.result-flush { margin-top: var(--sp-3); }
.result-head {
    padding: var(--sp-5) var(--sp-6);
    background: var(--grad-warm);
    color: #fff;
    display: flex;
    align-items: center;
    gap: var(--sp-4);
}
.result-head.ok    { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.result-head.warn  { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.result-head.error { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.result-head .badge {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    background: rgba(255,255,255,0.25);
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.result-head h3 { color: #fff; margin: 0; font-size: 1.2rem; }
.result-head p { color: rgba(255,255,255,0.92); margin: 0.2rem 0 0; font-size: 0.9rem; }

.result-body { padding: var(--sp-4); }  /* (#12) ridotto da sp-6 a sp-4 — si sommava al padding di .compare */

.compare-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-4);
}
@media (min-width: 720px) {
    .compare-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
}
.compare {
    border-radius: var(--radius);
    padding: var(--sp-3) var(--sp-4);  /* (#4) ridotto */
    border: 1px solid var(--border);
}
@media (max-width: 720px) {
    .compare { padding: var(--sp-3); }
}
.compare h4 {
    font-family: var(--font-sans);
    font-size: 0.68rem;                 /* (#2) ridotto */
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: var(--sp-2);         /* (#2) ridotto da sp-3 */
}
.compare.before { background: #fafafa; }
.compare.after  { background: #ecfdf5; border-color: #a7f3d0; }

/* Badge semantici sulle azioni del motore: valorizzato / normalizzato / modificato.
   Compaiono inline accanto al valore della singola riga modificata. */
.badge-action {
    display: inline-block;
    padding: 0.12rem 0.5rem;
    border-radius: var(--radius-pill);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: lowercase;
    border: 1px solid;
    font-family: var(--font-sans);
    line-height: 1.4;
    white-space: nowrap;
}
.badge-action-valorizzato  { background: #dbeafe; color: #1e40af; border-color: #93c5fd; } /* blu  = arricchito */
.badge-action-normalizzato { background: #fef3c7; color: #92400e; border-color: #fcd34d; } /* ambra = solo forma */
.badge-action-modificato   { background: #fed7aa; color: #9a3412; border-color: #fdba74; } /* arancio = cambio sostanziale */

/* Highlight char-by-char nei valori normalizzati (stessa palette del badge).
   Compare solo se NON tutti i caratteri alfabetici sono cambiati.
   Niente padding orizzontale: il <mark> deve combaciare col char successivo,
   altrimenti "S" evidenziata + "nc" mostrano un gap antiestetico. */
mark.diff-char {
    background: #fef3c7;
    color: #92400e;
    padding: 0;
    border-radius: 2px;
    font-weight: 700;
}

/* Form a sinistra del pannello "verifica": stessa griglia label/input del
   risultato a destra, righe allineate 1:1 con la colonna destra. */
.verify-form-dl input[type="text"] {
    width: 100%;
    padding: 0.4rem 0.6rem;
    font-family: var(--font-sans);        /* (#5) sans-serif: a sinistra si SCRIVE, mono solo a destra */
    font-size: 0.9rem;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    line-height: 1.3;
}
.verify-form-dl input[type="text"]:focus {
    /* (#10) WCAG 2.4.7: outline esplicito oltre al box-shadow */
    outline: 2px solid var(--primary);
    outline-offset: 1px;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232, 85, 32, 0.15);
}
.verify-form-dl label {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-muted);
    cursor: pointer;
}
.verify-form-dl dd { margin: 0; }

/* Stato "vuoto" del pannello destro (prima della verifica): mostra solo
   il placeholder, nasconde la dl che è ancora vuota. */
#ra-after.empty dl,
#ra-after:not(.empty) .verify-after-placeholder { display: none; }
.verify-after-placeholder {
    /* (#6) icona + testo centrati verticalmente; richiamo visivo di "trasformazione" */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: var(--sp-2);
    padding: var(--sp-6) var(--sp-4);
    color: var(--text-muted);
    font-size: 0.88rem;
    min-height: 120px;
}
.verify-after-placeholder svg {
    opacity: 0.35;
    color: var(--success);
}

/* Suggerimenti per esiti "non univoco": l'utente clicca per popolare il form
   e rilanciare la verifica. */
.suggestions {
    margin-top: var(--sp-6);
    padding-top: var(--sp-5);
    border-top: 1px solid var(--border);
}
.suggestions h4 {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--sp-2);
}
.sugg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--sp-3);
}
.sugg-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 0.7rem 0.9rem;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: all var(--t-fast);
}
.sugg-card:hover {
    border-color: var(--primary);
    background: #fff7ed;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.sugg-card .sugg-text {
    font-family: var(--font-mono);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
}
/* (#11) CTA visivamente separata dal dato sopra, a piena larghezza */
.sugg-card .sugg-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 0.3rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(232, 85, 32, 0.15);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary);
    transition: color var(--t-fast);
}
.sugg-card .sugg-cta::after {
    content: '→';
    transition: transform var(--t-fast);
}
.sugg-card:hover .sugg-cta { color: var(--primary-dark); }
.sugg-card:hover .sugg-cta::after { transform: translateX(3px); }
.compare dl {
    display: grid;
    /* prima colonna a larghezza fissa per allineare riga-per-riga le due dl
       (sinistra=form con input, destra=valore statico); senza fissarla, "Indirizzo *"
       e "Indirizzo" hanno larghezze diverse e ogni riga si scompone */
    grid-template-columns: 6.5rem 1fr;
    grid-auto-rows: minmax(2.1rem, auto);   /* altezza minima riga = altezza input */
    gap: 0.3rem 0.85rem;
    font-size: 0.92rem;
    align-items: center;
}
.compare dt { font-weight: 600; color: var(--text-muted); white-space: nowrap; }  /* niente wrap del label */
.compare dd {
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    word-break: break-word;
    /* flusso inline normale: il testo, le <mark> del diff e il badge stanno
       sulla stessa linea senza spazi artificiali tra i caratteri */
}
.compare dd.changed { color: var(--primary-dark); font-weight: 600; }
.compare dd .badge-action { margin-left: 0.5rem; }   /* unico spazio: tra valore e badge */

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    padding-top: var(--sp-5);
    margin-top: var(--sp-5);
    border-top: 1px solid var(--border);
}
.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.7rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-soft);
}
.tag.brand { background: rgba(232, 85, 32, 0.08); border-color: rgba(232, 85, 32, 0.3); color: var(--primary-dark); }

/* ===============================================
   TABELLA
   =============================================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.data-table thead th {
    text-align: left;
    padding: 0.7rem 0.9rem;
    background: var(--bg-soft);
    border-bottom: 2px solid var(--border);
    font-weight: 700;
    color: var(--text);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.data-table tbody td {
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.data-table tbody tr:hover td { background: #fffbeb; }

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #fff;
}

/* ===============================================
   STATISTICHE / NUMERI
   =============================================== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--sp-5);
    padding: var(--sp-6);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}
.stat .num {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
}
.stat .label {
    color: var(--text-soft);
    font-size: 0.88rem;
    margin-top: var(--sp-1);
}

/* ===============================================
   CODE BLOCK / API DOC
   =============================================== */
.code-block {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: var(--radius);
    padding: var(--sp-4) var(--sp-5);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.55;
}
.code-block .k { color: #fb923c; }
.code-block .s { color: #86efac; }
.code-block .n { color: #93c5fd; }
.code-block .c { color: #64748b; font-style: italic; }

.endpoint {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    margin: var(--sp-3) 0;
}
.method {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}
.method.post { background: #10b981; }
.method.get  { background: #3b82f6; }

/* ===============================================
   FAQ
   =============================================== */
.faq details {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    margin-bottom: var(--sp-3);
    background: #fff;
    transition: border-color var(--t-fast);
}
.faq details[open] { border-color: rgba(232, 85, 32, 0.4); }
.faq summary {
    padding: var(--sp-4) var(--sp-5);
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--sp-3);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    line-height: 1;
    transition: transform var(--t-fast);
}
.faq details[open] summary::after { content: '−'; }
.faq details > p { padding: 0 var(--sp-5) var(--sp-5); margin: 0; }

/* ===============================================
   FOOTER
   =============================================== */
.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: var(--sp-12) 0 var(--sp-6);
    margin-top: var(--sp-20);
}
.site-footer h4 {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: var(--sp-4);
}
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: var(--primary-light); }
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--sp-8);
    margin-bottom: var(--sp-8);
}
@media (max-width: 800px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand p { color: #94a3b8; margin-top: var(--sp-3); font-size: 0.92rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.92rem; }
.footer-bottom {
    padding-top: var(--sp-6);
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--sp-3);
}

/* ===============================================
   UTILITY
   =============================================== */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.flex { display: flex; }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* Animazione "radar pulse" per icone */
@keyframes radar-pulse {
    0%   { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}
.radar-pulse {
    position: relative;
}
.radar-pulse::before,
.radar-pulse::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--primary);
    animation: radar-pulse 2.4s linear infinite;
}
.radar-pulse::after { animation-delay: 1.2s; }

/* fade-in iniziale */
@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fade-in-up 0.6s ease-out both; }
