        :root {
            --navy: #0a4aa1;
            /* blu header */
            --bg: #0b1220;
            /* sfondo scuro elegante */
            --card: #121a2a;
            /* pannelli */
            --text: #e8eefc;
            /* testo principale */
            --muted: #9bb2d6;
            /* testo secondario */
            --accent: #4ea1ff;
            /* dettagli */
        }

        * {
            box-sizing: border-box;
        }

        html,
        body {
            height: 100%;
        }

        body {
            margin: 0;
            font-family: "Nunito Sans", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
            color: var(--text);
            background: radial-gradient(1200px 800px at 10% -10%, #133a82 0%, transparent 60%),
                radial-gradient(1000px 700px at 90% 110%, #0b1f37 0%, transparent 70%),
                var(--bg);
            background-repeat: no-repeat;
            background-attachment: fixed;
        }

        header {
            background: linear-gradient(180deg, var(--navy), #07326e);
            color: #fff;
            position: sticky;
            top: 0;
            z-index: 10;
            box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
        }

        .hdr {
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 140px 1fr 140px;
            align-items: center;
            gap: 12px;
            padding: 14px 16px;
        }

        .hdr img {
            max-height: 96px;
            width: auto;
            object-fit: contain;
            filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .3));
        }

        .title {
            text-align: center;
            font-weight: 800;
            letter-spacing: .6px;
        }

        .title h1 {
            margin: 0;
            font-size: clamp(20px, 3.4vw, 32px);
        }

        main {
            max-width: 1200px;
            margin: 22px auto;
            padding: 0 16px 36px;
        }

        .notice {
            background: #0f1b33;
            border: 1px solid #1f365f;
            color: var(--muted);
            padding: 10px 12px;
            border-radius: 10px;
            margin: 12px 0 22px;
        }

        .grid {
            display: grid;
            gap: 18px;
            grid-template-columns: 1fr;
            /* mobile */
        }



        .panel {
            background: linear-gradient(180deg, #0d1423, #0b1426);
            border: 1px solid rgba(255, 255, 255, .06);
            border-radius: 16px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            min-height: 0;
        }

        .panel h2 {
            margin: 0;
            font-size: 18px;
            padding: 14px 14px 12px;
            border-bottom: 1px solid rgba(255, 255, 255, .06);
            color: #dfe9ff;
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            position: relative;
            transition: background .2s ease, box-shadow .2s ease, color .2s ease, transform .05s ease;
        }

        .panel h2::after {
            content: '▾';
            margin-left: auto;
            font-size: 14px;
            opacity: .9;
            transform: rotate(-90deg);
            transition: transform .2s ease;
        }

        .panel h2:hover {
            background: linear-gradient(180deg, rgba(78, 161, 255, .20), rgba(78, 161, 255, .08));
            box-shadow: inset 0 0 0 1px rgba(78, 161, 255, .45), 0 6px 24px rgba(78, 161, 255, .25);
            color: #fff;
        }

        .panel h2:active {
            transform: translateY(1px);
        }

        .panel h2:focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: 2px;
            box-shadow: inset 0 0 0 1px rgba(78, 161, 255, .6), 0 0 0 3px rgba(78, 161, 255, .25);
        }

        .panel:not(.collapsed) h2::after {
            transform: rotate(0deg);
        }

        .panel.collapsed .chart-wrap,
        .panel.collapsed .table-wrap {
            display: none;
        }

        .panel h2 .chip {
            font-size: 12px;
            padding: 2px 8px;
            border-radius: 999px;
            background: rgba(78, 161, 255, .12);
            border: 1px solid rgba(78, 161, 255, .35);
            color: #b8d8ff;
        }

        .chart-wrap {
            padding: 14px;
        }

        .chart-box {
            margin-bottom: 14px;
            height: 340px;
            /* <- altezza al contenitore, non al canvas */
        }

        canvas {
            width: 100% !important;
            height: 100% !important;
            /* <- riempi il contenitore */
            display: block;
            /* evita spazi/line-height strani */
        }


        .table-wrap {
            overflow: auto;
            border-top: 1px solid rgba(255, 255, 255, .06);
        }

        table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }

        thead th {
            position: sticky;
            top: 0;
            background: #0e1931;
            color: #ccd9f8;
            text-align: center;
            padding: 10px;
            border-bottom: 1px solid #22355f;
        }

        tbody td {
            padding: 8px 10px;
            border-bottom: 1px dashed rgba(255, 255, 255, .08);
            color: #d7e4ff;
            white-space: nowrap;
            text-align: center;
        }

        tbody tr:hover {
            background: rgba(78, 161, 255, .06);
        }

        tbody tr:hover {
            background: rgba(78, 161, 255, .06);
        }

        .skeleton {
            animation: pulse 1.2s infinite ease-in-out;
            background: linear-gradient(90deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .12), rgba(255, 255, 255, .06));
            height: 220px;
            border-radius: 12px;
        }

        @keyframes pulse {
            0% {
                background-position: -200px 0
            }

            100% {
                background-position: calc(200px + 100%) 0
            }
        }

        footer {
            color: var(--muted);
            text-align: center;
            font-size: 12px;
            padding: 22px 0 12px;
        }

        a.muted {
            color: #9bb2d6;
            text-decoration: underline dotted;
        }

        button {
            outline: none;
            cursor: pointer;
            border: none;
            padding: 0.9rem 2rem;
            margin: 0;
            font-family: inherit;
            font-size: inherit;
            position: relative;
            display: inline-block;
            letter-spacing: 0.05rem;
            font-weight: 700;
            font-size: 17px;
            border-radius: 500px;
            overflow: hidden;
            background: #66ff66;
            color: ghostwhite;
        }

        button span {
            position: relative;
            z-index: 5;
            transition: color 0.4s;
        }

        button:hover span {
            color: black;
        }

        button::before,
        button::after {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
        }

        button::before {
            content: "";
            background: #1f365f;
            width: 120%;
            left: -10%;
            transform: skew(30deg);
            transition: transform 0.4s cubic-bezier(0.3, 1, 0.8, 1);
        }

        button:hover::before {
            transform: translate3d(100%, 0, 0);
        }

        .chart-box {
            margin-bottom: 50px;
        }

        .chart-title {
            font-size: 18px;
            font-weight: 600;
            color: #e3eeff;
            margin: 0 0 6px 4px;
            letter-spacing: .3px;
            text-align: center;
        }

        /* Cella con direzione onda (testo + freccia) */
        .dir-cell {
            display: inline-flex;
            align-items: center;
            gap: 10px;
        }

        .dir-cell img {
            width: 13px;
            height: 13px;
            transform-origin: 50% 50%;
            filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35));
            opacity: 0.9;
        }

        .warn-box {
            background: #ffd60c;
            border: 1px solid #1f365f;
            color: var(--text);
            border-radius: 12px;
            padding: 12px 14px;
            margin: 14px 0 18px;
        }

        .warn-title {
            font-weight: 700;
            letter-spacing: .3px;
            margin-bottom: 8px;
            color: #000000;
            /* un tocco di evidenza */
        }

        .warn-body {
            white-space: pre-wrap;
            /* rispetta \n */
            line-height: 1.35;
            color: #000000;
        }