/* ==========================================================================
   THE WISE GUY · Giroscopio 3D Anti-Bugia — Foglio di Stile Sito (IT/EN)
   1:1 Dark/Light Parity · Individual Transform Identity · Mobile 0-Overflow
   ========================================================================== */

.fucina-host {
  position: relative;
  z-index: 6;
  background: var(--bg-alt);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.gyro-section {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 780px;
}

.gyro-wrap {
  max-width: var(--twg-container-max, 1360px);
  margin: 0 auto;
  padding: 26px var(--twg-gutter, 24px) 30px;
}

.gyro-num { font-variant-numeric: tabular-nums; }

.gyro-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.gyro-title-block { min-width: 0; flex: 1 1 540px; }

.gyro-kicker-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 6px;
}

.gyro-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.7);
}

.gyro-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.gyro-leds { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.gyro-led {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-subtle);
  color: var(--fg-secondary);
}

.gyro-led-dot { width: 6px; height: 6px; border-radius: 999px; display: inline-block; }
.gyro-led-em { background: #10b981; }
.gyro-led-cy { background: #38bdf8; }
.gyro-led-vi { background: #a855f7; }

.gyro-h2 {
  margin: 0;
  font-size: clamp(18px, 2.05vw, 24px);
  line-height: 1.24;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fg-primary);
}

.gyro-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.gyro-btn {
  appearance: none;
  cursor: pointer;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border-medium);
  background: var(--bg-card-solid);
  color: var(--fg-primary);
  translate: 0px;
  scale: 1;
  transition: border-color 0.18s ease, background-color 0.18s ease, scale 0.18s ease;
}

.gyro-btn:hover { border-color: var(--accent-cyan); scale: 1.02; }

.gyro-btn:focus-visible,
.gyro-engine-pill:focus-visible,
.gyro-flow-card:focus-visible,
.gyro-link-btn:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

.gyro-btn-em {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
html[data-theme="light"] .gyro-btn-em { color: #047857; }

.gyro-engines-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.gyro-core-tag { font-size: 11.5px; font-weight: 700; color: var(--fg-muted); margin-right: 2px; }

.gyro-engine-pill {
  appearance: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card-solid);
  color: var(--fg-primary);
  translate: 0px;
  scale: 1;
  transition: border-color 0.18s ease, scale 0.18s ease;
}

.gyro-engine-pill:hover,
.gyro-engine-pill.is-selected { border-color: var(--accent-cyan); scale: 1.02; }

.gyro-engine-name { font-weight: 800; letter-spacing: 0.04em; }
.gyro-engine-tok { font-size: 11px; color: var(--fg-muted); }
.gyro-ha-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--fg-muted); }
.gyro-ha-dot.is-on { background: #10b981; }
.gyro-logo-svg { flex: 0 0 auto; display: inline-block; vertical-align: middle; }

.gyro-stage {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: radial-gradient(circle at 38% 50%, rgba(15, 23, 42, 0.96), #050811 76%);
}
html[data-theme="light"] .gyro-stage {
  background: radial-gradient(circle at 38% 50%, #ffffff, #f1f5f9 78%);
}

.gyro-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1100 / 610;
  cursor: grab;
  touch-action: pan-y;
}
.gyro-canvas:active { cursor: grabbing; }

.gyro-stage-hint {
  padding: 6px 14px 8px;
  font-size: 11px;
  color: var(--fg-muted);
  text-align: center;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-card-solid);
}

.gyro-inspector-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.gyro-flows-panel,
.gyro-detail-panel {
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-subtle);
  min-width: 0;
}

.gyro-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #10b981;
}
html[data-theme="light"] .gyro-panel-head { color: #047857; }

.gyro-link-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.gyro-flows-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.gyro-flow-card {
  appearance: none;
  cursor: pointer;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--fg-primary);
  min-width: 0;
  translate: 0px;
  scale: 1;
  transition: border-color 0.18s ease, background-color 0.18s ease, translate 0.18s ease;
}

.gyro-flow-card:hover { border-color: var(--border-medium); translate: 0px -1px; }
.gyro-flow-card.is-active { border-color: #10b981; background: rgba(16, 185, 129, 0.09); }

@supports not (translate: 0px) {
  .gyro-btn:hover,
  .gyro-engine-pill:hover,
  .gyro-engine-pill.is-selected { transform: scale(1.02); }
  .gyro-flow-card:hover { transform: translate(0px, -1px); }
}

.gyro-flow-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11.5px;
  margin-bottom: 3px;
}

.gyro-flow-route {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gyro-arrow { color: var(--fg-muted); }
.gyro-dest { color: #10b981; font-weight: 700; }
html[data-theme="light"] .gyro-dest { color: #047857; }

.gyro-badge { flex: 0 0 auto; font-size: 9.5px; font-weight: 800; padding: 1px 6px; border-radius: 6px; }
.gyro-badge.is-live { background: rgba(56, 189, 248, 0.16); color: #38bdf8; }
html[data-theme="light"] .gyro-badge.is-live { color: #0369a1; }
.gyro-badge.is-ok { background: rgba(16, 185, 129, 0.16); color: #10b981; }
html[data-theme="light"] .gyro-badge.is-ok { color: #065f46; }
.gyro-badge.is-rifare { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }
html[data-theme="light"] .gyro-badge.is-rifare { color: #b91c1c; }

.gyro-flow-sub {
  font-size: 11px;
  color: var(--fg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gyro-detail-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-color: rgba(16, 185, 129, 0.35);
}

.gyro-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12.5px;
}

.gyro-detail-route,
.gyro-detail-title { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gyro-detail-avatar { width: 24px; height: 24px; border-radius: 999px; object-fit: cover; }
.gyro-detail-meta { font-size: 10.5px; font-weight: 700; color: var(--fg-muted); }
.gyro-detail-body { margin: 0 0 10px; font-size: 12.5px; line-height: 1.5; color: var(--fg-secondary); }

.gyro-detail-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-muted);
}

@media (max-width: 960px) {
  .gyro-inspector-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .gyro-wrap { padding: 18px 14px 22px; }
  .gyro-flows-list { grid-template-columns: 1fr; }
  .gyro-btn { padding: 6px 10px; font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .gyro-btn,
  .gyro-engine-pill,
  .gyro-flow-card { transition: border-color 0.15s ease, background-color 0.15s ease; }
  .gyro-btn:hover,
  .gyro-engine-pill:hover { scale: 1; }
  .gyro-flow-card:hover { translate: 0px; }
}

/* 15/11/2026: testo per il cliente sotto il titolo e nota sull'Oracolo (scheda audit-sito-1511 F) */
.gyro-lead { margin: 10px 0 0; max-width: 70ch; font-size: 15px; line-height: 1.6; color: var(--fg-secondary, #CBD5E1); }
.gyro-core-note { font-size: 12.5px; font-weight: 600; color: var(--fg-muted, #94A3B8); margin-left: 4px; }
