/* ============================================================
   QUASCAN — Terminal Luxury
   Dark cyber-aesthetic with electric lime accents
   ============================================================ */

/* ---- Self-hosted fonts ---- */
@font-face {
    font-family: 'Syne';
    font-style: normal;
    font-weight: 600 800;
    font-display: swap;
    src: url('/fonts/syne.woff2') format('woff2');
}

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url('/fonts/outfit.woff2') format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url('/fonts/jetbrains-mono.woff2') format('woff2');
}

:root {
    --bg-deep: #07070f;
    --bg-surface: #0e0e1a;
    --bg-elevated: #161628;
    --bg-card: #12122180;
    --border: #1e1e3a;
    --border-focus: #4a9bbe;

    --accent: #c8ff00;
    --accent-dim: #c8ff0030;
    --secondary: #4a9bbe;
    --secondary-dim: #4a9bbe20;

    --text: #e0e0ee;
    --text-dim: #a8a8c4;
    --text-muted: #7a7a9a;

    --success: #00e676;
    --error: #ff4466;

    --font-display: 'Syne', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ---- Atmospheric layers ---- */
.scanline-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}

.grid-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.035;
    background-image:
        linear-gradient(var(--secondary) 1px, transparent 1px),
        linear-gradient(90deg, var(--secondary) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
}

/* ---- Navigation ---- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    background: linear-gradient(to bottom, var(--bg-deep), transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text);
}

.brand-icon {
    color: var(--accent);
    font-size: 1rem;
}

.brand-text {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.15em;
}

.nav-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.05em;
}

.nav-badge {
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--secondary);
    font-weight: 500;
}

.nav-divider { opacity: 0.3; }

.nav-powered,
.nav-powered:visited {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-powered:hover {
    color: var(--secondary);
}

/* ---- Hero ---- */
.hero {
    padding: 10rem 2rem 3rem;
    text-align: center;
}

.hero-inner {
    max-width: 750px;
    margin: 0 auto;
    animation: fadeUp 0.8s var(--ease-out) both;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 2rem;
    animation: fadeUp 0.8s var(--ease-out) 0.1s both;
}

.label-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--accent-dim); }
    50% { opacity: 0.7; box-shadow: 0 0 0 8px transparent; }
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.6rem, 6vw, 4.2rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    animation: fadeUp 0.8s var(--ease-out) 0.2s both;
}

.title-accent {
    color: var(--accent);
    position: relative;
}

.hero-sub {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--text-dim);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
    animation: fadeUp 0.8s var(--ease-out) 0.3s both;
}

/* ---- Scan Card ---- */
.scan-section {
    padding: 1rem 2rem 5rem;
    display: flex;
    justify-content: center;
    animation: fadeUp 0.8s var(--ease-out) 0.4s both;
}

.scan-card {
    width: 100%;
    max-width: 520px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.scan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
    opacity: 0.5;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.8rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--text-dim);
}

.card-header-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--secondary);
}

.card-header-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ---- Form Fields ---- */
.field {
    margin-bottom: 1.4rem;
}

.field-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.input-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.input-wrap:focus-within {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--secondary-dim);
}

.input-prefix {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 0 0 0 1rem;
    user-select: none;
}

.input-wrap input {
    flex: 1;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--secondary-dim);
}

.input-wrap input {
    border: none;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.input-wrap input:focus {
    border: none;
    box-shadow: none;
}

.field-error {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--error);
    margin-top: 0.35rem;
    min-height: 1rem;
}

/* ---- Delivery Toggle ---- */
.toggle-group {
    display: flex;
    gap: 0.6rem;
}

.toggle-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dim);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.toggle-btn.active {
    border-color: var(--secondary);
    color: var(--secondary);
    background: var(--secondary-dim);
}

/* ---- Submit Button ---- */
.submit-btn {
    width: 100%;
    padding: 1rem;
    margin-top: 0.5rem;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: var(--bg-deep);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 24px var(--accent-dim), 0 0 60px var(--accent-dim);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ---- Consent Checkbox ---- */
.consent-field {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-surface);
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    position: relative;
}

.consent-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.consent-checkmark {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 2px solid var(--accent);
    border-radius: 5px;
    background: var(--bg-deep);
    box-shadow: 0 0 0 3px var(--accent-dim);
    transition: all 0.2s;
    position: relative;
    margin-top: 1px;
}

.consent-checkmark::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 7px;
    width: 6px;
    height: 11px;
    border: solid var(--bg-deep);
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s var(--ease-spring);
}

.consent-label input:checked ~ .consent-checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.consent-label input:checked ~ .consent-checkmark::after {
    transform: rotate(45deg) scale(1);
}

.consent-label input:focus-visible ~ .consent-checkmark {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--secondary-dim);
}

.consent-text {
    font-size: 0.78rem;
    color: var(--text);
    line-height: 1.5;
}

.consent-text a {
    color: var(--text-dim);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.consent-text a:hover {
    color: var(--secondary);
}

.btn-arrow {
    transition: transform 0.2s var(--ease-out);
}

.submit-btn:hover .btn-arrow {
    transform: translateX(3px);
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--bg-deep);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ---- Success / Error states ---- */
.scan-success, .scan-error {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    animation: scaleIn 0.4s var(--ease-spring);
}

.error-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 68, 102, 0.1);
    color: var(--error);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
}

.scan-success h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.scan-success p, .scan-error p {
    color: var(--text-dim);
    font-size: 0.95rem;
}

.reset-btn {
    margin-top: 1.5rem;
    padding: 0.6rem 1.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-dim);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-btn:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

/* ---- Trust Section ---- */
.trust-section {
    padding: 4rem 2rem 5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.trust-card {
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: border-color 0.3s, transform 0.3s var(--ease-out);
    animation: fadeUp 0.6s var(--ease-out) calc(0.6s + var(--delay) * 0.1s) both;
}

.trust-card:hover {
    border-color: var(--text-muted);
    transform: translateY(-2px);
}

.trust-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--secondary-dim);
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
}

.trust-card h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
}

.trust-card p {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ---- Scanners Section ---- */
.scanners-section {
    padding: 3rem 2rem 6rem;
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.section-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.scanners-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.scanner-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-dim);
    transition: all 0.2s;
}

.scanner-item:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.scanner-tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--accent);
    opacity: 0.6;
}

/* ---- Footer ---- */
.footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 2rem;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-quascan {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    color: var(--text-dim);
}

.footer-quascan .brand-icon {
    font-size: 0.8rem;
}

.footer-email {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-email:hover {
    color: var(--accent);
}

.footer-brand-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.footer-logo-img {
    height: 32px;
    width: auto;
    display: block;
    opacity: 0.8;
}

.footer-tagline {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.25em;
    color: var(--text-muted);
}

/* ---- Animations ---- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ---- Legal Pages ---- */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 7rem 2rem 4rem;
}

.legal-content h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.legal-content .legal-subtitle {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 3rem;
}

.legal-content h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.legal-content p,
.legal-content li {
    color: var(--text-dim);
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

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

.legal-content li {
    margin-bottom: 0.4rem;
}

.legal-content strong {
    color: var(--text);
    font-weight: 600;
}

.legal-content a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.legal-content a:hover {
    color: var(--accent);
}

.legal-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0 1.5rem;
    font-size: 0.88rem;
}

.legal-content th,
.legal-content td {
    padding: 0.7rem 1rem;
    text-align: left;
    border: 1px solid var(--border);
    color: var(--text-dim);
}

.legal-content th {
    background: var(--bg-elevated);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Footer legal links */
.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--secondary);
}

/* ---- Cookie Consent Banner ---- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding: 1.2rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: slideUp 0.4s var(--ease-out) both;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.cookie-banner p {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.5;
    margin: 0;
    flex: 1;
    max-width: 620px;
}

.cookie-banner p a {
    color: var(--secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.cookie-banner p a:hover {
    color: var(--accent);
}

.cookie-banner-actions {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.55rem 1.3rem;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 100px;
    text-align: center;
}

.cookie-btn-reject {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
}

.cookie-btn-reject:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.cookie-btn-accept {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: var(--bg-deep);
}

.cookie-btn-accept:hover {
    box-shadow: 0 2px 12px var(--accent-dim);
}

/* ---- Utilities ---- */
.hidden { display: none !important; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        padding: 1rem 1.2rem;
        gap: 1rem;
    }

    .cookie-banner-actions {
        width: 100%;
    }

    .cookie-btn {
        flex: 1;
    }

    .nav { padding: 0.8rem 1.2rem; }
    .nav-meta { display: none; }

    .hero { padding: 7rem 1.5rem 2rem; }
    .hero-title { font-size: 2.4rem; }

    .scan-section { padding: 1rem 1.2rem 3rem; }
    .scan-card { padding: 1.5rem; }

    .trust-grid { grid-template-columns: 1fr; gap: 1rem; }
    .scanners-grid { grid-template-columns: repeat(2, 1fr); }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-left {
        align-items: center;
    }

    .footer-links {
        justify-content: center;
    }

    .footer-brand-block {
        align-items: center;
    }

    .legal-content {
        padding: 6rem 1.5rem 3rem;
    }

    .legal-content h1 {
        font-size: 1.6rem;
    }

    .legal-content table {
        font-size: 0.8rem;
    }

    .legal-content th,
    .legal-content td {
        padding: 0.5rem 0.6rem;
    }
}

/* ---- FAQ Accordion (shared: homepage + NIS2) ---- */
.faq-section {
    padding: 3rem 2rem 6rem;
    max-width: 800px;
    margin: 0 auto;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

details.faq-item {
    border-bottom: 1px solid var(--border);
}

details.faq-item:first-child {
    border-top: 1px solid var(--border);
}

summary.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 0;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    transition: color 0.2s;
    user-select: none;
}

summary.faq-question::-webkit-details-marker { display: none; }
summary.faq-question::marker { display: none; content: ""; }

summary.faq-question::after {
    content: '+';
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-dim);
    flex-shrink: 0;
    margin-left: 1rem;
    transition: transform 0.2s var(--ease-out), color 0.2s;
}

details.faq-item[open] > summary.faq-question::after {
    content: '−';
    color: var(--accent);
}

summary.faq-question:hover {
    color: var(--accent);
}

.faq-answer {
    padding: 0 0 1.2rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.7;
    animation: faqFadeIn 0.2s var(--ease-out);
}

.faq-answer a {
    color: var(--secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.faq-answer a:hover {
    color: var(--accent);
}

@keyframes faqFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- NIS2 Page ---- */
.nis2-hero {
    padding: 10rem 2rem 3rem;
    text-align: center;
}

.nis2-hero .hero-inner {
    max-width: 800px;
}

.urgency-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: #ff8c42;
    background: rgba(255, 140, 66, 0.1);
    border: 1px solid rgba(255, 140, 66, 0.25);
    border-radius: 4px;
    padding: 0.35rem 0.8rem;
    margin-bottom: 1.5rem;
}

.urgency-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff8c42;
    animation: pulse-urgency 2s ease infinite;
}

@keyframes pulse-urgency {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 140, 66, 0.3); }
    50% { opacity: 0.7; box-shadow: 0 0 0 8px transparent; }
}

.nis2-hero .hero-sub {
    max-width: 620px;
}

.nis2-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 0.9rem 2rem;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: var(--bg-deep);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
}

.nis2-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 24px var(--accent-dim), 0 0 60px var(--accent-dim);
}

/* NIS2 content sections */
.nis2-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.nis2-section .section-title {
    text-align: left;
    margin-bottom: 1.5rem;
}

.nis2-section p {
    color: var(--text-dim);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.nis2-section strong {
    color: var(--text);
    font-weight: 600;
}

/* Scope grid — essential vs important */
.scope-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.scope-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
}

.scope-card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
}

.scope-card-header.essential {
    color: var(--error);
    background: rgba(255, 68, 102, 0.05);
}

.scope-card-header.important {
    color: #ff8c42;
    background: rgba(255, 140, 66, 0.05);
}

.scope-card-body {
    padding: 1.2rem 1.5rem;
}

.scope-card-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.scope-card-body li {
    padding: 0.35rem 0;
    color: var(--text);
    font-size: 0.85rem;
    line-height: 1.5;
}

.scope-card-body li::before {
    content: '›';
    color: var(--accent);
    margin-right: 0.5rem;
}

.scope-threshold {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #b0b0cc;
}

.nis2-callout {
    margin-top: 1.5rem;
    padding: 1.2rem 1.5rem;
    border: 1px solid var(--accent-dim);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    background: rgba(200, 255, 0, 0.03);
    color: var(--text);
    font-size: 0.88rem;
    line-height: 1.6;
}

.nis2-callout strong {
    color: var(--accent);
}

/* Scanner mapping table */
.scanner-mapping-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.scanner-mapping {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.85rem;
}

.scanner-mapping th,
.scanner-mapping td {
    padding: 0.8rem 1rem;
    text-align: left;
    border: 1px solid var(--border);
    color: var(--text);
}

.scanner-mapping th {
    background: var(--bg-elevated);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 500;
}

.scanner-mapping td:first-child {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text);
    white-space: nowrap;
}

.scanner-mapping td:nth-child(2) {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--secondary);
    white-space: nowrap;
}

/* Timeline */
.timeline {
    position: relative;
    margin: 2rem 0 1rem 1.5rem;
    padding-left: 2rem;
    border-left: 2px solid var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(-2rem - 5px);
    top: 0.3rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    border: 2px solid var(--bg-deep);
}

.timeline-item.completed::before {
    background: var(--success);
}

.timeline-item.active::before {
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-dim), 0 0 12px var(--accent-dim);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.timeline-item.completed .timeline-date {
    color: #8a8aaa;
}

.timeline-item.active .timeline-date {
    color: var(--accent);
    font-weight: 500;
}

.timeline-text {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.timeline-item.completed .timeline-text {
    color: #7a7a9a;
}

.timeline-item.active .timeline-text {
    color: var(--text);
    font-weight: 500;
}

.timeline-check {
    color: var(--success);
    font-size: 0.75rem;
    margin-left: 0.3rem;
}

/* NIS2 CTA bottom section */
.nis2-cta-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem 5rem;
    text-align: center;
}

.nis2-cta-section .section-title {
    text-align: center;
}

.nis2-cta-section p {
    color: var(--text-dim);
    font-size: 0.92rem;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 1rem;
}

.nis2-cta-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.nis2-cta-links a {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.nis2-cta-links a:hover {
    color: var(--accent);
}

/* ---- NIS2 Responsive ---- */
@media (max-width: 768px) {
    .nis2-hero { padding: 7rem 1.5rem 2rem; }

    .scope-grid {
        grid-template-columns: 1fr;
    }

    .scanner-mapping {
        font-size: 0.78rem;
    }

    .scanner-mapping th,
    .scanner-mapping td {
        padding: 0.5rem 0.6rem;
    }

    .timeline {
        margin-left: 0.5rem;
        padding-left: 1.5rem;
    }

    .nis2-section {
        padding: 2rem 1.5rem;
    }

    .faq-section {
        padding: 2rem 1.5rem 4rem;
    }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2rem; }
    .scanners-grid { grid-template-columns: 1fr; }

    .toggle-group { flex-direction: column; }

    .scanner-mapping td:nth-child(2) {
        font-size: 0.7rem;
    }
}

/* ---- NIS2 Homepage Banner ---- */

.nis2-home-banner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
}

.nis2-home-banner-inner {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 140, 66, 0.2);
    border-radius: 12px;
    padding: 2rem 2.5rem;
    backdrop-filter: blur(20px);
}

.nis2-home-banner-content {
    flex: 1;
}

.nis2-home-banner-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.6rem;
}

.nis2-home-banner-text {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.7;
}

.nis2-home-banner-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex-shrink: 0;
}

.nis2-home-btn-primary {
    display: block;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: var(--bg-deep);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.nis2-home-btn-primary:hover {
    opacity: 0.9;
}

.nis2-home-btn-secondary {
    display: block;
    padding: 0.65rem 1.5rem;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    text-align: center;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
}

.nis2-home-btn-secondary:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

@media (max-width: 768px) {
    .nis2-home-banner { padding: 0 1.5rem 2rem; }

    .nis2-home-banner-inner {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .nis2-home-banner-actions {
        width: 100%;
    }
}

/* ---- NIS2 Verifica di Applicabilità ---- */

.verifica-hero {
    padding: 8rem 2rem 2rem;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.verifica-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    max-width: 640px;
    margin: 0 auto;
    backdrop-filter: blur(20px);
}

/* Progress bar */
.verifica-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.verifica-progress-bar {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.verifica-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    width: 16.67%;
    transition: width 0.4s var(--ease-out);
}

.verifica-progress-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Step */
.verifica-step {
    animation: verificaFadeIn 0.3s var(--ease-out);
}

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

.verifica-question {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.verifica-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

/* Option groups (sectors) */
.verifica-option-group {
    margin-bottom: 0.5rem;
}

.verifica-group-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1rem 0 0.5rem;
    padding-left: 0.2rem;
}

.verifica-option-group:first-child .verifica-group-label {
    margin-top: 0.5rem;
}

/* Options */
.verifica-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.verifica-option {
    display: block;
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.verifica-option:hover {
    border-color: var(--accent-dim);
    background: var(--bg-elevated);
}

.verifica-option.selected {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--accent);
}

.verifica-option-none {
    color: var(--text-muted);
    font-style: italic;
}

/* Back button */
.verifica-back {
    display: inline-block;
    margin-top: 1.2rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.4rem 0;
    transition: color 0.2s;
}

.verifica-back:hover {
    color: var(--text);
}

/* Result */
.verifica-result {
    animation: verificaFadeIn 0.4s var(--ease-out);
}

.verifica-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    margin-bottom: 1.2rem;
}

.verifica-badge.essential {
    background: rgba(255, 68, 102, 0.15);
    color: var(--error);
    border: 1px solid rgba(255, 68, 102, 0.3);
}

.verifica-badge.important {
    background: rgba(255, 140, 66, 0.15);
    color: #ff8c42;
    border: 1px solid rgba(255, 140, 66, 0.3);
}

.verifica-badge.supply-chain {
    background: var(--secondary-dim);
    color: var(--secondary);
    border: 1px solid rgba(74, 155, 190, 0.3);
}

.verifica-badge.not-subject {
    background: rgba(122, 122, 154, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(122, 122, 154, 0.2);
}

.verifica-badge.not-subject-sector {
    background: rgba(255, 200, 0, 0.1);
    color: #ffc800;
    border: 1px solid rgba(255, 200, 0, 0.25);
}

.verifica-desc {
    font-size: 0.95rem;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.verifica-countdown {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    padding: 0.8rem 1rem;
    background: var(--accent-dim);
    border-radius: 6px;
    margin-bottom: 1.2rem;
}

.verifica-penalties {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.7;
    padding: 1rem;
    background: rgba(255, 68, 102, 0.06);
    border: 1px solid rgba(255, 68, 102, 0.15);
    border-radius: 8px;
    margin-bottom: 1.2rem;
}

.verifica-measures {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.verifica-measures strong {
    display: block;
    color: var(--text);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.verifica-measures ol {
    padding-left: 1.2rem;
}

.verifica-measures li {
    margin-bottom: 0.3rem;
}

/* CTAs */
.verifica-cta-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin: 1.5rem 0;
}

.verifica-cta-primary {
    display: block;
    text-align: center;
    padding: 0.9rem 1.5rem;
    background: var(--accent);
    color: var(--bg-deep);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: opacity 0.2s;
}

.verifica-cta-primary:hover {
    opacity: 0.9;
}

.verifica-cta-secondary {
    display: block;
    text-align: center;
    padding: 0.9rem 1.5rem;
    background: transparent;
    color: var(--secondary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-decoration: none;
    border: 1px solid var(--secondary);
    border-radius: 8px;
    transition: background 0.2s;
}

.verifica-cta-secondary:hover {
    background: var(--secondary-dim);
}

/* Restart */
.verifica-restart {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.6rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.2s;
}

.verifica-restart:hover {
    color: var(--text);
}

/* Footnote */
.verifica-footnote {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* NIS2 verifica link (used on nis2.html hero) */
.nis2-verifica-link {
    display: block;
    margin-top: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.nis2-verifica-link:hover {
    color: var(--accent);
}

/* ---- NIS2 Verifica Responsive ---- */
@media (max-width: 768px) {
    .verifica-hero {
        padding: 7rem 1.5rem 2rem;
    }

    .verifica-card {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    .verifica-question {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .verifica-card {
        padding: 1.2rem;
        margin: 0 0.5rem;
    }

    .verifica-option {
        padding: 0.7rem 0.8rem;
        font-size: 0.85rem;
    }

    .verifica-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}
