/* ==========================================================================
   Speed Checker - foglio di stile unico
   Colori AD HOC: verde #5DDB85 su fondo nero, testo bianco.
   ========================================================================== */

:root {
    --verde: #5ddb85;
    --verde-chiaro: #a3f6bd;
    --verde-scuro: #36b55e;
    --verde-profondo: #1c6c3a;

    --nero: #070a08;
    --nero-2: #0b100d;
    --superficie: #111713;
    --superficie-2: #161d18;
    --superficie-3: #1c251f;

    --bordo: rgba(255, 255, 255, .09);
    --bordo-forte: rgba(255, 255, 255, .16);

    --testo: #f3f6f4;
    --testo-2: #c3ccc6;
    --muted: #8b968f;

    --rosso: #ff6b5e;
    --ambra: #ffc247;

    --r-sm: 10px;
    --r: 16px;
    --r-lg: 24px;
    --r-xl: 34px;

    --wrap: 1180px;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-display: 'Inter Tight', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--nero);
    color: var(--testo);
    font-family: var(--font);
    font-size: 16.5px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    line-height: 1.06;
    letter-spacing: -.035em;
    margin: 0 0 .5em;
    font-weight: 700;
}

h1 {
    font-size: clamp(2.6rem, 6.4vw, 5.1rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.9rem, 3.6vw, 3rem);
}

h3 {
    font-size: clamp(1.15rem, 1.9vw, 1.5rem);
    letter-spacing: -.02em;
}

h4 {
    font-size: 1.02rem;
    letter-spacing: -.01em;
}

p {
    margin: 0 0 1em;
}

a {
    color: var(--verde);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

strong {
    font-weight: 650;
}

code,
.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .86em;
}

.wrap {
    width: min(var(--wrap), calc(100% - 3rem));
    margin-inline: auto;
}

.muted {
    color: var(--muted);
}

.verde {
    color: var(--verde);
}

.center {
    text-align: center;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--verde);
    color: #04100a;
    padding: .6rem 1rem;
    z-index: 99;
    border-radius: 0 0 var(--r-sm) 0;
}

.skip-link:focus {
    left: 0;
}

:focus-visible {
    outline: 2px solid var(--verde);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ------------------------------------------------------------------ header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(7, 10, 8, .82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--bordo);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: .85rem 0;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: var(--testo);
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
}

.logo-mark {
    color: var(--verde);
    display: inline-flex;
}

.logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -.03em;
    font-size: 1.16rem;
}

.logo-text span {
    color: var(--verde);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    font-size: .93rem;
}

.site-nav a {
    color: var(--testo-2);
}

.site-nav a:hover {
    color: var(--verde);
    text-decoration: none;
}

/* ------------------------------------------------------------------- bottoni */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    font-family: var(--font-display);
    font-weight: 650;
    font-size: 1rem;
    letter-spacing: -.01em;
    padding: .95rem 1.7rem;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--verde);
    color: #04140a;
    box-shadow: 0 0 0 0 rgba(93, 219, 133, .5), 0 12px 40px -12px rgba(93, 219, 133, .75);
}

.btn-primary:hover {
    background: var(--verde-chiaro);
    box-shadow: 0 0 36px -6px rgba(93, 219, 133, .55);
}

.btn-ghost {
    background: rgba(255, 255, 255, .03);
    border-color: var(--bordo-forte);
    color: var(--testo);
}

.btn-ghost:hover {
    border-color: var(--verde);
    color: var(--verde);
}

.btn-sm {
    padding: .55rem 1.1rem;
    font-size: .9rem;
}

.btn-block {
    width: 100%;
}

/* --------------------------------------------------------------------- hero */
.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(3.5rem, 9vw, 7.5rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(90% 65% at 76% 32%, rgba(93, 219, 133, .16), transparent 62%),
        radial-gradient(60% 50% at 12% 0%, rgba(93, 219, 133, .07), transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .5;
    background-image: linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
    background-size: 78px 78px;
    mask-image: radial-gradient(75% 65% at 50% 35%, #000 30%, transparent 78%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 780px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .82rem;
    letter-spacing: .07em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--verde);
    background: rgba(93, 219, 133, .1);
    border: 1px solid rgba(93, 219, 133, .26);
    border-radius: 999px;
    padding: .38rem .9rem;
    margin-bottom: 1.4rem;
}

.hero h1 {
    margin-bottom: 1.1rem;
}

.hero h1 .riga2 {
    color: var(--verde);
    display: block;
}

.hero-sub {
    font-size: clamp(1.02rem, 1.5vw, 1.2rem);
    color: var(--testo-2);
    max-width: 46rem;
    margin-bottom: 2rem;
}

.hero-animal {
    position: absolute;
    z-index: 1;
    right: -6%;
    top: 50%;
    transform: translateY(-48%);
    width: min(640px, 52vw);
    pointer-events: none;
    filter: drop-shadow(0 0 90px rgba(93, 219, 133, .16));
    opacity: .96;
    mask-image: linear-gradient(to bottom, #000 74%, transparent 99%);
}

.hero-animal img {
    width: 100%;
    display: block;
}

/* ---------------------------------------------------------------- form URL */
.scan-form {
    display: flex;
    gap: .7rem;
    flex-wrap: wrap;
    max-width: 620px;
}

.scan-field {
    position: relative;
    flex: 1 1 320px;
}

.scan-field .prefix {
    position: absolute;
    left: 1.15rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: .95rem;
    pointer-events: none;
}

.scan-field input[type="url"],
.scan-field input[type="text"],
.scan-field input[type="password"] {
    width: 100%;
    padding: 1.05rem 1.2rem 1.05rem 3.3rem;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--bordo-forte);
    border-radius: 999px;
    color: var(--testo);
    font-size: 1.02rem;
    font-family: var(--font);
    transition: border-color .2s ease, background .2s ease;
}

.scan-field input::placeholder {
    color: #6d7a73;
}

.scan-field input:focus {
    outline: none;
    border-color: var(--verde);
    background: rgba(93, 219, 133, .06);
}

.scan-note {
    font-size: .88rem;
    color: var(--muted);
    margin-top: .95rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem;
}

.scan-note span {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
}

.scan-note svg {
    color: var(--verde);
    flex: none;
}

.flash {
    border-radius: var(--r);
    padding: .9rem 1.2rem;
    margin: 1rem 0 0;
    font-size: .95rem;
}

.flash-error {
    background: rgba(255, 107, 94, .12);
    border: 1px solid rgba(255, 107, 94, .35);
    color: #ffb3ab;
}

/* ----------------------------------------------------------------- sezioni */
.section {
    padding: clamp(3.2rem, 7vw, 6rem) 0;
    position: relative;
    scroll-margin-top: 110px;
}

.section-alt {
    background: linear-gradient(180deg, transparent, var(--nero-2) 12%, var(--nero-2) 88%, transparent);
}

.section-head {
    max-width: 46rem;
    margin-bottom: 3rem;
}

.section-head.center {
    margin-inline: auto;
}

.section-label {
    font-size: .78rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--verde);
    font-weight: 650;
    margin-bottom: .9rem;
    display: block;
}

.section-head p {
    color: var(--testo-2);
    font-size: 1.05rem;
    margin-bottom: 0;
}

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

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}

.card {
    background: var(--superficie);
    border: 1px solid var(--bordo);
    border-radius: var(--r-lg);
    padding: 1.7rem;
    position: relative;
    overflow: hidden;
}

.card h3 {
    margin-bottom: .5rem;
}

.card p:last-child {
    margin-bottom: 0;
}

.card-num {
    font-family: var(--font-display);
    font-size: .82rem;
    font-weight: 700;
    color: var(--verde);
    background: rgba(93, 219, 133, .12);
    border: 1px solid rgba(93, 219, 133, .25);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-bottom: 1.1rem;
}

.card-icon {
    color: var(--verde);
    margin-bottom: 1rem;
    display: block;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.chip {
    font-size: .86rem;
    padding: .42rem .85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--bordo);
    color: var(--testo-2);
}

.chip-verde {
    background: rgba(93, 219, 133, .12);
    border-color: rgba(93, 219, 133, .3);
    color: var(--verde-chiaro);
}

/* ------------------------------------------------------------------- score */
.score-legend {
    display: grid;
    gap: .9rem;
}

.score-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1.1rem;
    border-radius: var(--r);
    background: var(--superficie);
    border: 1px solid var(--bordo);
}

.score-badge {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .95rem;
    padding: .3rem .75rem;
    border-radius: 999px;
    flex: none;
    min-width: 5.6rem;
    text-align: center;
}

.t-ottimo {
    background: rgba(93, 219, 133, .16);
    color: var(--verde);
    border: 1px solid rgba(93, 219, 133, .35);
}

.t-buono {
    background: rgba(163, 246, 189, .12);
    color: var(--verde-chiaro);
    border: 1px solid rgba(163, 246, 189, .28);
}

.t-medio {
    background: rgba(255, 194, 71, .13);
    color: var(--ambra);
    border: 1px solid rgba(255, 194, 71, .3);
}

.t-scarso {
    background: rgba(255, 140, 94, .13);
    color: #ff9c76;
    border: 1px solid rgba(255, 140, 94, .3);
}

.t-critico {
    background: rgba(255, 107, 94, .13);
    color: var(--rosso);
    border: 1px solid rgba(255, 107, 94, .32);
}

/* --------------------------------------------------------------------- FAQ */
.faq {
    display: grid;
    gap: .8rem;
    max-width: 52rem;
}

.faq details {
    background: var(--superficie);
    border: 1px solid var(--bordo);
    border-radius: var(--r);
    overflow: hidden;
}

.faq summary {
    cursor: pointer;
    padding: 1.15rem 1.4rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.04rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

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

.faq summary::after {
    content: '+';
    color: var(--verde);
    font-size: 1.35rem;
    line-height: 1;
    flex: none;
}

.faq details[open] summary::after {
    content: '\2212';
}

.faq details>div {
    padding: 0 1.4rem 1.3rem;
    color: var(--testo-2);
}

.faq details>div p:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------- CTA */
.cta-band {
    padding: clamp(3rem, 6vw, 5rem) 0;
}

.cta-box {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(93, 219, 133, .14), rgba(93, 219, 133, .03) 55%), var(--superficie);
    border: 1px solid rgba(93, 219, 133, .28);
    border-radius: var(--r-xl);
    padding: clamp(2rem, 4.5vw, 3.4rem);
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

.cta-box::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    right: -120px;
    top: -160px;
    background: radial-gradient(circle, rgba(93, 219, 133, .22), transparent 65%);
    pointer-events: none;
}

.cta-box h2 {
    margin-bottom: .7rem;
}

.cta-box p {
    color: var(--testo-2);
    margin-bottom: 0;
}

.cta-actions {
    display: grid;
    gap: .8rem;
    position: relative;
    z-index: 2;
}

.cta-list {
    list-style: none;
    padding: 0;
    margin: 1.3rem 0 0;
    display: grid;
    gap: .5rem;
}

.cta-list li {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    color: var(--testo-2);
    font-size: .97rem;
}

.cta-list svg {
    color: var(--verde);
    flex: none;
    margin-top: .3rem;
}

/* ------------------------------------------------------------------ footer */
.site-footer {
    border-top: 1px solid var(--bordo);
    padding: 2.6rem 0;
    margin-top: 2rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-brand {
    font-family: var(--font-display);
    font-weight: 700;
    margin-bottom: .2rem;
}

.footer-inner p {
    margin-bottom: 0;
    font-size: .93rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.4rem;
    font-size: .93rem;
    align-items: flex-start;
}

.footer-links a {
    color: var(--testo-2);
}

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

/* =========================================================== avanzamento */
.progress-page {
    min-height: 62vh;
    display: grid;
    place-items: center;
    padding: 4rem 0;
}

.progress-card {
    max-width: 620px;
    width: 100%;
    text-align: center;
}

.progress-animal {
    width: 140px;
    margin: 0 auto 1.8rem;
    animation: respiro 3.4s ease-in-out infinite;
}

.progress-animal img {
    width: 100%;
    display: block;
    filter: drop-shadow(0 0 40px rgba(93, 219, 133, .25));
}

@keyframes respiro {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.045);
    }
}

.progress-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    overflow: hidden;
    margin: 1.6rem 0 1rem;
}

.progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--verde-scuro), var(--verde));
    transition: width .5s ease;
}

.progress-step {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
}

.progress-detail {
    color: var(--muted);
    font-size: .9rem;
    min-height: 1.4rem;
    word-break: break-word;
}

.progress-found {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    margin-top: 1.8rem;
}

.progress-found .chip {
    animation: entra .35s ease both;
}

@keyframes entra {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ================================================================= report */
.report-hero {
    padding: clamp(2.5rem, 5vw, 4rem) 0 2rem;
    position: relative;
}

.report-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(70% 60% at 22% 0%, rgba(93, 219, 133, .12), transparent 65%);
}

.report-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
    position: relative;
}

.report-url {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -.03em;
    word-break: break-word;
}

.report-meta {
    color: var(--muted);
    font-size: .9rem;
}

.score-panel {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    background: var(--superficie);
    border: 1px solid var(--bordo);
    border-radius: var(--r-xl);
    padding: clamp(1.6rem, 3.5vw, 2.6rem);
    margin-top: 1.8rem;
    position: relative;
    overflow: hidden;
}

.gauge {
    position: relative;
    width: 190px;
    height: 190px;
    flex: none;
}

.gauge svg {
    transform: rotate(-90deg);
    display: block;
}

.gauge-track {
    stroke: rgba(255, 255, 255, .07);
}

.gauge-value {
    stroke: var(--verde);
    stroke-linecap: round;
    transition: stroke-dashoffset 1.1s cubic-bezier(.22, .9, .3, 1);
}

.g-medio .gauge-value {
    stroke: var(--ambra);
}

.g-scarso .gauge-value {
    stroke: #ff9c76;
}

.g-critico .gauge-value {
    stroke: var(--rosso);
}

.g-medio .gauge-num {
    color: var(--ambra);
}

.g-scarso .gauge-num {
    color: #ff9c76;
}

.g-critico .gauge-num {
    color: var(--rosso);
}

.gauge-text {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    text-align: center;
}

.gauge-num {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.05em;
}

.gauge-den {
    color: var(--muted);
    font-size: .85rem;
}

.score-copy h2 {
    margin-bottom: .45rem;
}

.score-copy>p {
    color: var(--testo-2);
}

.score-counts {
    display: flex;
    gap: 1.6rem;
    flex-wrap: wrap;
    margin-top: 1.2rem;
}

.score-count b {
    font-family: var(--font-display);
    font-size: 1.5rem;
    display: block;
    line-height: 1.1;
}

.score-count span {
    font-size: .84rem;
    color: var(--muted);
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1.6rem;
}

.cat-card {
    background: var(--superficie);
    border: 1px solid var(--bordo);
    border-radius: var(--r);
    padding: 1.2rem 1.3rem;
}

.cat-card h4 {
    margin-bottom: .2rem;
}

.cat-score {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -.04em;
}

.cat-score small {
    font-size: .95rem;
    color: var(--muted);
    font-weight: 500;
}

.bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    overflow: hidden;
    margin: .6rem 0 .5rem;
}

.bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--verde);
}

.bar.b-medio span {
    background: var(--ambra);
}

.bar.b-scarso span {
    background: #ff9c76;
}

.bar.b-critico span {
    background: var(--rosso);
}

.cat-card p {
    font-size: .87rem;
    color: var(--muted);
    margin: 0;
}

/* ------------------------------------------------------------- highlights */
.highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.hl {
    border-radius: var(--r);
    padding: 1.2rem 1.35rem;
    border: 1px solid var(--bordo);
    background: var(--superficie);
}

.hl-critico {
    border-color: rgba(255, 107, 94, .32);
    background: linear-gradient(180deg, rgba(255, 107, 94, .07), transparent);
}

.hl-attenzione {
    border-color: rgba(255, 194, 71, .3);
    background: linear-gradient(180deg, rgba(255, 194, 71, .06), transparent);
}

.hl-ok {
    border-color: rgba(93, 219, 133, .32);
    background: linear-gradient(180deg, rgba(93, 219, 133, .07), transparent);
}

.hl h4 {
    margin-bottom: .35rem;
}

.hl p {
    font-size: .93rem;
    color: var(--testo-2);
    margin: 0;
}

.hl-points {
    font-size: .8rem;
    color: var(--verde);
    font-weight: 600;
    margin-top: .6rem;
    display: inline-block;
}

/* ------------------------------------------------------------------ check */
.checks {
    display: grid;
    gap: .75rem;
}

.check {
    background: var(--superficie);
    border: 1px solid var(--bordo);
    border-radius: var(--r);
    overflow: hidden;
    transition: border-color .2s ease;
}

.check:hover {
    border-color: var(--bordo-forte);
}

.check.s-fail {
    border-left: 3px solid var(--rosso);
}

.check.s-warn {
    border-left: 3px solid var(--ambra);
}

.check.s-pass {
    border-left: 3px solid var(--verde);
}

.check.s-na,
.check.s-info {
    border-left: 3px solid var(--bordo-forte);
    opacity: .8;
}

.check>summary {
    cursor: pointer;
    list-style: none;
    padding: 1.05rem 1.3rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
}

.check>summary::-webkit-details-marker {
    display: none;
}

.check-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: none;
}

.s-fail .check-dot {
    background: var(--rosso);
    box-shadow: 0 0 12px rgba(255, 107, 94, .6);
}

.s-warn .check-dot {
    background: var(--ambra);
    box-shadow: 0 0 12px rgba(255, 194, 71, .5);
}

.s-pass .check-dot {
    background: var(--verde);
    box-shadow: 0 0 12px rgba(93, 219, 133, .5);
}

.s-na .check-dot,
.s-info .check-dot {
    background: var(--muted);
}

.check-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.03rem;
}

.check-summary {
    font-size: .9rem;
    color: var(--testo-2);
    display: block;
    margin-top: .15rem;
}

.check-points {
    font-size: .82rem;
    color: var(--verde);
    font-weight: 650;
    white-space: nowrap;
}

.check-points.zero {
    color: var(--muted);
}

.check-body {
    padding: 0 1.3rem 1.4rem;
    display: grid;
    gap: 1.2rem;
}

.check-block h5 {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--verde);
    margin: 0 0 .5rem;
    font-weight: 650;
}

.check-block p {
    margin: 0;
    color: var(--testo-2);
    font-size: .95rem;
}

.fix-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
    display: grid;
    gap: .6rem;
    counter-reset: fix;
}

.fix-list li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .75rem;
    font-size: .95rem;
    color: var(--testo-2);
}

.fix-list li::before {
    counter-increment: fix;
    content: counter(fix);
    font-family: var(--font-display);
    font-size: .74rem;
    font-weight: 700;
    color: var(--verde);
    background: rgba(93, 219, 133, .12);
    border: 1px solid rgba(93, 219, 133, .26);
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-top: .12rem;
}

.evidence {
    margin: 0;
    padding: .85rem 1rem;
    background: var(--nero-2);
    border: 1px solid var(--bordo);
    border-radius: var(--r-sm);
    font-size: .84rem;
    color: var(--testo-2);
    display: grid;
    gap: .35rem;
    list-style: none;
}

.evidence li {
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ------------------------------------------------------------- rilevamenti */
.tool-group {
    margin-bottom: 2rem;
}

.tool-group>h3 {
    display: flex;
    align-items: baseline;
    gap: .7rem;
}

.tool-group>h3 small {
    font-size: .82rem;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: .9rem;
}

.tool {
    background: var(--superficie);
    border: 1px solid var(--bordo);
    border-radius: var(--r);
    padding: 1.1rem 1.2rem;
}

.tool-head {
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    align-items: flex-start;
}

.tool-name {
    font-family: var(--font-display);
    font-weight: 650;
    font-size: 1rem;
}

.tool-id {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .82rem;
    color: var(--verde);
    word-break: break-all;
}

.tool-desc {
    font-size: .89rem;
    color: var(--muted);
    margin: .5rem 0 0;
}

.tool-flags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .75rem;
}

.flag {
    font-size: .74rem;
    padding: .22rem .6rem;
    border-radius: 999px;
    border: 1px solid var(--bordo);
    color: var(--testo-2);
    background: rgba(255, 255, 255, .03);
}

.flag-ok {
    border-color: rgba(93, 219, 133, .3);
    color: var(--verde);
    background: rgba(93, 219, 133, .08);
}

.flag-warn {
    border-color: rgba(255, 194, 71, .3);
    color: var(--ambra);
    background: rgba(255, 194, 71, .07);
}

.flag-bad {
    border-color: rgba(255, 107, 94, .3);
    color: var(--rosso);
    background: rgba(255, 107, 94, .07);
}

/* -------------------------------------------------------------- tabelle */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--bordo);
    border-radius: var(--r);
    background: var(--superficie);
}

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

th,
td {
    padding: .8rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--bordo);
    vertical-align: top;
}

th {
    font-family: var(--font-display);
    font-weight: 650;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

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

td.mono,
th.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .83rem;
    word-break: break-all;
}

.pill {
    display: inline-block;
    font-size: .76rem;
    padding: .18rem .55rem;
    border-radius: 999px;
    border: 1px solid var(--bordo);
    color: var(--testo-2);
}

.pill-ok {
    border-color: rgba(93, 219, 133, .3);
    color: var(--verde);
}

.pill-bad {
    border-color: rgba(255, 107, 94, .3);
    color: var(--rosso);
}

/* ---------------------------------------------------------------- roadmap */
.roadmap {
    display: grid;
    gap: .8rem;
    counter-reset: passo;
}

.roadmap-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.1rem;
    align-items: start;
    background: var(--superficie);
    border: 1px solid var(--bordo);
    border-radius: var(--r);
    padding: 1.2rem 1.35rem;
}

.roadmap-num {
    counter-increment: passo;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .85rem;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(93, 219, 133, .12);
    border: 1px solid rgba(93, 219, 133, .28);
    color: var(--verde);
}

.roadmap-num::before {
    content: counter(passo);
}

.roadmap-item h4 {
    margin-bottom: .25rem;
}

.roadmap-item p {
    font-size: .93rem;
    color: var(--testo-2);
    margin: 0;
}

.roadmap-gain {
    text-align: right;
}

.roadmap-gain b {
    font-family: var(--font-display);
    color: var(--verde);
    font-size: 1.15rem;
    display: block;
    line-height: 1.2;
}

.roadmap-gain span {
    font-size: .74rem;
    color: var(--muted);
}

.note-box {
    background: var(--nero-2);
    border: 1px solid var(--bordo);
    border-radius: var(--r);
    padding: 1.3rem 1.5rem;
    font-size: .92rem;
    color: var(--testo-2);
}

.note-box ul {
    margin: .6rem 0 0;
    padding-left: 1.2rem;
    display: grid;
    gap: .4rem;
}

.toolbar {
    display: flex;
    gap: .7rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.filter-btn {
    font-size: .86rem;
    padding: .45rem .95rem;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--bordo);
    color: var(--testo-2);
    font-family: var(--font);
    transition: all .18s ease;
}

.filter-btn:hover {
    border-color: var(--bordo-forte);
}

.filter-btn.attivo {
    background: rgba(93, 219, 133, .12);
    border-color: rgba(93, 219, 133, .35);
    color: var(--verde);
}

.filter-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.filter-btn:disabled:hover {
    border-color: var(--bordo);
}

/* --------------------------------------------------------------- metriche */
.metrics-row {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1.2rem;
    margin-top: 1.8rem;
    align-items: start;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .8rem;
}

.metric-card {
    background: var(--superficie);
    border: 1px solid var(--bordo);
    border-left: 3px solid var(--verde);
    border-radius: var(--r);
    padding: .9rem 1.1rem;
}

.metric-card.m-medio {
    border-left-color: var(--ambra);
}

.metric-card.m-critico {
    border-left-color: var(--rosso);
}

.metric-label {
    display: block;
    font-size: .78rem;
    color: var(--muted);
    margin-bottom: .3rem;
}

.metric-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
}

.screenshot-frame {
    border: 1px solid var(--bordo);
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--nero-2);
    max-height: 320px;
    display: flex;
    justify-content: center;
}

.screenshot-frame img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

@media (max-width: 780px) {
    .metrics-row {
        grid-template-columns: 1fr;
    }

    .screenshot-frame {
        max-height: 220px;
    }
}

/* -------------------------------------------------------------- responsive */
@media (max-width: 920px) {
    .wrap {
        width: calc(100% - 2.2rem);
    }

    /* Su schermo stretto l illustrazione va sotto al testo, non sopra:
       la prima cosa che si deve leggere e' il titolo. */
    .hero {
        display: flex;
        flex-direction: column;
    }

    .hero>.wrap {
        order: 1;
    }

    .hero-animal {
        order: 2;
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: min(240px, 60vw);
        margin: 2.5rem auto 0;
        opacity: .8;
    }

    .hero-inner {
        max-width: none;
    }

    .cta-box {
        grid-template-columns: 1fr;
    }

    .score-panel {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .score-counts {
        justify-content: center;
    }

    .site-nav a:not(.btn) {
        display: none;
    }
}

@media (max-width: 560px) {
    body {
        font-size: 16px;
    }

    .scan-form {
        flex-direction: column;
    }

    /* In colonna il flex-basis diventa altezza: senza questo il campo
       diventa alto 320px e il prefisso finisce sotto all input. */
    .scan-field {
        flex: 0 0 auto;
        width: 100%;
    }

    .scan-form .btn,
    .cta-actions .btn {
        width: 100%;
    }

    .site-nav {
        gap: .8rem;
    }

    .logo-text {
        font-size: 1rem;
    }

    .logo svg {
        width: 19px;
        height: 19px;
    }

    .btn-sm {
        padding: .5rem .85rem;
        font-size: .84rem;
    }

    .solo-desktop {
        display: none;
    }

    .header-inner {
        gap: .8rem;
    }

    .scan-note {
        gap: .5rem 1rem;
        font-size: .84rem;
    }

    .roadmap-item {
        grid-template-columns: auto 1fr;
    }

    .roadmap-gain {
        grid-column: 2;
        text-align: left;
    }

    .check>summary {
        grid-template-columns: auto 1fr;
    }

    .check-points {
        grid-column: 2;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

@media print {

    .site-header,
    .cta-band,
    .site-footer,
    .toolbar {
        display: none;
    }

    body {
        background: #fff;
        color: #111;
    }

    .card,
    .check,
    .tool,
    .score-panel {
        border-color: #ccc;
        background: #fff;
    }
}

/* ------------------------------------------------- report: spiegazioni */
.panel-head {
    margin: 3rem 0 1.2rem;
    max-width: 48rem;
}

.panel-head h3 {
    font-size: clamp(1.35rem, 2.4vw, 1.8rem);
    margin-bottom: .4rem;
}

.panel-head .section-label {
    margin-bottom: .5rem;
}

.panel-head p {
    margin: 0;
    font-size: .95rem;
}

.cat-card p.cat-todo {
    margin-top: .5rem;
    color: var(--testo-2);
    font-weight: 600;
}

.metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.metric-label abbr {
    text-decoration: none;
    color: var(--muted);
    font-weight: 500;
    margin-left: .2rem;
}

.metric-goal {
    display: block;
    font-size: .78rem;
    color: var(--muted);
    margin-top: .1rem;
}

.metric-text {
    font-size: .84rem;
    color: var(--testo-2);
    margin: .55rem 0 0;
    line-height: 1.5;
}

.metric-runs {
    font-size: .76rem;
    color: var(--muted);
    margin: .45rem 0 0;
}

.metric-runs b {
    color: var(--testo);
}

.check-gain {
    text-align: right;
    white-space: nowrap;
    line-height: 1.15;
}

.check-gain b {
    display: block;
    font-family: var(--font-display);
    color: var(--verde);
    font-size: 1.05rem;
}

.check-gain small {
    font-size: .74rem;
    color: var(--muted);
}

.check-gain.zero small {
    color: var(--muted);
}

.check-meta {
    margin: 0;
    font-size: .82rem;
    color: var(--muted);
}

.roadmap-list .roadmap-num {
    font-size: .82rem;
}

.roadmap-list .roadmap-num::before {
    content: none;
}

.roadmap-more {
    margin-top: .2rem;
}

.roadmap-more>summary {
    cursor: pointer;
    color: var(--verde);
    font-size: .93rem;
    padding: .6rem 0;
}

.roadmap-more>.checks {
    margin-top: .6rem;
}

.check-group {
    margin-bottom: 2rem;
}

.check-group>h4 {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    margin-bottom: .8rem;
}

.check-group>h4 small {
    color: var(--muted);
    font-weight: 500;
    font-size: .85rem;
}

.note-inline {
    margin: 1.2rem 0 0;
    padding: .9rem 1.1rem;
    border-radius: var(--r);
    background: rgba(93, 219, 133, .07);
    border: 1px solid rgba(93, 219, 133, .22);
    color: var(--testo-2);
    font-size: .92rem;
}

.note-inline .mono {
    color: var(--testo);
    word-break: break-all;
}

@media (max-width: 560px) {
    .check-gain {
        grid-column: 2;
        text-align: left;
    }
}