/* ==========================================================================
   GERMANO.AI — DESIGN SYSTEM ISTITUZIONALE (v0.51)
   Tema chiaro e sobrio, coerente con la Dashboard del programma:
   superfici bianche, ombre morbide e la sfumatura del logo usata solo come accento.
   ========================================================================== */

:root {
    --bg-void: #f4f6f9;
    --bg-deep: #eef2f7;
    --bg-surface: #ffffff;
    --bg-surface-solid: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --bg-soft: #f8fafc;
    --bg-tint: #f1f6fc;
    --bg-terminal: #0d1526;

    --text-main: #0f172a;
    --text-secondary: #334155;
    --text-muted: #56657a;
    --text-dim: #94a3b8;
    --navy: #0b1f3a;

    /* I colori "bright" restano nomi storici: sul tema chiaro sono tonalità scure e leggibili */
    --primary: #0b57a8;
    --primary-bright: #0b57a8;
    --primary-dark: #08447f;
    --primary-soft: #eaf2fb;
    --primary-line: #cfe0f3;
    --cyan: #0891b2;
    --cyan-bright: #0e7490;
    --accent: #6d28d9;
    --accent-bright: #6d28d9;
    --success: #059669;
    --success-bright: #047857;
    --danger: #dc2626;
    --danger-bright: #b91c1c;
    --warning: #d97706;

    --border-subtle: #e6ebf2;
    --border-light: #dbe2ec;
    --border-strong: #c3cddb;
    --border-glow: rgba(11, 87, 168, 0.35);

    --brand-gradient: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    --btn-gradient: linear-gradient(180deg, #1868c4 0%, #0b57a8 100%);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 9999px;

    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 12px -4px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 1px 3px rgba(15, 23, 42, 0.05), 0 14px 32px -14px rgba(15, 23, 42, 0.2);
    --shadow-lg: 0 2px 6px rgba(15, 23, 42, 0.04), 0 28px 56px -24px rgba(15, 23, 42, 0.3);
    --shadow-glow-blue: 0 22px 44px -22px rgba(11, 87, 168, 0.42);
    --shadow-glow-violet: 0 22px 44px -22px rgba(109, 40, 217, 0.38);
    --shadow-glow-emerald: 0 22px 44px -22px rgba(5, 150, 105, 0.38);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

/* Reset & Base — Strict Viewport Lock */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    color-scheme: light;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-void);
    color: var(--text-main);
    line-height: 1.65;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    min-height: 100vh;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

main, header, section, footer {
    width: 100%;
    max-width: 100%;
}

::selection {
    background: rgba(11, 87, 168, 0.16);
    color: inherit;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

code, pre {
    font-family: var(--font-mono);
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Codice in linea nei testi (le guide hanno uno stile dedicato più sotto) */
p code,
li code,
span code {
    background: #eef2f7;
    color: #1e3a5f;
    border: 1px solid #e1e7ef;
    padding: 0.08rem 0.38rem;
    border-radius: 5px;
    font-size: 0.86em;
}

/* ==========================================================================
   SFONDO DELLA PAGINA (luce morbida in alto + griglia appena accennata)
   ========================================================================== */
.cyber-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(1100px 520px at 50% -160px, rgba(59, 130, 246, 0.11), transparent 70%),
        radial-gradient(760px 420px at 100% -60px, rgba(139, 92, 246, 0.07), transparent 70%),
        var(--bg-void);
}

.cyber-grid {
    position: absolute;
    inset: 0;
    background-size: 44px 44px;
    background-image:
        linear-gradient(to right, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
    mask-image: radial-gradient(ellipse 70% 42% at 50% 0%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 70% 42% at 50% 0%, #000 30%, transparent 100%);
}

/* Le "aurore" della versione scura non fanno parte del tema istituzionale */
.aurora-orb {
    display: none;
}

/* Barra di avanzamento della lettura (sopra la linea sfumata della testata) */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #0b57a8, #5b21b6);
    z-index: 2000;
    transition: width 0.1s ease-out;
}

/* ==========================================================================
   TESTATA (bianca, con la linea sfumata del logo)
   ========================================================================== */
.navbar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    padding: 0 1.5rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border-light);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.navbar-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--brand-gradient);
}

.navbar-wrapper:has(.navbar.scrolled) {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 12px 30px -20px rgba(15, 23, 42, 0.4);
}

.navbar {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 0.8rem 0 0.7rem 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.logo img {
    height: 44px;
    width: auto;
    display: block;
    transition: opacity 0.2s ease;
}

.logo a:hover img {
    opacity: 0.85;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.45rem 0.8rem;
    border-radius: 8px;
    white-space: nowrap;
    display: block;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: var(--primary-soft);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lang-switcher {
    display: inline-flex;
    background: #eef2f7;
    padding: 0.2rem;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    gap: 0.15rem;
}

.lang-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 0.32rem 0.62rem;
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-sans);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.lang-btn:hover {
    color: var(--text-main);
}

.lang-btn.active {
    background: #ffffff;
    color: var(--primary);
    border-color: var(--border-light);
    box-shadow: var(--shadow-xs);
}

.nav-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.05rem;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 600;
    background: var(--btn-gradient);
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15), 0 8px 18px -10px rgba(11, 87, 168, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    white-space: nowrap;
}

.nav-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.15), 0 12px 24px -10px rgba(11, 87, 168, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.mobile-menu-toggle {
    display: none;
    background: #ffffff;
    border: 1px solid var(--border-light);
    color: var(--text-main);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.05rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-xs);
}

.mobile-menu-toggle:hover {
    border-color: var(--border-strong);
}

/* ==========================================================================
   TIPOGRAFIA E UTILITÀ
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.section {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 3.5rem auto;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid var(--primary-line);
    padding: 0.32rem 0.85rem;
    border-radius: var(--radius-pill);
    margin-bottom: 1rem;
    max-width: 100%;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.8vw, 2.85rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--navy);
    margin-bottom: 1rem;
    overflow-wrap: break-word;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.08rem;
    line-height: 1.7;
    max-width: 680px;
    margin: 0 auto;
}

.section-desc a {
    color: var(--primary);
    font-weight: 600;
}

.gradient-text {
    background: linear-gradient(100deg, #0b57a8 0%, #2563eb 45%, #6d28d9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Ensure all Grid/Flex children can shrink below intrinsic content width */
.trust-item,
.simulator-shell,
.proxy-stage,
.id-card-preview,
.scanner-controls-box,
.usecase-mega-card,
.spotlight-card,
.mode-card,
.usecase-content,
.terminal-card,
.download-box,
.qs-step,
.license-box,
.collab-box,
.kb-sidebar,
.kb-content,
.folder-card,
.api-grid > * {
    min-width: 0;
    max-width: 100%;
}

/* ==========================================================================
   PULSANTI
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.6rem;
    border-radius: 11px;
    font-weight: 600;
    font-size: 0.97rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    position: relative;
    overflow: hidden;
    max-width: 100%;
    text-align: center;
}

.btn-primary {
    background: var(--btn-gradient);
    color: #ffffff;
    border-color: #0a4f99;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.16), 0 10px 22px -12px rgba(11, 87, 168, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.16), 0 18px 30px -14px rgba(11, 87, 168, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-main);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.02rem;
    border-radius: 12px;
}

/* ==========================================================================
   HERO E DIMOSTRAZIONE INTERATTIVA
   ========================================================================== */
.hero {
    padding: 140px 0 4rem 0;
    position: relative;
    /* visibile: l'ombra del simulatore non deve essere tagliata a fine sezione */
    overflow: visible;
}

.hero-top {
    text-align: center;
    max-width: 920px;
    margin: 0 auto 3rem auto;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.42rem 1.05rem;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-pill);
    color: var(--success-bright);
    font-size: 0.86rem;
    font-weight: 600;
    margin-bottom: 1.6rem;
    box-shadow: var(--shadow-sm);
    max-width: 100%;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45);
    animation: pulseRing 2.4s infinite;
    flex-shrink: 0;
}

@keyframes pulseRing {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45); }
    70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 5.2vw, 4.1rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
    color: var(--navy);
    margin-bottom: 1.4rem;
    overflow-wrap: break-word;
}

.hero-subtitle {
    font-size: clamp(1.02rem, 1.9vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 740px;
    margin: 0 auto 2.2rem auto;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 2.6rem;
}

/* Trust Specs Strip */
.trust-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    max-width: 980px;
    margin: 0 auto;
    width: 100%;
}

.trust-item {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 0.95rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-align: left;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.trust-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.trust-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--primary-soft);
    border: 1px solid var(--primary-line);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.trust-text {
    min-width: 0;
}

.trust-text strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-main);
    font-family: var(--font-display);
    font-weight: 600;
}

.trust-text span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ==========================================================================
   SIMULATORE (finestra applicativa chiara)
   ========================================================================== */
.simulator-shell {
    margin-top: 3.2rem;
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.55), 0 2px 6px rgba(15, 23, 42, 0.05), 0 40px 80px -40px rgba(15, 23, 42, 0.45);
    overflow: hidden;
    position: relative;
}

.simulator-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.4rem;
    background: linear-gradient(180deg, #fbfcfe 0%, #f2f5f9 100%);
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
    gap: 1rem;
}

.window-dots {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.window-dots span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.window-dots span:nth-child(1) { background: #f87171; }
.window-dots span:nth-child(2) { background: #fbbf24; }
.window-dots span:nth-child(3) { background: #34d399; }

.sim-tabs {
    display: flex;
    flex-wrap: wrap;
    background: #e9eef5;
    padding: 0.22rem;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    gap: 0.2rem;
    max-width: 100%;
}

.sim-tab {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 0.45rem 0.95rem;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    transition: all 0.2s ease;
}

.sim-tab:hover {
    color: var(--text-main);
}

.sim-tab.active {
    background: #ffffff;
    color: var(--primary);
    border-color: var(--border-light);
    box-shadow: var(--shadow-sm);
}

.sim-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--success-bright);
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 0.32rem 0.8rem;
    border-radius: var(--radius-pill);
    max-width: 100%;
}

.sim-body {
    padding: 2rem;
    width: 100%;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.sim-panel {
    display: none;
    width: 100%;
}

.sim-panel.active {
    display: block;
    animation: fadeInScale 0.35s ease;
}

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

/* Simulator Panel 1: AI Proxy Live Demo */
.proxy-preset-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.preset-Chips {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.preset-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}

.preset-btn {
    background: #ffffff;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 0.35rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: all 0.2s;
}

.preset-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.preset-btn.active {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.proxy-pipeline-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 1.25rem;
    align-items: stretch;
    width: 100%;
}

.proxy-stage {
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    position: relative;
}

.proxy-stage.sanitized-stage {
    background: #f4fbf7;
    border-color: #a7f3d0;
}

.stage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-main);
}

.stage-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.18rem 0.55rem;
    border-radius: 6px;
}

.tag-raw {
    background: #fef2f2;
    color: var(--danger-bright);
    border: 1px solid #fecaca;
}

.tag-safe {
    background: #ecfdf5;
    color: var(--success-bright);
    border: 1px solid #a7f3d0;
}

.prompt-box {
    font-family: var(--font-mono);
    font-size: 0.86rem;
    line-height: 1.8;
    color: #1e293b;
    flex: 1;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.pii-raw {
    background: #fee2e2;
    color: #991b1b;
    border-bottom: 2px dashed #ef4444;
    padding: 0.08rem 0.32rem;
    border-radius: 4px;
    font-weight: 600;
}

.pii-masked {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    padding: 0.08rem 0.42rem;
    border-radius: 5px;
    font-weight: 700;
}

.proxy-center-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0 0.4rem;
}

.shield-core {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #ffffff;
    box-shadow: 0 14px 28px -12px rgba(37, 99, 235, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    position: relative;
    flex-shrink: 0;
}

.shield-core::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 22px;
    border: 1px dashed rgba(37, 99, 235, 0.4);
    animation: spinSlow 14s linear infinite;
}

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

.proxy-port-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--cyan-bright);
    background: #ecfeff;
    border: 1px solid #a5f3fc;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    white-space: nowrap;
}

.audit-log-strip {
    margin-top: 1.2rem;
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 0.8rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    width: 100%;
}

.audit-log-strip .log-title {
    color: var(--accent-bright);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.audit-log-strip .log-json {
    color: var(--text-muted);
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

/* Simulator Panel 2: Document & ID Biometric Scanner */
.doc-scanner-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 1.5rem;
    align-items: center;
    width: 100%;
}

.id-card-preview {
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.07) 0%, rgba(139, 92, 246, 0.05) 100%),
        repeating-linear-gradient(45deg, rgba(15, 23, 42, 0.018) 0 2px, transparent 2px 9px),
        #ffffff;
    border: 1px solid #cbd6e4;
    border-radius: 18px;
    padding: 1.6rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    width: 100%;
}

.laser-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #22d3ee, #3b82f6, #22d3ee, transparent);
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.65);
    z-index: 5;
    animation: laserScan 3.6s ease-in-out infinite;
}

@keyframes laserScan {
    0%, 100% { top: 8%; opacity: 0.75; }
    50% { top: 92%; opacity: 1; }
}

.id-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.8rem;
    margin-bottom: 1.2rem;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cyan-bright);
    font-weight: 700;
}

.id-card-body {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: center;
    width: 100%;
}

.id-photo-box {
    width: 110px;
    height: 135px;
    border-radius: 12px;
    background: linear-gradient(180deg, #f1f5f9, #e2e8f0);
    border: 2px solid #10b981;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.id-photo-box i.fa-user {
    font-size: 3.4rem;
    color: #94a3b8;
    transition: filter 0.4s ease;
}

.id-photo-box.redacted i.fa-user {
    filter: blur(8px);
    opacity: 0.5;
}

.biometric-overlay {
    position: absolute;
    inset: 8px;
    border: 1.5px dashed #059669;
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 6px;
    background: rgba(16, 185, 129, 0.08);
    transition: opacity 0.3s ease;
}

.id-photo-box:not(.redacted) .biometric-overlay {
    opacity: 0;
}

.biometric-overlay span {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    background: rgba(255, 255, 255, 0.94);
    color: var(--success-bright);
    border: 1px solid #a7f3d0;
    padding: 0.12rem 0.4rem;
    border-radius: 4px;
    font-weight: 700;
}

.id-fields {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    width: 100%;
    min-width: 0;
}

.id-field-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.4rem 0.65rem;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    width: 100%;
}

.id-field-label {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.id-field-val {
    font-weight: 600;
    color: var(--text-main);
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Il dato oscurato appare come una vera barra di censura */
.id-card-preview.is-anonymized .id-field-val.censor-target {
    background: #0f172a;
    color: #6ee7b7;
    border: 1px solid #0f172a;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
}

.scanner-controls-box {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.scanner-feature-item {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    box-shadow: var(--shadow-xs);
}

.scanner-feature-item i {
    color: var(--primary);
    font-size: 1.15rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.scanner-toggle-btn {
    width: 100%;
    padding: 0.85rem 1.2rem;
    border-radius: 11px;
    border: 1px solid #0a4f99;
    background: var(--btn-gradient);
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-family: var(--font-sans);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15), 0 10px 22px -12px rgba(11, 87, 168, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-align: center;
}

.scanner-toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.15), 0 16px 28px -14px rgba(11, 87, 168, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

/* ==========================================================================
   CASI D'USO
   ========================================================================== */
.dual-usecases-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
    width: 100%;
}

.usecase-mega-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 2.4rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.35s ease;
    width: 100%;
}

.usecase-mega-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    opacity: 0.9;
}

.usecase-mega-card.uc-proxy::before {
    background: linear-gradient(90deg, #6d28d9, #a78bfa);
}

.usecase-mega-card:hover {
    transform: translateY(-5px);
    border-color: #bcd3ee;
    box-shadow: var(--shadow-lg), var(--shadow-glow-blue);
}

.usecase-mega-card.uc-proxy:hover {
    border-color: #d8c9f5;
    box-shadow: var(--shadow-lg), var(--shadow-glow-violet);
}

.uc-number-badge {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.34rem 0.9rem;
    border-radius: var(--radius-pill);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.2rem;
    width: fit-content;
    max-width: 100%;
}

.uc-standalone .uc-number-badge {
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid var(--primary-line);
}

.uc-proxy .uc-number-badge {
    background: #f3effd;
    color: var(--accent-bright);
    border: 1px solid #ddd0f8;
}

.usecase-mega-card h3 {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.9rem;
    line-height: 1.25;
}

.usecase-mega-card .uc-text {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.72;
    margin-bottom: 1.75rem;
}

.uc-mini-pipeline {
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 0.95rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    width: 100%;
}

.uc-pipe-node {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    color: var(--text-main);
    font-weight: 600;
    box-shadow: var(--shadow-xs);
}

.uc-pipe-node.highlight-blue {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: var(--primary-line);
}

.uc-pipe-node.highlight-violet {
    background: #f3effd;
    color: var(--accent-bright);
    border-color: #ddd0f8;
}

/* ==========================================================================
   COS'È GERMANO AI / NOVITÀ (SPOTLIGHT CARDS)
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.spotlight-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.spotlight-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(
        420px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(59, 130, 246, 0.07),
        transparent 45%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.spotlight-card > * {
    position: relative;
    z-index: 1;
}

.spotlight-card:hover::before {
    opacity: 1;
}

.spotlight-card:hover {
    transform: translateY(-4px);
    border-color: #bcd3ee;
    box-shadow: var(--shadow-md), var(--shadow-glow-blue);
}

.card-icon-wrap {
    width: 50px;
    height: 50px;
    border-radius: 13px;
    background: linear-gradient(135deg, #eef5ff, #f4f0ff);
    border: 1px solid #d6e2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 1.3rem;
    box-shadow: inset 0 1px 0 #ffffff, var(--shadow-xs);
}

.spotlight-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
    color: var(--navy);
}

.spotlight-card p {
    color: var(--text-muted);
    font-size: 0.96rem;
    line-height: 1.68;
}

.tech-pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1.3rem;
    padding-top: 1.05rem;
    border-top: 1px solid var(--border-subtle);
}

.tech-pill {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    padding: 0.2rem 0.58rem;
    border-radius: 6px;
}

/* ==========================================================================
   PROFILI DI CONFORMITÀ (GERMANO PA vs GERMANO PD)
   ========================================================================== */
.modes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
    width: 100%;
}

.mode-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 2.4rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
    width: 100%;
}

.mode-card.pa-mode {
    border-top: 3px solid var(--danger);
    background: linear-gradient(180deg, #fff7f7 0%, #ffffff 140px);
}

.mode-card.pd-mode {
    border-top: 3px solid var(--success);
    background: linear-gradient(180deg, #f3fbf7 0%, #ffffff 140px);
}

.mode-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.mode-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.7rem;
    padding-bottom: 1.3rem;
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}

.mode-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.pa-mode .mode-icon-box {
    background: #fef2f2;
    color: var(--danger-bright);
    border: 1px solid #fecaca;
}

.pd-mode .mode-icon-box {
    background: #ecfdf5;
    color: var(--success-bright);
    border: 1px solid #a7f3d0;
}

.mode-header h3 {
    font-family: var(--font-display);
    font-size: 1.38rem;
    font-weight: 700;
    color: var(--navy);
}

.mode-badge {
    margin-left: auto;
    padding: 0.32rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.pa-mode .mode-badge {
    background: #fef2f2;
    color: var(--danger-bright);
    border: 1px solid #fecaca;
}

.pd-mode .mode-badge {
    background: #ecfdf5;
    color: var(--success-bright);
    border: 1px solid #a7f3d0;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.05rem;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    color: var(--text-secondary);
    font-size: 0.97rem;
    line-height: 1.6;
}

.feature-list li i {
    margin-top: 4px;
    font-size: 1rem;
    flex-shrink: 0;
}

.pa-mode .feature-list li i {
    color: var(--danger-bright);
}

.pd-mode .feature-list li i {
    color: var(--success-bright);
}

/* ==========================================================================
   PROXY PER L'IA E API REST
   ========================================================================== */
.usecase-content {
    background:
        radial-gradient(800px 260px at 50% 0%, rgba(59, 130, 246, 0.07), transparent 70%),
        #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 3.4rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.usecase-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--brand-gradient);
}

.step-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;
    margin: 2.6rem 0;
    flex-wrap: wrap;
    width: 100%;
}

.step {
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    padding: 1.7rem 1.4rem;
    border-radius: 16px;
    width: 250px;
    max-width: 100%;
    box-shadow: var(--shadow-xs);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.step:hover {
    transform: translateY(-3px);
    border-color: #bcd3ee;
    box-shadow: var(--shadow-md);
}

.step-icon {
    width: 60px;
    height: 60px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.05rem auto;
    color: var(--text-muted);
    box-shadow: var(--shadow-xs);
}

.germano-step {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
    border: 1px solid transparent;
    box-shadow: 0 12px 24px -12px rgba(37, 99, 235, 0.7);
}

.llm-step {
    background: #f3effd;
    color: var(--accent-bright);
    border: 1px solid #ddd0f8;
}

.step h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-main);
}

.step span {
    font-size: 0.86rem;
    color: var(--text-muted);
}

.step-arrow {
    font-size: 1.35rem;
    color: var(--text-dim);
}

.usecase-conclusion {
    color: var(--success-bright);
    font-weight: 600;
    font-size: 1.04rem;
    max-width: 820px;
    margin: 0 auto;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 1rem 1.5rem;
    border-radius: 14px;
}

/* API Integration Split Showcase */
.api-section {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.api-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 3rem;
    align-items: center;
    width: 100%;
}

/* Il terminale resta scuro: è il contesto naturale del codice */
.terminal-card {
    background: var(--bg-terminal);
    border: 1px solid #1e293b;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08), 0 36px 70px -34px rgba(15, 23, 42, 0.6);
    width: 100%;
}

.terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1.1rem;
    background: #131d33;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.terminal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.term-tab {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.term-tab:hover {
    color: #e2e8f0;
}

.term-tab.active {
    background: rgba(59, 130, 246, 0.22);
    color: #bfdbfe;
}

.copy-code-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 0.75rem;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-family: var(--font-sans);
    transition: all 0.2s;
}

.copy-code-btn:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(96, 165, 250, 0.5);
    color: #ffffff;
}

.terminal-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.84rem;
    line-height: 1.7;
    color: #e2e8f0;
    overflow-x: auto;
    width: 100%;
}

.term-pane {
    display: none;
    white-space: pre-wrap;
    word-break: break-word;
}

.term-pane.active {
    display: block;
}

/* ==========================================================================
   DOWNLOAD, LICENZA E COMMUNITY
   ========================================================================== */
.download-box {
    background:
        radial-gradient(700px 240px at 50% 0%, rgba(59, 130, 246, 0.08), transparent 70%),
        #ffffff;
    border: 1px solid var(--border-light);
    padding: 3.6rem 3rem;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.download-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--brand-gradient);
}

.download-box h2 {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3.3vw, 2.45rem);
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1rem;
}

.download-box > p {
    color: var(--text-secondary);
    max-width: 720px;
    margin: 0 auto 2.2rem auto;
    font-size: 1.06rem;
}

.quickstart-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    max-width: 860px;
    margin: 0 auto 2.5rem auto;
    width: 100%;
}

.qs-step {
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
}

.qs-num {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--btn-gradient);
    color: #ffffff;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 12px -6px rgba(11, 87, 168, 0.7);
}

.qs-step span {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.download-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.download-bottom-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    text-align: left;
    margin-top: 2rem;
    width: 100%;
}

.license-box, .collab-box {
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    padding: 1.7rem;
    border-radius: 16px;
    width: 100%;
}

.license-box h3, .collab-box h3 {
    color: var(--navy);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-size: 1.16rem;
    font-weight: 600;
}

.license-box h3 i { color: var(--success-bright); }
.collab-box h3 i { color: var(--primary); }

.license-box p, .collab-box p {
    margin: 0;
    font-size: 0.93rem;
    line-height: 1.65;
    color: var(--text-muted);
}

/* ==========================================================================
   PIÈ DI PAGINA
   ========================================================================== */
footer {
    text-align: center;
    padding: 3.2rem 1.5rem;
    border-top: 1px solid var(--border-light);
    background: #ffffff;
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer a {
    color: var(--primary);
}

.made-in {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 1.3rem;
    background: var(--bg-soft);
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-light);
    margin-bottom: 1.1rem;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.02em;
    max-width: 100%;
    box-shadow: var(--shadow-xs);
}

/* ==========================================================================
   DOCUMENTAZIONE (guide.html)
   ========================================================================== */
.kb-hero {
    padding: 140px 0 2.8rem 0;
    text-align: center;
}

.kb-container {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 2.2rem;
    width: 100%;
    max-width: 1240px;
    margin: 1rem auto 5rem auto;
    padding: 0 1.5rem;
    align-items: start;
}

.kb-sidebar {
    position: sticky;
    top: 92px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    max-height: calc(100vh - 116px);
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
    width: 100%;
}

.kb-sidebar h3 {
    font-family: var(--font-display);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.9rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--border-subtle);
}

.kb-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.kb-nav a {
    color: var(--text-secondary);
    font-size: 0.89rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}

.kb-nav a:hover,
.kb-nav a.active {
    background: var(--primary-soft);
    color: var(--primary);
    border-left-color: var(--primary);
}

.kb-content {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-md);
    width: 100%;
}

.kb-content section {
    padding-bottom: 2.6rem;
    margin-bottom: 2.6rem;
    border-bottom: 1px solid var(--border-subtle);
}

.kb-content section:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.kb-content h2 {
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1.1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.kb-content h2 i {
    color: var(--primary);
}

.kb-content h3 {
    font-family: var(--font-display);
    font-size: 1.18rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: 1.7rem;
    margin-bottom: 0.8rem;
}

.kb-content p,
.kb-content li {
    color: var(--text-secondary);
    margin-bottom: 0.9rem;
    line-height: 1.72;
    font-size: 0.97rem;
    overflow-wrap: break-word;
}

.kb-content strong {
    color: var(--text-main);
}

.kb-content ul,
.kb-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.4rem;
}

.kb-content code {
    background: var(--primary-soft);
    color: #08427f;
    padding: 0.12rem 0.42rem;
    border-radius: 5px;
    font-size: 0.86em;
    border: 1px solid var(--primary-line);
}

.kb-content p a,
.kb-content li a,
.kb-content .note a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.code-block {
    background: var(--bg-terminal);
    border: 1px solid #1e293b;
    padding: 1.2rem 1.35rem;
    border-radius: 12px;
    font-family: var(--font-mono);
    font-size: 0.86rem;
    color: #e2e8f0;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    position: relative;
    line-height: 1.65;
    width: 100%;
    max-width: 100%;
    box-shadow: 0 16px 32px -24px rgba(15, 23, 42, 0.6);
}

.folder-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 1rem;
    margin: 1.4rem 0;
    width: 100%;
}

.folder-card {
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    width: 100%;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.folder-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.folder-card strong {
    font-family: var(--font-mono);
    font-size: 0.98rem;
    display: inline-block;
}

.kb-table-wrap {
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--shadow-xs);
}

.kb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    text-align: left;
}

.kb-table th {
    background: #f4f7fb;
    padding: 12px 16px;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-light);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kb-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    vertical-align: top;
}

.kb-table tr:last-child td {
    border-bottom: 0;
}

.kb-table tbody tr:hover td {
    background: #f8fafc;
}

.badge-sub {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.74rem;
    font-weight: 700;
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid var(--primary-line);
}

.note {
    background: #f3f8fe;
    border: 1px solid var(--primary-line);
    border-left: 4px solid var(--primary);
    padding: 1.15rem 1.4rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    width: 100%;
    color: var(--text-secondary);
}

.note-title {
    display: block;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.35rem;
    font-family: var(--font-display);
}

/* ==========================================================================
   ANIMAZIONI ALLO SCORRIMENTO
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.visible {
    opacity: 1;
    transform: translate(0, 0);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .fade-in, .slide-in-left, .slide-in-right { opacity: 1; transform: none; transition: none; }
    .pulse-dot, .shield-core::after, .laser-line { animation: none; }
}

/* ==========================================================================
   RESPONSIVE (TABLET E SMARTPHONE — MARGINI SIMMETRICI)
   ========================================================================== */
@media (max-width: 1024px) {
    .trust-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dual-usecases-grid { grid-template-columns: minmax(0, 1fr); }
    .proxy-pipeline-grid { grid-template-columns: minmax(0, 1fr); }
    .proxy-center-node { flex-direction: row; padding: 0.5rem 0; justify-content: center; }
    .doc-scanner-grid { grid-template-columns: minmax(0, 1fr); }
    .api-grid { grid-template-columns: minmax(0, 1fr); }
    .kb-container { grid-template-columns: minmax(0, 1fr); }
    .kb-sidebar { position: static; max-height: none; }

    /* Avoid horizontal off-axis shifts on touch/tablet devices */
    .slide-in-left,
    .slide-in-right {
        transform: translateY(20px);
    }
    .visible {
        transform: translate(0, 0);
    }
}

@media (max-width: 768px) {
    /* Enforce identical 1rem (16px) left and right outer spacing everywhere */
    .navbar-wrapper {
        top: 0;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .container,
    .kb-container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .navbar {
        padding: 0.65rem 0 0.55rem 0;
        gap: 0.5rem;
        position: relative;
        width: 100%;
    }

    .logo img {
        height: 34px;
    }

    .nav-actions {
        gap: 0.45rem;
    }

    .lang-btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }

    .nav-cta-btn { display: none; }
    .mobile-menu-toggle { display: inline-flex; }

    /* Hero & Trust Strip */
    .hero {
        padding: 100px 0 3rem 0;
    }

    .badge-pill {
        font-size: 0.78rem;
        padding: 0.4rem 0.85rem;
        gap: 0.4rem;
    }

    .trust-strip,
    .about-grid,
    .modes-grid,
    .dual-usecases-grid,
    .quickstart-steps,
    .download-bottom-grid,
    .kb-container {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn,
    .download-actions .btn,
    .btn-large {
        width: 100%;
        max-width: 100%;
        padding: 0.9rem 1.2rem;
        font-size: 0.95rem;
        white-space: normal;
    }

    /* Simulator on Mobile */
    .simulator-shell {
        margin-top: 2rem;
        border-radius: 16px;
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05), 0 24px 48px -28px rgba(15, 23, 42, 0.45);
    }

    .simulator-topbar {
        flex-direction: column;
        align-items: stretch;
        padding: 0.85rem 1rem;
        gap: 0.75rem;
    }

    .window-dots {
        justify-content: center;
    }

    .sim-tabs {
        flex-direction: column;
        width: 100%;
    }

    .sim-tab {
        width: 100%;
        justify-content: center;
        text-align: center;
        white-space: normal;
        padding: 0.55rem 0.75rem;
    }

    .sim-status-pill {
        width: 100%;
        justify-content: center;
        text-align: center;
        font-size: 0.72rem;
    }

    .sim-body {
        padding: 1rem;
    }

    .proxy-stage {
        padding: 1rem;
    }

    .proxy-center-node {
        flex-direction: column;
        padding: 0.4rem 0;
    }

    .audit-log-strip {
        padding: 0.75rem 0.9rem;
        font-size: 0.74rem;
    }

    .id-card-preview {
        padding: 1rem;
    }

    .id-card-header {
        flex-direction: column;
        align-items: flex-start;
        font-size: 0.72rem;
    }

    .id-card-body {
        grid-template-columns: minmax(0, 1fr);
        justify-items: stretch;
        gap: 1rem;
    }

    .id-photo-box {
        margin: 0 auto;
    }

    .id-field-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    /* Cards & Sections Symmetric Inner Padding */
    .section {
        padding: 3.5rem 0;
    }

    .section-header {
        margin-bottom: 2.4rem;
    }

    .usecase-mega-card,
    .spotlight-card,
    .mode-card,
    .usecase-content,
    .download-box,
    .kb-content {
        padding: 1.5rem 1.2rem;
        border-radius: 16px;
        width: 100%;
    }

    .usecase-mega-card h3,
    .mode-header h3 {
        font-size: 1.26rem;
    }

    .uc-mini-pipeline {
        flex-direction: column;
        align-items: stretch;
        padding: 0.85rem;
        gap: 0.45rem;
    }

    .uc-pipe-node {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .uc-mini-pipeline .fa-arrow-right {
        transform: rotate(90deg);
        align-self: center;
        margin: 0.1rem 0;
    }

    .mode-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .mode-badge {
        margin-left: 0;
    }

    .step-flow {
        flex-direction: column;
        gap: 1rem;
        margin: 2rem 0;
    }

    .step {
        width: 100%;
        padding: 1.3rem 1.1rem;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    /* Terminal on Mobile */
    .terminal-header {
        flex-direction: column;
        align-items: stretch;
        padding: 0.8rem 1rem;
        gap: 0.6rem;
    }

    .terminal-tabs {
        width: 100%;
        justify-content: center;
    }

    .term-tab {
        flex: 1 1 auto;
        text-align: center;
    }

    .copy-code-btn {
        width: 100%;
        padding: 0.45rem;
    }

    .terminal-body {
        padding: 1rem;
        font-size: 0.78rem;
    }

    .license-box,
    .collab-box {
        padding: 1.3rem 1.1rem;
    }

    /* Guide / KB on Mobile */
    .kb-hero {
        padding: 100px 0 2rem 0;
    }

    .kb-container {
        gap: 1.25rem;
        margin: 0.5rem auto 3rem auto;
    }

    .kb-sidebar {
        padding: 1.2rem;
    }

    .kb-content h2 {
        font-size: 1.32rem;
    }

    .code-block {
        padding: 0.9rem 1rem;
        font-size: 0.78rem;
    }
}

/* ==========================================================================
   MENU COMPATTO (TABLET E PORTATILI PICCOLI FINO A 1200px)
   La riga completa dei link richiede ~1150px: sotto si usa il menu a tendina.
   ========================================================================== */
@media (max-width: 1200px) {
    .navbar {
        position: relative;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        width: 100%;
        flex-direction: column;
        gap: 0.2rem;
        background: #ffffff;
        border: 1px solid var(--border-light);
        border-radius: 14px;
        padding: 0.6rem;
        box-shadow: var(--shadow-lg);
    }

    .nav-links.mobile-open {
        display: flex;
    }

    .nav-links li,
    .nav-links a {
        width: 100%;
        text-align: center;
    }

    .mobile-menu-toggle { display: inline-flex; }
}
