/* Repo Intelligence — Sirius Detector dark navy / cyan */
.ri-shell {
  --ri-bg: #0b1224;
  --ri-card: rgba(15, 23, 42, 0.92);
  --ri-border: rgba(56, 189, 248, 0.22);
  --ri-cyan: #22d3ee;
  --ri-blue: #38bdf8;
  --ri-text: #e2e8f0;
  --ri-muted: #94a3b8;
  background: radial-gradient(ellipse at 20% 0%, rgba(30, 58, 138, 0.35), transparent 55%),
    radial-gradient(ellipse at 90% 10%, rgba(6, 182, 212, 0.12), transparent 45%),
    var(--ri-bg);
  color: var(--ri-text);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.ri-hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ri-hero-title span {
  color: var(--ri-cyan);
}

.ri-card {
  background: var(--ri-card);
  border: 1px solid var(--ri-border);
  border-radius: 0.85rem;
  padding: 1.25rem;
}

.ri-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--ri-cyan);
  background: rgba(6, 182, 212, 0.08);
}

.ri-badge--muted {
  color: var(--ri-muted);
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.6);
}

.ri-file-tree {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
}

.ri-file-tree .dir {
  color: var(--ri-blue);
}

.ri-file-tree .file {
  padding-left: 1rem;
}

.ri-upload-zone {
  border: 2px dashed rgba(56, 189, 248, 0.45);
  border-radius: 0.75rem;
  padding: 2rem 1.5rem;
  text-align: center;
  background: rgba(15, 23, 42, 0.5);
  transition: border-color 0.2s, background 0.2s;
}

.ri-upload-zone:hover {
  border-color: var(--ri-cyan);
  background: rgba(6, 182, 212, 0.06);
}

.ri-warning {
  border-left: 3px solid #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  padding: 0.75rem 1rem;
  border-radius: 0.35rem;
  font-size: 0.88rem;
  color: #fde68a;
}

.ri-score-pill {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ri-cyan);
}

.ri-section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #f8fafc;
}

.ri-list li {
  margin-bottom: 0.35rem;
  color: var(--ri-muted);
}

.ri-module-card {
  background: linear-gradient(145deg, #0f172a 0%, #0c1929 40%, #0a1628 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 0.9rem;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.ri-module-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 12px 32px rgba(6, 182, 212, 0.12);
  color: inherit;
}

.ri-module-card__head {
  padding: 1rem 1.1rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.ri-module-card__body {
  padding: 0 1.1rem 1rem;
  flex-grow: 1;
}

.ri-module-card__tree {
  margin: 0.75rem 0;
  font-size: 0.72rem;
}

.ri-module-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.5rem 0;
}

.ri-module-card__cta {
  margin-top: auto;
  padding: 0 1.1rem 1.1rem;
}

.ri-cta-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ri-risk-high { color: #f87171; }
.ri-risk-medium { color: #fbbf24; }
.ri-risk-low { color: #4ade80; }
.ri-risk-critical { color: #ef4444; }

/* —— Report dashboard —— */
.ri-report-page {
  position: relative;
  min-height: 100vh;
  color: #e2e8f0;
}

.ri-report-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(34, 211, 238, 0.14), transparent 50%),
    radial-gradient(ellipse 60% 40% at 95% 5%, rgba(56, 189, 248, 0.1), transparent 45%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(99, 102, 241, 0.08), transparent 50%),
    #070d1a;
}

.ri-report-wrap {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
}

.ri-report-back {
  color: #94a3b8;
  transition: color 0.15s;
}

.ri-report-back:hover {
  color: #22d3ee;
}

.ri-report-subtitle {
  color: #94a3b8;
  line-height: 1.65;
  max-width: 42rem;
}

.ri-report-meta .ri-badge--file {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ri-report-hero {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(11, 18, 36, 0.88) 100%);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 1.25rem;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

/* Identità prodotto — above the fold */
.ri-identity-hero {
  border-radius: 1.25rem;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: linear-gradient(145deg, rgba(8, 47, 73, 0.92) 0%, rgba(15, 23, 42, 0.95) 55%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.ri-identity-hero__inner {
  padding: 1.5rem 1.5rem 1.25rem;
}

.ri-identity-hero__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 0.75rem;
}

.ri-identity-hero__kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(125, 211, 252, 0.85);
  width: 100%;
}

.ri-identity-hero__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #f0f9ff;
}

.ri-identity-hero__badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
}

.ri-identity-hero__badge--ai {
  border-color: rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
  background: rgba(6, 78, 59, 0.35);
}

.ri-identity-hero__headline {
  font-size: 1.15rem;
  line-height: 1.55;
  color: #e2e8f0;
  margin: 0 0 1rem;
  font-weight: 500;
}

.ri-identity-hero__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.ri-identity-hero__pill {
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: 0.65rem;
  padding: 0.55rem 0.75rem;
}

.ri-identity-hero__pill .label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(148, 163, 184, 0.9);
  margin-bottom: 0.15rem;
}

.ri-identity-hero__pill strong {
  color: #f8fafc;
  font-weight: 600;
}

.ri-identity-hero__alert {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
  background: rgba(120, 53, 15, 0.35);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fde68a;
  font-size: 0.88rem;
}

.ri-identity-hero__alert code {
  color: #fcd34d;
  font-size: 0.82em;
}

.ri-identity-hero__ok {
  margin-top: 0.75rem;
  color: #6ee7b7;
  font-size: 0.9rem;
}

.ri-identity-hero__details summary {
  cursor: pointer;
  color: rgba(148, 163, 184, 0.95);
}

.ri-score-ring-card {
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
}

.ri-score-ring {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 0.75rem;
}

.ri-score-ring__svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ri-score-ring__track {
  fill: none;
  stroke: rgba(51, 65, 85, 0.8);
  stroke-width: 10;
}

.ri-score-ring__fill {
  fill: none;
  stroke: url(#riScoreGrad);
  stroke: #22d3ee;
  stroke-width: 10;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.45));
}

.ri-score-ring__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ri-score-ring__value {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  color: #f8fafc;
}

.ri-score-ring__unit {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: -2px;
}

.ri-score-ring__label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #22d3ee;
  margin-top: 0.35rem;
  max-width: 90px;
  line-height: 1.2;
}

.ri-score-ring-card__footer {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  font-size: 0.78rem;
  color: #94a3b8;
}

/* KPI grid */
.ri-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
}

@media (max-width: 1199px) {
  .ri-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 575px) {
  .ri-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

.ri-kpi-card {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 0.85rem;
  padding: 1rem;
  transition: transform 0.2s, border-color 0.2s;
}

.ri-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.35);
}

.ri-kpi-card__head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.ri-kpi-card__value {
  font-size: 1.65rem;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.1;
}

.ri-kpi-card__sub {
  font-size: 0.7rem;
  color: #64748b;
  margin: 0.15rem 0 0.5rem;
}

.ri-kpi-card--green .ri-kpi-card__value { color: #4ade80; }
.ri-kpi-card--blue .ri-kpi-card__value { color: #38bdf8; }
.ri-kpi-card--purple .ri-kpi-card__value { color: #a78bfa; }
.ri-kpi-card--teal .ri-kpi-card__value { color: #2dd4bf; }
.ri-kpi-card--amber .ri-kpi-card__value { color: #fbbf24; }

/* Progress bars */
.ri-progress {
  height: 6px;
  background: rgba(30, 41, 59, 0.9);
  border-radius: 999px;
  overflow: hidden;
}

.ri-progress--sm { height: 4px; margin-top: 0.35rem; }
.ri-progress--md { height: 8px; }
.ri-progress--lg { height: 10px; }

.ri-progress__bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #0891b2, #22d3ee);
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.ri-progress__bar--green { background: linear-gradient(90deg, #16a34a, #4ade80); }
.ri-progress__bar--blue { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.ri-progress__bar--purple { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.ri-progress__bar--teal { background: linear-gradient(90deg, #0d9488, #2dd4bf); }
.ri-progress__bar--amber { background: linear-gradient(90deg, #d97706, #fbbf24); }
.ri-progress__bar--red { background: linear-gradient(90deg, #dc2626, #f87171); }

/* Chart cards */
.ri-chart-card {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 1rem;
  padding: 1.25rem 1.35rem;
}

.ri-chart-card__hint {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 1rem;
}

.ri-chart-canvas-wrap {
  position: relative;
  height: 260px;
}

.ri-chart-canvas-wrap--doughnut { height: 220px; }
.ri-chart-canvas-wrap--bar { height: 240px; }

.ri-risk-legend {
  list-style: none;
  padding: 0;
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  color: #94a3b8;
}

.ri-risk-legend .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.35rem;
}

.dot--sec { background: #f87171; }
.dot--lic { background: #fbbf24; }
.dot--comp { background: #60a5fa; }

/* Gap bars section */
.ri-gap-row {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.ri-gap-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ri-gap-row__label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.5rem;
}

.ri-gap-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: #94a3b8;
}

/* Section nav */
.ri-report-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.35rem;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 999px;
  border: 1px solid rgba(51, 65, 85, 0.6);
  width: fit-content;
  max-width: 100%;
}

.ri-report-nav__link {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  color: #94a3b8;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.ri-report-nav__link:hover {
  color: #e2e8f0;
  background: rgba(51, 65, 85, 0.5);
}

.ri-report-nav__link.active {
  background: rgba(34, 211, 238, 0.15);
  color: #22d3ee;
}

.ri-card--glass {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
}

.ri-card--cta {
  background: linear-gradient(120deg, rgba(15, 23, 42, 0.95), rgba(30, 58, 138, 0.25));
  border-color: rgba(251, 191, 36, 0.25);
}

.ri-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  margin-right: 0.5rem;
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: 0.35rem;
  background: rgba(34, 211, 238, 0.12);
  color: #22d3ee;
  vertical-align: middle;
}

.ri-mini-stats {
  display: grid;
  gap: 0.65rem;
}

.ri-mini-stats > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  padding: 0.5rem 0.65rem;
  background: rgba(2, 6, 23, 0.4);
  border-radius: 0.45rem;
}

.ri-mini-stats .label {
  color: #64748b;
}

.ri-tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (max-width: 575px) {
  .ri-tech-grid { grid-template-columns: 1fr; }
}

.ri-tech-pill {
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: 0.65rem;
  padding: 0.75rem;
  font-size: 0.82rem;
}

.ri-tech-pill i {
  color: #22d3ee;
  margin-right: 0.35rem;
}

.ri-tech-pill span {
  color: #64748b;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ri-tech-pill strong {
  display: block;
  margin: 0.2rem 0;
  color: #f1f5f9;
}

.ri-risk-panel {
  background: rgba(2, 6, 23, 0.45);
  border-radius: 0.75rem;
  padding: 1rem;
  height: 100%;
  border: 1px solid rgba(51, 65, 85, 0.5);
}

.ri-risk-panel--red { border-color: rgba(248, 113, 113, 0.25); }
.ri-risk-panel--amber { border-color: rgba(251, 191, 36, 0.25); }
.ri-risk-panel--blue { border-color: rgba(96, 165, 250, 0.25); }

.ri-risk-panel__head {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-bottom: 0.65rem;
}

.ri-risk-panel__head i {
  font-size: 1.25rem;
}

.ri-risk-panel--red .ri-risk-panel__head i { color: #f87171; }
.ri-risk-panel--amber .ri-risk-panel__head i { color: #fbbf24; }
.ri-risk-panel--blue .ri-risk-panel__head i { color: #60a5fa; }

.ri-check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ri-check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: #cbd5e1;
}

.ri-check-list i {
  color: #4ade80;
  margin-top: 0.15rem;
}

.ri-tag-cloud {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ri-tag-cloud li {
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(6, 182, 212, 0.06);
  color: #94a3b8;
}

.ri-question-list {
  padding-left: 1.2rem;
  color: #94a3b8;
}

.ri-question-list li {
  margin-bottom: 0.5rem;
}

.ri-report-footer {
  text-align: center;
  padding-bottom: 1rem;
}

/* Repo Project Intake v1 */
.ri-intake-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.ri-intake-nav__link {
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #94a3b8;
  text-decoration: none;
}
.ri-intake-nav__link--complete { border-color: rgba(34, 197, 94, 0.45); color: #86efac; }
.ri-intake-nav__link--partial { border-color: rgba(251, 191, 36, 0.45); color: #fcd34d; }
.ri-intake-proposed { color: #7dd3fc; }
.ri-intake-check { cursor: pointer; color: #cbd5e1; font-size: 0.88rem; }
.ri-intake-save-status--ok { color: #86efac; }
.ri-intake-save-status--error { color: #fca5a5; }
.ri-intake-save-status--pending { color: #fcd34d; }
.ri-intake-banner--info {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: #bae6fd;
  font-size: 0.88rem;
}
.ri-badge--warn { background: rgba(251, 191, 36, 0.15); color: #fcd34d; }
.ri-badge--ok { background: rgba(34, 197, 94, 0.15); color: #86efac; }
.ri-intake-section--complete { border-left: 3px solid rgba(34, 197, 94, 0.5); }
.ri-intake-section--partial { border-left: 3px solid rgba(251, 191, 36, 0.5); }
.ri-intake-section--missing { border-left: 3px solid rgba(148, 163, 184, 0.35); }
.ri-intake-proceed {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(30, 58, 138, 0.35) 100%);
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
}
.ri-intake-proceed__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.ri-intake-proceed__copy { flex: 1 1 220px; min-width: 0; }
.ri-intake-mvp-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  color: rgba(226, 232, 240, 0.92);
}
.ri-intake-pill-group .ri-intake-pill {
  border-radius: 999px;
  min-width: 4.5rem;
  font-weight: 500;
}
.ri-intake-pill-group .ri-intake-pill.active {
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.35);
}
.ri-intake-quick-field .ri-badge--ok {
  font-size: 0.7rem;
}
.ri-intake-future-phases summary { cursor: pointer; }
.ri-intake-optional__summary {
  cursor: pointer;
  list-style: none;
  padding: 0.85rem 1rem;
}
.ri-intake-optional__summary::-webkit-details-marker { display: none; }

/* Decision Workspace Fase 3 */
.ri-ws-nav {
  z-index: 1020;
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
  margin-left: -0.75rem;
  margin-right: -0.75rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
.ri-ws-nav__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem 0;
}
.ri-ws-nav__link {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: #94a3b8;
  text-decoration: none;
}
.ri-ws-nav__link:hover { color: #e2e8f0; border-color: rgba(34, 211, 238, 0.4); }
.ri-ws-details__summary {
  cursor: pointer;
  list-style: none;
  padding: 0.85rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}
.ri-ws-details__summary::-webkit-details-marker { display: none; }
.ri-ws-details__body { padding: 0 0.15rem 0.25rem; }
.ri-ws-details:not([open]) .ri-ws-details__summary {
  border-color: rgba(148, 163, 184, 0.25);
}
.ri-ws-details[open] .ri-ws-details__summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-bottom: 0;
}
.ri-badge--xs { font-size: 0.65rem; padding: 0.15rem 0.45rem; }
.ri-badge--status-declared { background: rgba(96, 165, 250, 0.15); color: #93c5fd; }
.ri-badge--status-detected { background: rgba(34, 211, 238, 0.12); color: #22d3ee; }
.ri-badge--status-verified { background: rgba(34, 197, 94, 0.15); color: #86efac; }
.ri-badge--status-inferred { background: rgba(167, 139, 250, 0.15); color: #c4b5fd; }
.ri-badge--status-unknown { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; }
.ri-badge--status-contradicted { background: rgba(248, 113, 113, 0.15); color: #fca5a5; }
.ri-badge--outcome-coherent { background: rgba(34, 197, 94, 0.12); color: #86efac; }
.ri-badge--outcome-contradiction { background: rgba(248, 113, 113, 0.12); color: #fca5a5; }
.ri-badge--outcome-partially_coherent { background: rgba(251, 191, 36, 0.12); color: #fcd34d; }
.ri-ws-table th { font-size: 0.72rem; text-transform: uppercase; color: #64748b; }
.ri-ws-comparison-detail td { border-top: none !important; padding-top: 0 !important; }
.ri-ws-path-card {
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: 0.75rem;
  padding: 1rem;
}
.ri-ws-path-order { color: #cbd5e1; }
.ri-kpi-card__value--muted { font-size: 0.95rem; font-weight: 600; color: #94a3b8; }
.ri-ws-comp-item {
  background: rgba(2, 6, 23, 0.35);
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
  height: 100%;
}
.ri-ws-dyn-q textarea { min-height: 2.5rem; }

/* —— Report pagina GitHub-style (sequenziale) —— */
.ri-report-page--gh {
  --gh-bg: #f6f8fa;
  --gh-canvas: #ffffff;
  --gh-border: #d0d7de;
  --gh-text: #24292f;
  --gh-muted: #57606a;
  --gh-link: #0969da;
  --gh-success: #1a7f37;
  --gh-success-bg: #dafbe1;
  --gh-warn: #9a6700;
  --gh-warn-bg: #fff8c5;
  background: var(--gh-bg);
  color: var(--gh-text);
  min-height: 100vh;
  margin: -1rem -0.75rem 0;
  padding: 1.5rem 0 3rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.ri-gh-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1rem;
}

.ri-gh-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--gh-link);
  text-decoration: none;
  margin-bottom: 1rem;
}
.ri-gh-back:hover { text-decoration: underline; }

.ri-gh-header {
  background: var(--gh-canvas);
  border: 1px solid var(--gh-border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.ri-gh-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gh-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.ri-gh-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--gh-text);
}

.ri-gh-sub, .ri-gh-lead, .ri-gh-identity {
  font-size: 0.875rem;
  color: var(--gh-muted);
  margin-bottom: 0.5rem;
}

.ri-gh-header__main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.ri-gh-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 2em;
  border: 1px solid var(--gh-border);
  white-space: nowrap;
}
.ri-gh-status--ok { background: var(--gh-success-bg); color: var(--gh-success); border-color: #4ac26b; }
.ri-gh-status--warn { background: var(--gh-warn-bg); color: var(--gh-warn); border-color: #d4a72c; }
.ri-gh-status--success { background: var(--gh-success-bg); color: var(--gh-success); }

.ri-gh-panel {
  background: var(--gh-canvas);
  border: 1px solid var(--gh-border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.ri-gh-panel__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.ri-gh-panel__note {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--gh-muted);
}

.ri-gh-panel__lead {
  font-size: 0.875rem;
  color: var(--gh-muted);
  margin: 0 0 1rem;
}

.ri-gh-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.ri-gh-panel--warn {
  border-color: #d4a72c;
  background: #fffbeb;
}

.ri-gh-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.ri-gh-stat {
  border: 1px solid var(--gh-border);
  border-radius: 6px;
  padding: 0.75rem;
  background: var(--gh-bg);
}

.ri-gh-stat__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gh-muted);
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-bottom: 0.35rem;
}

.ri-gh-stat__value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gh-text);
  line-height: 1.1;
}

.ri-gh-stat__bar {
  height: 4px;
  background: #eaeef2;
  border-radius: 2px;
  margin-top: 0.5rem;
  overflow: hidden;
}
.ri-gh-stat__bar span {
  display: block;
  height: 100%;
  background: var(--gh-link);
  border-radius: 2px;
}

.ri-gh-steps {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ri-gh-step {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--gh-border);
  position: relative;
}
.ri-gh-step:last-child { border-bottom: none; }

.ri-gh-step__num {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 50%;
  background: #eaeef2;
  color: var(--gh-text);
}
.ri-gh-step--current .ri-gh-step__num { background: var(--gh-link); color: #fff; }
.ri-gh-step--done .ri-gh-step__num { background: var(--gh-success); color: #fff; }

.ri-gh-step__title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.ri-gh-step__hint {
  font-size: 0.8125rem;
  color: var(--gh-muted);
  margin: 0;
}

.ri-gh-step__jump {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gh-link);
  text-decoration: none;
}
.ri-gh-step__jump:hover { text-decoration: underline; }

.ri-gh-step__badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gh-muted);
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--gh-border);
  border-radius: 2em;
  flex-shrink: 0;
}
.ri-gh-step__badge--done { color: var(--gh-success); border-color: #4ac26b; background: var(--gh-success-bg); }
.ri-gh-step__badge--block { color: var(--gh-warn); }

.ri-gh-step-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50%;
  background: var(--gh-link);
  color: #fff;
}
.ri-gh-step-pill--muted { background: #8c959f; }

.ri-gh-chip {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 2em;
  border: 1px solid var(--gh-border);
  color: var(--gh-muted);
}
.ri-gh-chip--ok { color: var(--gh-success); background: var(--gh-success-bg); border-color: #4ac26b; }
.ri-gh-chip--warn { color: var(--gh-warn); background: var(--gh-warn-bg); border-color: #d4a72c; }

.ri-gh-flag-box {
  border: 1px solid var(--gh-border);
  border-radius: 6px;
  padding: 1rem;
  background: var(--gh-bg);
}

.ri-gh-flag-check {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  cursor: pointer;
  font-size: 0.875rem;
  margin: 0;
}
.ri-gh-flag-check input { margin-top: 0.2rem; flex-shrink: 0; width: 1rem; height: 1rem; }

.ri-gh-panel-inner {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--gh-border);
}

.ri-gh-question {
  padding: 0.85rem 0;
  border-bottom: 1px solid #eaeef2;
}
.ri-gh-question:last-child { border-bottom: none; }

.ri-gh-question__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.ri-gh-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ri-gh-pill {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: 2em;
  border: 1px solid var(--gh-border);
  background: var(--gh-canvas);
  color: var(--gh-text);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.ri-gh-pill:hover { border-color: var(--gh-link); color: var(--gh-link); }
.ri-gh-pill--on, .ri-gh-pill.active {
  background: var(--gh-link);
  border-color: var(--gh-link);
  color: #fff;
}

.ri-gh-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 1.25rem;
  border: 2px solid #4ac26b;
  border-radius: 6px;
  background: var(--gh-success-bg);
}

.ri-gh-cta__copy {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.ri-gh-btn {
  font-weight: 600;
  border-radius: 6px;
  background: var(--gh-success) !important;
  border-color: rgba(27, 31, 36, 0.15) !important;
  color: #fff !important;
}
.ri-gh-btn:hover { background: #116329 !important; }

.ri-gh-alert {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  border: 1px solid var(--gh-border);
  background: #ddf4ff;
}

.ri-gh-details summary {
  cursor: pointer;
  color: var(--gh-link);
  font-size: 0.8125rem;
}
.ri-gh-details-panel {
  margin-bottom: 1rem;
}
.ri-gh-details-panel > summary {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gh-link);
  cursor: pointer;
  padding: 0.75rem 0;
}
.ri-gh-details-panel__body {
  background: var(--gh-canvas);
  border: 1px solid var(--gh-border);
  border-radius: 6px;
  padding: 1.25rem;
}

.ri-gh-mini-chart {
  border: 1px solid var(--gh-border);
  border-radius: 6px;
  padding: 0.75rem;
  background: var(--gh-bg);
}

.ri-gh-gap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eaeef2;
  font-size: 0.8125rem;
}

.ri-gh-risk-list {
  padding-left: 1.25rem;
  font-size: 0.875rem;
}
.ri-gh-risk-list li { margin-bottom: 0.5rem; }

.ri-gh-footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--gh-muted);
  margin-top: 1.5rem;
}

/* Icona ⓘ report GitHub */
.ri-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gh-muted);
  cursor: help;
  position: relative;
  font-size: 0.85rem;
  vertical-align: middle;
}
.ri-info:focus { outline: 2px solid var(--gh-link); border-radius: 50%; }

.ri-info__tip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 1080;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  min-width: 200px;
  max-width: 280px;
  padding: 0.5rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.45;
  color: #f6f8fa;
  background: #24292f;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(140, 149, 159, 0.2);
  pointer-events: none;
  transition: opacity 0.15s;
  text-align: left;
  white-space: normal;
}
.ri-info__tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #24292f;
}
.ri-info:hover .ri-info__tip,
.ri-info:focus .ri-info__tip {
  visibility: visible;
  opacity: 1;
}

.ri-intake-wrap--gh .ri-intake-save-status--ok { color: var(--gh-success); }
.ri-intake-wrap--gh .ri-intake-save-status--error { color: #cf222e; }
.ri-intake-wrap--gh .ri-intake-save-status--pending { color: var(--gh-muted); }

.ri-gh-panel--optional {
  border-color: #54aeff;
  background: #ffffff;
}

.ri-gh-panel--action {
  margin-top: 0;
}

/* Overlay Procedi → Sirius Lab */
body.ri-gh-overlay-open {
  overflow: hidden;
}

.ri-gh-overlay {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(27, 31, 36, 0.45);
  backdrop-filter: blur(2px);
}

.ri-gh-overlay[hidden] {
  display: none !important;
}

.ri-gh-overlay__card {
  min-width: 280px;
  max-width: 360px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  background: #ffffff;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(27, 31, 36, 0.18);
}

.ri-gh-overlay__spinner {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 1rem;
  border: 3px solid #eaeef2;
  border-top-color: #0969da;
  border-radius: 50%;
  animation: ri-gh-spin 0.8s linear infinite;
}

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

.ri-gh-overlay__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  color: #24292f;
}

.ri-gh-overlay__hint {
  margin: 0;
  font-size: 0.8125rem;
  color: #57606a;
}

.ri-gh-gap-list {
  border: 1px solid var(--gh-border);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  background: var(--gh-bg);
}

.ri-gh-alert--warn {
  background: #fff8c5;
  border-color: #d4a72c;
  color: #9a6700;
}

.ri-gh-alert--info {
  background: #ddf4ff;
  border-color: #54aeff;
  color: #0969da;
}

.ri-gh-stat__value--sm {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
}

/* Repo workspace — stile GitHub (italiano) */
.rpw-page--gh .rpw-gh-topnav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.rpw-page--gh .pr-back-strip {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

.rpw-page--gh .pr-back-strip__link {
  font-size: 0.875rem;
  color: var(--gh-link);
  text-decoration: none;
}

.rpw-page--gh .pr-back-strip__link:hover {
  text-decoration: underline;
}

.rpw-page--gh .rpw-gh-stats {
  margin-top: 1rem;
}

.rpw-page--gh .rpw-gh-gap-box {
  border: 1px solid var(--gh-border);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  background: var(--gh-bg);
  height: 100%;
}

.rpw-page--gh .rpw-gh-gap-box h3 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gh-text);
}

.rpw-intake-assist {
  padding: 0.85rem 1rem;
  border: 1px solid #d0d7de;
  border-radius: 12px;
  background: #f6f8fa;
}
.rpw-intake-assist__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.rpw-intake-assist__copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.rpw-intake-assist__label {
  font-size: 0.9rem;
  font-weight: 650;
  color: #1f2328;
}
.rpw-intake-assist__meta {
  font-size: 0.8rem;
  color: #656d76;
}
.rpw-intake-assist-btn.is-loading {
  pointer-events: none;
  opacity: 0.85;
}
.rpw-intake-assist-status {
  color: #0969da;
}
.rpw-intake-answer--loading {
  opacity: 0.7;
}
.rpw-page--gh .rpw-gh-field textarea {
  border-color: var(--gh-border);
  border-radius: 6px;
  font-size: 0.875rem;
}

.rpw-page--gh .rpw-gh-field textarea:focus {
  border-color: var(--gh-link);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15);
}

.rpw-page--gh .rpw-gh-status {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid var(--gh-border);
  background: var(--gh-bg);
}

.rpw-page--gh .rpw-gh-status > i {
  font-size: 1.35rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.rpw-page--gh .rpw-gh-status p {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--gh-muted);
}

.rpw-page--gh .rpw-gh-status--pending { border-color: #54aeff; background: #ddf4ff; }
.rpw-page--gh .rpw-gh-status--pending > i { color: #0969da; }
.rpw-page--gh .rpw-gh-status--ready { border-color: #4ac26b; background: var(--gh-success-bg); }
.rpw-page--gh .rpw-gh-status--ready > i { color: var(--gh-success); }
.rpw-page--gh .rpw-gh-status--review { border-color: #d4a72c; background: #fff8c5; }
.rpw-page--gh .rpw-gh-status--review > i { color: #9a6700; }
.rpw-page--gh .rpw-gh-status--ok { border-color: #4ac26b; background: var(--gh-success-bg); }
.rpw-page--gh .rpw-gh-status--ok > i { color: var(--gh-success); }
.rpw-page--gh .rpw-gh-status--warn { border-color: #d4a72c; background: #fff8c5; }
.rpw-page--gh .rpw-gh-status--warn > i { color: #9a6700; }
.rpw-page--gh .rpw-gh-status--muted { border-color: var(--gh-border); background: #f6f8fa; }
.rpw-page--gh .rpw-gh-status--muted > i { color: var(--gh-muted); }

.rpw-page--gh .rpw-gh-checklist {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
}

.rpw-page--gh .rpw-gh-checklist li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
  color: var(--gh-muted);
}

.rpw-page--gh .rpw-gh-checklist li.is-done {
  color: var(--gh-success);
}

.rpw-page--gh .rpw-gh-demo-cta {
  margin-bottom: 1rem;
}

.rpw-page--gh .ri-gh-panel--mvp {
  scroll-margin-top: 1rem;
}

.rpw-page--gh #rpw-gaps,
.rpw-page--gh #repo-intake,
.rpw-page--gh #rpw-summary {
  scroll-margin-top: 1rem;
}

