/* Risultati degli strumenti (Check URL, Audit header): componenti condivisi */
.tr-muted { color: #8b97aa; font-size: 0.88rem; }

/* avanzamento */
.tr-steps { list-style: none; display: grid; gap: 0.5rem; margin: 1.2rem 0 0; padding: 1rem 1.2rem; border: 1px solid var(--sc-border); border-radius: 14px; background: var(--sc-glass); }
.tr-steps li { display: flex; align-items: center; gap: 0.7rem; color: #64748b; font-size: 0.9rem; transition: color 0.3s; }
.tr-steps i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #334155; flex: none; position: relative; }
.tr-steps li.is-active { color: #e2e8f0; }
.tr-steps li.is-active i { border-color: var(--sc-cyan); border-top-color: transparent; animation: trSpin 0.8s linear infinite; }
.tr-steps li.is-done { color: #94a3b8; }
.tr-steps li.is-done i { background: var(--sc-emerald); border-color: var(--sc-emerald); }
.tr-steps li.is-fail i { background: var(--sc-rose); border-color: var(--sc-rose); }
@keyframes trSpin { to { transform: rotate(360deg); } }

/* riepilogo */
.tr-results { margin-top: 1.6rem; display: grid; gap: 1.2rem; }
.tr-results[hidden] { display: none; }
.tr-hero { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center; padding: 1.4rem; border: 1px solid var(--sc-border); border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--g, #34d399) 10%, transparent), var(--sc-glass) 60%); animation: trIn 0.5s both; }
@keyframes trIn { from { opacity: 0; transform: translateY(12px); } }
.tr-ring { position: relative; width: 150px; height: 150px; }
.tr-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tr-ring circle { fill: none; stroke-width: 9; }
.tr-ring__bg { stroke: rgba(255, 255, 255, 0.08); }
.tr-ring__fg { stroke: var(--c); stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(.2,.8,.2,1); filter: drop-shadow(0 0 6px var(--c)); }
.tr-ring__txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.tr-ring__txt strong { font: 700 2.4rem/1 var(--sc-mono); color: #fff; }
.tr-ring__txt span { font: 700 1rem var(--sc-mono); color: var(--c); }
.tr-hero h2 { margin: 0 0 0.25rem; font-size: 1.5rem; color: #fff; font-family: var(--sc-serif); font-weight: 400; }
.tr-hero p { margin: 0 0 0.9rem; color: #aab4c4; line-height: 1.55; }
.tr-facts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin: 0 0 0.9rem; }
.tr-facts div { min-width: 0; }
.tr-facts dt { font: 0.64rem var(--sc-mono); text-transform: uppercase; letter-spacing: 0.06em; color: #8b97aa; }
.tr-facts dd { margin: 0.1rem 0 0; font-size: 0.9rem; color: #e2e8f0; word-break: break-all; }
.tr-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* tab */
.tr-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; border-bottom: 1px solid var(--sc-border); margin-bottom: 1rem; }
.tr-tabs button { padding: 0.65rem 1rem; border: 0; border-bottom: 2px solid transparent; background: none; color: #94a3b8; cursor: pointer; font-size: 0.92rem; transition: color 0.2s, border-color 0.2s; }
.tr-tabs button:hover { color: #e2e8f0; }
.tr-tabs button[aria-selected="true"] { color: #fff; border-color: var(--sc-cyan); }
.tr-tabs b { margin-left: 0.4rem; padding: 0.05rem 0.45rem; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font: 0.7rem var(--sc-mono); }
.tr-panel { animation: trIn 0.35s both; }
.tr-panel[hidden] { display: none; }
.tr-panel h3 { margin: 1.2rem 0 0.6rem; font-size: 1rem; color: #f1f5f9; }
.tr-panel h3:first-child { margin-top: 0; }

/* cosa sistemare */
.tr-findings { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.tr-finding { display: grid; grid-template-columns: auto 1fr auto; gap: 0.8rem; align-items: start; padding: 0.85rem 1rem; border-radius: 12px; border: 1px solid var(--sc-border); border-left-width: 3px; background: var(--sc-glass); animation: trIn 0.4s both; animation-delay: calc(var(--i) * 50ms); }
.tr-finding--critical { border-left-color: #fb7185; } .tr-finding--high { border-left-color: #fb923c; } .tr-finding--medium { border-left-color: #f59e0b; } .tr-finding--low { border-left-color: #64748b; } .tr-finding--info { border-left-color: #34d399; }
.tr-finding strong { color: #f8fafc; }
.tr-finding p { margin: 0.25rem 0 0; font-size: 0.86rem; color: #9fb0c3; line-height: 1.5; }
.tr-fix { color: #cbd5e1 !important; }
.tr-fix b { color: var(--sc-emerald); }
.tr-sev { padding: 0.15rem 0.55rem; border-radius: 6px; font: 0.68rem var(--sc-mono); text-transform: uppercase; background: rgba(255, 255, 255, 0.08); color: #cbd5e1; }
.tr-sev--critical, .tr-sev--high { background: rgba(251, 113, 133, 0.18); color: #fda4af; }
.tr-sev--medium { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }

/* barre della detrazione */
.tr-break { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.tr-break li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; font-size: 0.84rem; color: #cbd5e1; }
.tr-break i { display: block; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); position: relative; overflow: hidden; }
.tr-break i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: linear-gradient(90deg, #fb923c, #fb7185); border-radius: 3px; animation: trGrow 0.9s both; transform-origin: left; }
@keyframes trGrow { from { transform: scaleX(0); } }
.tr-break b { font-family: var(--sc-mono); color: #fda4af; }

/* controlli (header, file…) */
.tr-checks { display: grid; gap: 0.6rem; }
.tr-check { border: 1px solid var(--sc-border); border-radius: 12px; background: var(--sc-glass); overflow: hidden; }
.tr-check summary { display: grid; grid-template-columns: auto 1fr auto; gap: 0.8rem; align-items: center; padding: 0.8rem 1rem; cursor: pointer; list-style: none; }
.tr-check summary::-webkit-details-marker { display: none; }
.tr-check__icon { width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; font-size: 0.85rem; background: rgba(255, 255, 255, 0.08); }
.tr-check--ok .tr-check__icon { background: rgba(52, 211, 153, 0.2); color: #6ee7b7; }
.tr-check--bad .tr-check__icon { background: rgba(251, 113, 133, 0.2); color: #fda4af; }
.tr-check--warn .tr-check__icon { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.tr-check strong { display: block; color: #f1f5f9; font-size: 0.95rem; }
.tr-check small { color: #8b97aa; font-size: 0.78rem; }
.tr-check__body { padding: 0 1rem 0.9rem 3.4rem; font-size: 0.86rem; color: #aab4c4; line-height: 1.55; }
.tr-check__body code { display: block; margin-top: 0.4rem; padding: 0.4rem 0.6rem; border-radius: 8px; background: rgba(0, 0, 0, 0.35); color: #a5f3fc; font-size: 0.78rem; word-break: break-all; }
.tr-chip { padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.72rem; background: rgba(255, 255, 255, 0.08); color: #cbd5e1; white-space: nowrap; }
.tr-chip--ok { background: rgba(52, 211, 153, 0.18); color: #6ee7b7; } .tr-chip--bad { background: rgba(251, 113, 133, 0.18); color: #fda4af; } .tr-chip--warn { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }

/* tabelle compatte e coppie chiave/valore */
.tr-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.6rem; margin: 0; }
.tr-kv div { padding: 0.65rem 0.8rem; border-radius: 10px; background: rgba(255, 255, 255, 0.04); min-width: 0; }
.tr-kv dt { font: 0.64rem var(--sc-mono); text-transform: uppercase; letter-spacing: 0.06em; color: #8b97aa; }
.tr-kv dd { margin: 0.15rem 0 0; font-size: 0.88rem; color: #e2e8f0; word-break: break-word; }
.tr-chain { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tr-chain li { position: relative; padding: 0.5rem 0 0.5rem 1.6rem; font-size: 0.84rem; color: #cbd5e1; word-break: break-all; }
.tr-chain li::before { content: ""; position: absolute; left: 0.35rem; top: 0.9rem; width: 9px; height: 9px; border-radius: 50%; background: var(--sc-cyan); }
.tr-chain li::after { content: ""; position: absolute; left: 0.7rem; top: 1.5rem; bottom: -0.4rem; width: 1px; background: rgba(255, 255, 255, 0.15); }
.tr-chain li:last-child::after { display: none; }
.tr-chain em { font-style: normal; font-family: var(--sc-mono); font-size: 0.72rem; color: #8b97aa; margin-left: 0.4rem; }
.tr-more { margin-top: 1rem; border: 1px solid var(--sc-border); border-radius: 12px; background: var(--sc-glass); }
.tr-more summary { padding: 0.7rem 1rem; cursor: pointer; color: #94a3b8; font-size: 0.86rem; }
.tr-more > div { padding: 0 1rem 1rem; font-size: 0.84rem; color: #9fb0c3; line-height: 1.55; }
.tr-more ul { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.tr-more a { color: var(--sc-cyan); }

/* guida iniziale */
.tr-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.tr-how li { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.8rem 1rem; border: 1px solid var(--sc-border); border-radius: 12px; background: var(--sc-glass); font-size: 0.86rem; color: #aab4c4; line-height: 1.45; }
.tr-how b { display: grid; place-items: center; flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: rgba(34, 211, 238, 0.18); color: var(--sc-cyan); font: 700 0.8rem var(--sc-mono); }
.tr-how strong { display: block; color: #f1f5f9; }
.tr-error { margin-top: 0.7rem; padding: 0.7rem 1rem; border-radius: 10px; background: rgba(251, 113, 133, 0.12); border: 1px solid rgba(251, 113, 133, 0.4); color: #fecdd3; font-size: 0.88rem; }
.tr-error[hidden] { display: none; }

@media (max-width: 720px) {
  .tr-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .tr-facts { justify-content: center; }
  .tr-actions { justify-content: center; }
  .tr-how { grid-template-columns: 1fr; }
  .tr-finding { grid-template-columns: auto 1fr; }
  .tr-finding .tr-sev { grid-column: 2; justify-self: start; }
  .tr-break li { grid-template-columns: 1fr auto; }
  .tr-break i { grid-column: 1 / -1; order: 3; }
  .tr-check__body { padding-left: 1rem; }
}
@media print {
  .evil-theme .sc-scene, #matrix-canvas, header, footer, .sc-panel, .tr-steps, .tr-actions, .tr-tabs, .tr-how { display: none !important; }
  .tr-panel[hidden] { display: block !important; }
  body { background: #fff !important; color: #000 !important; }
  .tr-hero, .tr-finding, .tr-check, .tr-more { background: #fff !important; border-color: #999 !important; color: #000 !important; }
  .tr-finding *, .tr-hero *, .tr-check *, .tr-kv *, .tr-break * { color: #000 !important; }
}
@media (prefers-reduced-motion: reduce) { .tr-hero, .tr-finding, .tr-panel, .tr-break i::after, .tr-steps i { animation: none !important; } .tr-ring__fg { transition: none; } }
