.fi-shell {
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 18px;
  padding: 18px;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 20rem),
    linear-gradient(180deg, rgba(239, 246, 255, 0.94), rgba(255, 255, 255, 0.99));
}

.fi-panel,
.fi-card {
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 16px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.fi-grid,
.fi-results-grid,
.fi-adjacent-grid {
  display: grid;
  gap: 16px;
}

.fi-grid {
  grid-template-columns: 1.1fr 1.2fr;
}

.fi-results-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.fi-adjacent-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.fi-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
}

.fi-field select,
.fi-field textarea {
  width: 100%;
}

.fi-field textarea {
  min-height: 120px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.fi-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.fi-banner {
  margin-top: 12px;
  border-radius: 12px;
  padding: 12px 14px;
}

.fi-banner--ok {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.fi-banner--warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.fi-banner--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.fi-metric {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 14px;
  background: rgba(248, 250, 252, 0.95);
}

.fi-metric-label {
  font-size: 0.86rem;
  color: #475569;
}

.fi-metric-value {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.fi-bit-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.fi-bit-chip {
  display: inline-flex;
  min-width: 30px;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 8px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
}

.fi-bit-chip.is-sign {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.fi-bit-chip.is-exponent {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.fi-bit-chip.is-mantissa {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.fi-detail-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.fi-detail-row {
  display: grid;
  gap: 8px;
  grid-template-columns: 150px minmax(0, 1fr);
}

.fi-detail-row code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.fi-adjacent-card {
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 16px;
  background: rgba(248, 250, 252, 0.92);
}

.fi-adjacent-card h3 {
  margin: 0 0 8px;
}

@media (max-width: 900px) {
  .fi-grid {
    grid-template-columns: 1fr;
  }

  .fi-detail-row {
    grid-template-columns: 1fr;
  }
}
