/* Verdex — «Motivi principali dell'esito» in cima alla scheda «Esito» (shield-why.js) */
.rx-why-host.hidden { display: none; }
.rx-why { display: grid; gap: .45rem; min-width: 0; padding: .65rem .75rem .7rem; border: 1px solid #E2E8F0; border-left: 5px solid #94A3B8; border-radius: .9rem; background: #FFFFFF; }
.rx-why[data-top="risk"] { border-left-color: #DC2626; }
.rx-why[data-top="warn"] { border-left-color: #D97706; }
.rx-why[data-top="ok"] { border-left-color: #059669; }
.rx-why-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .6rem; margin: 0; }
.rx-why-title { font-size: .78rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; color: #1E1B4B; }
.rx-why-hint { font-size: .78rem; color: #64748B; }
/* Indice di rischio del referto (lo stesso del riquadro principale). */
.rx-why-risk { font-size: .8rem; font-weight: 800; color: #0F172A; background: #F1F5F9; border-radius: 9999px; padding: .05rem .55rem; }
.rx-why[data-top="risk"] .rx-why-risk { color: #991B1B; background: #FEF2F2; }
.rx-why[data-top="warn"] .rx-why-risk { color: #92400E; background: #FFFBEB; }
.rx-why-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; min-width: 0; }
.rx-why-item { display: grid; gap: .12rem; min-width: 0; padding: .4rem .55rem; border-radius: .65rem; background: #F8FAFC; }
.rx-why-item[data-tone="risk"] { background: #FEF2F2; }
.rx-why-item[data-tone="warn"] { background: #FFFBEB; }
.rx-why-item[data-tone="ok"] { background: #ECFDF5; }
.rx-why-tag { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .45rem; min-width: 0; font-size: .78rem; line-height: 1.3; }
.rx-why-dot { flex-shrink: 0; width: .6rem; height: .6rem; border-radius: 999px; background: #94A3B8; }
.rx-why-item[data-tone="risk"] .rx-why-dot { background: #DC2626; }
.rx-why-item[data-tone="warn"] .rx-why-dot { background: #D97706; }
.rx-why-item[data-tone="ok"] .rx-why-dot { background: #059669; }
.rx-why-g { font-weight: 900; color: #0F172A; overflow-wrap: anywhere; }
.rx-why-tone { font-weight: 800; padding: 0 .45rem; border-radius: 999px; font-size: .72rem; background: #FFFFFF; border: 1px solid currentColor; }
.rx-why-item[data-tone="risk"] .rx-why-tone { color: #B91C1C; }
.rx-why-item[data-tone="warn"] .rx-why-tone { color: #92400E; }
.rx-why-item[data-tone="ok"] .rx-why-tone { color: #047857; }
.rx-why-text { font-size: .92rem; line-height: 1.4; color: #1E293B; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rx-why-route { font-size: .78rem; line-height: 1.35; color: #475569; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rx-why-more { font-size: .74rem; color: #64748B; }

@media (max-width: 640px) {
  .rx-why { padding: .5rem .6rem .55rem; gap: .35rem; border-left-width: 4px; border-radius: .8rem; }
  .rx-why-hint { display: none; }
  .rx-why-title { font-size: .68rem; }
  .rx-why-list { gap: .3rem; }
  .rx-why-item { padding: .32rem .45rem; }
  .rx-why-tag { font-size: .72rem; }
  .rx-why-tone { font-size: .66rem; }
  .rx-why-text { font-size: .86rem; line-height: 1.35; -webkit-line-clamp: 2; }
  .rx-why-route { -webkit-line-clamp: 1; }
}
@media (min-width: 1024px) {
  .rx-why-list { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
}
html.large-text .rx-why-title { font-size: .9rem; }
html.large-text .rx-why-tag { font-size: .9rem; }
html.large-text .rx-why-text { font-size: 1.05rem; -webkit-line-clamp: 4; }
html.large-text .rx-why-route, html.large-text .rx-why-more { font-size: .9rem; }
html.high-contrast .rx-why, html.high-contrast .rx-why-item { background: #FFFFFF; border-color: #000000; }
html.high-contrast .rx-why-item { border: 1px solid #000000; }
html.high-contrast :is(.rx-why-title, .rx-why-hint, .rx-why-risk, .rx-why-g, .rx-why-text, .rx-why-route, .rx-why-more, .rx-why-tone) { color: #000000 !important; }
@media print {
  .rx-why-text, .rx-why-route { -webkit-line-clamp: unset; display: block; overflow: visible; }
}
